System.Threading.Tasks.TaskCompletionSource<TResult>.Task Property

Gets the System.Threading.Tasks.Task`1 created by this System.Threading.Tasks.TaskCompletionSource`1.


public Task<TResult> Task { get; }


Documentation for this section has not yet been entered.


This property enables a consumer to access the System.Threading.Tasks.Task`1 that is controlled by this instance. When you create a System.Threading.Tasks.TaskCompletionSource`1 object, the Task.Status property of this System.Threading.Tasks.Task`1 object returns TaskStatus.WaitingForActivation

The TaskCompletionSource`1.SetResult(`0), TaskCompletionSource`1.SetException(Exception), TaskCompletionSource`1.SetException(IEnumerable<Exception>), and TaskCompletionSource`1.SetCanceled methods (and their "Try" variants) on this instance all result in the relevant state transitions on this underlying Task.


Namespace: System.Threading.Tasks
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: