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

◆ WriteAsync() [2/3]

override Task System.IO.FileStream.WriteAsync ( 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 325 of file FileStream.cs.

326 {
327 Stream.ValidateBufferArguments(buffer, offset, count);
328 if (cancellationToken.IsCancellationRequested)
329 {
331 }
332 if (!_strategy.CanWrite)
333 {
335 {
336 ThrowHelper.ThrowObjectDisposedException_FileClosed();
337 }
338 ThrowHelper.ThrowNotSupportedException_UnwritableStream();
339 }
341 }
readonly FileStreamStrategy _strategy
Definition FileStream.cs:12
Task WriteAsync(byte[] buffer, int offset, int count)
Definition Stream.cs:914
static Task FromCanceled(CancellationToken cancellationToken)
Definition Task.cs:3363

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

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