21 instantiations of CancellationToken
mscorlib (11)
system\threading\CancellationTokenSource.cs (1)
159
return new
CancellationToken
(this);
system\threading\CountdownEvent.cs (3)
442
Wait(Timeout.Infinite, new
CancellationToken
());
490
return Wait((int)totalMilliseconds, new
CancellationToken
());
537
return Wait(millisecondsTimeout, new
CancellationToken
());
system\threading\ManualResetEventSlim.cs (3)
426
Wait(Timeout.Infinite, new
CancellationToken
());
472
return Wait((int)totalMilliseconds, new
CancellationToken
());
521
return Wait(millisecondsTimeout, new
CancellationToken
());
system\threading\SemaphoreSlim.cs (3)
210
Wait(Timeout.Infinite, new
CancellationToken
());
252
return Wait((int)timeout.TotalMilliseconds, new
CancellationToken
());
297
return Wait(millisecondsTimeout, new
CancellationToken
());
system\threading\Tasks\TaskCanceledException.cs (1)
66
base(Environment.GetResourceString("TaskCanceledException_ctor_DefaultMessage"), task!=null ? task.CancellationToken:new
CancellationToken
())
System (7)
sys\system\collections\concurrent\BlockingCollection.cs (4)
271
TryAddWithNoTimeValidation(item, Timeout.Infinite, new
CancellationToken
());
320
return TryAddWithNoTimeValidation(item, 0, new
CancellationToken
());
344
return TryAddWithNoTimeValidation(item, (int)timeout.TotalMilliseconds, new
CancellationToken
());
366
return TryAddWithNoTimeValidation(item, millisecondsTimeout, new
CancellationToken
());
sys\system\threading\Barrier.cs (3)
509
SignalAndWait(new
CancellationToken
());
558
return SignalAndWait(timeout, new
CancellationToken
());
612
return SignalAndWait(millisecondsTimeout, new
CancellationToken
());
System.Core (3)
System\Linq\Parallel\QueryOperators\QuerySettings.cs (1)
222
get { return new QuerySettings(null, null, new
CancellationToken
(), null, null); }
System\Linq\Parallel\Scheduling\CancellationState.cs (1)
46
return new
CancellationToken
(false);
System\Linq\Parallel\Scheduling\QueryTask.cs (1)
87
return Task.Factory.StartNew(s_baseWorkDelegate, this, new
CancellationToken
(), TaskCreationOptions.AttachedToParent | TaskCreationOptions.PreferFairness, taskScheduler);
947 references to CancellationToken
mscorlib (406)
system\io\bufferedstream.cs (9)
332
public override Task FlushAsync(
CancellationToken
cancellationToken) {
343
private static async Task FlushAsyncInternal(
CancellationToken
cancellationToken,
452
private async Task FlushWriteAsync(
CancellationToken
cancellationToken) {
631
Task<Int32> readOp = ReadFromUnderlyingStreamAsync(buffer, offset, count,
CancellationToken
.None,
665
public override Task<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count,
CancellationToken
cancellationToken) {
732
CancellationToken
cancellationToken,
1056
Task writeOp = WriteToUnderlyingStreamAsync(buffer, offset, count,
CancellationToken
.None, semaphoreLockTask, useApmPattern: true);
1077
public override Task WriteAsync(Byte[] buffer, Int32 offset, Int32 count,
CancellationToken
cancellationToken) {
1142
CancellationToken
cancellationToken,
system\io\filestream.cs (7)
2603
public override Task<int> ReadAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
2655
public override Task WriteAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
2708
internal
CancellationToken
_cancellationToken;
2712
internal FileStreamReadWriteTask(
CancellationToken
cancellationToken) : base()
2772
var
cancellationToken = readTask._cancellationToken;
2808
var
cancellationToken = writeTask._cancellationToken;
2828
public override Task FlushAsync(
CancellationToken
cancellationToken)
system\io\memorystream.cs (4)
196
public override Task FlushAsync(
CancellationToken
cancellationToken) {
375
public override Task<int> ReadAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
421
public override Task CopyToAsync(Stream destination, Int32 bufferSize,
CancellationToken
cancellationToken) {
602
public override Task WriteAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
system\io\stream.cs (15)
138
return CopyToAsync(destination, bufferSize,
CancellationToken
.None);
143
public virtual Task CopyToAsync(Stream destination, Int32 bufferSize,
CancellationToken
cancellationToken)
162
private async Task CopyToAsyncInternal(Stream destination, Int32 bufferSize,
CancellationToken
cancellationToken)
278
return FlushAsync(
CancellationToken
.None);
283
public virtual Task FlushAsync(
CancellationToken
cancellationToken)
412
return ReadAsync(buffer, offset, count,
CancellationToken
.None);
417
public virtual Task<int> ReadAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
529
default(
CancellationToken
),
634
base(function, state,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach)
707
return WriteAsync(buffer, offset, count,
CancellationToken
.None);
712
public virtual Task WriteAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
897
public override Task FlushAsync(
CancellationToken
cancellationToken)
946
public override Task<int> ReadAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
950
s_nullReadTask = nullReadTask = new Task<int>(false, 0, (TaskCreationOptions)InternalTaskOptions.DoNotDispose,
CancellationToken
.None); // benign ----
967
public override Task WriteAsync(Byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
system\io\textreader.cs (2)
200
return Task<String>.Factory.StartNew(_ReadLineDelegate, this,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
240
return Task<int>.Factory.StartNew(_ReadDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
system\io\textwriter.cs (7)
544
return Task.Factory.StartNew(_WriteCharDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
552
return Task.Factory.StartNew(_WriteStringDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
568
return Task.Factory.StartNew(_WriteCharArrayRangeDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
576
return Task.Factory.StartNew(_WriteLineCharDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
584
return Task.Factory.StartNew(_WriteLineStringDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
600
return Task.Factory.StartNew(_WriteLineCharArrayRangeDelegate, tuple,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
614
return Task.Factory.StartNew(_FlushDelegate, this,
CancellationToken
.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
system\io\unmanagedmemorystream.cs (3)
292
public override Task FlushAsync(
CancellationToken
cancellationToken) {
448
public override Task<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count,
CancellationToken
cancellationToken) {
644
public override Task WriteAsync(Byte[] buffer, Int32 offset, Int32 count,
CancellationToken
cancellationToken) {
system\io\unmanagedmemorystreamwrapper.cs (4)
153
public override Task CopyToAsync(Stream destination, Int32 bufferSize,
CancellationToken
cancellationToken) {
180
public override Task FlushAsync(
CancellationToken
cancellationToken) {
186
public override Task<Int32> ReadAsync(Byte[] buffer, Int32 offset, Int32 count,
CancellationToken
cancellationToken) {
192
public override Task WriteAsync(Byte[] buffer, Int32 offset, Int32 count,
CancellationToken
cancellationToken) {
system\operationcanceledexception.cs (5)
27
private
CancellationToken
_cancellationToken;
29
public
CancellationToken
CancellationToken
51
public OperationCanceledException(
CancellationToken
token)
57
public OperationCanceledException(String message,
CancellationToken
token)
63
public OperationCanceledException(String message, Exception innerException,
CancellationToken
token)
system\runtime\compilerservices\AsyncMethodBuilder.cs (1)
833
return new Task<TResult>(false, result, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default(
CancellationToken
));
system\runtime\compilerservices\TaskAwaiter.cs (1)
148
bool taskCompleted = task.InternalWait(Timeout.Infinite, default(
CancellationToken
));
system\runtime\compilerservices\YieldAwaitable.cs (1)
123
Task.Factory.StartNew(continuation, default(
CancellationToken
), TaskCreationOptions.PreferFairness, scheduler);
system\security\cryptography\cryptostream.cs (5)
156
public override Task FlushAsync(
CancellationToken
cancellationToken)
306
public override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
342
private async Task<int> ReadAsyncInternal(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
571
public override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
597
private async Task WriteAsyncInternal(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
system\threading\CancellationToken.cs (11)
28
/// A <see cref="
CancellationToken
"/> may be created directly in an unchangeable canceled or non-canceled state
60
/// The <see cref="
CancellationToken
"/> value returned by this property will be non-cancelable by default.
62
public static
CancellationToken
None
64
get { return default(
CancellationToken
); }
365
public bool Equals(
CancellationToken
other)
403
if (other is
CancellationToken
)
405
return Equals((
CancellationToken
) other);
434
public static bool operator ==(
CancellationToken
left,
CancellationToken
right)
447
public static bool operator !=(
CancellationToken
left,
CancellationToken
right)
system\threading\CancellationTokenSource.cs (9)
22
/// Signals to a <see cref="System.Threading.
CancellationToken
"/> that it should be canceled.
147
/// Gets the <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
150
/// <value>The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
154
public
CancellationToken
Token
342
/// <see cref="System.Threading.
CancellationToken
.IsCancellationRequested">IsCancellationRequested</see> returns true.
372
/// <see cref="System.Threading.
CancellationToken
.IsCancellationRequested">IsCancellationRequested</see> returns true.
874
public static CancellationTokenSource CreateLinkedTokenSource(
CancellationToken
token1,
CancellationToken
token2)
908
public static CancellationTokenSource CreateLinkedTokenSource(params
CancellationToken
[] tokens)
system\threading\CountdownEvent.cs (3)
463
public void Wait(
CancellationToken
cancellationToken)
512
public bool Wait(TimeSpan timeout,
CancellationToken
cancellationToken)
557
public bool Wait(int millisecondsTimeout,
CancellationToken
cancellationToken)
system\threading\ManualResetEventSlim.cs (3)
444
public void Wait(
CancellationToken
cancellationToken)
495
public bool Wait(TimeSpan timeout,
CancellationToken
cancellationToken)
542
public bool Wait(int millisecondsTimeout,
CancellationToken
cancellationToken)
system\threading\SemaphoreSlim.cs (13)
81
new Task<bool>(false, true, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default(
CancellationToken
));
223
public void Wait(
CancellationToken
cancellationToken)
271
public bool Wait(TimeSpan timeout,
CancellationToken
cancellationToken)
313
public bool Wait(int millisecondsTimeout,
CancellationToken
cancellationToken)
449
private bool WaitUntilCountOrTimeout(int millisecondsTimeout, uint startTime,
CancellationToken
cancellationToken)
484
return WaitAsync(Timeout.Infinite, default(
CancellationToken
));
498
public Task WaitAsync(
CancellationToken
cancellationToken)
521
return WaitAsync(millisecondsTimeout, default(
CancellationToken
));
549
return WaitAsync(timeout, default(
CancellationToken
));
568
public Task<bool> WaitAsync(TimeSpan timeout,
CancellationToken
cancellationToken)
600
public Task<bool> WaitAsync(int millisecondsTimeout,
CancellationToken
cancellationToken)
695
private async Task<bool> WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, int millisecondsTimeout,
CancellationToken
cancellationToken)
705
CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, default(
CancellationToken
)) :
system\threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (2)
300
default(
CancellationToken
), GetCreationOptionsForTask(fairly));
327
default(
CancellationToken
), GetCreationOptionsForTask(fairly));
system\threading\Tasks\Future.cs (67)
104
base(false, TaskCreationOptions.None, default(
CancellationToken
))
109
internal Task(bool canceled, TResult result, TaskCreationOptions creationOptions,
CancellationToken
ct)
137
: this(function, null, default(
CancellationToken
),
152
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> to be assigned to this task.</param>
156
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
160
public Task(Func<TResult> function,
CancellationToken
cancellationToken)
188
: this(function, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, InternalTaskOptions.None, null)
201
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new task.</param>
213
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
217
public Task(Func<TResult> function,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions)
237
: this(function, state, null, default(
CancellationToken
),
252
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> to be assigned to the new task.</param>
256
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
260
public Task(Func<object, TResult> function, object state,
CancellationToken
cancellationToken)
289
: this(function, state, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
),
305
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> to be assigned to the new task.</param>
317
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
321
public Task(Func<object, TResult> function, object state,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions)
330
Func<TResult> valueSelector, Task parent,
CancellationToken
cancellationToken,
350
internal Task(Func<TResult> valueSelector, Task parent,
CancellationToken
cancellationToken,
361
Func<object, TResult> valueSelector, object state, Task parent,
CancellationToken
cancellationToken,
380
internal Task(Delegate valueSelector, object state, Task parent,
CancellationToken
cancellationToken,
392
internal static Task<TResult> StartNew(Task parent, Func<TResult> function,
CancellationToken
cancellationToken,
417
internal static Task<TResult> StartNew(Task parent, Func<object, TResult> function, object state,
CancellationToken
cancellationToken,
556
if (!IsCompleted) InternalWait(Timeout.Infinite, default(
CancellationToken
)); // won't throw if task faulted or canceled; that's handled below
616
internal bool TrySetCanceled(
CancellationToken
tokenToRecord)
625
internal bool TrySetCanceled(
CancellationToken
tokenToRecord, object cancellationException)
738
return ContinueWith(continuationAction, TaskScheduler.Current, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
749
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new continuation task.</param>
759
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
763
public Task ContinueWith(Action<Task<TResult>> continuationAction,
CancellationToken
cancellationToken)
796
return ContinueWith(continuationAction, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
831
return ContinueWith(continuationAction, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
841
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new continuation task.</param>
869
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
873
public Task ContinueWith(Action<Task<TResult>> continuationAction,
CancellationToken
cancellationToken,
881
internal Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler,
CancellationToken
cancellationToken,
938
return ContinueWith(continuationAction, state, TaskScheduler.Current, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
950
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new continuation task.</param>
960
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
964
public Task ContinueWith(Action<Task<TResult>, Object> continuationAction, Object state,
CancellationToken
cancellationToken)
998
return ContinueWith(continuationAction, state, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
1034
return ContinueWith(continuationAction, state, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
1045
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new continuation task.</param>
1073
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1077
public Task ContinueWith(Action<Task<TResult>, Object> continuationAction, Object state,
CancellationToken
cancellationToken,
1085
internal Task ContinueWith(Action<Task<TResult>, Object> continuationAction, Object state, TaskScheduler scheduler,
CancellationToken
cancellationToken,
1145
return ContinueWith<TNewResult>(continuationFunction, TaskScheduler.Current, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
1159
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new task.</param>
1169
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1173
public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction,
CancellationToken
cancellationToken)
1208
return ContinueWith<TNewResult>(continuationFunction, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
1252
return ContinueWith<TNewResult>(continuationFunction, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
1265
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new task.</param>
1300
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1304
public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction,
CancellationToken
cancellationToken,
1313
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
1372
return ContinueWith<TNewResult>(continuationFunction, state, TaskScheduler.Current, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
1387
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new task.</param>
1397
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1402
CancellationToken
cancellationToken)
1439
return ContinueWith<TNewResult>(continuationFunction, state, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
1485
return ContinueWith<TNewResult>(continuationFunction, state, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
1499
/// <param name="cancellationToken">The <see cref="
CancellationToken
"/> that will be assigned to the new task.</param>
1534
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1539
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1547
TaskScheduler scheduler,
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
system\threading\Tasks\FutureFactory.cs (46)
52
private
CancellationToken
m_defaultCancellationToken;
93
: this(default(
CancellationToken
), TaskCreationOptions.None, TaskContinuationOptions.None, null)
113
public TaskFactory(
CancellationToken
cancellationToken)
138
: this(default(
CancellationToken
), TaskCreationOptions.None, TaskContinuationOptions.None, scheduler)
169
: this(default(
CancellationToken
), creationOptions, continuationOptions, null)
208
public TaskFactory(
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
222
/// Gets the default <see cref="System.Threading.
CancellationToken
">CancellationToken</see> of this
230
public
CancellationToken
CancellationToken { get { return m_defaultCancellationToken; } }
302
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
313
public Task<TResult> StartNew(Func<TResult> function,
CancellationToken
cancellationToken)
375
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
386
public Task<TResult> StartNew(Func<TResult> function,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
433
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
444
public Task<TResult> StartNew(Func<Object, TResult> function, Object state,
CancellationToken
cancellationToken)
510
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
521
public Task<TResult> StartNew(Func<Object, TResult> function, Object state,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
725
default(
CancellationToken
), TaskCreationOptions.None, InternalTaskOptions.None, null, ref stackMark);
1466
private static Task<TResult> CreateCanceledTask(TaskContinuationOptions continuationOptions,
CancellationToken
ct)
1511
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1522
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1526
public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction,
CancellationToken
cancellationToken)
1579
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1601
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1611
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1655
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1666
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1671
CancellationToken
cancellationToken)
1727
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1749
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1759
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
1773
TaskContinuationOptions continuationOptions,
CancellationToken
cancellationToken, TaskScheduler scheduler, ref StackCrawlMark stackMark)
1820
TaskContinuationOptions continuationOptions,
CancellationToken
cancellationToken, TaskScheduler scheduler, ref StackCrawlMark stackMark)
1911
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1922
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1926
public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction,
CancellationToken
cancellationToken)
1979
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2001
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2011
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2055
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2066
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2071
CancellationToken
cancellationToken)
2127
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2149
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2159
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2172
TaskContinuationOptions continuationOptions,
CancellationToken
cancellationToken, TaskScheduler scheduler, ref StackCrawlMark stackMark)
2220
TaskContinuationOptions continuationOptions,
CancellationToken
cancellationToken, TaskScheduler scheduler, ref StackCrawlMark stackMark)
system\threading\Tasks\Parallel.cs (4)
44
private
CancellationToken
m_cancellationToken;
60
m_cancellationToken =
CancellationToken
.None;
120
public
CancellationToken
CancellationToken
3553
internal static void ThrowIfReducableToSingleOCE(IEnumerable<Exception> excCollection,
CancellationToken
ct)
system\threading\Tasks\Task.cs (104)
265
internal
CancellationToken
m_cancellationToken; // Task's cancellation token, if it has one
316
internal Task(bool canceled, TaskCreationOptions creationOptions,
CancellationToken
ct)
367
TaskConstructorCore(null, state, default(
CancellationToken
), creationOptions, InternalTaskOptions.PromiseTask, null);
377
: this(action, null, null, default(
CancellationToken
), TaskCreationOptions.None, InternalTaskOptions.None, null)
384
/// Initializes a new <see cref="Task"/> with the specified action and <see cref="System.Threading.
CancellationToken
">CancellationToken</see>.
387
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
390
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
394
public Task(Action action,
CancellationToken
cancellationToken)
418
: this(action, null, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, InternalTaskOptions.None, null)
440
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
444
public Task(Action action,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions)
462
: this(action, state, null, default(
CancellationToken
), TaskCreationOptions.None, InternalTaskOptions.None, null)
477
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
481
public Task(Action<object> action, object state,
CancellationToken
cancellationToken)
506
: this(action, state, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, InternalTaskOptions.None, null)
529
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
533
public Task(Action<object> action, object state,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions)
540
internal Task(Action<object> action, object state, Task parent,
CancellationToken
cancellationToken,
558
internal Task(Delegate action, object state, Task parent,
CancellationToken
cancellationToken,
590
internal void TaskConstructorCore(object action, object state,
CancellationToken
cancellationToken,
670
private void AssignCancellationToken(
CancellationToken
cancellationToken, Task antecedent, TaskContinuation continuation)
1229
SpinThenBlockingWait(Timeout.Infinite, default(
CancellationToken
));
1278
Task creatingTask, Delegate action, object state,
CancellationToken
cancellationToken, TaskScheduler scheduler,
1457
/// <see cref="System.Threading.
CancellationToken
">CancellationToken</see>.
1521
internal
CancellationToken
CancellationToken
1526
return (props == null) ? default(
CancellationToken
) : props.m_cancellationToken;
1656
s_completedTask = completedTask = new Task(false, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default(
CancellationToken
)); // benign initialization ----
2535
return new Task(taskReplicaDelegate, stateObject, parentTask, default(
CancellationToken
),
3049
Wait(Timeout.Infinite, default(
CancellationToken
));
3083
return Wait((int)totalMilliseconds, default(
CancellationToken
));
3100
public void Wait(
CancellationToken
cancellationToken)
3125
return Wait(millisecondsTimeout, default(
CancellationToken
));
3153
public bool Wait(int millisecondsTimeout,
CancellationToken
cancellationToken)
3224
internal bool InternalWait(int millisecondsTimeout,
CancellationToken
cancellationToken)
3307
private bool SpinThenBlockingWait(int millisecondsTimeout,
CancellationToken
cancellationToken)
3496
internal void RecordInternalCancellationRequest(
CancellationToken
tokenToRecord)
3501
Contract.Assert(m_contingentProperties.m_cancellationToken == default(
CancellationToken
));
3505
if (tokenToRecord != default(
CancellationToken
))
3514
internal void RecordInternalCancellationRequest(
CancellationToken
tokenToRecord, object cancellationException)
3755
return ContinueWith(continuationAction, TaskScheduler.Current, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
3775
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3779
public Task ContinueWith(Action<Task> continuationAction,
CancellationToken
cancellationToken)
3811
return ContinueWith(continuationAction, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
3846
return ContinueWith(continuationAction, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
3884
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3888
public Task ContinueWith(Action<Task> continuationAction,
CancellationToken
cancellationToken,
3897
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
3953
return ContinueWith(continuationAction, state, TaskScheduler.Current, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
3974
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3978
public Task ContinueWith(Action<Task, Object> continuationAction, Object state,
CancellationToken
cancellationToken)
4011
return ContinueWith(continuationAction, state, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
4047
return ContinueWith(continuationAction, state, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
4086
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
4090
public Task ContinueWith(Action<Task, Object> continuationAction, Object state,
CancellationToken
cancellationToken,
4099
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
4158
return ContinueWith<TResult>(continuationFunction, TaskScheduler.Current, default(
CancellationToken
),
4183
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
4187
public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction,
CancellationToken
cancellationToken)
4222
return ContinueWith<TResult>(continuationFunction, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
4260
return ContinueWith<TResult>(continuationFunction, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
4301
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
4305
public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction,
CancellationToken
cancellationToken,
4314
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
4373
return ContinueWith<TResult>(continuationFunction, state, TaskScheduler.Current, default(
CancellationToken
),
4399
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
4403
public Task<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state,
CancellationToken
cancellationToken)
4439
return ContinueWith<TResult>(continuationFunction, state, scheduler, default(
CancellationToken
), TaskContinuationOptions.None, ref stackMark);
4478
return ContinueWith<TResult>(continuationFunction, state, TaskScheduler.Current, default(
CancellationToken
), continuationOptions, ref stackMark);
4520
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
4524
public Task<TResult> ContinueWith<TResult>(Func<Task, Object, TResult> continuationFunction, Object state,
CancellationToken
cancellationToken,
4533
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, ref StackCrawlMark stackMark)
4633
CancellationToken
cancellationToken,
4971
return WaitAll(tasks, millisecondsTimeout, default(
CancellationToken
));
5001
public static void WaitAll(Task[] tasks,
CancellationToken
cancellationToken)
5041
public static bool WaitAll(Task[] tasks, int millisecondsTimeout,
CancellationToken
cancellationToken)
5180
private static bool WaitAllBlockingCore(List<Task> tasks, int millisecondsTimeout,
CancellationToken
cancellationToken)
5267
task.SpinThenBlockingWait(Timeout.Infinite, default(
CancellationToken
));
5388
public static int WaitAny(Task[] tasks,
CancellationToken
cancellationToken)
5420
return WaitAny(tasks, millisecondsTimeout, default(
CancellationToken
));
5454
public static int WaitAny(Task[] tasks, int millisecondsTimeout,
CancellationToken
cancellationToken)
5550
internal static Task FromCancellation(
CancellationToken
cancellationToken)
5560
public static Task FromCanceled(
CancellationToken
cancellationToken)
5570
internal static Task<TResult> FromCancellation<TResult>(
CancellationToken
cancellationToken)
5581
public static Task<TResult> FromCanceled<TResult>(
CancellationToken
cancellationToken)
5617
return Task.InternalStartNew(null, action, null, default(
CancellationToken
), TaskScheduler.Default,
5634
public static Task Run(Action action,
CancellationToken
cancellationToken)
5653
return Task<TResult>.StartNew(null, function, default(
CancellationToken
),
5670
public static Task<TResult> Run<TResult>(Func<TResult> function,
CancellationToken
cancellationToken)
5688
return Run(function, default(
CancellationToken
));
5705
public static Task Run(Func<Task> function,
CancellationToken
cancellationToken)
5742
return Run(function, default(
CancellationToken
));
5756
public static Task<TResult> Run<TResult>(Func<Task<TResult>> function,
CancellationToken
cancellationToken)
5799
return Delay(delay, default(
CancellationToken
));
5819
public static Task Delay(TimeSpan delay,
CancellationToken
cancellationToken)
5843
return Delay(millisecondsDelay, default(
CancellationToken
));
5863
public static Task Delay(int millisecondsDelay,
CancellationToken
cancellationToken)
5907
internal DelayPromise(
CancellationToken
token)
5920
internal readonly
CancellationToken
Token;
6324
new Task<TResult[]>(false, new TResult[0], TaskCreationOptions.None, default(
CancellationToken
)) :
6556
return intermediate.ContinueWith(Task<TResult>.TaskWhenAnyCast, default(
CancellationToken
),
6585
return intermediate.ContinueWith(Task<TResult>.TaskWhenAnyCast, default(
CancellationToken
),
6737
: base(action, null, Task.InternalCurrent, default(
CancellationToken
), creationOptions, internalOptions | InternalTaskOptions.SelfReplicating, null)
6788
base(taskReplicaDelegate, stateObject, parentTask, default(
CancellationToken
), creationOptionsForReplica, internalOptionsForReplica, taskScheduler)
7324
TrySetCanceled(default(
CancellationToken
));
system\threading\Tasks\TaskCompletionSource.cs (2)
342
return TrySetCanceled(default(
CancellationToken
));
346
public bool TrySetCanceled(
CancellationToken
cancellationToken)
system\threading\Tasks\TaskContinuation.cs (5)
35
base(action, state, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, internalOptions, null)
83
base(function, state, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, internalOptions, null)
131
base(action, state, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, internalOptions, null)
179
base(function, state, Task.InternalCurrentIfAttached(creationOptions), default(
CancellationToken
), creationOptions, internalOptions, null)
594
action, state, null, default(
CancellationToken
),
system\threading\Tasks\TaskFactory.cs (73)
47
private
CancellationToken
m_defaultCancellationToken;
93
: this(default(
CancellationToken
), TaskCreationOptions.None, TaskContinuationOptions.None, null)
113
public TaskFactory(
CancellationToken
cancellationToken)
138
: this(default(
CancellationToken
), TaskCreationOptions.None, TaskContinuationOptions.None, scheduler)
169
: this(default(
CancellationToken
), creationOptions, continuationOptions, null)
208
public TaskFactory(
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
239
/// Gets the default <see cref="System.Threading.
CancellationToken
">CancellationToken</see> of this
247
public
CancellationToken
CancellationToken { get { return m_defaultCancellationToken; } }
316
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
327
public Task StartNew(Action action,
CancellationToken
cancellationToken)
387
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
398
public Task StartNew(Action action,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
408
internal Task StartNew(Action action,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions, TaskScheduler scheduler)
454
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
465
public Task StartNew(Action<Object> action, Object state,
CancellationToken
cancellationToken)
529
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
540
public Task StartNew(Action<Object> action, Object state,
CancellationToken
cancellationToken,
591
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
602
public Task<TResult> StartNew<TResult>(Func<TResult> function,
CancellationToken
cancellationToken)
670
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
681
public Task<TResult> StartNew<TResult>(Func<TResult> function,
CancellationToken
cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler)
735
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
746
public Task<TResult> StartNew<TResult>(Func<Object, TResult> function, Object state,
CancellationToken
cancellationToken)
818
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
829
public Task<TResult> StartNew<TResult>(Func<Object, TResult> function, Object state,
CancellationToken
cancellationToken,
1818
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1829
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1833
public Task ContinueWhenAll(Task[] tasks, Action<Task[]> continuationAction,
CancellationToken
cancellationToken)
1886
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1908
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1917
public Task ContinueWhenAll(Task[] tasks, Action<Task[]> continuationAction,
CancellationToken
cancellationToken,
1963
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1974
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
1979
CancellationToken
cancellationToken)
2035
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2057
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2067
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2118
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2129
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2133
public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction,
CancellationToken
cancellationToken)
2194
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2216
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2225
public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction,
CancellationToken
cancellationToken,
2279
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2290
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2295
CancellationToken
cancellationToken)
2359
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2381
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2391
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
2561
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2572
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2576
public Task ContinueWhenAny(Task[] tasks, Action<Task> continuationAction,
CancellationToken
cancellationToken)
2629
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2651
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2660
public Task ContinueWhenAny(Task[] tasks, Action<Task> continuationAction,
CancellationToken
cancellationToken,
2712
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2723
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2727
public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction,
CancellationToken
cancellationToken)
2788
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2810
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2819
public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction,
CancellationToken
cancellationToken,
2870
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2881
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2886
CancellationToken
cancellationToken)
2950
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2972
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
2982
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
3027
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3038
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3043
CancellationToken
cancellationToken)
3099
/// <param name="cancellationToken">The <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3121
/// <exception cref="T:System.ObjectDisposedException">The provided <see cref="System.Threading.
CancellationToken
">CancellationToken</see>
3131
CancellationToken
cancellationToken, TaskContinuationOptions continuationOptions, TaskScheduler scheduler)
System (144)
net\System\Net\_ConnectStream.cs (1)
2761
public override Task FlushAsync(
CancellationToken
cancellationToken)
net\System\Net\_ListenerRequestStream.cs (1)
77
public override Task FlushAsync(
CancellationToken
cancellationToken)
net\System\Net\_ListenerResponseStream.cs (1)
85
public override Task FlushAsync(
CancellationToken
cancellationToken)
net\System\Net\_PooledStream.cs (1)
784
public override Task FlushAsync(
CancellationToken
cancellationToken)
net\System\Net\mail\BufferedReadStream.cs (2)
77
public override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
98
private async Task<int> ReadMoreAsync(int bytesAlreadyRead, byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
net\System\Net\mail\DelegatedStream.cs (3)
153
public override Task FlushAsync(
CancellationToken
cancellationToken)
167
public override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
200
public override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
net\System\Net\Sockets\NetworkStream.cs (1)
1256
public override Task FlushAsync(
CancellationToken
cancellationToken)
net\System\Net\WebSockets\ClientWebSocket.cs (6)
120
public Task ConnectAsync(Uri uri,
CancellationToken
cancellationToken)
150
private async Task ConnectAsyncCore(Uri uri,
CancellationToken
cancellationToken)
322
CancellationToken
cancellationToken)
329
CancellationToken
cancellationToken)
336
CancellationToken
cancellationToken)
343
CancellationToken
cancellationToken)
net\System\Net\WebSockets\WebSocket.cs (4)
130
CancellationToken
cancellationToken);
133
CancellationToken
cancellationToken);
136
CancellationToken
cancellationToken);
140
CancellationToken
cancellationToken);
net\System\Net\WebSockets\WebSocketBase.cs (39)
198
CancellationToken
cancellationToken)
205
CancellationToken
cancellationToken)
222
CancellationToken
linkedCancellationToken =
CancellationToken
.None;
282
CancellationToken
cancellationToken)
304
CancellationToken
cancellationToken)
326
CancellationToken
linkedCancellationToken =
CancellationToken
.None;
399
private async Task SendFrameAsync(IList<ArraySegment<byte>> sendBuffers,
CancellationToken
cancellationToken)
510
CancellationToken
cancellationToken)
519
CancellationToken
cancellationToken)
545
CancellationToken
linkedCancellationToken =
CancellationToken
.None;
689
CancellationToken
cancellationToken)
756
CancellationToken
cancellationToken)
764
CancellationToken
cancellationToken)
788
CancellationToken
linkedCancellationToken =
CancellationToken
.None;
884
linkedCancellationToken =
CancellationToken
.None;
1299
CancellationToken
cancellationToken,
1544
CancellationToken
linkedCancellationToken =
CancellationToken
.None;
1561
ownsCancellationTokenSource = thisPtr.m_SendOutstandingOperationHelper.TryStartOperation(
CancellationToken
.None, out linkedCancellationToken);
1589
CancellationToken
.None,
1624
protected abstract void Initialize(Nullable<ArraySegment<byte>> buffer,
CancellationToken
cancellationToken);
1625
protected abstract bool ShouldContinue(
CancellationToken
cancellationToken);
1646
CancellationToken
cancellationToken)
1906
protected override void Initialize(Nullable<ArraySegment<byte>> buffer,
CancellationToken
cancellationToken)
1944
protected override bool ShouldContinue(
CancellationToken
cancellationToken)
2114
CancellationToken
cancellationToken)
2131
protected override bool ShouldContinue(
CancellationToken
cancellationToken)
2348
public bool TryStartOperation(
CancellationToken
userCancellationToken, out
CancellationToken
linkedCancellationToken)
2350
linkedCancellationToken =
CancellationToken
.None;
2397
private
CancellationToken
CreateLinkedCancellationToken(
CancellationToken
cancellationToken)
2401
if (cancellationToken ==
CancellationToken
.None)
2489
Task MultipleWriteAsync(IList<ArraySegment<byte>> buffers,
CancellationToken
cancellationToken);
2495
Task CloseNetworkConnectionAsync(
CancellationToken
cancellationToken);
net\System\Net\WebSockets\WebSocketConnectionStream.cs (12)
90
public async Task CloseNetworkConnectionAsync(
CancellationToken
cancellationToken)
101
CancellationToken
linkedCancellationToken =
CancellationToken
.None;
197
public async override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
245
public async override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
313
public async Task MultipleWriteAsync(IList<ArraySegment<byte>> sendBuffers,
CancellationToken
cancellationToken)
536
public Task CloseNetworkConnectionAsync(
CancellationToken
cancellationToken)
628
CancellationToken
cancellationToken)
681
public override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
733
public override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
745
internal Task<int> ReadAsyncCore(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken,
810
public override Task FlushAsync(
CancellationToken
cancellationToken)
net\System\Net\WebSockets\WebSocketHelpers.cs (1)
213
internal static string GetTraceMsgForParameters(int offset, int count,
CancellationToken
cancellationToken)
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (8)
129
public override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
136
private async Task<int> ReadAsyncCore(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
343
public Task MultipleWriteAsync(IList<ArraySegment<byte>> sendBuffers,
CancellationToken
cancellationToken)
359
private async Task MultipleWriteAsyncCore(IList<ArraySegment<byte>> sendBuffers,
CancellationToken
cancellationToken)
417
public override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
424
private async Task WriteAsyncCore(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
597
public override Task FlushAsync(
CancellationToken
cancellationToken)
612
public async Task CloseNetworkConnectionAsync(
CancellationToken
cancellationToken)
sys\system\collections\concurrent\BlockingCollection.cs (60)
279
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
284
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
294
/// a call to <see cref="Add(T,System.Threading.
CancellationToken
)"/> may block until space is available to store the provided item.
296
public void Add(T item,
CancellationToken
cancellationToken)
371
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
380
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
389
public bool TryAdd(T item, int millisecondsTimeout,
CancellationToken
cancellationToken)
405
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
410
private bool TryAddWithNoTimeValidation(T item, int millisecondsTimeout,
CancellationToken
cancellationToken)
554
if (!TryTake(out item, Timeout.Infinite,
CancellationToken
.None))
564
/// <exception cref="T:System.OperationCanceledException">If the <see cref="
CancellationToken
"/> is
573
/// <remarks>A call to <see cref="Take(
CancellationToken
)"/> may block until an item is available to be removed.</remarks>
574
public T Take(
CancellationToken
cancellationToken)
598
return TryTake(out item, 0,
CancellationToken
.None);
621
return TryTakeWithNoTimeValidation(out item, (int)timeout.TotalMilliseconds,
CancellationToken
.None, null);
642
return TryTakeWithNoTimeValidation(out item, millisecondsTimeout,
CancellationToken
.None, null);
647
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
656
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
664
public bool TryTake(out T item, int millisecondsTimeout,
CancellationToken
cancellationToken)
674
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
684
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
686
private bool TryTakeWithNoTimeValidation(out T item, int millisecondsTimeout,
CancellationToken
cancellationToken, CancellationTokenSource combinedTokenSource)
812
TryAddToAny(collections, item, Timeout.Infinite,
CancellationToken
.None);
823
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
830
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
847
public static int AddToAny(BlockingCollection<T>[] collections, T item,
CancellationToken
cancellationToken)
882
return TryAddToAny(collections, item, 0,
CancellationToken
.None);
912
return TryAddToAnyCore(collections, item, (int)timeout.TotalMilliseconds,
CancellationToken
.None);
939
return TryAddToAnyCore(collections, item, millisecondsTimeout,
CancellationToken
.None);
945
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
955
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
968
public static int TryAddToAny(BlockingCollection<T>[] collections, T item, int millisecondsTimeout,
CancellationToken
cancellationToken)
975
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
985
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
990
private static int TryAddToAnyCore(BlockingCollection<T>[] collections, T item, int millisecondsTimeout,
CancellationToken
externalCancellationToken)
1017
CancellationToken
[] collatedCancellationTokens;
1097
private static List<WaitHandle> GetHandles(BlockingCollection<T>[] collections,
CancellationToken
externalCancellationToken, bool isAddOperation, out
CancellationToken
[] cancellationTokens)
1102
List<
CancellationToken
> tokensList = new List<
CancellationToken
>(collections.Length + 1); // + 1 for the external token
1188
return TakeFromAny(collections, out item,
CancellationToken
.None);
1194
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
1204
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
1215
public static int TakeFromAny(BlockingCollection<T>[] collections, out T item,
CancellationToken
cancellationToken)
1278
return TryTakeFromAnyCore(collections, out item, (int)timeout.TotalMilliseconds, false,
CancellationToken
.None);
1308
return TryTakeFromAnyCore(collections, out item, millisecondsTimeout, false,
CancellationToken
.None);
1314
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
1324
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
1339
public static int TryTakeFromAny(BlockingCollection<T>[] collections, out T item, int millisecondsTimeout,
CancellationToken
cancellationToken)
1346
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
1357
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
1362
private static int TryTakeFromAnyCore(BlockingCollection<T>[] collections, out T item, int millisecondsTimeout, bool isTakeOperation,
CancellationToken
externalCancellationToken)
1381
/// A <see cref="System.OperationCanceledException"/> is thrown if the <see cref="
CancellationToken
"/> is
1392
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
1397
private static int TryTakeFromAnyCoreSlow(BlockingCollection<T>[] collections, out T item, int millisecondsTimeout, bool isTakeOperation,
CancellationToken
externalCancellationToken)
1427
CancellationToken
[] collatedCancellationTokens;
1658
return GetConsumingEnumerable(
CancellationToken
.None);
1663
/// throw an <see cref="System.OperationCanceledException"/> if the <see cref="
CancellationToken
"/> is canceled.
1669
/// <exception cref="OperationCanceledException">If the <see cref="
CancellationToken
"/> is canceled.</exception>
1670
public IEnumerable<T> GetConsumingEnumerable(
CancellationToken
cancellationToken)
sys\system\threading\Barrier.cs (4)
527
public void SignalAndWait(
CancellationToken
cancellationToken)
583
public Boolean SignalAndWait(TimeSpan timeout,
CancellationToken
cancellationToken)
636
public bool SignalAndWait(int millisecondsTimeout,
CancellationToken
cancellationToken)
894
private bool DiscontinuousWait(ManualResetEventSlim currentPhaseEvent, int totalTimeout,
CancellationToken
token, long observedPhase)
System.Activities (5)
System\Activities\ProcessActivityTreeOptions.cs (4)
29
public
CancellationToken
CancellationToken
330
if (originalOptions.CancellationToken ==
CancellationToken
.None)
364
if (settings.CancellationToken ==
CancellationToken
.None)
374
static ProcessActivityTreeOptions AttachCancellationToken(ProcessActivityTreeOptions result,
CancellationToken
cancellationToken)
System\Activities\Validation\ValidationSettings.cs (1)
17
public
CancellationToken
CancellationToken
System.Activities.Presentation (6)
System.Activities.Presentation\System\Activities\Presentation\Validation\BackgroundValidationSynchronizer.cs (2)
22
private Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork;
33
internal BackgroundValidationSynchronizer(TaskDispatcher dispatcher, Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork, Action<TValidationResult> updateWork)
System.Activities.Presentation\System\Activities\Presentation\Validation\ForegroundValidationSynchronizer.cs (3)
15
private Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork;
18
internal ForegroundValidationSynchronizer(TaskDispatcher dispatcher, Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork, Action<TValidationResult> updateWork)
31
this.updateWork(this.validationWork(reason, /* cancellationToken = */
CancellationToken
.None));
System.Activities.Presentation\System\Activities\Presentation\Validation\ValidationService.cs (1)
381
internal Tuple<ValidationReason, ValidationResults, Exception> CoreValidationWork(ValidationReason reason,
CancellationToken
cancellationToken)
System.Core (203)
System\IO\Pipes\IOCancellationHelper.cs (2)
15
private
CancellationToken
_cancellationToken;
22
public IOCancellationHelper(
CancellationToken
cancellationToken) {
System\IO\Pipes\Pipe.cs (7)
627
public Task WaitForConnectionAsync(
CancellationToken
cancellationToken) {
642
return WaitForConnectionAsync(
CancellationToken
.None);
1243
return ConnectAsync(Timeout.Infinite,
CancellationToken
.None);
1247
return ConnectAsync(timeout,
CancellationToken
.None);
1250
public Task ConnectAsync(
CancellationToken
cancellationToken) {
1254
public Task ConnectAsync(int timeout,
CancellationToken
cancellationToken) {
1275
private void ConnectInternal(int timeout,
CancellationToken
cancellationToken, int startTime) {
System\Linq\Parallel\Channels\AsynchronousChannel.cs (3)
93
private
CancellationToken
m_cancellationToken;
109
internal AsynchronousChannel(int index, int chunkSize,
CancellationToken
cancellationToken, IntValueEvent consumerEvent) :
114
internal AsynchronousChannel(int index, int capacity, int chunkSize,
CancellationToken
cancellationToken, IntValueEvent consumerEvent)
System\Linq\Parallel\Merging\MergeExecutor.cs (1)
147
internal static AsynchronousChannel<TInputOutput>[] MakeAsynchronousChannels(int partitionCount, ParallelMergeOptions options, IntValueEvent consumerEvent,
CancellationToken
cancellationToken)
System\Linq\Parallel\Partitioning\HashRepartitionEnumerator.cs (2)
39
private readonly
CancellationToken
m_cancellationToken; // A token for canceling the process.
70
CountdownEvent barrier, ListChunk<Pair<TInputOutput, THashKey>>[,] valueExchangeMatrix,
CancellationToken
cancellationToken)
System\Linq\Parallel\Partitioning\OrderedHashRepartitionEnumerator.cs (2)
40
private readonly
CancellationToken
m_cancellationToken; // A token for canceling the process.
72
ListChunk<Pair<TInputOutput, THashKey>>[,] valueExchangeMatrix, ListChunk<TOrderKey>[,] keyExchangeMatrix,
CancellationToken
cancellationToken)
System\Linq\Parallel\Partitioning\OrderedHashRepartitionStream.cs (1)
23
IEqualityComparer<THashKey> hashKeyComparer, IEqualityComparer<TInputOutput> elementComparer,
CancellationToken
cancellationToken)
System\Linq\Parallel\Partitioning\UnorderedHashRepartitionStream.cs (1)
29
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\AssociativeAggregationOperator.cs (3)
218
internal override IEnumerable<TIntermediate> AsSequentialQuery(
CancellationToken
token)
246
private readonly
CancellationToken
m_cancellationToken;
256
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Binary\ExceptQueryOperator.cs (6)
85
IPartitionedStreamRecipient<TInputOutput> outputRecipient,
CancellationToken
cancellationToken)
118
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
147
private
CancellationToken
m_cancellationToken;
158
CancellationToken
cancellationToken)
237
private
CancellationToken
m_cancellationToken;
247
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Binary\GroupJoinQueryOperator.cs (2)
104
IPartitionedStreamRecipient<TOutput> outputRecipient, int partitionCount,
CancellationToken
cancellationToken)
125
internal override IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Binary\HashJoinQueryOperatorEnumerator.cs (2)
47
private readonly
CancellationToken
m_cancellationToken;
70
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Binary\IntersectQueryOperator.cs (6)
87
IPartitionedStreamRecipient<TInputOutput> outputRecipient,
CancellationToken
cancellationToken)
137
private
CancellationToken
m_cancellationToken;
147
IEqualityComparer<TInputOutput> comparer,
CancellationToken
cancellationToken)
225
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
241
private
CancellationToken
m_cancellationToken;
251
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Binary\JoinQueryOperator.cs (2)
106
IPartitionedStreamRecipient<TOutput> outputRecipient,
CancellationToken
cancellationToken)
136
internal override IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Binary\UnionQueryOperator.cs (7)
95
IPartitionedStreamRecipient<TInputOutput> outputRecipient, int partitionCount,
CancellationToken
cancellationToken)
125
CancellationToken
cancellationToken)
164
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
194
private
CancellationToken
m_cancellationToken;
206
CancellationToken
cancellationToken)
313
private
CancellationToken
m_cancellationToken;
323
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Binary\ZipQueryOperator.cs (1)
121
internal override IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Inlined\CountAggregationOperator.cs (2)
71
CancellationToken
cancellationToken)
90
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\DecimalAverageAggregationOperator.cs (2)
81
int index, int count, QueryOperatorEnumerator<decimal, TKey> source, object sharedData,
CancellationToken
cancellationToken)
100
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\DecimalMinMaxAggregationOperator.cs (2)
98
int index, int count, QueryOperatorEnumerator<decimal, TKey> source, object sharedData,
CancellationToken
cancellationToken)
118
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\DecimalSumAggregationOperator.cs (2)
69
int index, int count, QueryOperatorEnumerator<decimal, TKey> source, object sharedData,
CancellationToken
cancellationToken)
88
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\DoubleAverageAggregationOperator.cs (2)
81
CancellationToken
cancellationToken)
100
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\DoubleMinMaxAggregationOperator.cs (2)
104
CancellationToken
cancellationToken)
124
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\DoubleSumAggregationOperator.cs (2)
71
int index, int count, QueryOperatorEnumerator<double, TKey> source, object sharedData,
CancellationToken
cancellationToken)
90
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\FloatAverageAggregationOperator.cs (2)
81
CancellationToken
cancellationToken)
100
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\FloatMinMaxAggregationOperator.cs (2)
102
int index, int count, QueryOperatorEnumerator<float, TKey> source, object sharedData,
CancellationToken
cancellationToken)
122
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\FloatSumAggregationOperator.cs (2)
73
CancellationToken
cancellationToken)
92
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperator.cs (2)
146
int index, int count, QueryOperatorEnumerator<TSource, TKey> source, object sharedData,
CancellationToken
cancellationToken);
148
internal override IEnumerable<TIntermediate> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Inlined\InlinedAggregationOperatorEnumerator.cs (2)
39
protected
CancellationToken
m_cancellationToken;
45
internal InlinedAggregationOperatorEnumerator(int partitionIndex,
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Inlined\IntAverageAggregationOperator.cs (2)
81
int index, int count, QueryOperatorEnumerator<int, TKey> source, object sharedData,
CancellationToken
cancellationToken)
100
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\IntMinMaxAggregationOperator.cs (2)
98
int index, int count, QueryOperatorEnumerator<int, TKey> source, object sharedData,
CancellationToken
cancellationToken)
118
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\IntSumAggregationOperator.cs (2)
73
int index, int count, QueryOperatorEnumerator<int, TKey> source, object sharedData,
CancellationToken
cancellationToken)
92
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\LongAverageAggregationOperator.cs (2)
81
int index, int count, QueryOperatorEnumerator<long, TKey> source, object sharedData,
CancellationToken
cancellationToken)
100
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\LongCountAggregationOperator.cs (2)
73
int index, int count, QueryOperatorEnumerator<TSource, TKey> source, object sharedData,
CancellationToken
cancellationToken)
92
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\LongMinMaxAggregationOperator.cs (2)
99
CancellationToken
cancellationToken)
119
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\LongSumAggregationOperator.cs (2)
72
int index, int count, QueryOperatorEnumerator<long, TKey> source, object sharedData,
CancellationToken
cancellationToken)
91
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalAverageAggregationOperator.cs (2)
77
int index, int count, QueryOperatorEnumerator<decimal?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
96
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalMinMaxAggregationOperator.cs (2)
94
int index, int count, QueryOperatorEnumerator<decimal?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
114
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableDecimalSumAggregationOperator.cs (2)
66
int index, int count, QueryOperatorEnumerator<decimal?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
85
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleAverageAggregationOperator.cs (2)
77
int index, int count, QueryOperatorEnumerator<double?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
96
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleMinMaxAggregationOperator.cs (2)
102
int index, int count, QueryOperatorEnumerator<double?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
122
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableDoubleSumAggregationOperator.cs (2)
66
int index, int count, QueryOperatorEnumerator<double?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
85
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatAverageAggregationOperator.cs (2)
77
int index, int count, QueryOperatorEnumerator<float?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
96
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatMinMaxAggregationOperator.cs (2)
102
int index, int count, QueryOperatorEnumerator<float?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
122
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableFloatSumAggregationOperator.cs (2)
66
int index, int count, QueryOperatorEnumerator<float?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
85
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableIntAverageAggregationOperator.cs (2)
77
int index, int count, QueryOperatorEnumerator<int?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
96
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableIntMinMaxAggregationOperator.cs (2)
94
int index, int count, QueryOperatorEnumerator<int?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
114
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableIntSumAggregationOperator.cs (2)
69
int index, int count, QueryOperatorEnumerator<int?, TKey> source, object sharedData,
CancellationToken
cancellationToken)
88
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableLongAverageAggregationOperator.cs (2)
78
CancellationToken
cancellationToken)
97
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableLongMinMaxAggregationOperator.cs (2)
95
CancellationToken
cancellationToken)
115
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Inlined\NullableLongSumAggregationOperator.cs (2)
70
CancellationToken
cancellationToken)
89
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Options\OrderingQueryOperator.cs (1)
58
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Options\QueryExecutionOption.cs (1)
43
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\PartitionerQueryOperator.cs (1)
58
internal override IEnumerable<TElement> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\QueryOperator.cs (1)
253
internal abstract IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token);
System\Linq\Parallel\QueryOperators\QuerySettings.cs (2)
90
CancellationToken
externalCancellationToken, ParallelExecutionMode? executionMode,
135
CancellationToken
externalCancellationToken = (this.CancellationState.ExternalCancellationToken.CanBeCanceled) ? this.CancellationState.ExternalCancellationToken : settings2.CancellationState.ExternalCancellationToken;
System\Linq\Parallel\QueryOperators\ScanQueryOperator.cs (1)
94
internal override IEnumerable<TElement> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\AnyAllSearchOperator.cs (3)
130
internal override IEnumerable<bool> AsSequentialQuery(
CancellationToken
token)
159
private readonly
CancellationToken
m_cancellationToken;
167
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\ConcatQueryOperator.cs (1)
142
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\ContainsSearchOperator.cs (3)
117
internal override IEnumerable<bool> AsSequentialQuery(
CancellationToken
token)
146
private
CancellationToken
m_cancellationToken;
154
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\DefaultIfEmptyQueryOperator.cs (3)
86
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
117
private
CancellationToken
m_cancelToken; // Token used to cancel this operator.
125
Shared<int> sharedEmptyCount, CountdownEvent sharedLatch,
CancellationToken
cancelToken)
System\Linq\Parallel\QueryOperators\Unary\DistinctQueryOperator.cs (6)
84
IPartitionedStreamRecipient<TInputOutput> recipient,
CancellationToken
cancellationToken)
128
private
CancellationToken
m_cancellationToken;
137
CancellationToken
cancellationToken)
191
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
204
private
CancellationToken
m_cancellationToken;
213
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\ElementAtQueryOperator.cs (3)
104
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
175
private
CancellationToken
m_cancellationToken;
183
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\FirstQueryOperator.cs (3)
102
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
133
private
CancellationToken
m_cancellationToken; // Token used to cancel this operator.
142
FirstQueryOperatorState<TKey> operatorState, CountdownEvent sharedBarrier,
CancellationToken
cancellationToken,
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (3)
106
internal override IEnumerable<TInput> AsSequentialQuery(
CancellationToken
token)
131
private
CancellationToken
m_cancellationToken; // Token used to cancel this operator.
137
internal ForAllEnumerator(QueryOperatorEnumerator<TInput, TKey> source, Action<TInput> elementAction,
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\GroupByQueryOperator.cs (11)
105
CancellationToken
cancellationToken)
144
CancellationToken
cancellationToken)
193
internal override IEnumerable<IGrouping<TGroupKey, TElement>> AsSequentialQuery(
CancellationToken
token)
233
protected readonly
CancellationToken
m_cancellationToken;
248
IEqualityComparer<TGroupKey> keyComparer,
CancellationToken
cancellationToken)
319
IEqualityComparer<TGroupKey> keyComparer,
CancellationToken
cancellationToken)
381
IEqualityComparer<TGroupKey> keyComparer, Func<TSource, TElement> elementSelector,
CancellationToken
cancellationToken) :
440
protected readonly
CancellationToken
m_cancellationToken;
455
CancellationToken
cancellationToken)
552
CancellationToken
cancellationToken)
626
CancellationToken
cancellationToken) :
System\Linq\Parallel\QueryOperators\Unary\IndexedSelectQueryOperator.cs (1)
186
internal override IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\IndexedWhereQueryOperator.cs (3)
122
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
148
private
CancellationToken
m_cancellationToken;
155
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\LastQueryOperator.cs (3)
98
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
129
private
CancellationToken
m_cancellationToken; // Token used to cancel this operator.
138
LastQueryOperatorState<TKey> operatorState, CountdownEvent sharedBarrier,
CancellationToken
cancelToken,
System\Linq\Parallel\QueryOperators\Unary\ReverseQueryOperator.cs (3)
89
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
113
private readonly
CancellationToken
m_cancellationToken;
122
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\SelectManyQueryOperator.cs (5)
200
internal override IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token)
244
private readonly
CancellationToken
m_cancellationToken;
263
CancellationToken
cancellationToken)
374
private readonly
CancellationToken
m_cancellationToken;
393
CancellationToken
cancellationToken)
System\Linq\Parallel\QueryOperators\Unary\SelectQueryOperator.cs (1)
78
internal override IEnumerable<TOutput> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\SingleQueryOperator.cs (1)
79
internal override IEnumerable<TSource> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\SortQueryOperator.cs (1)
131
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipQueryOperator.cs (3)
162
private readonly
CancellationToken
m_cancellationToken; // Indicates that cancellation has occurred.
173
FixedMaxHeap<TKey> sharedIndices, CountdownEvent sharedBarrier,
CancellationToken
cancellationToken,
316
internal override IEnumerable<TResult> AsSequentialQuery(
CancellationToken
token)
System\Linq\Parallel\QueryOperators\Unary\TakeOrSkipWhileQueryOperator.cs (3)
172
internal override IEnumerable<TResult> AsSequentialQuery(
CancellationToken
token)
220
private readonly
CancellationToken
m_cancellationToken; // Token used to cancel this operator.
234
OperatorState<TKey> operatorState, CountdownEvent sharedBarrier,
CancellationToken
cancelToken, IComparer<TKey> keyComparer)
System\Linq\Parallel\QueryOperators\Unary\WhereQueryOperator.cs (3)
86
internal override IEnumerable<TInputOutput> AsSequentialQuery(
CancellationToken
token)
111
private
CancellationToken
m_cancellationToken;
119
CancellationToken
cancellationToken)
System\Linq\Parallel\Scheduling\CancellationState.cs (5)
33
internal
CancellationToken
ExternalCancellationToken;
39
internal
CancellationToken
MergedCancellationToken
53
internal CancellationState(
CancellationToken
externalCancellationToken)
81
internal static void ThrowIfCanceled(
CancellationToken
token)
88
internal static void ThrowWithStandardMessageIfCanceled(
CancellationToken
externalCancellationToken)
System\Linq\Parallel\Scheduling\OrderPreservingPipeliningSpoolingTask.cs (1)
102
CancellationToken
cancelToken = m_taskGroupState.CancellationState.MergedCancellationToken;
System\Linq\Parallel\Scheduling\SpoolingTask.cs (2)
229
CancellationToken
cancelToken = m_groupState.CancellationState.MergedCancellationToken;
318
CancellationToken
cancelToken = m_groupState.CancellationState.MergedCancellationToken;
System\Linq\Parallel\Utils\CancellableEnumerable.cs (1)
30
internal static IEnumerable<TElement> Wrap<TElement>(IEnumerable<TElement> source,
CancellationToken
token)
System\Linq\Parallel\Utils\ExchangeUtilities.cs (2)
99
IEqualityComparer<TElement> elementComparer,
CancellationToken
cancellationToken)
107
IEqualityComparer<TElement> elementComparer,
CancellationToken
cancellationToken)
System\Linq\Parallel\Utils\Sorting.cs (3)
230
CancellationToken
cancelToken = m_groupState.CancellationState.MergedCancellationToken;
364
CancellationToken
cancelToken = m_groupState.CancellationState.MergedCancellationToken;
579
private void QuickSort(int left, int right, TKey[] keys, int[] indices,
CancellationToken
cancelToken)
System\Linq\ParallelEnumerable.cs (3)
348
/// Sets the <see cref="System.Threading.
CancellationToken
"/> to associate with the query.
353
/// <returns>ParallelQuery representing the same query as source, but with the <seealso cref="System.Threading.
CancellationToken
"/>
364
public static ParallelQuery<TSource> WithCancellation<TSource>(this ParallelQuery<TSource> source,
CancellationToken
cancellationToken)
System.Data (82)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Validation\BackgroundValidationSynchronizer.cs (2)
22
private Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork;
33
internal BackgroundValidationSynchronizer(TaskDispatcher dispatcher, Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork, Action<TValidationResult> updateWork)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Validation\ForegroundValidationSynchronizer.cs (3)
15
private Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork;
18
internal ForegroundValidationSynchronizer(TaskDispatcher dispatcher, Func<ValidationReason,
CancellationToken
, TValidationResult> validationWork, Action<TValidationResult> updateWork)
31
this.updateWork(this.validationWork(reason, /* cancellationToken = */
CancellationToken
.None));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Validation\ValidationService.cs (1)
381
internal Tuple<ValidationReason, ValidationResults, Exception> CoreValidationWork(ValidationReason reason,
CancellationToken
cancellationToken)
fx\src\data\System\Data\Common\DBCommand.cs (9)
205
return ExecuteNonQueryAsync(
CancellationToken
.None);
208
public virtual Task<int> ExecuteNonQueryAsync(
CancellationToken
cancellationToken) {
229
return ExecuteReaderAsync(CommandBehavior.Default,
CancellationToken
.None);
232
public Task<DbDataReader> ExecuteReaderAsync(
CancellationToken
cancellationToken) {
237
return ExecuteReaderAsync(behavior,
CancellationToken
.None);
240
public Task<DbDataReader> ExecuteReaderAsync(CommandBehavior behavior,
CancellationToken
cancellationToken) {
244
protected virtual Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior,
CancellationToken
cancellationToken) {
265
return ExecuteScalarAsync(
CancellationToken
.None);
268
public virtual Task<object> ExecuteScalarAsync(
CancellationToken
cancellationToken) {
fx\src\data\System\Data\Common\DBConnection.cs (2)
181
return OpenAsync(
CancellationToken
.None);
184
public virtual Task OpenAsync(
CancellationToken
cancellationToken) {
fx\src\data\System\Data\Common\DbDataReader.cs (8)
199
return GetFieldValueAsync<T>(ordinal,
CancellationToken
.None);
202
virtual public Task<T> GetFieldValueAsync<T>(int ordinal,
CancellationToken
cancellationToken) {
221
return IsDBNullAsync(ordinal,
CancellationToken
.None);
224
virtual public Task<bool> IsDBNullAsync(int ordinal,
CancellationToken
cancellationToken) {
243
return ReadAsync(
CancellationToken
.None);
246
virtual public Task<bool> ReadAsync(
CancellationToken
cancellationToken) {
261
return NextResultAsync(
CancellationToken
.None);
264
virtual public Task<bool> NextResultAsync(
CancellationToken
cancellationToken) {
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (25)
1001
private Task ReadFromRowSourceAsync(
CancellationToken
cts) {
1485
WriteRowSourceToServerAsync(reader.FieldCount,
CancellationToken
.None); //It returns null since _isAsyncBulkCopy = false;
1515
WriteRowSourceToServerAsync(reader.FieldCount,
CancellationToken
.None); //It returns null since _isAsyncBulkCopy = false;
1548
WriteRowSourceToServerAsync(table.Columns.Count,
CancellationToken
.None); //It returns null since _isAsyncBulkCopy = false;
1585
WriteRowSourceToServerAsync(table.Columns.Count,
CancellationToken
.None); //It returns null since _isAsyncBulkCopy = false;
1594
return WriteToServerAsync(rows,
CancellationToken
.None);
1597
public Task WriteToServerAsync(DataRow[] rows,
CancellationToken
cancellationToken) {
1643
return WriteToServerAsync(reader,
CancellationToken
.None);
1645
public Task WriteToServerAsync(DbDataReader reader,
CancellationToken
cancellationToken) {
1675
return WriteToServerAsync(reader,
CancellationToken
.None);
1677
public Task WriteToServerAsync(IDataReader reader,
CancellationToken
cancellationToken) {
1707
return WriteToServerAsync(table, 0,
CancellationToken
.None);
1709
public Task WriteToServerAsync(DataTable table,
CancellationToken
cancellationToken) {
1713
return WriteToServerAsync(table, rowState,
CancellationToken
.None);
1715
public Task WriteToServerAsync(DataTable table, DataRowState rowState,
CancellationToken
cancellationToken) {
1747
private Task WriteRowSourceToServerAsync(int columnCount,
CancellationToken
ctoken) {
2126
Task CheckForCancellation(
CancellationToken
cts, TaskCompletionSource<object> tcs) {
2158
private Task CopyRowsAsync(int rowsSoFar, int totalRows,
CancellationToken
cts, TaskCompletionSource<object> source = null) {
2229
private Task CopyBatchesAsync(BulkCopySimpleResultSet internalResults, string updateBulkCommandText,
CancellationToken
cts, TaskCompletionSource<object> source = null) {
2294
private Task CopyBatchesAsyncContinued(BulkCopySimpleResultSet internalResults, string updateBulkCommandText,
CancellationToken
cts, TaskCompletionSource<object> source) {
2339
private Task CopyBatchesAsyncContinuedOnSuccess(BulkCopySimpleResultSet internalResults, string updateBulkCommandText,
CancellationToken
cts, TaskCompletionSource<object> source) {
2457
private void WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults,
CancellationToken
cts, TaskCompletionSource<object> source) {
2554
private void WriteToServerInternalRestAsync(
CancellationToken
cts, TaskCompletionSource<object> source) {
2588
()=>{return SQL.BulkLoadInvalidDestinationTable(_destinationTableName, SQL.CR_ReconnectTimeout());},
CancellationToken
.None);
2661
private Task WriteToServerInternalAsync(
CancellationToken
ctoken) {
fx\src\data\System\Data\SqlClient\SqlCommand.cs (10)
2405
public override Task<int> ExecuteNonQueryAsync(
CancellationToken
cancellationToken) {
2448
protected override Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior,
CancellationToken
cancellationToken) {
2454
},
CancellationToken
.None, TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.NotOnCanceled, TaskScheduler.Default);
2458
return ExecuteReaderAsync(CommandBehavior.Default,
CancellationToken
.None);
2462
return ExecuteReaderAsync(behavior,
CancellationToken
.None);
2465
new public Task<SqlDataReader> ExecuteReaderAsync(
CancellationToken
cancellationToken) {
2469
new public Task<SqlDataReader> ExecuteReaderAsync(CommandBehavior behavior,
CancellationToken
cancellationToken) {
2512
public override Task<object> ExecuteScalarAsync(
CancellationToken
cancellationToken)
2570
return ExecuteXmlReaderAsync(
CancellationToken
.None);
2573
public Task<XmlReader> ExecuteXmlReaderAsync(
CancellationToken
cancellationToken) {
fx\src\data\System\Data\SqlClient\SqlConnection.cs (2)
1229
CancellationToken
ctoken = cts.Token;
1383
public override Task OpenAsync(
CancellationToken
cancellationToken) {
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (12)
95
private
CancellationToken
_cancelAsyncOnCloseToken;
3932
public override Task<bool> NextResultAsync(
CancellationToken
cancellationToken) {
3994
internal Task<int> GetBytesAsync(int i, byte[] buffer, int index, int length, int timeout,
CancellationToken
cancellationToken, out int bytesRead) {
4032
CancellationToken
timeoutToken =
CancellationToken
.None;
4088
return GetBytesAsyncReadDataStage(i, buffer, index, length, timeout, false, cancellationToken,
CancellationToken
.None, out bytesRead);
4097
private Task<int> GetBytesAsyncReadDataStage(int i, byte[] buffer, int index, int length, int timeout, bool isContinuation,
CancellationToken
cancellationToken,
CancellationToken
timeoutToken, out int bytesRead) {
4127
Debug.Assert(timeoutToken ==
CancellationToken
.None, "TimeoutToken is set when GetBytesAsyncReadDataStage is not a continuation");
4185
public override Task<bool> ReadAsync(
CancellationToken
cancellationToken) {
4324
override public Task<bool> IsDBNullAsync(int i,
CancellationToken
cancellationToken) {
4426
override public Task<T> GetFieldValueAsync<T>(int i,
CancellationToken
cancellationToken) {
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (4)
139
public override Task<T> GetFieldValueAsync<T>(int ordinal,
CancellationToken
cancellationToken) {
199
public override Task<bool> IsDBNullAsync(int ordinal,
CancellationToken
cancellationToken) {
359
public override Task<bool> NextResultAsync(
CancellationToken
cancellationToken)
411
public override Task<bool> ReadAsync(
CancellationToken
cancellationToken)
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (2)
124
Task readTask = ReadAsync(buffer, offset, count,
CancellationToken
.None);
153
public override Task<int> ReadAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken)
fx\src\data\System\Data\SqlClient\SqlUtil.cs (1)
169
internal static void SetTimeoutException(TaskCompletionSource<object> completion, int timeout, Func<Exception> exc,
CancellationToken
ctoken) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (1)
10184
public override Task WriteAsync(byte[] buffer, int offset, int count,
CancellationToken
cancellationToken) {
System.ServiceModel (19)
System\ServiceModel\Channels\DefaultWebSocketConnectionHandler.cs (1)
50
protected internal override HttpResponseMessage AcceptWebSocket(HttpRequestMessage request,
CancellationToken
cancellationToken)
System\ServiceModel\Channels\HttpChannelListener.cs (2)
1488
public Task<HttpResponseMessage> ProcessPipelineAsync(HttpRequestMessage request,
CancellationToken
cancellationToken)
1558
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
CancellationToken
cancellationToken)
System\ServiceModel\Channels\WebSocketConnectionHandler.cs (2)
18
protected internal virtual HttpResponseMessage AcceptWebSocket(HttpRequestMessage request,
CancellationToken
cancellationToken)
56
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
CancellationToken
cancellationToken)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (11)
184
Task task = this.CloseOutputAsync(
CancellationToken
.None);
248
},
CancellationToken
.None);
342
Task task = this.WebSocket.SendAsync(messageData, outgoingMessageType, true,
CancellationToken
.None);
416
return this.WebSocket.CloseAsync(this.webSocketCloseDetails.OutputCloseStatus, this.webSocketCloseDetails.OutputCloseStatusDescription,
CancellationToken
.None);
430
private Task CloseOutputAsync(
CancellationToken
cancellationToken)
665
CancellationToken
.None);
878
CancellationToken
.None);
1261
Task<WebSocketReceiveResult> task = this.webSocket.ReceiveAsync(new ArraySegment<byte>(buffer, offset, count),
CancellationToken
.None);
1319
Task task = this.webSocket.SendAsync(new ArraySegment<byte>(buffer, offset, count), this.outgoingMessageType, false,
CancellationToken
.None);
1381
Task task = this.webSocket.SendAsync(new ArraySegment<byte>(EmptyArray<byte>.Instance, 0, 0), this.outgoingMessageType, true,
CancellationToken
.None);
1468
Task<WebSocketReceiveResult> receiveTask = this.webSocket.ReceiveAsync(new ArraySegment<byte>(this.initialReadBuffer.Array),
CancellationToken
.None);
System\ServiceModel\Description\ServiceReflector.cs (1)
343
internal static readonly Type CancellationTokenType = typeof(
CancellationToken
);
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (2)
276
}, callback,
CancellationToken
.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
309
}, continuationState,
CancellationToken
.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
System.ServiceModel.Discovery (6)
System\ServiceModel\Discovery\DiscoveryClient.cs (6)
427
return this.FindTaskAsync(criteria,
CancellationToken
.None);
431
public Task<FindResponse> FindTaskAsync(FindCriteria criteria,
CancellationToken
cancellationToken)
448
return this.ResolveTaskAsync(criteria,
CancellationToken
.None);
452
public Task<ResolveResponse> ResolveTaskAsync(ResolveCriteria criteria,
CancellationToken
cancellationToken)
1394
CancellationToken
cancellationToken;
1396
internal TaskAsyncOperationState(DiscoveryClient discoveryClient, TaskCompletionSource<TResult> taskCompletionSource,
CancellationToken
cancellationToken)
System.ServiceModel.Internals (3)
System\Runtime\IOThreadCancellationTokenSource.cs (3)
15
CancellationToken
? token;
31
public
CancellationToken
Token
39
this.token =
CancellationToken
.None;
System.Web (52)
Abstractions\HttpRequestBase.cs (1)
244
public virtual
CancellationToken
TimedOutToken {
Abstractions\HttpRequestWrapper.cs (1)
255
public override
CancellationToken
TimedOutToken {
Abstractions\HttpResponseBase.cs (1)
66
public virtual
CancellationToken
ClientDisconnectedToken {
Abstractions\HttpResponseWrapper.cs (1)
72
public override
CancellationToken
ClientDisconnectedToken {
Hosting\BackgroundWorkScheduler.cs (3)
33
private async void RunWorkItemImpl(Func<
CancellationToken
, Task> workItem) {
58
public void ScheduleWorkItem(Func<
CancellationToken
, Task> workItem) {
76
RunWorkItemImpl((Func<
CancellationToken
, Task>)state);
Hosting\HostingEnvironment.cs (3)
1161
public static void QueueBackgroundWorkItem(Action<
CancellationToken
> workItem) {
1175
public static void QueueBackgroundWorkItem(Func<
CancellationToken
, Task> workItem) {
1186
private void QueueBackgroundWorkItemInternal(Func<
CancellationToken
, Task> workItem) {
Hosting\IIS7WorkerRequest.cs (2)
839
internal bool TryGetClientDisconnectedCancellationToken(out
CancellationToken
cancellationToken) {
842
cancellationToken =
CancellationToken
.None;
HttpContext.cs (1)
1656
internal
CancellationToken
TimedOutToken {
HttpRequest.cs (2)
3335
public
CancellationToken
TimedOutToken {
3340
return (context != null) ? context.TimedOutToken : default(
CancellationToken
);
HttpResponse.cs (2)
1865
public
CancellationToken
ClientDisconnectedToken {
1868
CancellationToken
cancellationToken;
UI\IPageAsyncTask.cs (1)
16
Task ExecuteAsync(object sender, EventArgs e,
CancellationToken
cancellationToken);
UI\Page.cs (1)
6033
CancellationToken
cancellationToken = cancellationTokenSource.Token;
UI\PageAsyncTask.cs (5)
54
public PageAsyncTask(Func<
CancellationToken
, Task> handler)
59
internal PageAsyncTask(Func<
CancellationToken
, Task> handler, SynchronizationContextMode currentMode) {
81
internal Func<
CancellationToken
, Task> TaskHandler { get; private set; }
83
private static Func<
CancellationToken
, Task> WrapParameterlessTaskHandler(Func<Task> handler) {
85
? (Func<
CancellationToken
, Task>)(_ => handler())
UI\PageAsyncTaskApm.cs (1)
26
public async Task ExecuteAsync(object sender, EventArgs e,
CancellationToken
cancellationToken) {
UI\PageAsyncTaskManager.cs (1)
30
public async Task ExecuteTasksAsync(object sender, EventArgs e,
CancellationToken
cancellationToken, AspNetSynchronizationContextBase syncContext, IRequestCompletedNotifier requestCompletedNotifier) {
UI\PageAsyncTaskTap.cs (3)
16
private readonly Func<
CancellationToken
, Task> _handler;
18
public PageAsyncTaskTap(Func<
CancellationToken
, Task> handler) {
22
public Task ExecuteAsync(object sender, EventArgs e,
CancellationToken
cancellationToken) {
UI\TemplateControl.cs (2)
473
var handler = FastDelegateCreator<Func<
CancellationToken
, Task>>.BindTo(this, preRenderCompleteAsyncEvent.MethodInfo);
544
MethodInfo parameterfulMethod = GetInstanceMethodInfo(typeof(Func<
CancellationToken
, Task>), methodName);
UI\WebControls\ModelDataSourceView.cs (10)
564
if (lastParameter != null && lastParameter.ParameterType == typeof(
CancellationToken
)) {
572
private void SetCancellationTokenIfRequired(ModelDataSourceMethod method, bool isAsyncMethod,
CancellationToken
? cancellationToken) {
590
private object GetDeleteMethodResult(IDictionary keys, IDictionary oldValues, ModelDataSourceMethod method, bool isAsyncMethod,
CancellationToken
? cancellationToken) {
624
private object GetInsertMethodResult(IDictionary values, ModelDataSourceMethod method, bool isAsyncMethod,
CancellationToken
? cancellationToken) {
657
private object GetUpdateMethodResult(IDictionary keys, IDictionary values, IDictionary oldValues, ModelDataSourceMethod method, bool isAsyncMethod,
CancellationToken
? cancellationToken) {
739
CancellationToken
cancellationToken = cancellationTokenSource.Token;
822
private void ViewOperationAsync(Func<
CancellationToken
, Task> asyncViewOperation, DataSourceViewOperationCallback callback) {
827
CancellationToken
cancellationToken = cancellationTokenSource.Token;
1056
if (parameterInfo == lastParameter && typeof(
CancellationToken
) == parameterInfo.ParameterType && value == null) {
1057
value =
CancellationToken
.None;
Util\CancellationTokenHelper.cs (1)
41
internal
CancellationToken
Token {
WebSockets\AspNetWebSocket.cs (10)
221
public override Task CloseAsync(WebSocketCloseStatus closeStatus, string statusDescription,
CancellationToken
cancellationToken) {
225
private Func<Task> CloseAsyncImpl(WebSocketCloseStatus closeStatus, string statusDescription,
CancellationToken
cancellationToken, bool performValidation = true) {
295
public override Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription,
CancellationToken
cancellationToken) {
299
private Func<Task> CloseOutputAsyncImpl(WebSocketCloseStatus closeStatus, string statusDescription,
CancellationToken
cancellationToken, bool performValidation = true) {
368
public override Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
CancellationToken
cancellationToken) {
372
private Func<Task<WebSocketReceiveResult>> ReceiveAsyncImpl(ArraySegment<byte> buffer,
CancellationToken
cancellationToken, bool performValidation = true) {
430
public override Task SendAsync(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage,
CancellationToken
cancellationToken) {
434
private Func<Task> SendAsyncImpl(ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage,
CancellationToken
cancellationToken, bool performValidation = true) {
562
private async Task<T> DoWork<T>(Func<Task<T>> taskDelegate,
CancellationToken
cancellationToken) {
607
internal Task DoWork(Func<Task> taskDelegate,
CancellationToken
cancellationToken) {
WindowsBase (21)
Base\MS\Internal\WeakEventTable.cs (1)
424
Dispatcher.Invoke((Action)OnShutDown, DispatcherPriority.Send,
CancellationToken
.None, TimeSpan.FromMilliseconds(300));
Base\System\Windows\Threading\Dispatcher.cs (20)
562
Invoke(callback, DispatcherPriority.Send,
CancellationToken
.None, TimeSpan.FromMilliseconds(-1));
579
Invoke(callback, priority,
CancellationToken
.None, TimeSpan.FromMilliseconds(-1));
600
public void Invoke(Action callback, DispatcherPriority priority,
CancellationToken
cancellationToken)
635
public void Invoke(Action callback, DispatcherPriority priority,
CancellationToken
cancellationToken, TimeSpan timeout)
711
return Invoke(callback, DispatcherPriority.Send,
CancellationToken
.None, TimeSpan.FromMilliseconds(-1));
737
return Invoke(callback, priority,
CancellationToken
.None, TimeSpan.FromMilliseconds(-1));
767
public TResult Invoke<TResult>(Func<TResult> callback, DispatcherPriority priority,
CancellationToken
cancellationToken)
805
public TResult Invoke<TResult>(Func<TResult> callback, DispatcherPriority priority,
CancellationToken
cancellationToken, TimeSpan timeout)
874
return InvokeAsync(callback, DispatcherPriority.Normal,
CancellationToken
.None);
897
return InvokeAsync(callback, priority,
CancellationToken
.None);
926
public DispatcherOperation InvokeAsync(Action callback, DispatcherPriority priority,
CancellationToken
cancellationToken)
955
return InvokeAsync(callback, DispatcherPriority.Normal,
CancellationToken
.None);
975
return InvokeAsync(callback, priority,
CancellationToken
.None);
1006
public DispatcherOperation<TResult> InvokeAsync<TResult>(Func<TResult> callback, DispatcherPriority priority,
CancellationToken
cancellationToken)
1036
InvokeAsyncImpl(operation,
CancellationToken
.None);
1045
private void InvokeAsyncImpl(DispatcherOperation operation,
CancellationToken
cancellationToken)
1457
return InvokeImpl(operation,
CancellationToken
.None, timeout);
1464
private object InvokeImpl(DispatcherOperation operation,
CancellationToken
cancellationToken, TimeSpan timeout)
1477
CancellationToken
ctTimeout =
CancellationToken
.None;