AsyncDolls.TaskCompletionSource.SetCanceled C# (CSharp) Method

SetCanceled() public method

Transitions the underlying Task into the TaskStatus.Canceled state.
The underlying has already been completed.
public SetCanceled ( ) : void
return void
        public void SetCanceled()
        {
            _tcs.SetCanceled();
        }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Transitions the underlying <see cref="Task"/> into the <see cref="TaskStatus.Canceled"/> state.
 /// </summary>
 /// <exception cref="InvalidOperationException">The underlying <see cref="Task"/> has already been completed.</exception>
 public void SetCanceled()
 {
     _tcs.SetCanceled();
 }