AsyncHelperEndOperation(IAsyncResult, String) Method

Waits for the completion of an operation started by a corresponding BeginOperation, FromResult or FromCompleted call. If the operation is still running, then this method blocks the caller and waits for the completion. The possibly occurred exceptions are also thrown then this method is called.
See the Examples section of the AsyncHelper class for details.


Namespace: KGySoft.Threading
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.2.0
public static void EndOperation(
	IAsyncResult asyncResult,
	string beginMethodName


asyncResult  IAsyncResult
The result of a corresponding BeginOperation or FromCompleted call.
beginMethodName  String
The same name that was passed to the BeginOperation, FromResult or FromCompleted method.


ArgumentNullExceptionasyncResult is .
InvalidOperationExceptionasyncResult was not returned by the corresponding BeginOperation or FromCompleted methods with a matching beginMethodName
this method was already called for this asyncResult instance.
OperationCanceledExceptionThe operation has been canceled and ThrowIfCanceled in the corresponding AsyncConfig was .

See Also