System.ComponentModel.AsyncOperation Class

Tracks the lifetime of an asynchronous operation.

See Also: AsyncOperation


public sealed class AsyncOperation


When you implement a class according to the Event-based Asynchronous Pattern Overview, you may need to track the lifetime of each asynchronous operation invoked on an instance of your class. The AsyncOperation class provides ways to track and report the progress of an asynchronous task.

The following list identifies ways to use an AsyncOperation object:

Your class should get an AsyncOperation object for each asynchronous task by calling AsyncOperationManager.CreateOperation(Object) when each task starts. To allow the client to distinguish separate asynchronous tasks, AsyncOperationManager.CreateOperation(Object) takes a parameter for a unique client-provided token, which becomes the AsyncOperation.UserSuppliedState property. It can then be used by client code to identify the particular asynchronous task that is raising progress or completion events.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions:,
Since: .NET 2.0

The members of System.ComponentModel.AsyncOperation are listed below.

See Also: Object

Public Properties


Gets the SynchronizationContext object that was passed to the constructor.


Gets or sets an object used to uniquely identify an asynchronous operation.

Public Methods


Ends the lifetime of an asynchronous operation.

Post(SendOrPostCallback, Object)

Invokes a delegate on the thread or context appropriate for the application model.

PostOperationCompleted(SendOrPostCallback, Object)

Ends the lifetime of an asynchronous operation.