StreamExtensionsReadAsync Method (Stream, Byte, Int32, Int32) |
Namespace: Rackspace.Threading
public static Task<int> ReadAsync( 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 reading. |
ObjectDisposedException |
If stream has been disposed. |
InvalidOperationException |
If stream is currently in use by a previous read operation. |
Use the CanRead property to determine whether the stream instance supports reading.