System.ComponentModel.AsyncOperation Class

Tracks the lifetime of an asynchronous operation.

See Also: AsyncOperation Members


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 System.ComponentModel.AsyncOperation class provides ways to track and report the progress of an asynchronous task.

The following list identifies ways to use an System.ComponentModel.AsyncOperation object:

Your class should get an System.ComponentModel.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