System.Threading.Tasks.TaskCompletionSource<TResult> public class TaskCompletionSource<TResult> Documentation public Task<TResult> Task { get; } public TaskCompletionSource() public TaskCompletionSource(object state) public TaskCompletionSource(object state, TaskCreationOptions creationOptions) public TaskCompletionSource(TaskCreationOptions creationOptions) public void SetCanceled() public void SetException(IEnumerable<Exception> exceptions) public void SetException(Exception exception) public void SetResult(TResult result) public bool TrySetCanceled() public bool TrySetCanceled(CancellationToken cancellationToken) public bool TrySetException(IEnumerable<Exception> exceptions) public bool TrySetException(Exception exception) public bool TrySetResult(TResult result)