35 references to CancellationToken
System.Private.CoreLib (35)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.cs (1)
1429public bool CancellationPending => (m_task.Status == TaskStatus.WaitingToRun) && m_task.CancellationToken.IsCancellationRequested;
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (31)
544/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new task.</param> 582/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new task.</param> 620/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new task.</param> 1446/// A <see cref="Task">Task</see> will complete in Canceled state either if its <see cref="CancellationToken">CancellationToken</see> 2815/// A <see cref="CancellationToken"/> to observe while waiting for the task to complete. 2848/// A <see cref="CancellationToken"/> to observe while waiting for the task to complete. 2892/// A <see cref="CancellationToken"/> to observe while waiting for the task to complete. 2946/// <summary>Gets a <see cref="Task"/> that will complete when this <see cref="Task"/> completes or when the specified <see cref="CancellationToken"/> has cancellation requested.</summary> 2947/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for a cancellation request.</param> 2967/// <summary>Gets a <see cref="Task"/> that will complete when this <see cref="Task"/> completes, when the specified timeout expires, or when the specified <see cref="CancellationToken"/> has cancellation requested.</summary> 2969/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for a cancellation request.</param> 2974/// <summary>Gets a <see cref="Task"/> that will complete when this <see cref="Task"/> completes, when the specified timeout expires, or when the specified <see cref="CancellationToken"/> has cancellation requested.</summary> 2977/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for a cancellation request.</param> 3077TaskStatus.Canceled => TrySetCanceled(completingTask.CancellationToken, completingTask.GetCancellationExceptionDispatchInfo()), 3837/// <param name="cancellationToken"> The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 3926/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4016/// <param name="cancellationToken"> The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4108/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4204/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4298/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4405/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4502/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 5013/// A <see cref="CancellationToken"/> to observe while waiting for the tasks to complete. 5055/// A <see cref="CancellationToken"/> to observe while waiting for the tasks to complete. 5088/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe while waiting for the tasks to complete.</param> 5397/// A <see cref="CancellationToken"/> to observe while waiting for a task to complete. 5458/// A <see cref="CancellationToken"/> to observe while waiting for a task to complete. 6376TrySetCanceled(canceledTask.CancellationToken, canceledTask.GetCancellationExceptionDispatchInfo()); 6648TrySetCanceled(canceledTask.CancellationToken, canceledTask.GetCancellationExceptionDispatchInfo()); 7338public bool CancellationPending => (m_task.Status == TaskStatus.WaitingToRun) && m_task.CancellationToken.IsCancellationRequested; 7696result = TrySetCanceled(task.CancellationToken, task.GetCancellationExceptionDispatchInfo());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCanceledException.cs (1)
73base(SR.TaskCanceledException_ctor_DefaultMessage, task != null ? task.CancellationToken : CancellationToken.None)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
341result = _task.TrySetCanceled(completedTask.CancellationToken, completedTask.GetCancellationExceptionDispatchInfo());
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (1)
339result = _task.TrySetCanceled(completedTask.CancellationToken, completedTask.GetCancellationExceptionDispatchInfo());