1 type derived from CancellationTokenSource
System.ServiceModel (1)
System\ServiceModel\Channels\HttpPipelineCancellationTokenSource.cs (1)
11class HttpPipelineCancellationTokenSource : CancellationTokenSource
31 instantiations of CancellationTokenSource
mscorlib (5)
system\threading\CancellationTokenSource.cs (4)
45private static readonly CancellationTokenSource _staticSource_Set = new CancellationTokenSource(true); 46private static readonly CancellationTokenSource _staticSource_NotCancelable = new CancellationTokenSource(false); 876CancellationTokenSource linkedTokenSource = new CancellationTokenSource(); 920CancellationTokenSource linkedTokenSource = new CancellationTokenSource();
system\threading\SemaphoreSlim.cs (1)
706new CancellationTokenSource())
System (6)
net\System\Net\WebSockets\ClientWebSocket.cs (1)
49cts = new CancellationTokenSource();
net\System\Net\WebSockets\WebSocketBase.cs (2)
2403linkedCancellationTokenSource = new CancellationTokenSource(); 2408new CancellationTokenSource().Token);
net\System\Net\WebSockets\WebSocketConnectionStream.cs (1)
109new CancellationTokenSource(WebSocketHelpers.ClientTcpCloseTimeout);
sys\system\collections\concurrent\BlockingCollection.cs (2)
233m_ConsumersCancellationTokenSource = new CancellationTokenSource(); 234m_ProducersCancellationTokenSource = new CancellationTokenSource();
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\Validation\BackgroundValidationSynchronizer.cs (1)
148this.cancellationTokenSource = new CancellationTokenSource();
System.Core (4)
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
52private readonly CancellationTokenSource m_topLevelCancellationTokenSource = new CancellationTokenSource();
System\Linq\Parallel\QueryOperators\QuerySettings.cs (1)
144return WithPerExecutionSettings(new CancellationTokenSource(), new Shared<bool>(false));
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
57CancellationTokenSource dummyInternalCancellationTokenSource = new CancellationTokenSource();
System\Linq\ParallelEnumerable.cs (1)
4412.WithPerExecutionSettings(new CancellationTokenSource(), new System.Linq.Parallel.Shared<bool>(false));
System.Data (10)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Validation\BackgroundValidationSynchronizer.cs (1)
148this.cancellationTokenSource = new CancellationTokenSource();
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (1)
218CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
3071CancellationTokenSource timeoutCTS = new CancellationTokenSource(); 4357CancellationTokenSource timeoutCTS = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlConnection.cs (1)
1227CancellationTokenSource cts = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (3)
124_cancelAsyncOnCloseTokenSource = new CancellationTokenSource(); 4035timeoutCancellationSource = new CancellationTokenSource(); 4129timeoutCancellationSource = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (1)
25_disposalTokenSource = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (1)
34_disposalTokenSource = new CancellationTokenSource();
System.ServiceModel.Internals (1)
System\Runtime\IOThreadCancellationTokenSource.cs (1)
44this.source = new CancellationTokenSource();
System.Web (3)
UI\Page.cs (2)
6005? new CancellationTokenSource(timeout) 6006: new CancellationTokenSource();
Util\CancellationTokenHelper.cs (1)
27private readonly CancellationTokenSource _cts = new CancellationTokenSource();
WindowsBase (1)
Base\System\Windows\Threading\Dispatcher.cs (1)
1486ctsTimeout = new CancellationTokenSource(timeout);
86 references to CancellationTokenSource
mscorlib (35)
system\threading\CancellationToken.cs (12)
31/// <see cref="System.Threading.CancellationTokenSource">CancellationTokenSource</see> must be used. 33/// <see cref="System.Threading.CancellationTokenSource.Token">Token</see> property. 51private CancellationTokenSource m_source; 75/// calling <see cref="System.Threading.CancellationTokenSource.Cancel()">Cancel</see> 76/// on the token's associated <see cref="CancellationTokenSource"/>. 115/// dispose the associated <see cref="CancellationTokenSource"/> instance at the earliest opportunity (disposing 140internal CancellationToken(CancellationTokenSource source) 162m_source = CancellationTokenSource.InternalGetStaticSource(canceled); 377return other.m_source == CancellationTokenSource.InternalGetStaticSource(false); 382return m_source == CancellationTokenSource.InternalGetStaticSource(false); 420return CancellationTokenSource.InternalGetStaticSource(false).GetHashCode(); 498m_source = CancellationTokenSource.InternalGetStaticSource(false);
system\threading\CancellationTokenRegistration.cs (1)
82var tokenSource = callbackInfo.CancellationTokenSource;
system\threading\CancellationTokenSource.cs (20)
28/// (via the source's <see cref="System.Threading.CancellationTokenSource.Token">Token</see> property) 31/// calling to the source's <see cref="System.Threading.CancellationTokenSource.Cancel()">Cancel</see> 45private static readonly CancellationTokenSource _staticSource_Set = new CancellationTokenSource(true); 46private static readonly CancellationTokenSource _staticSource_NotCancelable = new CancellationTokenSource(false); 88CancellationTokenSource cts = source as CancellationTokenSource; 98/// cref="System.Threading.CancellationTokenSource">CancellationTokenSource</see>. 101/// cref="System.Threading.CancellationTokenSource">CancellationTokenSource</see>.</value> 106/// <see cref="System.Threading.CancellationTokenSource.Cancel()">Cancel</see> method. 148/// associated with this <see cref="CancellationTokenSource"/>. 151/// associated with this <see cref="CancellationTokenSource"/>.</value> 516CancellationTokenSource cts = (CancellationTokenSource)obj; 625internal static CancellationTokenSource InternalGetStaticSource(bool set) 874public static CancellationTokenSource CreateLinkedTokenSource(CancellationToken token1, CancellationToken token2) 876CancellationTokenSource linkedTokenSource = new CancellationTokenSource(); 908public static CancellationTokenSource CreateLinkedTokenSource(params CancellationToken[] tokens) 920CancellationTokenSource linkedTokenSource = new CancellationTokenSource(); 981internal readonly CancellationTokenSource CancellationTokenSource; 985CancellationTokenSource cancellationTokenSource)
system\threading\SemaphoreSlim.cs (2)
704using (var cts = cancellationToken.CanBeCanceled ? 705CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, default(CancellationToken)) :
System (23)
net\System\Net\WebSockets\ClientWebSocket.cs (1)
22private readonly CancellationTokenSource cts;
net\System\Net\WebSockets\WebSocketBase.cs (6)
2344private volatile CancellationTokenSource m_CancellationTokenSource; 2376CancellationTokenSource snapshot = null; 2399CancellationTokenSource linkedCancellationTokenSource; 2407linkedCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, 2419CancellationTokenSource cancellationTokenSourceSnapshot = null; 2452CancellationTokenSource snapshot = null;
net\System\Net\WebSockets\WebSocketConnectionStream.cs (3)
99CancellationTokenSource reasonableTimeoutCancellationTokenSource = null; 100CancellationTokenSource linkedCancellationTokenSource = null; 110linkedCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(
sys\system\collections\concurrent\BlockingCollection.cs (13)
64private CancellationTokenSource m_ConsumersCancellationTokenSource; 65private CancellationTokenSource m_ProducersCancellationTokenSource; 428CancellationTokenSource linkedTokenSource = null; 434linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource( 686private bool TryTakeWithNoTimeValidation(out T item, int millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource) 702CancellationTokenSource linkedTokenSource = combinedTokenSource; 710linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, 1029using (CancellationTokenSource linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(collatedCancellationTokens)) 1438using (CancellationTokenSource linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(collatedCancellationTokens)) 1672CancellationTokenSource linkedTokenSource = null; 1675linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, m_ConsumersCancellationTokenSource.Token);
System.Activities.Presentation (1)
System.Activities.Presentation\System\Activities\Presentation\Validation\BackgroundValidationSynchronizer.cs (1)
25private CancellationTokenSource cancellationTokenSource;
System.Core (6)
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
52private readonly CancellationTokenSource m_topLevelCancellationTokenSource = new CancellationTokenSource();
System\Linq\Parallel\QueryOperators\QuerySettings.cs (2)
147internal QuerySettings WithPerExecutionSettings(CancellationTokenSource topLevelCancellationTokenSource, Shared<bool> topLevelDisposedFlag) 161CancellationTokenSource.CreateLinkedTokenSource(settings.CancellationState.InternalCancellationTokenSource.Token, settings.CancellationState.ExternalCancellationToken);
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
57CancellationTokenSource dummyInternalCancellationTokenSource = new CancellationTokenSource();
System\Linq\Parallel\Scheduling\CancellationState.cs (2)
28internal CancellationTokenSource InternalCancellationTokenSource; 36internal CancellationTokenSource MergedCancellationTokenSource;
System.Data (14)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Validation\BackgroundValidationSynchronizer.cs (1)
25private CancellationTokenSource cancellationTokenSource;
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (1)
218CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
3071CancellationTokenSource timeoutCTS = new CancellationTokenSource(); 4357CancellationTokenSource timeoutCTS = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlConnection.cs (3)
291private CancellationTokenSource _reconnectionCancellationSource; 1091CancellationTokenSource cts = _reconnectionCancellationSource; 1227CancellationTokenSource cts = new CancellationTokenSource();
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (3)
94private CancellationTokenSource _cancelAsyncOnCloseTokenSource; 4033CancellationTokenSource timeoutCancellationSource = null; 4100CancellationTokenSource timeoutCancellationSource = null;
fx\src\data\System\Data\SqlClient\SqlSequentialStream.cs (3)
15private CancellationTokenSource _disposalTokenSource; // Used to indicate that a cancellation is requested due to disposal 174CancellationTokenSource combinedTokenSource; 183combinedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, _disposalTokenSource.Token);
fx\src\data\System\Data\SqlClient\SqlSequentialTextReader.cs (1)
19private CancellationTokenSource _disposalTokenSource; // Used to indicate that a cancellation is requested due to disposal
System.ServiceModel.Internals (1)
System\Runtime\IOThreadCancellationTokenSource.cs (1)
14CancellationTokenSource source;
System.Web (5)
UI\Page.cs (2)
6000internal CancellationTokenSource CreateCancellationTokenFromAsyncTimeout() { 6032using (CancellationTokenSource cancellationTokenSource = CreateCancellationTokenFromAsyncTimeout()) {
UI\WebControls\ModelDataSourceView.cs (2)
738CancellationTokenSource cancellationTokenSource = _owner.DataControl.Page.CreateCancellationTokenFromAsyncTimeout(); 826CancellationTokenSource cancellationTokenSource = _owner.DataControl.Page.CreateCancellationTokenFromAsyncTimeout();
Util\CancellationTokenHelper.cs (1)
27private readonly CancellationTokenSource _cts = new CancellationTokenSource();
WindowsBase (1)
Base\System\Windows\Threading\Dispatcher.cs (1)
1479CancellationTokenSource ctsTimeout = null;