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

◆ ReadAsync() [3/3]

override ValueTask< int > System.IO.FileStream.ReadAsync ( Memory< byte > buffer,
CancellationToken cancellationToken = default(CancellationToken) )
inlinevirtualinherited

Reimplemented from System.IO.Stream.

Reimplemented in System.IO.IsolatedStorage.IsolatedStorageFileStream.

Definition at line 297 of file FileStream.cs.

298 {
299 if (cancellationToken.IsCancellationRequested)
300 {
302 }
303 if (!_strategy.CanRead)
304 {
306 {
307 ThrowHelper.ThrowObjectDisposedException_FileClosed();
308 }
309 ThrowHelper.ThrowNotSupportedException_UnreadableStream();
310 }
312 }
readonly FileStreamStrategy _strategy
Definition FileStream.cs:12
Task< int > ReadAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:762
static ValueTask FromCanceled(CancellationToken cancellationToken)
Definition ValueTask.cs:180

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