/// <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(); }