35 references to CancellationToken
System.Private.CoreLib (35)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (1)
1431public bool CancellationPending => (m_task.Status == TaskStatus.WaitingToRun) && m_task.CancellationToken.IsCancellationRequested;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (31)
399/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new task.</param> 437/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new task.</param> 475/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new task.</param> 1298/// A <see cref="Task">Task</see> will complete in Canceled state either if its <see cref="CancellationToken">CancellationToken</see> 2659/// A <see cref="CancellationToken"/> to observe while waiting for the task to complete. 2692/// A <see cref="CancellationToken"/> to observe while waiting for the task to complete. 2736/// A <see cref="CancellationToken"/> to observe while waiting for the task to complete. 2790/// <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> 2791/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for a cancellation request.</param> 2811/// <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> 2813/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for a cancellation request.</param> 2818/// <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> 2821/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for a cancellation request.</param> 2921TaskStatus.Canceled => TrySetCanceled(completingTask.CancellationToken, completingTask.GetCancellationExceptionDispatchInfo()), 3632/// <param name="cancellationToken"> The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 3721/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 3811/// <param name="cancellationToken"> The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 3903/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 3999/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4093/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4200/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4297/// <param name="cancellationToken">The <see cref="CancellationToken"/> that will be assigned to the new continuation task.</param> 4805/// A <see cref="CancellationToken"/> to observe while waiting for the tasks to complete. 4847/// A <see cref="CancellationToken"/> to observe while waiting for the tasks to complete. 4880/// <param name="cancellationToken">A <see cref="CancellationToken"/> to observe while waiting for the tasks to complete.</param> 5185/// A <see cref="CancellationToken"/> to observe while waiting for a task to complete. 5246/// A <see cref="CancellationToken"/> to observe while waiting for a task to complete. 6141TrySetCanceled(canceledTask.CancellationToken, canceledTask.GetCancellationExceptionDispatchInfo()); 6411TrySetCanceled(canceledTask.CancellationToken, canceledTask.GetCancellationExceptionDispatchInfo()); 7086public bool CancellationPending => (m_task.Status == TaskStatus.WaitingToRun) && m_task.CancellationToken.IsCancellationRequested; 7444result = TrySetCanceled(task.CancellationToken, task.GetCancellationExceptionDispatchInfo());
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCanceledException.cs (1)
73base(SR.TaskCanceledException_ctor_DefaultMessage, task != null ? task.CancellationToken : CancellationToken.None)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (1)
339result = _task.TrySetCanceled(completedTask.CancellationToken, completedTask.GetCancellationExceptionDispatchInfo());
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (1)
341result = _task.TrySetCanceled(completedTask.CancellationToken, completedTask.GetCancellationExceptionDispatchInfo());