Export (0) Print
Expand All

AsyncResult Class

.NET Framework 4.5

An abstract base class that implements the IAsyncResult interface. Serves as a base class from which to derive IAsyncResult objects that can be used for common asynchronous programming scenarios.

Namespace:  System.IdentityModel
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public abstract class AsyncResult : IAsyncResult, 
	IDisposable

The AsyncResult type exposes the following members.

  NameDescription
Protected methodAsyncResult()Called from constructors in derived classes to initialize an instance of the AsyncResult class that does not have a callback delegate or a state object.
Protected methodAsyncResult(Object)Called from constructors in derived classes to initialize an instance of the AsyncResult class that does not have a callback delegate but does have a state object.
Protected methodAsyncResult(AsyncCallback, Object)Called from constructors in derived classes to initialize an instance of the AsyncResult class that has a callback delegate and a state object.
Top

  NameDescription
Public propertyAsyncStateGets a user-defined object that qualifies or contains information about an asynchronous operation.
Public propertyAsyncWaitHandleGets a WaitHandle that is used to wait for an asynchronous operation to complete.
Public propertyCompletedSynchronouslyGets a value that indicates whether the asynchronous operation completed synchronously.
Public propertyIsCompletedGets a value that indicates whether the asynchronous operation has completed.
Top

  NameDescription
Protected methodComplete(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.
Protected methodComplete(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 method.
Public methodDispose()Releases the resources used by the current instance of the AsyncResult class.
Protected methodDispose(Boolean)Called by the Dispose() and Finalize methods to release the managed and unmanaged resources used by the current instance of the AsyncResult class.
Public methodStatic memberEndCall this method when the End function for the asynchronous operation is complete. It ensures that the asynchronous operation is complete, and does some common validation.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows the AsyncResult object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Overrides Object.Finalize().)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

For more information see the System.IAsyncResult interface.

The TypedAsyncResult<T> class derives from AsyncResult.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft