697 references to CancellationTokenSource
AnalyzerRunner (1)
Program.cs (1)
42var cts = new CancellationTokenSource();
ApiExplorerWebSite (2)
ActionDescriptorChangeProvider.cs (1)
22var changeTokenSource = new CancellationTokenSource();
WellKnownChangeToken.cs (1)
8public CancellationTokenSource TokenSource { get; } = new CancellationTokenSource();
Aspire.Cli.Tests (2)
Commands\RunCommandTests.cs (2)
223using var cts = new CancellationTokenSource(); 277using var cts = new CancellationTokenSource();
Aspire.Dashboard (14)
Components\Controls\ApplicationName.razor.cs (1)
33_disposalCts = new CancellationTokenSource();
Components\Controls\Chart\ChartBase.cs (1)
23private readonly CancellationTokenSource _cts = new();
Components\Controls\SpanDetails.razor.cs (1)
67private readonly CancellationTokenSource _cts = new();
Components\Dialogs\ExemplarsDialog.razor.cs (1)
35private readonly CancellationTokenSource _cts = new();
Components\Interactions\InteractionsProvider.cs (1)
25private readonly CancellationTokenSource _cts = new();
Components\Pages\ConsoleLogs.razor.cs (2)
33private readonly CancellationTokenSource _cts = new(); 101private readonly CancellationTokenSource _resourceSubscriptionCts = new();
Components\Pages\Resources.razor.cs (1)
97private readonly CancellationTokenSource _watchTaskCancellationTokenSource = new();
Model\DashboardCommandExecutor.cs (1)
133closeToastCts = new CancellationTokenSource();
Model\MetricsHelpers.cs (1)
31using var cts = new CancellationTokenSource();
Model\ResourceOutgoingPeerResolver.cs (1)
16private readonly CancellationTokenSource _watchContainersTokenSource = new();
ServiceClient\DashboardClient.cs (1)
47private readonly CancellationTokenSource _cts = new();
Utils\CallbackThrottler.cs (1)
21_cts = new CancellationTokenSource();
Utils\CancellationSeries.cs (1)
33var nextCts = new CancellationTokenSource();
Aspire.Dashboard.Components.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Dashboard.Tests (8)
ChannelExtensionsTests.cs (4)
18var cts = new CancellationTokenSource(); 42var cts = new CancellationTokenSource(); 66var cts = new CancellationTokenSource(); 110var cts = new CancellationTokenSource();
Model\DashboardClientTests.cs (3)
47var cts = new CancellationTokenSource(); 133var cts = new CancellationTokenSource(); 158var cts = new CancellationTokenSource();
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
357CancellationTokenSource cts = new();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
84CancellationTokenSource cts = new();
Aspire.Hosting (10)
ApplicationModel\ResourceLoggerService.cs (1)
345private readonly CancellationTokenSource _logStreamCts = new();
ApplicationModel\ResourceNotificationService.cs (1)
27private readonly CancellationTokenSource _disposing = new();
Backchannel\BackchannelLoggerProvider.cs (1)
15private readonly CancellationTokenSource _backgroundChannelRegistrationCts = new();
Dashboard\DashboardServiceData.cs (1)
19private readonly CancellationTokenSource _cts = new();
Dcp\DcpExecutor.cs (3)
56private readonly CancellationTokenSource _shutdownCancellation = new(); 214var disposeCts = new CancellationTokenSource(); 508var cancellation = new CancellationTokenSource();
Dcp\DcpHost.cs (1)
28private readonly CancellationTokenSource _shutdownCts = new();
Orchestrator\ApplicationOrchestrator.cs (1)
27private readonly CancellationTokenSource _shutdownCancellation = new();
Publishing\PublishingActivityProgressReporter.cs (1)
361private readonly CancellationTokenSource _cancellationTokenSource = new();
Aspire.Hosting.Azure.Tests (1)
DefaultUserPrincipalProviderTests.cs (1)
71using var cts = new CancellationTokenSource();
Aspire.Hosting.Kafka.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.MySql.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.NodeJs.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.PostgreSQL.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.RabbitMQ.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
29private readonly CancellationTokenSource _disposingCts = new();
Aspire.Hosting.Testing.Tests (3)
ResourceLoggerForwarderServiceTests.cs (3)
138private readonly CancellationTokenSource _startedCts = new(); 139private readonly CancellationTokenSource _stoppingCts = new(); 140private readonly CancellationTokenSource _stoppedCts = new();
Aspire.Hosting.Tests (26)
Dashboard\DashboardServiceTests.cs (4)
180var cts = new CancellationTokenSource(); 234var cts = new CancellationTokenSource(); 303var cts = new CancellationTokenSource(); 339var cts = new CancellationTokenSource();
Dashboard\ResourcePublisherTests.cs (5)
16CancellationTokenSource cts = new(); 69CancellationTokenSource cts = new(); 116CancellationTokenSource cts = new(); 137CancellationTokenSource cts = new(); 158CancellationTokenSource cts = new();
Dcp\DcpExecutorTests.cs (2)
589var watchCts = new CancellationTokenSource(); 1218var tokenSource = new CancellationTokenSource();
DistributedApplicationTests.cs (2)
63var cts = new CancellationTokenSource(); 104var cts = new CancellationTokenSource();
InteractionServiceTests.cs (1)
47var cts = new CancellationTokenSource();
ResourceNotificationTests.cs (3)
270using var cts = new CancellationTokenSource(); 302using var cts = new CancellationTokenSource(); 446private readonly CancellationTokenSource _stoppingCts = new();
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Utils\PeriodicRestartAsyncEnumerableTests.cs (2)
15using var cts = new CancellationTokenSource(); 39using var cts = new CancellationTokenSource();
WithHttpCommandTests.cs (2)
382var watchCts = new CancellationTokenSource(); 452var watchCts = new CancellationTokenSource();
WithUrlsTests.cs (4)
336var cts = new CancellationTokenSource(); 372var cts = new CancellationTokenSource(); 460var cts = new CancellationTokenSource(); 581var cts = new CancellationTokenSource();
Aspire.Hosting.Valkey.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Playground.Tests (2)
ProjectSpecificTests.cs (1)
157CancellationTokenSource cts = new();
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Templates.Tests (3)
TemplateTestsBase.cs (1)
186var cts = new CancellationTokenSource();
tests\Shared\TemplatesTesting\AspireProject.cs (1)
357CancellationTokenSource cts = new();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
84CancellationTokenSource cts = new();
ClientSample (1)
HubSample.cs (1)
56using var closedTokenSource = new CancellationTokenSource();
CustomResources.AppHost (1)
TestResource.cs (1)
32private readonly CancellationTokenSource _tokenSource = new();
dotnet-svcutil-lib (3)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (1)
166using (CancellationTokenSource cts = new CancellationTokenSource())
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (1)
892_httpSendCts = new CancellationTokenSource();
Tool.cs (1)
70var cancellationSource = new CancellationTokenSource();
GenerateDocumentationAndConfigFiles (2)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
HelixTestRunner (1)
ProcessUtil.cs (1)
190var cancel = new CancellationTokenSource();
HtmlGenerationWebSite (1)
SignalTokenProviderService.cs (1)
20var cancellationTokenSource = new CancellationTokenSource();
http2cat (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
HttpStress (2)
Program.cs (2)
217var cts = new CancellationTokenSource(); 304var cts = new CancellationTokenSource();
IIS.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
IIS.LongTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
IIS.NewHandler.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
IIS.NewShim.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
IIS.Tests (2)
ClientDisconnectTests.cs (2)
147var cancellationTokenSource = new CancellationTokenSource(); 189var cancellationTokenSource = new CancellationTokenSource();
IISExpress.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
InMemory.FunctionalTests (8)
Http2\Http2StreamTests.cs (1)
3820var cts = new CancellationTokenSource();
KeepAliveTimeoutTests.cs (2)
141var cts = new CancellationTokenSource(); 211var cts = new CancellationTokenSource();
RequestTests.cs (1)
114var cts = new CancellationTokenSource();
ResponseTests.cs (1)
148var cts = new CancellationTokenSource();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1028public CancellationTokenSource ConnectionClosingCts { get; set; } = new CancellationTokenSource(); 1030public CancellationTokenSource ConnectionClosedCts { get; set; } = new CancellationTokenSource();
TestTransport\InMemoryTransportConnection.cs (1)
18private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
1013var cts = new CancellationTokenSource();
IntegrationTestsWebsite (1)
Infrastructure\DynamicEndpointDataSource.cs (1)
24_cts = new CancellationTokenSource();
Interop.FunctionalTests (6)
Http3\Http3RequestTests.cs (5)
486var cts = new CancellationTokenSource(); 732using var cts = new CancellationTokenSource(); 1011var cts = new CancellationTokenSource(); 1108var cts = new CancellationTokenSource(); 1256var cts = new CancellationTokenSource();
HttpClientHttp2InteropTests.cs (1)
931var requestCancellation = new CancellationTokenSource();
InteropClient (2)
InteropClient.cs (2)
487var cts = new CancellationTokenSource(); 504var cts = new CancellationTokenSource();
Metrics (4)
Program.cs (1)
24using var tokenSource = new CancellationTokenSource();
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Metrics.Legacy (4)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\RoslynAnalyzers\Tools\Metrics\Program.cs (1)
24using var tokenSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.AspNetCore.Components (2)
NavigationManager.cs (1)
368var cts = new CancellationTokenSource();
Routing\Router.cs (1)
354_onNavigateCts = new CancellationTokenSource();
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\RazorComponentEndpointDataSource.cs (2)
63_cancellationTokenSource = new CancellationTokenSource(); 165_cancellationTokenSource = new CancellationTokenSource();
DependencyInjection\HotReloadService.cs (2)
19private CancellationTokenSource _tokenSource = new(); 39var current = Interlocked.Exchange(ref _tokenSource, new CancellationTokenSource());
Microsoft.AspNetCore.Components.QuickGrid (1)
QuickGrid.razor.cs (1)
307var thisLoadCts = _pendingDataLoadCancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Components.Server (2)
Circuits\RevalidatingServerAuthenticationStateProvider.cs (2)
18private CancellationTokenSource _loopCancellationTokenSource = new CancellationTokenSource(); 41_loopCancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Components.Server.Tests (4)
Circuits\RemoteJSDataStreamTest.cs (3)
295var cts = new CancellationTokenSource(); 326var cts1 = new CancellationTokenSource(); 327var cts2 = new CancellationTokenSource();
Circuits\RevalidatingServerAuthenticationStateProviderTest.cs (1)
206validationTcs.TrySetCanceled(new CancellationTokenSource().Token);
Microsoft.AspNetCore.Components.Tests (2)
ComponentBaseTest.cs (1)
358var cts = new CancellationTokenSource();
RendererTest.cs (1)
4112var cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Components.Web (1)
Virtualization\Virtualize.cs (1)
408_refreshCts = new CancellationTokenSource();
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
136var source = new CancellationTokenSource();
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
Hosting\WebAssemblyHostTest.cs (3)
26var cts = new CancellationTokenSource(); 46var cts = new CancellationTokenSource(); 71var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Connections.Abstractions (1)
DefaultConnectionContext.cs (1)
27private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\XmlKeyManager.cs (1)
487Interlocked.Exchange(ref _cacheExpirationTokenSource, new CancellationTokenSource())?.Cancel();
Microsoft.AspNetCore.DataProtection.Tests (14)
KeyManagement\CacheableKeyRingTests.cs (2)
23var cts = new CancellationTokenSource(); 38var cts = new CancellationTokenSource();
KeyManagement\KeyRingProviderTests.cs (12)
22var expirationCts = new CancellationTokenSource(); 60var expirationCts = new CancellationTokenSource(); 103var expirationCts1 = new CancellationTokenSource(); 104var expirationCts2 = new CancellationTokenSource(); 194var expirationCts1 = new CancellationTokenSource(); 195var expirationCts2 = new CancellationTokenSource(); 276var expirationCts1 = new CancellationTokenSource(); 277var expirationCts2 = new CancellationTokenSource(); 326var expirationCts = new CancellationTokenSource(); 364var expirationCts = new CancellationTokenSource(); 727var cts = new CancellationTokenSource(); 819var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (1)
JsonTranscodingServerCallContextTests.cs (1)
24var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Hosting (4)
Internal\ApplicationLifetime.cs (3)
20private readonly CancellationTokenSource _startedSource = new CancellationTokenSource(); 21private readonly CancellationTokenSource _stoppingSource = new CancellationTokenSource(); 22private readonly CancellationTokenSource _stoppedSource = new CancellationTokenSource();
WebHostExtensions.cs (1)
89using (var cts = new CancellationTokenSource())
Microsoft.AspNetCore.Hosting.Tests (3)
WebHostTests.cs (3)
169var cts = new CancellationTokenSource(); 223var cts = new CancellationTokenSource(); 298var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Http.Connections (8)
Internal\HttpConnectionContext.cs (5)
108_connectionClosedTokenSource = new CancellationTokenSource(); 111_connectionCloseRequested = new CancellationTokenSource(); 481Cancellation = new CancellationTokenSource(); 483var timeoutSource = new CancellationTokenSource(); 650_sendCts = new CancellationTokenSource();
Internal\HttpConnectionDispatcher.cs (1)
177connection.Cancellation ??= new CancellationTokenSource();
Internal\Transports\WebSocketsServerTransport.cs (2)
81using (var delayCts = new CancellationTokenSource()) 109using (var delayCts = new CancellationTokenSource())
Microsoft.AspNetCore.Http.Connections.Client (4)
Internal\LongPollingTransport.cs (1)
28private readonly CancellationTokenSource _transportCts = new CancellationTokenSource();
Internal\ServerSentEventsTransport.cs (2)
26private readonly CancellationTokenSource _transportCts = new CancellationTokenSource(); 27private readonly CancellationTokenSource _inputCts = new CancellationTokenSource();
Internal\WebSocketsTransport.cs (1)
315_stopCts = new CancellationTokenSource();
Microsoft.AspNetCore.Http.Connections.Tests (7)
ApplicationLifetime.cs (3)
12private readonly CancellationTokenSource _startedSource = new CancellationTokenSource(); 13private readonly CancellationTokenSource _stoppingSource = new CancellationTokenSource(); 14private readonly CancellationTokenSource _stoppedSource = new CancellationTokenSource();
HttpConnectionDispatcherTests.cs (4)
458var cts = new CancellationTokenSource(); 521var cts = new CancellationTokenSource(); 2907_cts = new CancellationTokenSource(); 3115var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Http.Extensions.Tests (9)
HttpRequestJsonExtensionsTests.cs (1)
141var cts = new CancellationTokenSource();
HttpResponseJsonExtensionsTests.cs (5)
129var cts = new CancellationTokenSource(); 313var cts = new CancellationTokenSource(); 347var cts = new CancellationTokenSource(); 385var cts = new CancellationTokenSource(); 419var cts = new CancellationTokenSource();
RequestDelegateFactoryTests.cs (2)
1222using var cts = new CancellationTokenSource(); 3751private readonly CancellationTokenSource _requestAbortedCts = new();
RequestDelegateGenerator\RequestDelegateCreationTests.SpecialTypes.cs (1)
55using var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Http.Microbenchmarks (1)
RequestTimeoutsMiddlewareBenchmark.cs (1)
120var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Http.Results.Tests (1)
ServerSentEventsResultTests.cs (1)
223var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Http.Tests (2)
Timeouts\RequestTimeoutsMiddlewareTests.cs (2)
368var cts = new CancellationTokenSource(); 375return (cts, new CancellationTokenSource());
Microsoft.AspNetCore.HttpLogging (1)
FileLoggerProcessor.cs (1)
102_cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.InternalTesting.Tests (4)
TaskExtensionsTest.cs (4)
16var cts = new CancellationTokenSource(); 36var cts = new CancellationTokenSource(); 44var cts = new CancellationTokenSource(); 52var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc (2)
HotReloadService.cs (2)
21private CancellationTokenSource _tokenSource = new(); 78var current = Interlocked.Exchange(ref _tokenSource, new CancellationTokenSource());
Microsoft.AspNetCore.Mvc.Core (2)
Infrastructure\DefaultActionDescriptorCollectionProvider.cs (1)
164_cancellationTokenSource = new CancellationTokenSource();
Routing\ActionEndpointDataSourceBase.cs (1)
134_cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.Core.Test (8)
Formatters\SystemTextJsonOutputFormatterTest.cs (1)
125var cts = new CancellationTokenSource();
Infrastructure\AsyncEnumerableReaderTest.cs (1)
210var cts = new CancellationTokenSource();
Infrastructure\DefaultActionDescriptorCollectionProviderTest.cs (1)
180TokenSource = new CancellationTokenSource();
Infrastructure\JsonResultExecutorTestBase.cs (4)
367var cts = new CancellationTokenSource(); 398var cts = new CancellationTokenSource(); 432var cts = new CancellationTokenSource(); 452var cts = new CancellationTokenSource();
Routing\ActionEndpointDataSourceBaseTest.cs (1)
84cts = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
727var cts = new CancellationTokenSource();
XmlSerializerOutputFormatterTest.cs (1)
509var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.IntegrationTests (1)
ModelBindingTestHelper.cs (1)
210private readonly CancellationTokenSource _cts = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (9)
NewtonsoftJsonOutputFormatterTest.cs (3)
443var cts = new CancellationTokenSource(); 488var cts = new CancellationTokenSource(); 522var cts = new CancellationTokenSource();
NewtonsoftJsonResultExecutorTest.cs (1)
37var cts = new CancellationTokenSource();
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (1)
210var cts = new CancellationTokenSource();
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (4)
367var cts = new CancellationTokenSource(); 398var cts = new CancellationTokenSource(); 432var cts = new CancellationTokenSource(); 452var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.Razor.Test (3)
RazorViewEngineTest.cs (3)
170var cancellationTokenSource = new CancellationTokenSource(); 905var cancellationTokenSource = new CancellationTokenSource(); 1004var cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (1)
84cts = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.TagHelpers (1)
CacheTagHelper.cs (1)
92var tokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
CacheTagHelperTest.cs (1)
488var tokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.OpenApi.Tests (5)
Extensions\OpenApiServiceCollectionExtensionsTests.cs (1)
293using var cts = new CancellationTokenSource();
Transformers\DocumentTransformerTests.cs (1)
268using var cts = new CancellationTokenSource();
Transformers\OperationTransformerTests.cs (1)
599using var cts = new CancellationTokenSource();
Transformers\SchemaTransformerTests.cs (2)
131var cts = new CancellationTokenSource(); 884using var cts = new CancellationTokenSource();
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
31private readonly CancellationTokenSource _disposalCancellation = new();
Microsoft.AspNetCore.Routing (1)
CompositeEndpointDataSource.cs (1)
245var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Routing.Tests (1)
TestObjects\DynamicEndpointDataSource.cs (1)
48_cts = new CancellationTokenSource();
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\DisconnectListener.cs (1)
59var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (35)
Listener\RequestBodyTests.cs (5)
56var cts = new CancellationTokenSource(); 80var cts = new CancellationTokenSource(); 104var cts = new CancellationTokenSource(); 129var cts = new CancellationTokenSource(); 154var cts = new CancellationTokenSource();
Listener\ResponseBodyTests.cs (10)
110var cts = new CancellationTokenSource(); 131var cts = new CancellationTokenSource(); 154var cts = new CancellationTokenSource(); 174var cts = new CancellationTokenSource(); 195var cts = new CancellationTokenSource(); 217var cts = new CancellationTokenSource(); 238var cts = new CancellationTokenSource(); 274var cts = new CancellationTokenSource(); 309var cts = new CancellationTokenSource(); 337var cts = new CancellationTokenSource();
ResponseSendFileTests.cs (10)
338var cts = new CancellationTokenSource(); 355var cts = new CancellationTokenSource(); 376var cts = new CancellationTokenSource(); 404var cts = new CancellationTokenSource(); 432var cts = new CancellationTokenSource(); 459var cts = new CancellationTokenSource(); 496using var cts = new CancellationTokenSource(); 518var cts = new CancellationTokenSource(); 561var cts = new CancellationTokenSource(); 586using var cts = new CancellationTokenSource();
ServerTests.cs (9)
465var cts = new CancellationTokenSource(); 502var cts = new CancellationTokenSource(); 504var stopTask2 = server.StopAsync(new CancellationTokenSource().Token); 505var stopTask3 = server.StopAsync(new CancellationTokenSource().Token); 539var cts = new CancellationTokenSource(); 540var stopTask1 = server.StopAsync(new CancellationTokenSource().Token); 542var stopTask3 = server.StopAsync(new CancellationTokenSource().Token); 578stopTask1 = server.StopAsync(new CancellationTokenSource().Token); 579stopTask2 = server.StopAsync(new CancellationTokenSource().Token);
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.IHttpRequestLifetimeFeature.cs (1)
35_abortedCts = new CancellationTokenSource();
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Deployers\SelfHostDeployer.cs (1)
164var hostExitTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (2)
IISDeployer.cs (1)
26private readonly CancellationTokenSource _hostShutdownToken = new CancellationTokenSource();
IISExpressDeployer.cs (1)
220var hostExitTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Internal\Http\HttpProtocol.cs (1)
300_abortedCts = new CancellationTokenSource();
Internal\Http3\Http3Connection.cs (2)
52private CancellationTokenSource _acceptStreamsCts = new(); 372_acceptStreamsCts = new CancellationTokenSource();
Internal\Infrastructure\KestrelConnection.cs (1)
18private readonly CancellationTokenSource _connectionClosingCts = new CancellationTokenSource();
Internal\KestrelServerImpl.cs (1)
31private readonly CancellationTokenSource _stopCts = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
TlsListenerTests.cs (2)
92var cts = new CancellationTokenSource(); 115var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1028public CancellationTokenSource ConnectionClosingCts { get; set; } = new CancellationTokenSource(); 1030public CancellationTokenSource ConnectionClosedCts { get; set; } = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Internal\NamedPipeConnection.cs (1)
23private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
Internal\NamedPipeConnectionListener.cs (1)
24private readonly CancellationTokenSource _listeningTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Internal\QuicConnectionContext.cs (1)
29private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
Internal\QuicStreamContext.cs (1)
126_streamClosedTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicConnectionContextTests.cs (1)
92var cts = new CancellationTokenSource();
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
Internal\SocketConnection.cs (1)
24private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Session.Tests (3)
SessionTests.cs (3)
801var cts = new CancellationTokenSource(); 982var cts = new CancellationTokenSource(); 1046var cts = new CancellationTokenSource();
Microsoft.AspNetCore.SignalR.Client.Core (7)
HubConnection.cs (7)
301_state.StopCts = new CancellationTokenSource(); 630_state.StopCts = new CancellationTokenSource(); 674var cts = cancellationToken.CanBeCanceled ? CancellationTokenSource.CreateLinkedTokenSource(cancellationToken) : new CancellationTokenSource(); 1609using var uploadStreamSource = new CancellationTokenSource(); 1778_state.StopCts = new CancellationTokenSource(); 2445StopCts = new CancellationTokenSource(); 2453public CancellationTokenSource StopCts { get; set; } = new CancellationTokenSource();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (7)
HubConnectionTests.cs (6)
572var cts = new CancellationTokenSource(); 609var cts = new CancellationTokenSource(); 893var cts = new CancellationTokenSource(); 938var cts = new CancellationTokenSource(); 977var cts = new CancellationTokenSource(); 1018var cts = new CancellationTokenSource();
HubConnectionTests.Tracing.cs (1)
402var cts = new CancellationTokenSource();
Microsoft.AspNetCore.SignalR.Client.Tests (13)
HttpConnectionTests.ConnectionLifecycle.cs (3)
406var cts = new CancellationTokenSource(); 432var cts = new CancellationTokenSource(); 514var cts = new CancellationTokenSource();
HubConnectionTests.ConnectionLifecycle.cs (1)
577var cts = new CancellationTokenSource();
HubConnectionTests.cs (6)
174var cts = new CancellationTokenSource(); 231var cts = new CancellationTokenSource(); 292using var cts = new CancellationTokenSource(); 321using var cts = new CancellationTokenSource(); 553var cts = new CancellationTokenSource(); 585var cts = new CancellationTokenSource();
HubServerProxyGeneratorTests.cs (2)
177var cts = new CancellationTokenSource(); 264var cts = new CancellationTokenSource();
TestHttpMessageHandler.cs (1)
106var deleteCts = new CancellationTokenSource();
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionContext.cs (2)
30private readonly CancellationTokenSource _connectionAbortedTokenSource = new CancellationTokenSource(); 500using (var cts = new CancellationTokenSource())
Microsoft.AspNetCore.SignalR.Specification.Tests (4)
HubLifetimeManagerTestBase.cs (1)
357var cts = new CancellationTokenSource();
Internal\TaskExtensions.cs (2)
24var cts = new CancellationTokenSource(); 48var cts = new CancellationTokenSource();
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (1)
65_cts = new CancellationTokenSource();
Microsoft.AspNetCore.SignalR.Tests (16)
DefaultHubLifetimeManagerTests.cs (9)
34var cts = new CancellationTokenSource(); 64var cts = new CancellationTokenSource(); 88var cts = new CancellationTokenSource(); 110var cts = new CancellationTokenSource(); 133var cts = new CancellationTokenSource(); 160var cts = new CancellationTokenSource(); 185var cts = new CancellationTokenSource(); 210var cts = new CancellationTokenSource(); 240var cts = new CancellationTokenSource();
HubConnectionHandlerTests.ClientResult.cs (2)
372var cts = new CancellationTokenSource(); 417var cts = new CancellationTokenSource();
HubConnectionHandlerTests.cs (1)
2263private readonly CancellationTokenSource _cts = new CancellationTokenSource();
Internal\TypedClientBuilderTests.cs (4)
101CancellationTokenSource cts1 = new CancellationTokenSource(); 105CancellationTokenSource cts2 = new CancellationTokenSource(); 249CancellationTokenSource cts1 = new CancellationTokenSource(); 253CancellationTokenSource cts2 = new CancellationTokenSource();
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
TestClient.cs (1)
65_cts = new CancellationTokenSource();
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
SpaServicesExtensionsTests.cs (2)
81_applicationStoppingSource = new CancellationTokenSource(); 84_applicationStoppedSource = new CancellationTokenSource();
Microsoft.AspNetCore.StaticAssets (2)
StaticAssetEndpointDataSource.cs (2)
38_cancellationTokenSource = new CancellationTokenSource(); 114_cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.TestHost (1)
RequestLifetimeFeature.cs (1)
10private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.TestHost.Tests (4)
ClientHandlerTests.cs (1)
477CancellationTokenSource cts = new CancellationTokenSource();
HttpContextBuilderTests.cs (2)
231var cts = new CancellationTokenSource(); 258var cts = new CancellationTokenSource();
TestClientTests.cs (1)
730var tokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\AutobahnTester.cs (1)
37var pingCts = new CancellationTokenSource();
AutobahnTests.cs (1)
52var cts = new CancellationTokenSource();
Microsoft.AspNetCore.WebSockets.Tests (1)
WebSocketMiddlewareTests.cs (1)
583CancellationTokenSource cts = new CancellationTokenSource();
Microsoft.Build (5)
BackEnd\BuildManager\BuildManager.cs (1)
538_executionCancellationTokenSource = new CancellationTokenSource();
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
637_packetQueueDrainDelayCancellation = new CancellationTokenSource();
BackEnd\Components\Logging\LoggingService.cs (1)
1356_loggingEventProcessingCancellation = new CancellationTokenSource();
BackEnd\Components\RequestBuilder\RequestBuilder.cs (1)
642_cancellationTokenSource = new CancellationTokenSource();
Logging\TerminalLogger\TerminalLogger.cs (1)
83private readonly CancellationTokenSource _cts = new();
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TargetBuilder_Tests.cs (1)
1398using (CancellationTokenSource source = new CancellationTokenSource())
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
540_sharedCompileCts = new CancellationTokenSource();
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
540_sharedCompileCts = new CancellationTokenSource();
Microsoft.Build.Tasks.Core (5)
Copy.cs (1)
107private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
DownloadFile.cs (1)
23private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
FileIO\GetFileHash.cs (1)
121private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
FileIO\VerifyFileHash.cs (1)
74private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
Unzip.cs (1)
32private readonly CancellationTokenSource _cancellationToken = new CancellationTokenSource();
Microsoft.Build.Tasks.UnitTests (1)
DownloadFile_Tests.cs (1)
255using CancellationTokenSource timeout = new CancellationTokenSource();
Microsoft.CodeAnalysis.Analyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.CodeStyle (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
96_cancellationTokenSource = new();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4248var cancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
SemanticSearch\CSharpSemanticSearchServiceTests.cs (1)
294var cancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (3)
InteractiveSessionTests.cs (3)
2026var cancellationSource = new CancellationTokenSource(); 2060var cancellationSource = new CancellationTokenSource(); 2094var cancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
SourceGeneration\GeneratorDriverTests.cs (2)
744CancellationTokenSource cts = new CancellationTokenSource(); 2591CancellationTokenSource cts = new CancellationTokenSource();
SourceGeneration\SyntaxAwareGeneratorTests.cs (2)
1986CancellationTokenSource cts = new CancellationTokenSource(); 2012CancellationTokenSource cts = new CancellationTokenSource();
Microsoft.CodeAnalysis.EditorFeatures (19)
AutomaticCompletion\BraceCompletionSessionProvider.cs (1)
100var cancellationTokenSource = new CancellationTokenSource();
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
48private readonly CancellationTokenSource _disposalCancellationSource = new();
EditAndContinue\ActiveStatementTrackingService.cs (1)
103private readonly CancellationTokenSource _cancellationSource = new();
GoOrFind\AbstractGoOrFindNavigationService.cs (2)
62private CancellationTokenSource _cancellationTokenSource = new(); 98_cancellationTokenSource = new();
InlineRename\InlineRenameSession.cs (3)
118private readonly CancellationTokenSource _cancellationTokenSource = new(); 129private CancellationTokenSource _conflictResolutionTaskCancellationSource = new(); 527_conflictResolutionTaskCancellationSource = new CancellationTokenSource();
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (2)
46private CancellationTokenSource _cancellationTokenSource = new(); 193_cancellationTokenSource = new CancellationTokenSource();
IntelliSense\ModelComputation.cs (1)
57_stopTokenSource = new CancellationTokenSource();
Interactive\InteractiveSession.cs (1)
86_shutdownCancellationSource = new CancellationTokenSource();
NavigateTo\NavigateToItemProvider.cs (2)
26private CancellationTokenSource _cancellationTokenSource = new(); 77_cancellationTokenSource = new CancellationTokenSource();
NavigationBar\NavigationBarController.cs (1)
64private readonly CancellationTokenSource _cancellationTokenSource = new();
QuickInfo\OnTheFlyDocsView.xaml.cs (1)
49private readonly CancellationTokenSource _cancellationTokenSource = new();
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
43private readonly CancellationTokenSource _cancellationTokenSource = new();
Shared\Utilities\ThreadingContext.cs (1)
28private readonly CancellationTokenSource _disposalTokenSource = new();
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (1)
102private readonly CancellationTokenSource _disposalTokenSource = new();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Utilities\AsynchronousOperationListenerTests.cs (1)
30=> _tokenSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (1)
Cohost\RazorStartupServiceFactory.cs (1)
36private readonly CancellationTokenSource _disposalTokenSource = new();
Microsoft.CodeAnalysis.Features (3)
EditAndContinue\DebuggingSession.cs (1)
34private readonly CancellationTokenSource _cancellationSource = new();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
30private readonly CancellationTokenSource _shutdownNotificationSource = new();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncWorkItemQueue.cs (1)
234var source = new CancellationTokenSource();
Microsoft.CodeAnalysis.InteractiveHost (3)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
34_cancellationSource = new CancellationTokenSource();
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.LanguageServer (2)
BrokeredServices\ServiceBrokerFactory.cs (1)
34private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
213_cancellationTokenSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Handler\AbstractRefreshQueue.cs (1)
48_disposalTokenSource = new();
Handler\SourceGenerators\SourceGeneratorRefreshQueue.cs (1)
26private readonly CancellationTokenSource _disposalTokenSource = new();
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (1)
69private readonly CancellationTokenSource _cancelSource = new();
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Host\RemoteWorkspace.InFlightSolution.cs (1)
32private readonly CancellationTokenSource _cancellationTokenSource_doNotAccessDirectly = new();
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
32private readonly CancellationTokenSource _shutdownCancellationSource = new();
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
57private readonly CancellationTokenSource _cancellationTokenSource = new();
Microsoft.CodeAnalysis.ResxSourceGenerator (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
2220public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource(); 2676private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); 2911private readonly CancellationTokenSource _cancellationTokenSource = new();
Microsoft.CodeAnalysis.Threading.Package (1)
CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
Microsoft.CodeAnalysis.UnitTests (3)
AsyncQueueTests.cs (3)
166var cts = new CancellationTokenSource(); 178var cts = new CancellationTokenSource(); 195var cts = new CancellationTokenSource();
Microsoft.CodeAnalysis.Workspaces (10)
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
33private readonly CancellationTokenSource _tokenSource = new();
Remote\IRemoteKeepAliveService.cs (1)
26private readonly CancellationTokenSource _cancellationTokenSource = new();
Shared\TestHooks\AsynchronousOperationListener.cs (2)
35_expeditedDelayCancellationTokenSource = new CancellationTokenSource(); 133var oldSource = Interlocked.Exchange(ref _expeditedDelayCancellationTokenSource, new CancellationTokenSource());
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Storage\SQLite\v2\SQLitePersistentStorage.cs (1)
31private readonly CancellationTokenSource _shutdownTokenSource = new();
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
154private readonly CancellationTokenSource _asynchronousFileChangeProcessingCancellationTokenSource = new();
Workspace\Workspace.cs (1)
44private readonly CancellationTokenSource _workQueueTokenSource = new();
Workspace\Workspace_SourceGeneration.cs (1)
29private readonly CancellationTokenSource _updateSourceGeneratorsQueueTokenSource = new();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
Rpc\RpcClient.cs (1)
39private readonly CancellationTokenSource _shutdownTokenSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\RpcServer.cs (1)
36private readonly CancellationTokenSource _shutdownTokenSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
RpcTests.cs (1)
209var tokenSource = new CancellationTokenSource();
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (1)
36private readonly CancellationTokenSource _shutdownTokenSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.Workspaces.UnitTests (23)
UtilityTest\AsyncLazyTests.cs (6)
40var requestCancellationTokenSource = new CancellationTokenSource(); 174var cancellationTokenSource = new CancellationTokenSource(); 197var cancellationTokenSource = new CancellationTokenSource(); 227var requestCancellationTokenSource = new CancellationTokenSource(); 334var cancellationTokenSource = new CancellationTokenSource(); 369var asynchronousRequestCancellationToken = new CancellationTokenSource();
UtilityTest\CancellationSeriesTests.cs (4)
63var cts = new CancellationTokenSource(); 76var cts = new CancellationTokenSource(); 89var cts = new CancellationTokenSource(); 104var cts = new CancellationTokenSource();
UtilityTest\SpecializedTasksTests.cs (13)
103using var cts = new CancellationTokenSource(); 148using var cts = new CancellationTokenSource(); 180using var cts = new CancellationTokenSource(); 204using var cts = new CancellationTokenSource(); 237using var unexpectedCts = new CancellationTokenSource(); 264using var unexpectedCts = new CancellationTokenSource(); 301using var cts = new CancellationTokenSource(); 304using var unexpectedCts = new CancellationTokenSource(); 328using var cts = new CancellationTokenSource(); 331using var unexpectedCts = new CancellationTokenSource(); 439using var cts = new CancellationTokenSource(); 464using var cts = new CancellationTokenSource(); 489using var cts = new CancellationTokenSource();
Microsoft.CommonLanguageServerProtocol.Framework.Package (1)
RequestExecutionQueue.cs (1)
69private readonly CancellationTokenSource _cancelSource = new();
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
41private readonly CancellationTokenSource _cancellationSource = new CancellationTokenSource();
Microsoft.DotNet.ArcadeAzureIntegration (1)
AzureCliCredentialWithAzNoUpdateWrapper.cs (1)
94using var tokenSource = new CancellationTokenSource();
Microsoft.DotNet.Build.Tasks.Feed (3)
src\BlobFeedAction.cs (1)
24private static readonly CancellationTokenSource TokenSource = new CancellationTokenSource();
src\common\UploadToAzure.cs (1)
18private static readonly CancellationTokenSource TokenSource = new CancellationTokenSource();
src\PublishBuildToMaestro.cs (1)
55private readonly CancellationTokenSource _tokenSource = new CancellationTokenSource();
Microsoft.DotNet.Build.Tasks.Installers (1)
src\ExecWithRetries.cs (1)
52private CancellationTokenSource _cancelTokenSource = new CancellationTokenSource();
Microsoft.DotNet.Helix.Sdk (2)
DownloadFromResultsContainer.cs (1)
31private readonly CancellationTokenSource _cancellationSource = new CancellationTokenSource();
HelixTask.cs (1)
15private readonly CancellationTokenSource _cancel = new CancellationTokenSource();
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatClientExtensionsTests.cs (2)
105using var cts = new CancellationTokenSource(); 132using var cts = new CancellationTokenSource();
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
25using var cts = new CancellationTokenSource();
SpeechToText\SpeechToTextClientExtensionsTests.cs (1)
57using var cts = new CancellationTokenSource();
SpeechToText\SpeechToTextClientTests.cs (2)
19using var cts = new CancellationTokenSource(); 47using var cts = new CancellationTokenSource();
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAISpeechToTextClientTests.cs (2)
113using var cancellationTokenSource = new CancellationTokenSource(); 127using var cancellationTokenSource = new CancellationTokenSource();
Microsoft.Extensions.AI.Templates.Tests (1)
Infrastructure\TestCommand.cs (1)
88using var timeoutCts = new CancellationTokenSource();
Microsoft.Extensions.AI.Tests (19)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
39using CancellationTokenSource cts = new();
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
942using CancellationTokenSource cts = new(); 1042using CancellationTokenSource cts = new();
ChatCompletion\UseDelegateChatClientTests.cs (4)
30using CancellationTokenSource expectedCts = new(); 80using CancellationTokenSource expectedCts = new(); 122using CancellationTokenSource expectedCts = new(); 173using CancellationTokenSource expectedCts = new();
Embeddings\ConfigureOptionsEmbeddingGeneratorTests.cs (1)
36using CancellationTokenSource cts = new();
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
30using CancellationTokenSource expectedCts = new();
Functions\AIFunctionFactoryTest.cs (9)
81using var cts = new CancellationTokenSource(); 584using CancellationTokenSource cts = new(); 607using CancellationTokenSource cts = new(); 630using CancellationTokenSource cts = new(); 653using CancellationTokenSource cts = new(); 676using CancellationTokenSource cts = new(); 699using CancellationTokenSource cts = new(); 722using CancellationTokenSource cts = new(); 745using CancellationTokenSource cts = new();
SpeechToText\ConfigureOptionsSpeechToTextClientTests.cs (1)
40using CancellationTokenSource cts = new();
Microsoft.Extensions.AsyncState (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.StampedeState.cs (1)
49_sharedCancellation = new();
Microsoft.Extensions.Caching.Hybrid.Tests (6)
StampedeTests.cs (6)
91using var cts = canBeCanceled ? new CancellationTokenSource() : null; 187cancels[i] = new CancellationTokenSource(); 265cancels[i] = new CancellationTokenSource(); 333using CancellationTokenSource? cts = withCancelation ? new() : null; 373using var cts = withCancelation ? new CancellationTokenSource() : null; 417using CancellationTokenSource? cts = withCancelation ? new() : null;
Microsoft.Extensions.Compliance.Abstractions (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Configuration (1)
ConfigurationReloadToken.cs (1)
16private readonly CancellationTokenSource _cts = new CancellationTokenSource();
Microsoft.Extensions.Diagnostics.HealthChecks (1)
HealthCheckPublisherHostedService.cs (1)
50_stopping = new CancellationTokenSource();
Microsoft.Extensions.Diagnostics.HealthChecks.Common (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (3)
MockHostApplicationLifetime.cs (3)
12private readonly CancellationTokenSource _started = new(); 13private readonly CancellationTokenSource _stopping = new(); 14private readonly CancellationTokenSource _stopped = new();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (1)
DefaultHealthCheckServiceTest.cs (1)
261var cancel = new CancellationTokenSource();
Microsoft.Extensions.Diagnostics.Probes.Tests (2)
TcpEndpointProbesServiceTests.cs (2)
23using var cts = new CancellationTokenSource(); 89using var cts = new CancellationTokenSource();
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Metrics\MetricCollectorTests.cs (1)
283using var cts = new CancellationTokenSource();
Microsoft.Extensions.FileProviders.Physical (4)
PhysicalFilesWatcher.cs (4)
178var cancellationTokenSource = new CancellationTokenSource(); 194pollingChangeToken.CancellationTokenSource = new CancellationTokenSource(); 213var cancellationTokenSource = new CancellationTokenSource(); 231pollingChangeToken.CancellationTokenSource = new CancellationTokenSource();
Microsoft.Extensions.Hosting (3)
Internal\ApplicationLifetime.cs (3)
21private readonly CancellationTokenSource _startedSource = new CancellationTokenSource(); 22private readonly CancellationTokenSource _stoppingSource = new CancellationTokenSource(); 23private readonly CancellationTokenSource _stoppedSource = new CancellationTokenSource();
Microsoft.Extensions.Hosting.Testing.Tests (3)
FakeHostTests.cs (2)
59using var tokenSource = new CancellationTokenSource(); 118using var tokenSource = new CancellationTokenSource();
HostingFakesExtensionsTests.cs (1)
28using var tokenSource = new CancellationTokenSource();
Microsoft.Extensions.Http.Diagnostics.Tests (2)
Logging\HttpClientLoggerTest.cs (1)
117using var cancellationTokenSource = new CancellationTokenSource();
Logging\HttpResponseBodyReaderTest.cs (1)
186using var cts = new CancellationTokenSource();
Microsoft.Extensions.Http.Resilience (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Http.Resilience.PerformanceTests (2)
RetryBenchmark.cs (1)
30_cancellationToken = new CancellationTokenSource().Token;
StandardResilienceBenchmark.cs (1)
30_cancellationToken = new CancellationTokenSource().Token;
Microsoft.Extensions.Http.Resilience.Tests (2)
Hedging\HedgingTests.cs (1)
43_cancellationTokenSource = new CancellationTokenSource();
Resilience\ResilienceHandlerTest.cs (1)
128using var source = new CancellationTokenSource();
Microsoft.Extensions.Logging.AzureAppServices (1)
BatchingLoggerProvider.cs (1)
161_cancellationTokenSource = new CancellationTokenSource();
Microsoft.Extensions.Logging.EventSource (1)
LoggingEventSource.cs (1)
388CancellationTokenSource cts = LazyInitializer.EnsureInitialized(ref _cancellationTokenSource, () => new CancellationTokenSource());
Microsoft.Extensions.ML (2)
ModelLoaders\UriModelLoader.cs (1)
41_stopping = new CancellationTokenSource();
ModelReloadToken.cs (1)
20_cts = new CancellationTokenSource();
Microsoft.Extensions.ObjectPool.Tests (1)
ThreadingTest.cs (1)
31_cts = new CancellationTokenSource();
Microsoft.Extensions.Primitives (1)
CompositeChangeToken.cs (1)
103_cancellationTokenSource = new CancellationTokenSource();
Microsoft.Extensions.ServiceDiscovery (1)
ServiceEndpointWatcher.cs (1)
30private readonly CancellationTokenSource _disposalCancellation = new();
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsServiceEndpointProviderBase.cs (2)
16private readonly CancellationTokenSource _disposeCancellation = new(); 42var cancellation = _lastCollectionCancellation = new CancellationTokenSource();
Resolver\DnsResolver.cs (1)
27private readonly CancellationTokenSource _pendingRequestsCts = new();
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (2)
Resolver\CancellationTests.cs (2)
18CancellationTokenSource cts = new CancellationTokenSource(); 29CancellationTokenSource cts = new CancellationTokenSource();
Microsoft.Extensions.ServiceDiscovery.Tests (8)
ServiceEndpointResolverTests.cs (8)
86var cts = new[] { new CancellationTokenSource() }; 95cts[0] = new(); 138var cts = new[] { new CancellationTokenSource() }; 147cts[0] = new(); 174var cts = new[] { new CancellationTokenSource() }; 183cts[0] = new(); 212var cts = new[] { new CancellationTokenSource() }; 221cts[0] = new();
Microsoft.Extensions.Telemetry (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Telemetry.Abstractions (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.TimeProvider.Testing.Tests (2)
FakeTimeProviderTests.cs (2)
317using var cs = new CancellationTokenSource(); 431using var cts = new CancellationTokenSource();
Microsoft.JSInterop.Tests (4)
Infrastructure\DotNetDispatcherTest.cs (2)
323var cts = new CancellationTokenSource(); 387var cts = new CancellationTokenSource();
JSRuntimeTest.cs (2)
73using var cts = new CancellationTokenSource(); 89using var cts = new CancellationTokenSource();
Microsoft.Maui (1)
ImageSources\ImageSourceServiceResultManager.cs (1)
41 _sourceCancellation = new CancellationTokenSource();
Microsoft.Maui.Controls (1)
ImageSource.cs (1)
149 CancellationTokenSource = new CancellationTokenSource();
Microsoft.Maui.Resizetizer (1)
AsyncTask.cs (1)
18 readonly CancellationTokenSource cts = new CancellationTokenSource();
Microsoft.ML.AutoML (2)
AutoMLExperiment\AutoMLExperiment.cs (1)
252var trialCancellationTokenSource = new CancellationTokenSource();
AutoMLExperiment\IStopTrainingManager.cs (1)
66_cts = new CancellationTokenSource();
Microsoft.ML.AutoML.Tests (5)
AutoMLExperimentTests.cs (3)
47var cts = new CancellationTokenSource(); 134var cts = new CancellationTokenSource(); 173var cts = new CancellationTokenSource();
StopTrainingManagerTests.cs (2)
28var cts = new CancellationTokenSource(); 72var cts = new CancellationTokenSource();
Microsoft.ML.Core (2)
Utilities\ResourceManagerUtils.cs (1)
158using (var downloadCancel = new CancellationTokenSource())
Utilities\ThreadUtils.cs (1)
196_ctSource = new CancellationTokenSource();
Microsoft.ML.Maml (1)
MAML.cs (1)
63using (var progressCancel = new CancellationTokenSource())
Microsoft.ML.Sweeper (1)
AsyncSweeper.cs (1)
206_cts = new CancellationTokenSource();
Microsoft.VisualBasic.Forms (2)
Microsoft\VisualBasic\ApplicationServices\WindowsFormsApplicationBase.vb (2)
1064Dim tokenSource As New CancellationTokenSource() 1077Dim tokenSource As New CancellationTokenSource()
Microsoft.VisualBasic.Forms.Tests (1)
System\Windows\Forms\SingleInstanceHelpersTests.vb (1)
50Dim tokenSource As New CancellationTokenSource()
Microsoft.VisualBasic.Tests (1)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (1)
58CancellationTokenSource tokenSource = new();
Microsoft.VisualStudio.IntegrationTest.Setup (1)
AsyncCompletionTracker.cs (1)
47var cancellationSource = new CancellationTokenSource();
Microsoft.VisualStudio.LanguageServices (10)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
23private readonly CancellationTokenSource _cancellationSource = new();
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (1)
57public readonly CancellationTokenSource CancellationTokenSource = new();
KeybindingReset\KeybindingResetDetector.cs (2)
75private CancellationTokenSource _cancellationTokenSource = new(); 163_cancellationTokenSource = new CancellationTokenSource();
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
106using var cancellationTokenSource = new CancellationTokenSource();
PdbSourceDocument\PdbSourceDocumentOutputWindowLogger.cs (1)
32private readonly CancellationTokenSource _cancellationTokenSource = new();
ProjectSystem\RuleSets\VisualStudioRuleSetManager.RuleSetFile.cs (1)
41_disposalCancellationSource = new();
PullMemberUp\VisualStudioPullMemberUpService.cs (1)
57using var cancellationTokenSource = new CancellationTokenSource();
Remote\VisualStudioWorkspaceServiceHubConnector.cs (1)
28private readonly CancellationTokenSource _disposalCancellationSource = new();
Workspace\SourceGeneratedFileManager.cs (1)
250private readonly CancellationTokenSource _cancellationTokenSource = new();
Microsoft.VisualStudio.LanguageServices.CodeLens (1)
ReferenceCodeLensProvider.cs (1)
48private readonly CancellationTokenSource _cancellationTokenSource = new();
Microsoft.VisualStudio.LanguageServices.CSharp (1)
SemanticSearch\SemanticSearchToolWindowImpl.cs (1)
377var cancellationSource = new CancellationTokenSource();
Microsoft.VisualStudio.LanguageServices.UnitTests (13)
SymbolSearch\SymbolSearchUpdateEngineTests.vb (13)
24Dim cancellationTokenSource = New CancellationTokenSource() 55Dim cancellationTokenSource = New CancellationTokenSource() 83Dim cancellationTokenSource = New CancellationTokenSource() 121Dim cancellationTokenSource = New CancellationTokenSource() 164Dim cancellationTokenSource = New CancellationTokenSource() 197Dim cancellationTokenSource = New CancellationTokenSource() 245Dim cancellationTokenSource = New CancellationTokenSource() 288Dim cancellationTokenSource = New CancellationTokenSource() 336Dim cancellationTokenSource = New CancellationTokenSource() 395Dim cancellationTokenSource = New CancellationTokenSource() 439Dim cancellationTokenSource = New CancellationTokenSource() 493Dim cancellationTokenSource = New CancellationTokenSource() 553Dim cancellationTokenSource = New CancellationTokenSource()
MSBuild (1)
XMake.cs (1)
142private static readonly CancellationTokenSource s_buildCancellationSource = new CancellationTokenSource();
Nats.Backend (1)
Program.cs (1)
22private readonly CancellationTokenSource _cts = new();
RazorBuildWebSite (3)
UpdateableFileProvider.cs (3)
13public CancellationTokenSource _pagesTokenSource = new CancellationTokenSource(); 51_pagesTokenSource = new CancellationTokenSource(); 97public CancellationTokenSource TokenSource { get; } = new CancellationTokenSource();
Roslyn.Diagnostics.Analyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
Roslyn.VisualStudio.DiagnosticsWindow (1)
OptionPages\ForceLowMemoryMode.cs (1)
61private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
Roslyn.VisualStudio.Next.UnitTests (3)
Services\ServiceHubServicesTests.cs (2)
147var cancellationTokenSource = new CancellationTokenSource(); 198var cancellationTokenSource = new CancellationTokenSource();
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
119var source = new CancellationTokenSource();
RunTests (1)
Program.cs (1)
65using var cts = new CancellationTokenSource();
Shared (1)
Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (1)
202var cts = new CancellationTokenSource();
Stress.AppHost (1)
TestResource.cs (1)
51private readonly CancellationTokenSource _tokenSource = new();
System.Collections.Concurrent (2)
System\Collections\Concurrent\BlockingCollection.cs (2)
217_consumersCancellationTokenSource = new CancellationTokenSource(); 218_producersCancellationTokenSource = new CancellationTokenSource();
System.Data.Odbc (1)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
48CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
System.Diagnostics.DiagnosticSource (1)
System\Diagnostics\Metrics\AggregationManager.cs (1)
29private readonly CancellationTokenSource _cts = new();
System.Diagnostics.Process (1)
System\Diagnostics\AsyncStreamReader.cs (1)
63_cts = new CancellationTokenSource();
System.IO.FileSystem.Watcher (1)
System\IO\FileSystemWatcher.Linux.cs (1)
59CancellationTokenSource cancellation = new CancellationTokenSource();
System.IO.Pipelines (2)
System\IO\Pipelines\StreamPipeReader.cs (1)
80return _internalTokenSource ??= new CancellationTokenSource();
System\IO\Pipelines\StreamPipeWriter.cs (1)
41return _internalTokenSource ??= new CancellationTokenSource();
System.IO.Pipes (1)
System\IO\Pipes\NamedPipeServerStream.Unix.cs (1)
22private readonly CancellationTokenSource _internalTokenSource = new CancellationTokenSource();
System.Linq.Parallel (4)
System\Linq\Parallel\QueryOperators\QueryOpeningEnumerator.cs (1)
45private readonly CancellationTokenSource _topLevelCancellationTokenSource = new CancellationTokenSource();
System\Linq\Parallel\QueryOperators\QuerySettings.cs (1)
137return WithPerExecutionSettings(new CancellationTokenSource(), new Shared<bool>(false));
System\Linq\Parallel\QueryOperators\Unary\ForAllOperator.cs (1)
53CancellationTokenSource dummyInternalCancellationTokenSource = new CancellationTokenSource();
System\Linq\ParallelEnumerable.cs (1)
4386.WithPerExecutionSettings(new CancellationTokenSource(), new System.Linq.Parallel.Shared<bool>(false));
System.Net.Http (6)
System\Net\Http\HttpClient.cs (2)
150_pendingRequestsCts = new CancellationTokenSource(); 681CancellationTokenSource currentCts = Interlocked.Exchange(ref _pendingRequestsCts, new CancellationTokenSource());
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
833_altSvcBlocklistTimerCancellation = new CancellationTokenSource();
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (2)
115_requestBodyCancellationSource = new CancellationTokenSource(); 127_requestBodyCancellationSource = new CancellationTokenSource();
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
79_requestBodyCancellationSource = new CancellationTokenSource();
System.Net.Mail (2)
System\Net\Mail\SmtpClient.cs (2)
93_pendingSendCts = new CancellationTokenSource(); 631CancellationTokenSource currentCts = Interlocked.Exchange(ref _pendingSendCts, new CancellationTokenSource());
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.cs (1)
87_timeoutOrCancellationSource ??= new();
System.Net.Quic (2)
System\Net\Quic\QuicConnection.cs (1)
144private readonly CancellationTokenSource _shutdownTokenSource = new CancellationTokenSource();
System\Net\Quic\QuicListener.cs (1)
89private readonly CancellationTokenSource _disposeCts = new CancellationTokenSource();
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1202_sendRequestCts = new CancellationTokenSource();
System.Net.Sockets (1)
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
604_multipleConnectCancellation = saeaMultiConnectCancelable ? new CancellationTokenSource() : null;
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
25private readonly CancellationTokenSource _abortSource = new CancellationTokenSource();
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.Threads.cs (1)
16m_dispatchTaskCancellationSource = new CancellationTokenSource();
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (3)
29internal static readonly CancellationTokenSource s_canceledSource = new CancellationTokenSource() { _state = States.NotifyingCompleteState }; 31internal static readonly CancellationTokenSource s_neverCanceledSource = new CancellationTokenSource(); 863token.CanBeCanceled ? new Linked1CancellationTokenSource(token) : new CancellationTokenSource();
System.Threading.Tasks.Dataflow (2)
Base\DataflowBlock.cs (2)
1125internal readonly CancellationTokenSource _cts = new CancellationTokenSource(); 2358internal readonly CancellationTokenSource Canceler = new CancellationTokenSource();
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
537public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
System.Windows.Forms.Tests (1)
System\Windows\Forms\ToolStripTests.cs (1)
7312using CancellationTokenSource cancellationTokenSource = new CancellationTokenSource();
Test.Utilities (2)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Text.Analyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (1)
419public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
VBCSCompiler (3)
src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
52var cancellationTokenSource = new CancellationTokenSource();
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnection.cs (1)
20private CancellationTokenSource DisconnectCancellationTokenSource { get; } = new CancellationTokenSource();
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (1)
59_cancellationTokenSource = new CancellationTokenSource();
VBCSCompiler.UnitTests (2)
BuildClientTests.cs (1)
149var cts = new CancellationTokenSource();
ServerUtil.cs (1)
92var cts = new CancellationTokenSource();