Table of Contents

Method EndWrite

Namespace
MongoDB.Driver.GridFS
Assembly
MongoDB.Driver.dll

EndWrite(IAsyncResult)

Ends an asynchronous write operation. (Consider using WriteAsync(byte[], int, int) instead.)

public override void EndWrite(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

A reference to the outstanding asynchronous I/O request.

Exceptions

ArgumentNullException

asyncResult is null.

ArgumentException

A handle to the pending write operation is not available.
-or-
The pending operation does not support writing.

InvalidOperationException

asyncResult did not originate from a BeginWrite(byte[], int, int, AsyncCallback, object) method on the current stream.

IOException

The stream is closed or an internal error has occurred.