Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadAsyncPrivate()

async ValueTask< int > System.Net.Http.MultipartContent.ContentReadStream.ReadAsyncPrivate ( Memory< byte > buffer,
CancellationToken cancellationToken )
inline

Definition at line 178 of file MultipartContent.cs.

179 {
180 if (buffer.Length == 0)
181 {
182 return 0;
183 }
184 while (true)
185 {
186 if (_current != null)
187 {
189 if (num != 0)
190 {
191 _position += num;
192 return num;
193 }
194 _current = null;
195 }
196 if (_next >= _streams.Length)
197 {
198 break;
199 }
201 }
202 return 0;
203 }
Task< int > ReadAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:762
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.Net.Http.MultipartContent.ContentReadStream._current, System.Net.Http.MultipartContent.ContentReadStream._next, System.Net.Http.MultipartContent.ContentReadStream._position, System.Net.Http.MultipartContent.ContentReadStream._streams, System.buffer, System.cancellationToken, System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.IO.Stream.Length, and System.IO.Stream.ReadAsync().

Referenced by System.Net.Http.MultipartContent.ContentReadStream.ReadAsync(), and System.Net.Http.MultipartContent.ContentReadStream.ReadAsync().