TaskCompletionSource<TResult> Methods

The TaskCompletionSource<TResult> type exposes the following members.

  Name Description
Public method Supported by Portable Class Library Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Supported by Portable Class Library Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method Supported by Portable Class Library GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method Supported by Portable Class Library GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method Supported by Portable Class Library MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Supported by Portable Class Library SetCanceled Transitions the underlying Task<TResult> into the Canceled state.
Public method Supported by Portable Class Library SetException(IEnumerable<Exception>) Transitions the underlying Task<TResult> into the Faulted state.
Public method Supported by Portable Class Library SetException(Exception) Transitions the underlying Task<TResult> into the Faulted state.
Public method Supported by Portable Class Library SetResult Transitions the underlying Task<TResult> into the RanToCompletion state.
Public method Supported by Portable Class Library ToString Returns a string that represents the current object. (Inherited from Object.)
Public method Supported by Portable Class Library TrySetCanceled() Attempts to transition the underlying Task<TResult> into the Canceled state.
Public method TrySetCanceled(CancellationToken) Attempts to transition the underlying Task<TResult> into the TaskStatus.Canceled state and enables a cancellation token to be stored in the canceled task.
Public method Supported by Portable Class Library TrySetException(IEnumerable<Exception>) Attempts to transition the underlying Task<TResult> into the Faulted state.
Public method Supported by Portable Class Library TrySetException(Exception) Attempts to transition the underlying Task<TResult> into the Faulted state.
Public method Supported by Portable Class Library TrySetResult Attempts to transition the underlying Task<TResult> into the RanToCompletion state.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft