TypedAsyncResult<T>.Complete Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called to complete the asynchronous operation.
Overloads
Complete(T, 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(T, 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(T, 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.
public:
void Complete(T result, bool completedSynchronously);
public void Complete (T result, bool completedSynchronously);
override this.Complete : 'T * bool -> unit
Public Sub Complete (result As T, completedSynchronously As Boolean)
Parameters
- result
- T
The result to be wrapped.
- completedSynchronously
- Boolean
true
if the asynchronous operation completed synchronously; otherwise false
.
Applies to
Complete(T, 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.
public:
void Complete(T result, bool completedSynchronously, Exception ^ exception);
public void Complete (T result, bool completedSynchronously, Exception exception);
override this.Complete : 'T * bool * Exception -> unit
Public Sub Complete (result As T, completedSynchronously As Boolean, exception As Exception)
Parameters
- result
- T
The result to be wrapped.
- completedSynchronously
- Boolean
true
if the asynchronous operation completed synchronously; otherwise false
.
- exception
- Exception
The exception that occurred during the processing of the asynchronous operation.