SetCanceled() публичный Метод

Transitions the underlying Task into the TaskStatus.Canceled state.
The underlying has already been completed.
public SetCanceled ( ) : void
Результат void
Пример #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();
 }