System 2.0.0.0 4.0.0.0 System.Object If your class needs to provide asynchronous behavior according to the Event-based Asynchronous Pattern, you will encounter a number of concurrency management issues. Among these is the requirement to ensure that event handlers are called on a thread or context that is appropriate for the application model (for example, Windows Forms applications, vstecasp applications, console applications, and so on). The provides a convenient way to create a class that runs properly under all application models supported by the dnprdnshort. The class has one method, , which returns an that can be used to track the duration of a particular asynchronous task. The for a task can be used to alert clients when a task completes. It can also be used to post progress updates and incremental results without terminating the operation. For more information about implementing asynchronous classes, see Implementing the Event-based Asynchronous Pattern. Provides concurrency management for classes that support asynchronous method calls. This class cannot be inherited. Method 2.0.0.0 4.0.0.0 System.ComponentModel.AsyncOperation The method returns an that you can use to track the duration of a particular asynchronous operation and to alert the application model when the operation completes. You can also use it to post progress updates and incremental results without terminating the operation. The will correctly marshal these calls to the appropriate thread or context for the application model. If you implement a class that supports the Event-based Asynchronous Pattern, your class should call each time your MethodNameAsync method is called. The client application that makes calls to the method can use the parameter to uniquely identify each invocation, so as to distinguish events raised during the execution of the asynchronous operation. Client code must provide a unique value for the parameter. Non-unique task IDs may cause your implementation to report progress and other events incorrectly. Your code should check for a non-unique task ID and throw an if one is detected. Your code should track every returned by and use the object in the corresponding underlying asynchronous operation to post updates and terminate the operation. This tracking can be as simple as passing the as a parameter among delegates. In more sophisticated designs, your class can maintain a collection of objects, adding objects when tasks are started and removing them when tasks are completed or canceled. This approach allows you to check for unique parameter values, and is the method you should use when working with classes that support multiple concurrent invocations. For more information about implementing asynchronous classes, see Implementing the Event-based Asynchronous Pattern. Returns an for tracking the duration of a particular asynchronous operation. An that you can use to track the duration of an asynchronous method invocation. An object used to associate a piece of client state, such as a task ID, with a particular asynchronous operation. Property 2.0.0.0 4.0.0.0 System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced) System.Threading.SynchronizationContext To be added. The default implementation is the free-threaded implementation. A thread should set the property to null to release the free-threaded factory when it is done, or else its factory will never be disposed. Gets or sets the synchronization context for the asynchronous operation.