Bewerken

Delen via


AsyncResult.Complete Method

Definition

Called to complete the asynchronous operation.

Overloads

Complete(Boolean)

Call this version of complete when your asynchronous operation is complete and no exception was encountered. It updates the state of the operation and notifies the callback.

Complete(Boolean, Exception)

Call this version of complete if you raise an exception during processing. In addition to notifying the callback, it captures the exception and stores it to be thrown during the call to the End(IAsyncResult) method.

Complete(Boolean)

Call this version of complete when your asynchronous operation is complete and no exception was encountered. It updates the state of the operation and notifies the callback.

protected:
 void Complete(bool completedSynchronously);
protected void Complete (bool completedSynchronously);
member this.Complete : bool -> unit
Protected Sub Complete (completedSynchronously As Boolean)

Parameters

completedSynchronously
Boolean

true if the asynchronous operation completed synchronously; otherwise false.

Applies to

Complete(Boolean, Exception)

Call this version of complete if you raise an exception during processing. In addition to notifying the callback, it captures the exception and stores it to be thrown during the call to the End(IAsyncResult) method.

protected:
 void Complete(bool completedSynchronously, Exception ^ exception);
protected void Complete (bool completedSynchronously, Exception exception);
member this.Complete : bool * Exception -> unit
Protected Sub Complete (completedSynchronously As Boolean, exception As Exception)

Parameters

completedSynchronously
Boolean

true if the asynchronous operation completed synchronously; otherwise false.

exception
Exception

The exception that occurred during the processing of the asynchronous operation.

Applies to