/// <summary> /// Attempts to transition the underlying task into the <see cref="SystemTasks.TaskStatus.Canceled"/> state /// and enables a cancellation token to be stored in the canceled task. /// </summary> public static bool TrySetCanceled(SystemTasks.TaskCompletionSource <TResult> tcs, SystemThreading.CancellationToken cancellationToken) => tcs.TrySetCanceled(cancellationToken);
/// <summary> /// Attempts to transition the underlying task into the <see cref="SystemTasks.TaskStatus.Canceled"/> state. /// </summary> public static bool TrySetCanceled(SystemTasks.TaskCompletionSource <TResult> tcs) => tcs.TrySetCanceled();