720 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 (1)
Program.cs (1)
575using var cts = new CancellationTokenSource();
Aspire.Cli.Tests (17)
Agents\AgentEnvironmentApplicatorTests.cs (1)
31using var cts = new CancellationTokenSource();
Commands\AgentMcpCommandTests.cs (1)
39_cts = new CancellationTokenSource();
Commands\RunCommandTests.cs (11)
321using var cts = new CancellationTokenSource(); 376using var cts = new CancellationTokenSource(); 546using var cts = new CancellationTokenSource(); 616using var cts = new CancellationTokenSource(); 686using var cts = new CancellationTokenSource(); 748using var cts = new CancellationTokenSource(); 807using var cts = new CancellationTokenSource(); 866using var cts = new CancellationTokenSource(); 925using var cts = new CancellationTokenSource(); 1343using var cts = new CancellationTokenSource(); 1415using var cts = new CancellationTokenSource();
Mcp\Docs\DocsFetcherTests.cs (1)
204using var cts = new CancellationTokenSource();
Mcp\Docs\DocsIndexServiceTests.cs (1)
604using var cts = new CancellationTokenSource();
Mcp\Docs\LlmsTxtParserTests.cs (1)
381var cts = new CancellationTokenSource();
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Dashboard (20)
Components\Controls\ApplicationName.razor.cs (1)
33_disposalCts = new CancellationTokenSource();
Components\Controls\AssistantChat.razor.cs (1)
45private readonly CancellationTokenSource _cts = new();
Components\Controls\Chart\ChartBase.cs (1)
23private readonly CancellationTokenSource _cts = new();
Components\Controls\SpanDetails.razor.cs (1)
89private readonly CancellationTokenSource _cts = new();
Components\Dialogs\AssistantModalDialog.razor.cs (1)
37private readonly CancellationTokenSource _cts = new();
Components\Dialogs\ExemplarsDialog.razor.cs (1)
34private readonly CancellationTokenSource _cts = new();
Components\Dialogs\ManageDataDialog.razor.cs (1)
63private readonly CancellationTokenSource _cts = new();
Components\Interactions\InteractionsProvider.cs (1)
41private readonly CancellationTokenSource _cts = new();
Components\Pages\ConsoleLogs.razor.cs (3)
36private readonly CancellationTokenSource _cts = new(); 51_cts = new(); 145private readonly CancellationTokenSource _resourceSubscriptionCts = new();
Components\Pages\Resources.razor.cs (1)
116private readonly CancellationTokenSource _watchTaskCancellationTokenSource = new();
Model\Assistant\AIHelpers.cs (1)
310var messageCts = new CancellationTokenSource();
Model\Assistant\AssistantChatViewModel.cs (1)
157_cts = new CancellationTokenSource();
Model\DashboardCommandExecutor.cs (1)
131closeToastCts = new CancellationTokenSource();
Model\ResourceOutgoingPeerResolver.cs (1)
22private readonly CancellationTokenSource _watchContainersTokenSource = new();
Model\TraceLinkHelpers.cs (1)
48using var cts = new CancellationTokenSource();
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 (11)
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();
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (3)
446using var cts = new CancellationTokenSource(); 563using var cts = new CancellationTokenSource(); 658using var doneCts = new CancellationTokenSource();
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.EndToEnd.Tests (2)
tests\Shared\TemplatesTesting\AspireProject.cs (1)
367CancellationTokenSource cts = new();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
84CancellationTokenSource cts = new();
Aspire.Hosting (14)
ApplicationModel\ResourceLoggerService.cs (2)
23private readonly CancellationTokenSource _disposing = new(); 362private readonly CancellationTokenSource _logStreamCts = new();
ApplicationModel\ResourceNotificationService.cs (1)
28private readonly CancellationTokenSource _disposing = new();
Backchannel\AppHostRpcTarget.cs (1)
22private readonly CancellationTokenSource _shutdownCts = new();
Dashboard\DashboardServiceData.cs (1)
19private readonly CancellationTokenSource _cts = new();
Dcp\DcpExecutor.cs (3)
77private readonly CancellationTokenSource _shutdownCancellation = new(); 359var disposeCts = new CancellationTokenSource(); 711var cancellation = new CancellationTokenSource();
Dcp\DcpHost.cs (1)
32private readonly CancellationTokenSource _shutdownCts = new();
Dcp\ResourceLogSource.cs (1)
34ownedCts = new CancellationTokenSource();
Devcontainers\DevcontainerSettingsWriter.cs (1)
34private readonly CancellationTokenSource _processingCancellation = new();
Orchestrator\ApplicationOrchestrator.cs (1)
36private readonly CancellationTokenSource _shutdownCancellation = new();
Orchestrator\ParameterProcessor.cs (1)
75var cts = new CancellationTokenSource();
Pipelines\PipelineActivityReporter.cs (1)
22private readonly CancellationTokenSource _cancellationTokenSource = new();
Aspire.Hosting.Azure.Kusto.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.Azure.Tests (1)
DefaultUserPrincipalProviderTests.cs (1)
71using var cts = new CancellationTokenSource();
Aspire.Hosting.DevTunnels.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.DotnetTool.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.GitHub.Models.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var cts = new CancellationTokenSource();
Aspire.Hosting.JavaScript.Tests (1)
tests\Shared\AsyncTestHelpers.cs (1)
43var 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.OpenAI.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.RemoteHost.Tests (2)
CallbackProxyTests.cs (1)
167using var cts = new CancellationTokenSource();
CancellationTokenRegistryTests.cs (1)
38using var cts = new CancellationTokenSource();
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
29private readonly CancellationTokenSource _disposingCts = new();
Aspire.Hosting.Testing.Tests (3)
ResourceLoggerForwarderServiceTests.cs (3)
156private readonly CancellationTokenSource _startedCts = new(); 157private readonly CancellationTokenSource _stoppingCts = new(); 158private readonly CancellationTokenSource _stoppedCts = new();
Aspire.Hosting.Tests (26)
Backchannel\AuxiliaryBackchannelRpcTargetTests.cs (1)
383using var cts = new CancellationTokenSource();
Dashboard\DashboardServiceTests.cs (6)
181var cts = new CancellationTokenSource(); 236var cts = new CancellationTokenSource(); 306var cts = new CancellationTokenSource(); 353var cts = new CancellationTokenSource(); 412var cts = new CancellationTokenSource(); 449var 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)
629var watchCts = new CancellationTokenSource(); 1336var tokenSource = new CancellationTokenSource();
DistributedApplicationTests.cs (2)
69var cts = new CancellationTokenSource(); 114var cts = new CancellationTokenSource();
EndpointReferenceTests.cs (1)
173using var cts = new CancellationTokenSource();
InteractionServiceTests.cs (1)
50var cts = new CancellationTokenSource();
ResourceNotificationTests.cs (3)
314using var cts = new CancellationTokenSource(); 346using var cts = new CancellationTokenSource(); 734private 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();
ValueSnapshotTests.cs (2)
180using var cts = new CancellationTokenSource(); 192using var 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)
367CancellationTokenSource cts = new();
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
84CancellationTokenSource cts = new();
aspire-server (2)
CancellationTokenRegistry.cs (2)
30var cts = new CancellationTokenSource(); 137var cts = new CancellationTokenSource();
ClientSample (1)
HubSample.cs (1)
56using var closedTokenSource = new CancellationTokenSource();
CustomResources.AppHost (1)
TestResource.cs (1)
36private 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();
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.Tests (2)
ClientDisconnectTests.cs (2)
146var cancellationTokenSource = new CancellationTokenSource(); 188var cancellationTokenSource = new CancellationTokenSource();
IISExpress.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
28private readonly CancellationTokenSource _stopTokenSource = new CancellationTokenSource();
Infrastructure.Tests (1)
PowerShellScripts\PowerShellCommand.cs (1)
57CancellationTokenSource cts = new();
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)
1046public CancellationTokenSource ConnectionClosingCts { get; set; } = new CancellationTokenSource(); 1048public CancellationTokenSource ConnectionClosedCts { get; set; } = new CancellationTokenSource();
TestTransport\InMemoryTransportConnection.cs (1)
18private readonly CancellationTokenSource _connectionClosedTokenSource = new CancellationTokenSource();
InProcessWebSite (1)
Startup.cs (1)
1013var cts = new CancellationTokenSource();
IntegrationTestsWebsite (1)
Infrastructure\DynamicEndpointDataSource.cs (1)
24_cts = new CancellationTokenSource();
Interop.FunctionalTests (7)
Http3\Http3RequestTests.cs (6)
486var cts = new CancellationTokenSource(); 732using var cts = new CancellationTokenSource(); 925var cts1 = new CancellationTokenSource(); 1165var cts = new CancellationTokenSource(); 1262var cts = new CancellationTokenSource(); 1410var 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\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Metrics.Legacy (4)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = 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();
Microsoft.Agents.AI.ProjectTemplates.Tests (1)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
88using var timeoutCts = new CancellationTokenSource();
Microsoft.AspNetCore.Components (2)
NavigationManager.cs (1)
426var cts = new CancellationTokenSource();
Routing\Router.cs (1)
354_onNavigateCts = new CancellationTokenSource();
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\RazorComponentEndpointDataSource.cs (2)
59_cancellationTokenSource = new CancellationTokenSource(); 173_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)
330var 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)
207validationTcs.TrySetCanceled(new CancellationTokenSource().Token);
Microsoft.AspNetCore.Components.Tests (3)
ComponentBaseTest.cs (1)
358var cts = new CancellationTokenSource();
OwningComponentBaseTest.cs (1)
212_cts = new CancellationTokenSource();
RendererTest.cs (1)
4113var cancellationTokenSource = new CancellationTokenSource();
Microsoft.AspNetCore.Components.Web (2)
Media\MediaComponentBase.cs (1)
285_loadCts = new CancellationTokenSource();
Virtualization\Virtualize.cs (1)
414_refreshCts = new CancellationTokenSource();
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
TargetPickerUi.cs (1)
136var source = new CancellationTokenSource();
Microsoft.AspNetCore.Components.WebAssembly.Tests (7)
Hosting\WebAssemblyHostTest.cs (7)
27var cts = new CancellationTokenSource(); 47var cts = new CancellationTokenSource(); 72var cts = new CancellationTokenSource(); 100var cts = new CancellationTokenSource(); 130var cts = new CancellationTokenSource(); 163var cts = new CancellationTokenSource(); 194var 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)
91using (var cts = new CancellationTokenSource())
Microsoft.AspNetCore.Hosting.Tests (3)
WebHostTests.cs (3)
171var cts = new CancellationTokenSource(); 225var cts = new CancellationTokenSource(); 300var 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.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(); 501var cts = new CancellationTokenSource(); 503var stopTask2 = server.StopAsync(new CancellationTokenSource().Token); 504var stopTask3 = server.StopAsync(new CancellationTokenSource().Token); 537var cts = new CancellationTokenSource(); 538var stopTask1 = server.StopAsync(new CancellationTokenSource().Token); 540var stopTask3 = server.StopAsync(new CancellationTokenSource().Token); 575stopTask1 = server.StopAsync(new CancellationTokenSource().Token); 576stopTask2 = 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)
222var 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)
1046public CancellationTokenSource ConnectionClosingCts { get; set; } = new CancellationTokenSource(); 1048public 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)
478CancellationTokenSource cts = new CancellationTokenSource();
HttpContextBuilderTests.cs (2)
323var cts = new CancellationTokenSource(); 359var cts = new CancellationTokenSource();
TestClientTests.cs (1)
893var 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.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
541_sharedCompileCts = new CancellationTokenSource();
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
541_sharedCompileCts = new CancellationTokenSource();
Microsoft.CodeAnalysis.Analyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.AnalyzerUtilities (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.BannedApiAnalyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CodeStyle (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (1)
93_cancellationTokenSource = new();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4249var cancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (3)
InteractiveSessionTests.cs (3)
2027var cancellationSource = new CancellationTokenSource(); 2061var cancellationSource = new CancellationTokenSource(); 2095var cancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
SourceGeneration\GeneratorDriverTests.cs (2)
748CancellationTokenSource cts = new CancellationTokenSource(); 2597CancellationTokenSource cts = new CancellationTokenSource();
SourceGeneration\SyntaxAwareGeneratorTests.cs (2)
1986CancellationTokenSource cts = new CancellationTokenSource(); 2012CancellationTokenSource cts = new CancellationTokenSource();
Microsoft.CodeAnalysis.EditorFeatures (19)
AutomaticCompletion\BraceCompletionSessionProvider.cs (1)
107var 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)
110private readonly CancellationTokenSource _cancellationTokenSource = new(); 121private CancellationTokenSource _conflictResolutionTaskCancellationSource = new(); 515_conflictResolutionTaskCancellationSource = new CancellationTokenSource();
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (2)
46private CancellationTokenSource _cancellationTokenSource = new(); 186_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)
35private 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 (4)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (1)
34_cancellationSource = new CancellationTokenSource();
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = 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();
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (1)
213_cancellationTokenSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Handler\AbstractRefreshQueue.cs (1)
46_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\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.PublicApiAnalyzers (3)
src\Dependencies\Threading\CancellationSeries.cs (1)
40_cts = new CancellationTokenSource();
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.Remote.ServiceHub (3)
Host\RemoteWorkspace.InFlightSolution.cs (1)
32private readonly CancellationTokenSource _cancellationTokenSource_doNotAccessDirectly = new();
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
31private 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\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\CommonDiagnosticAnalyzers.cs (3)
2220public CancellationTokenSource CancellationTokenSource { get; } = new CancellationTokenSource(); 2679private readonly CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); 2914private 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)
52private CancellationTokenSource KeepAliveTokenSource { get; } = new();
Shared\TestHooks\AsynchronousOperationListener.cs (2)
34_expeditedDelayCancellationTokenSource = new CancellationTokenSource(); 132var 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)
141private 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)
38private readonly CancellationTokenSource _shutdownTokenSource = new();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (1)
Rpc\RpcServer.cs (1)
35private readonly CancellationTokenSource _shutdownTokenSource = new();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
RpcTests.cs (1)
213var tokenSource = new CancellationTokenSource();
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (1)
35private readonly CancellationTokenSource _shutdownTokenSource = new();
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
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();
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 (12)
ChatCompletion\ChatClientExtensionsTests.cs (4)
105using var cts = new CancellationTokenSource(); 132using var cts = new CancellationTokenSource(); 176using var cts = new CancellationTokenSource(); 216using var cts = new CancellationTokenSource();
Contents\DataContentTests.cs (3)
772using CancellationTokenSource cts = new(); 794using CancellationTokenSource cts = new(); 821using CancellationTokenSource cts = new();
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
25using var cts = new CancellationTokenSource();
Image\ImageGeneratorTests.cs (1)
49using 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)
108using var cancellationTokenSource = new CancellationTokenSource(); 122using var cancellationTokenSource = new CancellationTokenSource();
Microsoft.Extensions.AI.Templates.Tests (1)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
88using var timeoutCts = new CancellationTokenSource();
Microsoft.Extensions.AI.Tests (25)
ChatCompletion\ConfigureOptionsChatClientTests.cs (1)
39using CancellationTokenSource cts = new();
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (4)
960using CancellationTokenSource cts = new(); 1036using CancellationTokenSource cts = new(); 1238using CancellationTokenSource cts = new(); 1326using CancellationTokenSource cts = new();
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
2198using CancellationTokenSource cts = new(); 2268using CancellationTokenSource cts = new();
ChatCompletion\UseDelegateChatClientTests.cs (4)
30using CancellationTokenSource expectedCts = new(); 80using CancellationTokenSource expectedCts = new(); 122using CancellationTokenSource expectedCts = new(); 173using CancellationTokenSource expectedCts = new();
ChatReduction\SummarizingChatReducerTests.cs (1)
281using var cts = new CancellationTokenSource();
Embeddings\ConfigureOptionsEmbeddingGeneratorTests.cs (1)
36using CancellationTokenSource cts = new();
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
30using CancellationTokenSource expectedCts = new();
Functions\AIFunctionFactoryTest.cs (9)
193using var cts = new CancellationTokenSource(); 745using CancellationTokenSource cts = new(); 768using CancellationTokenSource cts = new(); 791using CancellationTokenSource cts = new(); 814using CancellationTokenSource cts = new(); 837using CancellationTokenSource cts = new(); 860using CancellationTokenSource cts = new(); 883using CancellationTokenSource cts = new(); 906using CancellationTokenSource cts = new();
Image\ConfigureOptionsImageGeneratorTests.cs (1)
36using 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.DataIngestion.Tests (2)
Readers\DocumentReaderConformanceTests.cs (2)
39using CancellationTokenSource cts = new(); 57using CancellationTokenSource cts = new();
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 (1)
TcpEndpointProbesServiceTests.cs (1)
23using var cts = new CancellationTokenSource();
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
src\Shared\Pools\PooledCancellationTokenSourcePolicy.cs (1)
22public override CancellationTokenSource Create() => new();
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogCollector.LogEnumeration.cs (1)
93: new CancellationTokenSource();
Microsoft.Extensions.Diagnostics.Testing.Tests (2)
Logging\FakeLogCollectorTests.LogEnumeration.cs (1)
33using var cts = new CancellationTokenSource();
Metrics\MetricCollectorTests.cs (1)
283using var cts = new CancellationTokenSource();
Microsoft.Extensions.FileProviders.Physical (4)
PhysicalFilesWatcher.cs (4)
170var cancellationTokenSource = new CancellationTokenSource(); 186pollingChangeToken.CancellationTokenSource = new CancellationTokenSource(); 205var cancellationTokenSource = new CancellationTokenSource(); 223pollingChangeToken.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)
61using var tokenSource = new CancellationTokenSource(); 120using 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)
391CancellationTokenSource 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)
25private 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)
88var cts = new[] { new CancellationTokenSource() }; 97cts[0] = new(); 140var cts = new[] { new CancellationTokenSource() }; 149cts[0] = new(); 176var cts = new[] { new CancellationTokenSource() }; 185cts[0] = new(); 214var cts = new[] { new CancellationTokenSource() }; 223cts[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.McpServer.ProjectTemplates.Tests (1)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
88using var timeoutCts = 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.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.Extensibility.Testing.Xunit (2)
src\VisualStudio\IntegrationTest\Harness\XUnitShared\Harness\InProcessIdeTestAssemblyRunner.cs (1)
44using (var cancellationTokenSource = new CancellationTokenSource())
src\VisualStudio\IntegrationTest\Harness\XUnitShared\Harness\VisualStudioInstanceFactory.cs (1)
459using var cancellatokenSource = new CancellationTokenSource();
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)
271private 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)
395var cancellationSource = new CancellationTokenSource();
Microsoft.VisualStudio.LanguageServices.Implementation (2)
SolutionExplorer\AnalyzerItem\AnalyzerItemSource.cs (1)
32private readonly CancellationTokenSource _cancellationTokenSource = new();
SolutionExplorer\DiagnosticItem\BaseDiagnosticAndGeneratorItemSource.cs (1)
31private readonly CancellationTokenSource _cancellationTokenSource = new();
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\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = new CancellationTokenSource();
Roslyn.VisualStudio.DiagnosticsWindow (1)
OptionPages\ForceLowMemoryMode.cs (1)
61private readonly CancellationTokenSource _cancellationTokenSource = new();
Roslyn.VisualStudio.Next.UnitTests (3)
Services\ServiceHubServicesTests.cs (2)
150var cancellationTokenSource = new CancellationTokenSource(); 201var cancellationTokenSource = new CancellationTokenSource();
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
111var source = new CancellationTokenSource();
RunTests (1)
Program.cs (1)
57using 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)
55private 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.Pipelines (2)
System\IO\Pipelines\StreamPipeReader.cs (1)
79return _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(); 693CancellationTokenSource currentCts = Interlocked.Exchange(ref _pendingRequestsCts, new CancellationTokenSource());
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
828_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)
81_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)
145private readonly CancellationTokenSource _shutdownTokenSource = new CancellationTokenSource();
System\Net\Quic\QuicListener.cs (1)
91private 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)
608_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(); 854token.CanBeCanceled ? new Linked1CancellationTokenSource(token) : new CancellationTokenSource();
System.ServiceModel.Http (1)
System\ServiceModel\Channels\HttpChannelFactory.cs (1)
990_httpSendCts = new CancellationTokenSource();
System.ServiceModel.Primitives (1)
Internals\System\Runtime\TaskHelpers.cs (1)
232using (CancellationTokenSource cts = 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 (8)
System\Windows\Forms\ControlTests_InvokeAsync.cs (7)
235using var cts = new CancellationTokenSource(); 249using var cts = new CancellationTokenSource(); 271using var cts = new CancellationTokenSource(); 285using var cts = new CancellationTokenSource(); 301using var cts = new CancellationTokenSource(); 327using var cts = new CancellationTokenSource(); 359using var cts = new CancellationTokenSource();
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\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
415public readonly CancellationTokenSource Cancellation = new CancellationTokenSource();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (1)
380_asynchronousComputationCancellationSource = 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();