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

◆ ReadAsync() [2/3]

override Task< int > System.IO.FileStream.ReadAsync ( byte[] buffer,
int offset,
int count,
CancellationToken cancellationToken )
inlinevirtual

Reimplemented from System.IO.Stream.

Reimplemented in System.IO.IsolatedStorage.IsolatedStorageFileStream, and System.Net.WebFileStream.

Definition at line 279 of file FileStream.cs.

280 {
281 Stream.ValidateBufferArguments(buffer, offset, count);
282 if (cancellationToken.IsCancellationRequested)
283 {
285 }
286 if (!_strategy.CanRead)
287 {
289 {
290 ThrowHelper.ThrowObjectDisposedException_FileClosed();
291 }
292 ThrowHelper.ThrowNotSupportedException_UnreadableStream();
293 }
295 }
readonly FileStreamStrategy _strategy
Definition FileStream.cs:12
Task< int > ReadAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:762
static Task FromCanceled(CancellationToken cancellationToken)
Definition Task.cs:3363

References System.IO.FileStream._strategy, System.buffer, System.cancellationToken, System.IO.Stream.CanRead, System.count, System.Threading.Tasks.Task< TResult >.FromCanceled(), System.IO.Strategies.FileStreamStrategy.IsClosed, System.offset, System.IO.Stream.ReadAsync(), System.ThrowHelper.ThrowNotSupportedException_UnreadableStream(), System.ThrowHelper.ThrowObjectDisposedException_FileClosed(), and System.IO.Stream.ValidateBufferArguments().

Referenced by System.IO.IsolatedStorage.IsolatedStorageFileStream.ReadAsync(), and System.IO.IsolatedStorage.IsolatedStorageFileStream.ReadAsync().