StreamExtensionsWriteAsync Method (Stream, Byte, Int32, Int32) |
Namespace: Rackspace.Threading
public static Task WriteAsync( this Stream stream, byte[] buffer, int offset, int count )
Exception | Condition |
---|---|
ArgumentNullException |
If stream is . -or- If buffer is . |
ArgumentOutOfRangeException |
If offset is negative. -or- If count is negative. |
ArgumentException |
If the sum of offset and count is larger than the buffer length. |
NotSupportedException |
If stream does not support writing. |
ObjectDisposedException |
If stream has been disposed. |
InvalidOperationException |
If stream is currently in use by a previous write operation. |
Use the CanWrite property to determine whether the stream instance supports writing.