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

◆ WriteAsync() [3/3]

override ValueTask System.IO.FileStream.WriteAsync ( ReadOnlyMemory< byte > buffer,
CancellationToken cancellationToken = default(CancellationToken) )
inlinevirtualinherited

Reimplemented from System.IO.Stream.

Reimplemented in System.IO.IsolatedStorage.IsolatedStorageFileStream.

Definition at line 343 of file FileStream.cs.

344 {
345 if (cancellationToken.IsCancellationRequested)
346 {
348 }
349 if (!_strategy.CanWrite)
350 {
352 {
353 ThrowHelper.ThrowObjectDisposedException_FileClosed();
354 }
355 ThrowHelper.ThrowNotSupportedException_UnwritableStream();
356 }
358 }
readonly FileStreamStrategy _strategy
Definition FileStream.cs:12
Task WriteAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:914
static ValueTask FromCanceled(CancellationToken cancellationToken)
Definition ValueTask.cs:180

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