/// <summary> /// Extends BeginWrite so that when a state object is not needed, null does not need to be passed. /// <example> /// stream.BeginWrite(buffer, offset, count, callback); /// </example> /// </summary> public static IAsyncResult BeginWrite(this CryptoStream stream, Byte[] buffer, Int32 offset, Int32 count, AsyncCallback callback) { if (stream == null) { throw new ArgumentNullException("stream"); } return(stream.BeginWrite(buffer, offset, count, callback, null)); }
/// <summary> /// Extends BeginWrite so that buffer offset of 0 and call to Array.Length are not needed. /// <example> /// stream.BeginWrite(buffer, callback); /// </example> /// </summary> public static IAsyncResult BeginWrite(this CryptoStream stream, Byte[] buffer, AsyncCallback callback) { if (stream == null) { throw new ArgumentNullException("stream"); } if (buffer == null) { throw new ArgumentNullException("buffer"); } return(stream.BeginWrite(buffer, 0, buffer.Length, callback)); }
public IAsyncResult BeginWrite(byte[] buffer, int offset, int count, AsyncCallback callback, object state) { return(_encryptStream.BeginWrite(buffer, offset, count, callback, state)); }