4351 references to None
Analyzer.Utilities.UnitTests (2)
FlowAnalysis\Analysis\PropertySetAnalysis\PropertySetAnalysisTests.cs (1)
1230var references = Task.Run(() => defaultReferences.ResolveAsync(LanguageNames.CSharp, CancellationToken.None)).GetAwaiter().GetResult();
Options\SymbolNamesWithValueOptionTests.cs (1)
421var cancellationToken = CancellationToken.None;
aspire (3)
Backchannel\ExtensionBackchannel.cs (2)
556await ConnectAsync(CancellationToken.None); 567CancellationToken.None);
Interaction\ExtensionInteractionService.cs (1)
37_cancellationToken = cancellationToken ?? CancellationToken.None;
Aspire.Cli.Tests (29)
Commands\RunCommandTests.cs (1)
409await AppHostHelper.BuildAppHostAsync(testRunner, testInteractionService, appHostProjectFile, options, workspace.WorkspaceRoot, CancellationToken.None);
DotNet\DotNetCliRunnerTests.cs (8)
70CancellationToken.None 108var exitCode = await runner.BuildAsync(projectFile, options, CancellationToken.None); 155var exitCode = await runner.BuildAsync(projectFile, options, CancellationToken.None); 200CancellationToken.None 249CancellationToken.None 303CancellationToken.None 343var exitCode = await runner.NewProjectAsync("aspire", "TestProject", "/tmp/test", [], options, CancellationToken.None); 396cancellationToken: CancellationToken.None
Hosting\CliOrphanDetectorTests.cs (7)
28await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 47await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 70await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 91await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 121await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 163await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5)); 189await detector.StartAsync(CancellationToken.None).WaitAsync(TimeSpan.FromSeconds(5));
Interaction\ConsoleInteractionServiceTests.cs (1)
22interactionService.PromptForSelectionAsync("Select an item:", choices, x => x, CancellationToken.None));
NuGet\NuGetPackageCacheTests.cs (5)
39var packages = await nuGetPackageCache.GetCliPackagesAsync(workspace.WorkspaceRoot, prerelease: true, nugetConfigFile: null, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 73var packages = await nuGetPackageCache.GetPackagesAsync(workspace.WorkspaceRoot, "Aspire.Hosting", null, prerelease: false, nugetConfigFile: null, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 111var packages = await nuGetPackageCache.GetPackagesAsync(workspace.WorkspaceRoot, "Aspire.Hosting", null, prerelease: false, nugetConfigFile: null, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 154CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 189var packages = await nuGetPackageCache.GetPackagesAsync(workspace.WorkspaceRoot, "Aspire.Hosting", null, prerelease: false, nugetConfigFile: null, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout);
Projects\ProjectLocatorTests.cs (1)
313await locator.UseOrFindAppHostProjectFileAsync(null, CancellationToken.None);
Utils\CliUpdateNotificationServiceTests.cs (6)
68await notifier.CheckForCliUpdatesAsync(workspace.WorkspaceRoot, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 123await notifier.CheckForCliUpdatesAsync(workspace.WorkspaceRoot, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 178await notifier.CheckForCliUpdatesAsync(workspace.WorkspaceRoot, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 229await notifier.CheckForCliUpdatesAsync(workspace.WorkspaceRoot, CancellationToken.None).WaitAsync(CliTestConstants.DefaultTimeout); 254await service.CheckForCliUpdatesAsync(workspace.WorkspaceRoot, CancellationToken.None); 273await service.CheckForCliUpdatesAsync(workspace.WorkspaceRoot, CancellationToken.None);
Aspire.Dashboard (3)
Components\Controls\PropertyValues\SpanIdButtonValue.razor.cs (1)
45CancellationToken.None).ConfigureAwait(false);
Model\DashboardCommandExecutor.cs (1)
140response = await dashboardClient.ExecuteResourceCommandAsync(resource.Name, resource.ResourceType, command, CancellationToken.None).ConfigureAwait(false);
Model\ThemeManager.cs (1)
106var browserThemeSettings = await _themeResolver.GetThemeSettingsAsync(CancellationToken.None).ConfigureAwait(false);
Aspire.Dashboard.Tests (9)
Model\DashboardClientTests.cs (9)
51var (_, subscription) = await client.SubscribeResourcesAsync(CancellationToken.None).DefaultTimeout(); 79var (_, subscription) = await client.SubscribeResourcesAsync(CancellationToken.None).DefaultTimeout(); 104await Assert.ThrowsAsync<ObjectDisposedException>(() => client.SubscribeResourcesAsync(CancellationToken.None)).DefaultTimeout(); 117_ = await client.SubscribeResourcesAsync(CancellationToken.None).DefaultTimeout(); 135var subscribeTask = client.SubscribeResourcesAsync(CancellationToken.None); 162var subscription = client.SubscribeInteractionsAsync(CancellationToken.None); 189var subscription = client.SubscribeInteractionsAsync(CancellationToken.None); 214Assert.Throws<ObjectDisposedException>(() => client.SubscribeInteractionsAsync(CancellationToken.None)); 226_ = client.SubscribeInteractionsAsync(CancellationToken.None);
Aspire.Hosting (4)
Dcp\DcpHost.cs (1)
353var result = await reader.ReadAsync(CancellationToken.None).ConfigureAwait(false);
Exec\ExecResourceManager.cs (1)
108await Task.Delay(1000, CancellationToken.None).ConfigureAwait(false);
Publishing\PublishingStep.cs (1)
154await Reporter.CompleteStepAsync(this, completionText, finalState, CancellationToken.None).ConfigureAwait(false);
Publishing\PublishingTask.cs (1)
86await CompleteAsync(cancellationToken: CancellationToken.None).ConfigureAwait(false);
Aspire.Hosting.Azure.Tests (59)
AzureBicepProvisionerTests.cs (3)
110var result = await bicepExecutor.CompileBicepToArmAsync("test.bicep", CancellationToken.None); 148var token = credential.GetToken(requestContext, CancellationToken.None); 166var token = await credential.GetTokenAsync(requestContext, CancellationToken.None);
AzureCosmosDBExtensionsTests.cs (3)
276var cs = await csExpr.GetValueAsync(CancellationToken.None); 297await ExecuteBeforeStartHooksAsync(app, CancellationToken.None); 331await ExecuteBeforeStartHooksAsync(app, CancellationToken.None);
AzureEventHubsExtensionsTests.cs (7)
82hb.Configuration["ConnectionStrings:hub"] = await eventHub.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 88hb.Configuration["ConnectionStrings:eventhubns"] = await eventHubns.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 134hb.Configuration["ConnectionStrings:eventhubns"] = await eventHubns.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 140hb.Configuration["ConnectionStrings:eventhubns"] = await eventHubns.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None) + $";EntityPath={hubName};"; 353var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 414var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 488var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = eventHubsEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None);
AzurePostgresExtensionsTests.cs (16)
60await ExecuteBeforeStartHooksAsync(app, CancellationToken.None); 132Assert.StartsWith("Host=localhost;Port=12455;Username=postgres;Password=", await postgres.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 134var db1ConnectionString = await db1.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 138var db2ConnectionString = await db2.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 190Assert.Equal("Host=localhost;Port=12455;Username=user1;Password=p@ssw0rd1", await postgres.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 194Assert.Equal("localhost:12455", await postgres.Resource.HostName.GetValueAsync(CancellationToken.None)); 197Assert.Equal("user1", await postgres.Resource.UserName.GetValueAsync(CancellationToken.None)); 200Assert.Equal("p@ssw0rd1", await postgres.Resource.Password.GetValueAsync(CancellationToken.None)); 202var db1ConnectionString = await db1.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 205var db2ConnectionString = await db2.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 239Assert.Equal("Host=localhost;Port=12455;Username=user;Password=p@ssw0rd1", await postgres.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 240Assert.Equal("Host=localhost;Port=12455;Username=user;Password=p@ssw0rd1;Database=db1", await db1.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 241Assert.Equal("Host=localhost;Port=12455;Username=user;Password=p@ssw0rd1;Database=db2Name", await db2.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 321var hostValue = await postgres.Resource.HostName.GetValueAsync(CancellationToken.None); 324var userValue = await postgres.Resource.UserName.GetValueAsync(CancellationToken.None); 328var passwordValue = await postgres.Resource.Password.GetValueAsync(CancellationToken.None);
AzureRedisExtensionsTests.cs (7)
59await ExecuteBeforeStartHooksAsync(app, CancellationToken.None); 107Assert.Equal($"localhost:12455,password={redisResource.PasswordParameter.Value}", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 142Assert.Equal($"localhost:12455,password=p@ssw0rd1", await redis.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None)); 146Assert.Equal("localhost:12455", await redis.Resource.HostName.GetValueAsync(CancellationToken.None)); 149Assert.Equal("p@ssw0rd1", await redis.Resource.Password.GetValueAsync(CancellationToken.None)); 201var hostValue = await redis.Resource.HostName.GetValueAsync(CancellationToken.None); 204var passwordValue = await redis.Resource.Password.GetValueAsync(CancellationToken.None);
AzureServiceBusExtensionsTests.cs (6)
129hb.Configuration["ConnectionStrings:servicebusns"] = await serviceBus.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 369var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 468var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 524var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 583var configFiles = await configAnnotation.Callback(new ContainerFileSystemCallbackContext { Model = serviceBusEmulatorResource, ServiceProvider = app.Services }, CancellationToken.None); 810hb.Configuration["ConnectionStrings:servicebusns"] = await serviceBus.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None);
AzureSignalREmulatorFunctionalTest.cs (1)
31var connectionString = await connectionStringExpr.GetValueAsync(CancellationToken.None);
AzureSqlExtensionsTests.cs (8)
93var serverConnectionString = await sql.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 97var db1ConnectionString = await db1.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 101var db2ConnectionString = await db2.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 105var db3ConnectionString = await db3.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 159var serverConnectionString = await sql.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 162var db1ConnectionString = await db1.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 165var db2ConnectionString = await db2.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 168var db3ConnectionString = await db3.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None);
AzureStorageEmulatorFunctionalTests.cs (6)
175hb.Configuration[$"ConnectionStrings:{blobsResourceName}"] = await blobs.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 176hb.Configuration[$"ConnectionStrings:{blobContainerName}"] = await container.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 177hb.Configuration[$"ConnectionStrings:{queuesResourceName}"] = await queues.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 178hb.Configuration[$"ConnectionStrings:{queueName}"] = await queue.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 226hb.Configuration["ConnectionStrings:BlobConnection"] = await blobs.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None); 265hb.Configuration["ConnectionStrings:QueueConnection"] = await queues.Resource.ConnectionStringExpression.GetValueAsync(CancellationToken.None);
ProvisioningContextProviderTests.cs (1)
355CancellationToken = CancellationToken.None,
ProvisioningContextTests.cs (1)
85var token = await context.Credential.GetTokenAsync(requestContext, CancellationToken.None);
Aspire.Hosting.Docker (1)
DockerComposePublishingContext.cs (1)
103var files = await a.Callback(new() { Model = serviceResource.TargetResource, ServiceProvider = executionContext.ServiceProvider }, CancellationToken.None).ConfigureAwait(false);
Aspire.Hosting.Keycloak.Tests (2)
KeycloakPublicApiTests.cs (2)
167var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None); 194var entries = await containerAnnotation.Callback(new() { Model = keycloakResource, ServiceProvider = app.Services }, CancellationToken.None);
Aspire.Hosting.PostgreSQL.Tests (2)
AddPostgresTests.cs (2)
478var entries = await createServers.Callback(new() { Model = pgadmin, ServiceProvider = app.Services }, CancellationToken.None); 542var entries = await createBookmarks.Callback(new() { Model = pgweb, ServiceProvider = app.Services }, CancellationToken.None);
Aspire.Hosting.Testing (1)
DistributedApplicationTestingBuilder.cs (1)
243public DistributedApplication Build() => BuildAsync(CancellationToken.None).Result;
Aspire.Hosting.Tests (150)
Dashboard\DashboardLifecycleHookTests.cs (7)
46await hook.BeforeStartAsync(model, CancellationToken.None).DefaultTimeout(); 89await hook.BeforeStartAsync(model, CancellationToken.None).DefaultTimeout(); 137await hook.BeforeStartAsync(model, CancellationToken.None).DefaultTimeout(); 231await hook.BeforeStartAsync(model, CancellationToken.None); 319await hook.BeforeStartAsync(model, CancellationToken.None); 391await hook.BeforeStartAsync(model, CancellationToken.None); 461await hook.BeforeStartAsync(model, CancellationToken.None);
Dashboard\ResourcePublisherTests.cs (1)
156ResourcePublisher publisher = new(CancellationToken.None);
Dcp\DcpExecutorTests.cs (3)
212await appExecutor.StopResourceAsync(reference, CancellationToken.None); 214await appExecutor.StartResourceAsync(reference, CancellationToken.None); 1145var ex = await Assert.ThrowsAsync<DistributedApplicationException>(async () => await appExecutor.StartResourceAsync(resourceReference, CancellationToken.None));
Dcp\DcpHostNotificationTests.cs (6)
77await dcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken.None); 126await dcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken.None); 181await dcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken.None); 236await dcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken.None); 286await dcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken.None); 350await dcpHost.EnsureDcpContainerRuntimeAsync(CancellationToken.None);
DistributedApplicationTests.cs (15)
136await orchestrator.StartResourceAsync(resourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 140await orchestrator.StopResourceAsync(resourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 144var restartResourceTask = orchestrator.StartResourceAsync(resourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 148await orchestrator.StartResourceAsync(resourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 198await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 215await orchestrator.StopResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 219await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 272await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 288await orchestrator.StopResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 292await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.LongTimeoutTimeSpan); 353await orchestrator.StartResourceAsync(notStartedResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 371await orchestrator.StopResourceAsync(runningResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 378await orchestrator.StartResourceAsync(runningResourceEvent.ResourceId, CancellationToken.None).DefaultTimeout(TestConstants.ExtraLongTimeoutTimeSpan); 677await orchestrator.StopResourceAsync(serviceA.Metadata.Name, CancellationToken.None).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout); 682await orchestrator.StartResourceAsync(serviceA.Metadata.Name, CancellationToken.None).DefaultTimeout(TestConstants.DefaultOrchestratorTestTimeout);
Eventing\DistributedApplicationBuilderEventingTests.cs (1)
304await eventing.PublishAsync(testEvent, CancellationToken.None);
ExpressionResolverTests.cs (3)
21var resolvedValue = await ExpressionResolver.ResolveAsync(testData.SourceIsContainer, testData.ValueProvider, string.Empty, CancellationToken.None); 27async Task<ResolvedValue> ResolveAsync() => await ExpressionResolver.ResolveAsync(testData.SourceIsContainer, testData.ValueProvider, string.Empty, CancellationToken.None); 98var connectionString = await ExpressionResolver.ResolveAsync(sourceIsContainer, csRef, "ContainerHostName", CancellationToken.None).DefaultTimeout();
ExternalServiceTests.cs (1)
428CancellationToken.None).DefaultTimeout();
InteractionServiceTests.cs (2)
124await foreach (var interaction in subscription.WithCancellation(CancellationToken.None)) 712await interactionService.CompleteInteractionAsync(interactionId, (_, _) => state, CancellationToken.None);
Orchestrator\ApplicationOrchestratorTests.cs (8)
57await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 104await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 144await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 211await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 271await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 318await events.PublishAsync(new OnResourcesPreparedContext(CancellationToken.None)); 387await events.PublishAsync(new OnResourceStartingContext(CancellationToken.None, KnownResourceTypes.Container, parentResource.Resource, parentResource.Resource.Name)); 431await applicationEventing.PublishAsync(new ConnectionStringAvailableEvent(resource.Resource, app.Services), CancellationToken.None);
Publishing\PublishingActivityReporterTests.cs (79)
27var step = await reporter.CreateStepAsync(title, CancellationToken.None); 58var step = await reporter.CreateStepAsync("Parent Step", CancellationToken.None); 65var task = await step.CreateTaskAsync(statusText, CancellationToken.None); 98() => nonExistentStep.CreateTaskAsync("Test Task", CancellationToken.None)); 110var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 111await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 115() => step.CreateTaskAsync("Test Task", CancellationToken.None)); 129var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 135await step.CompleteAsync(completionText, isError ? CompletionState.CompletedWithError : CompletionState.Completed, CancellationToken.None); 160var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 161var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 168await task.UpdateAsync(newStatusText, CancellationToken.None); 191var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 192var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 195var dummyStep = await reporter.CreateStepAsync("Dummy Step", CancellationToken.None); 202() => invalidTask.UpdateAsync("New status", CancellationToken.None)); 213var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 214var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 215await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 219() => task.UpdateAsync("New status", CancellationToken.None)); 232var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 233var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 240await task.CompleteAsync(completionMessage, cancellationToken: CancellationToken.None); 267var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 268var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 269await step.CompleteAsync("Completed", CompletionState.Completed, CancellationToken.None); 273() => task.CompleteAsync(null, cancellationToken: CancellationToken.None)); 289await reporter.CompletePublishAsync(null, completionState, isDeploy: false, CancellationToken.None); 310await reporter.CompletePublishAsync(expectedStatusText, CompletionState.CompletedWithError, isDeploy: false, CancellationToken.None); 329var step1 = await reporter.CreateStepAsync("Step 1", CancellationToken.None); 330var step2 = await reporter.CreateStepAsync("Step 2", CancellationToken.None); 331var step3 = await reporter.CreateStepAsync("Step 3", CancellationToken.None); 333var task1 = await step1.CreateTaskAsync("Task 1", CancellationToken.None); 334await task1.CompleteAsync(null, cancellationToken: CancellationToken.None); 335await step1.CompleteAsync("Step 1 completed", CompletionState.Completed, CancellationToken.None); 337var task2 = await step2.CreateTaskAsync("Task 2", CancellationToken.None); 338await task2.CompleteAsync(null, cancellationToken: CancellationToken.None); 339await step2.CompleteAsync("Step 2 completed with warning", CompletionState.CompletedWithWarning, CancellationToken.None); 341var task3 = await step3.CreateTaskAsync("Task 3", CancellationToken.None); 342await task3.CompleteAsync(null, cancellationToken: CancellationToken.None); 343await step3.CompleteAsync("Step 3 failed", CompletionState.CompletedWithError, CancellationToken.None); 350await reporter.CompletePublishAsync(isDeploy: false, cancellationToken: CancellationToken.None); 366var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 367var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 370await task.CompleteAsync(null, cancellationToken: CancellationToken.None); 383var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 384var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 387await task.CompleteAsync(null, cancellationToken: CancellationToken.None); 391() => task.CompleteAsync(null, cancellationToken: CancellationToken.None)); 403var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 406await step.CompleteAsync("Complete", cancellationToken: CancellationToken.None); 410() => step.CompleteAsync("Complete again", cancellationToken: CancellationToken.None)); 422var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 423var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 426await task.CompleteAsync(null, cancellationToken: CancellationToken.None); 429await step.CompleteAsync("Step completed", CompletionState.Completed, CancellationToken.None); 434() => task.UpdateAsync("New status", CancellationToken.None)); 440() => task.CompleteAsync(null, cancellationToken: CancellationToken.None)); 445() => step.CreateTaskAsync("New Task", CancellationToken.None)); 455await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 487await reporter.CompleteInteractionAsync(promptId, responses, CancellationToken.None).DefaultTimeout(); 527await reporter.CompleteInteractionAsync(notificationId, responses, CancellationToken.None).DefaultTimeout(); 540var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 555var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 583var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 584var task1 = await step.CreateTaskAsync("Task 1", CancellationToken.None); 585var task2 = await step.CreateTaskAsync("Task 2", CancellationToken.None); 588await task1.SucceedAsync(null, CancellationToken.None); 589await task2.SucceedAsync(null, CancellationToken.None); 617var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 620await step.CompleteAsync("Step completed manually", CompletionState.Completed, CancellationToken.None); 642var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 643var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 651await taskInternal.WarnAsync(completionMessage, CancellationToken.None); 677var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 678var task = await step.CreateTaskAsync("Test Task", CancellationToken.None); 686await taskInternal.FailAsync(completionMessage, CancellationToken.None); 715await reporter.CompletePublishAsync(null, completionState, isDeploy: true, CancellationToken.None); 736await reporter.CompletePublishAsync(expectedStatusText, CompletionState.CompletedWithError, isDeploy: true, CancellationToken.None);
Publishing\PublishingExtensionsTests.cs (16)
19await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 22var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 38await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 41var result = await step.SucceedAsync("Success message", CancellationToken.None); 56await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 57var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 60var result = await task.UpdateStatusAsync("Updated status", CancellationToken.None); 75await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 76var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 79var result = await task.SucceedAsync("Success message", CancellationToken.None); 93await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 94var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 97var result = await task.WarnAsync("Warning message", CancellationToken.None); 111await using var step = await reporter.CreateStepAsync("Test Step", CancellationToken.None); 112var task = await step.CreateTaskAsync("Initial status", CancellationToken.None); 115await task.FailAsync("Error message", CancellationToken.None);
Utils\Grpc\TestServerStreamWriter.cs (1)
62return WriteAsync(message, CancellationToken.None);
VersionChecking\VersionCheckServiceTests.cs (7)
30_ = service.StartAsync(CancellationToken.None); 58_ = service.StartAsync(CancellationToken.None); 90_ = service.StartAsync(CancellationToken.None); 126_ = service.StartAsync(CancellationToken.None); 167_ = service.StartAsync(CancellationToken.None); 203_ = service.StartAsync(CancellationToken.None); 232_ = service.StartAsync(CancellationToken.None);
Aspire.Hosting.Yarp.Tests (1)
YarpConfigGeneratorTests.cs (1)
221var content = await config.Build(CancellationToken.None);
Aspire.StackExchange.Redis.DistributedCaching.Tests (1)
DistributedCacheConformanceTests.cs (1)
64await cache.GetAsync("myFakeKey", CancellationToken.None);
Aspire.StackExchange.Redis.OutputCaching.Tests (1)
OutputCacheConformanceTests.cs (1)
64await cacheStore.GetAsync("myFakeKey", CancellationToken.None);
AuthSamples.FunctionalTests (1)
TestAssert.cs (1)
79.OpenAsync(ResponseFactory, CancellationToken.None);
BuildActionTelemetryTable (4)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
BuildValidator (1)
CompilationDiff.cs (1)
140CancellationToken.None);
Client.ChannelLayer.IntegrationTests (2)
DuplexChannelWithSynchronizationContext.cs (2)
155Task.Factory.StartNew(() => SingleThreadedSyncContext_CallbackUsingDefaultSyncCtx_SyncCallNotBlocked_Helper(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 220Task.Factory.StartNew(() => SingleThreadedSyncContext_SyncCallNotBlocked_Helper(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
Client.TypedClient.IntegrationTests (5)
TypedProxyTests.4.0.0.cs (3)
72Task.Factory.StartNew(() => TypedProxyTests.ServiceContract_TypedProxy_AsyncBeginEnd_Call(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 106Task.Factory.StartNew(() => TypedProxyTests.ServiceContract_TypedProxy_AsyncTask_Call(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 160Task.Factory.StartNew(() => TypedProxyTests.ServiceContract_TypedProxy_Synchronous_Call(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
TypedProxyTests.4.1.0.cs (2)
26Task.Factory.StartNew(() => TypedProxyTests.ServiceContract_TypedProxy_NetTcpBinding_AsyncBeginEnd_Call(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 40Task.Factory.StartNew(() => TypedProxyTests.ServiceContract_TypedProxy_NetTcpBinding_AsyncTask_Call(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
CodeStyleConfigFileGenerator (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
ConfigurationSchemaGenerator (2)
ConfigSchemaGenerator.cs (1)
30var spec = parser.GetSchemaGenerationSpec(CancellationToken.None);
Program.cs (1)
14return await rootCommand.Parse(args).InvokeAsync(CancellationToken.None).ConfigureAwait(false);
ConfigurationSchemaGenerator.Tests (1)
GeneratorTests.cs (1)
1570var spec = parser.GetSchemaGenerationSpec(CancellationToken.None);
Contract.Service.IntegrationTests (8)
ServiceContractTests.4.0.0.cs (4)
336Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Open_ChannelFactory(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 389Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Open_Proxy(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 440Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Close_ChannelFactory(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 490Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_Async_Close_Proxy(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
ServiceContractTests.4.1.0.cs (4)
210Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_DefaultSettings_Echo_RoundTrips_String_Streamed(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 224Task.Factory.StartNew(() => ServiceContractTests.BasicHttp_DefaultSettings_Echo_RoundTrips_String_Streamed_Async(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 614Task.Factory.StartNew(() => ServiceContractTests.NetTcp_NoSecurity_Streamed_RoundTrips_String(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 628Task.Factory.StartNew(() => ServiceContractTests.NetTcp_NoSecurity_Streamed_Async_RoundTrips_String(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
dotnet-svcutil-lib (19)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\ActionItem.cs (2)
37Task.Factory.StartNew(callback, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 67Task.Factory.StartNew(callback, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (4)
47}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 68}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 92}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 124}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
46_cancellationToken = CancellationToken.None;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoder.cs (1)
66int count = await stream.ReadAsync(buffer, offset, currentBufferSize - offset, CancellationToken.None);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ProducerConsumerStream.cs (2)
41return ReadAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult(); 98WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TimeoutStream.cs (2)
35return ReadAsyncInternal(buffer, offset, count, CancellationToken.None).WaitForCompletion(); 64WriteAsyncInternal(buffer, offset, count, CancellationToken.None).WaitForCompletion();
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (3)
122Task task = CloseOutputAsync(CancellationToken.None); 361return WebSocket.CloseAsync(_webSocketCloseDetails.OutputCloseStatus, _webSocketCloseDetails.OutputCloseStatusDescription, CancellationToken.None); 582CancellationToken.None);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
1183Task.Factory.StartNew(s_receiveThreadSchedulerCallback, result, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Shared\Options\OptionValueParser.cs (1)
64value = CreateValue<MSBuildProj>(() => MSBuildProj.FromPathAsync(stringValue, null, System.Threading.CancellationToken.None).Result, option, stringValue);
Tool.cs (2)
68var cancellationToken = CancellationToken.None; 403var telemetryClient = await AppInsightsTelemetryClient.GetInstanceAsync(CancellationToken.None).ConfigureAwait(false);
dotnet-svcutil-lib.Tests (24)
E2ETests.cs (4)
233MSBuildProj binProj = MSBuildProj.FromPathAsync(binProjPath, null, CancellationToken.None).Result; 234ProcessRunner.ProcessResult result = binProj.BuildAsync(true, null, CancellationToken.None).Result; 243this_TestCaseProject.SaveAsync(this_TestCaseLogger, CancellationToken.None).Wait(); 245ProcessRunner.ProcessResult ret = this_TestCaseProject.BuildAsync(true, this_TestCaseLogger, CancellationToken.None).Result;
GlobalToolTests.cs (4)
129this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None); 157this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None); 158ProcessRunner.ProcessResult ret = await this_TestCaseProject.BuildAsync(true, this_TestCaseLogger, CancellationToken.None); 181await this_TestCaseProject.SaveAsync(this_TestCaseLogger, System.Threading.CancellationToken.None);
MSBuildProjTests.cs (4)
41var build = await MSBuildProj.ParseAsync(projectText, TestDir + "/MSBuildProjTests/Sample", null, CancellationToken.None); 61var build = await MSBuildProj.ParseAsync(projectText, TestDir + "/MSBuildProjTests/Sample", null, CancellationToken.None); 80var build = await MSBuildProj.ParseAsync(projectText, TestDir + "/MSBuildProjTests/Sample", null, CancellationToken.None); 100var build = await MSBuildProj.ParseAsync(projectText, TestDir + "/MSBuildProjTests/Sample", null, CancellationToken.None);
ProjectUtils.cs (3)
17static readonly CancellationToken token = CancellationToken.None; 95result = ProcessRunner.RunAsync("dotnet-svcutil", options, project.DirectoryPath, redirectOutput: true, throwOnError: false, environmentVariables: envVars, logger: logger, cancellationToken: CancellationToken.None).Result; 156result = ProcessRunner.RunAsync("dotnet", $"run", project.DirectoryPath, redirectOutput: true, throwOnError: false, environmentVariables: envVars, logger: logger, cancellationToken: CancellationToken.None).Result;
TestInit.cs (4)
178ProcessRunner.ProcessResult ret = ProcessRunner.TryRunAsync("dotnet", "tool uninstall -g dotnet-svcutil", currentDirectory, null, CancellationToken.None).Result; 185ret = ProcessRunner.TryRunAsync("dotnet", $"tool install --global --add-source {pkgPath} dotnet-svcutil --version {g_SvcutilPkgVersion}", currentDirectory, null, CancellationToken.None).Result; 259this_TestCaseProject = MSBuildProj.FromPathAsync(projectPath, null, CancellationToken.None).Result; 589var rootSolutionFolder = PathHelper.TryFindFileAsync("dotnet-svcutil.sln", parentDir, null, CancellationToken.None).Result;
UnitTest.cs (5)
34exitCode = Tool.MainAsync(args, this_TestCaseLogger, CancellationToken.None).Result; 249cmdOptions.ProcessBasicOptionsAsync(this_TestCaseLogger, CancellationToken.None).Wait(); 250cmdOptions.ResolveAsync(CancellationToken.None).Wait(); 295await cmdOptions.ProcessBasicOptionsAsync(this_TestCaseLogger, CancellationToken.None); 296await cmdOptions.ResolveAsync(CancellationToken.None);
GenerateDocumentationAndConfigFiles (23)
Program.cs (1)
260return rootCommand.Parse(args).InvokeAsync(null, CancellationToken.None);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
http2cat (2)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
IdeBenchmarks (10)
FormatterBenchmarks.cs (4)
45var root = document.GetSyntaxRootSynchronously(CancellationToken.None); 47return Formatter.GetFormattedTextChanges(root, workspace.Services.SolutionServices, options, CancellationToken.None); 58var root = document.GetSyntaxRootSynchronously(CancellationToken.None); 60return Formatter.GetFormattedTextChanges(root, workspace.Services.SolutionServices, options, CancellationToken.None);
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
80return PrepareGlyphRequiredDataAsync(CancellationToken.None);
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
62CancellationToken.None).ConfigureAwait(false);
Lsp\LspCompletionSerializationBenchmarks.cs (1)
117var results = await testServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None);
RegexClassifierBenchmarks.cs (1)
93CancellationToken.None);
SQLitePersistentStorageBenchmark.cs (1)
68_storage = _storageService.GetStorageAsync(SolutionKey.ToSolutionKey(solution), CancellationToken.None).AsTask().GetAwaiter().GetResult();
StackTraceExplorer\StackTraceExplorerBenchmarks.cs (1)
18var result = await Microsoft.CodeAnalysis.StackTraceExplorer.StackTraceAnalyzer.AnalyzeAsync(Stack, CancellationToken.None);
IdeCoreBenchmarks (22)
ClassificationBenchmarks.cs (2)
79_solution = await _workspace.OpenSolutionAsync(solutionPath, progress: null, CancellationToken.None); 87await service.AddSemanticClassificationsAsync(document, span, ClassificationOptions.Default, result, CancellationToken.None);
CSharpIdeAnalyzerBenchmarks.cs (2)
66_ = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result; 79await _diagnosticAnalyzerRunner.RunAsync(CancellationToken.None).ConfigureAwait(false);
FindReferencesBenchmarks.cs (2)
78_solution = await _workspace.OpenSolutionAsync(solutionPath, progress: null, CancellationToken.None); 87var storage = await storageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.CurrentSolution), CancellationToken.None);
FormatterBenchmarks.cs (3)
53var root = document.GetSyntaxRootAsync(CancellationToken.None).Result.WithAdditionalAnnotations(Formatter.Annotation); 68var formattedDoc = Formatter.FormatAsync(_document, Formatter.Annotation, _options, CancellationToken.None).Result; 69var formattedRoot = formattedDoc.GetSyntaxRootAsync(CancellationToken.None).Result;
IncrementalAnalyzerBenchmarks.cs (2)
65_ = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result; 78await _incrementalAnalyzerRunner.RunAsync(CancellationToken.None).ConfigureAwait(false);
IncrementalSourceGeneratorBenchmarks.cs (1)
81var solution = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result;
NavigateToBenchmarks.cs (4)
82var solution = _workspace.OpenSolutionAsync(_solutionPath, progress: null, CancellationToken.None).Result; 184var storage = await storageService.GetStorageAsync(SolutionKey.ToSolutionKey(_workspace.CurrentSolution), CancellationToken.None); 215g => Task.Run(() => SearchAsync(solution, g, priorityDocuments: ImmutableArray<Document>.Empty), CancellationToken.None)).ToArray(); 237() => Task.CompletedTask, CancellationToken.None);
SyntacticChangeRangeBenchmark.cs (6)
91SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None); 98SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None); 104SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, _rootWithSimpleEdit, TimeSpan.MaxValue, CancellationToken.None); 110SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, _rootWithComplexEdit, TimeSpan.MaxValue, CancellationToken.None); 117SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None); 124SyntacticChangeRangeComputer.ComputeSyntacticChangeRange(_root, newRoot, TimeSpan.MaxValue, CancellationToken.None);
IIS.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
IIS.LongTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
IIS.NewHandler.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
IIS.NewShim.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
IIS.ShadowCopy.Tests (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
IISExpress.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
InMemory.FunctionalTests (14)
Http2\TlsTests.cs (2)
72}, CancellationToken.None); 74var reader = PipeReaderFactory.CreateFromStream(PipeOptions.Default, sslStream, CancellationToken.None);
Http3\WebTransport\WebTransportHandshakeTests.cs (1)
37var session = await webTransportFeature.AcceptAsync(CancellationToken.None).DefaultTimeout(); // todo session is null here
Http3\WebTransport\WebTransportSessionTests.cs (5)
21var stream = await session.OpenUnidirectionalStreamAsync(CancellationToken.None); 45var stream = await session.AcceptStreamAsync(CancellationToken.None); 53var stream2 = await session.AcceptStreamAsync(CancellationToken.None); 93Assert.Null(await session.AcceptStreamAsync(CancellationToken.None)); 94Assert.Null(await session.OpenUnidirectionalStreamAsync(CancellationToken.None));
Http3\WebTransport\WebTransportStreamTests.cs (2)
42await stream.Transport.Output.WriteAsync(input, CancellationToken.None); 47var length = await stream.Transport.Input.AsStream().ReadAsync(memoryOut, CancellationToken.None);
Http3\WebTransport\WebTransportTestUtilities.cs (1)
35var session = await webTransportFeature.AcceptAsync(CancellationToken.None).DefaultTimeout();
HttpsTests.cs (2)
463var sslServerAuthenticationOptions = await sslOptions.OnConnection(new TlsConnectionCallbackContext(), CancellationToken.None); 507var sslServerAuthenticationOptions = await tlsOptions.OnConnection(new TlsConnectionCallbackContext(), CancellationToken.None);
TlsListenerTests.cs (1)
61}, CancellationToken.None);
InProcessWebSite (4)
Startup.WebSockets.cs (4)
138await webSocket.SendAsync(new ArraySegment<byte>(Encoding.ASCII.GetBytes(message)), WebSocketMessageType.Text, true, CancellationToken.None); 189await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None); 202await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "CloseFromServer", CancellationToken.None); 215result = await webSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None);
Interop.FunctionalTests (46)
Http2\Http2RequestTests.cs (4)
130var response1 = await client.SendAsync(request1, CancellationToken.None); 187var response = await client.SendAsync(request1, CancellationToken.None); 214var responseMessage = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 298var responseMessage = await client.SendAsync(request, CancellationToken.None).DefaultTimeout();
Http3\Http3RequestTests.cs (35)
94var response1 = await client.SendAsync(request1, CancellationToken.None); 154var responseMessage = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 256var response = await client.SendAsync(request, CancellationToken.None); 300var responseTask = client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 380var responseTask = client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 424var responseTask = client.SendAsync(request, CancellationToken.None); 566var sendTask = client.SendAsync(request, CancellationToken.None); 625var sendTask = client.SendAsync(request, CancellationToken.None); 681var ex = await Assert.ThrowsAnyAsync<HttpRequestException>(() => client.SendAsync(request, CancellationToken.None)).DefaultTimeout(); 820var response = await client.SendAsync(request, CancellationToken.None); 856var response1 = await client.SendAsync(request1, CancellationToken.None); 867var response2 = await client.SendAsync(request2, CancellationToken.None); 953var response2 = await client.SendAsync(request2, CancellationToken.None); 1004var responseTask1 = client.SendAsync(request1, CancellationToken.None); 1020var response2 = await client.SendAsync(request2, CancellationToken.None); 1070var response1 = await client.SendAsync(request1, CancellationToken.None); 1083var response2 = await client.SendAsync(request2, CancellationToken.None); 1099var response3 = await client.SendAsync(request3, CancellationToken.None); 1529var response = await client.SendAsync(request, CancellationToken.None); 1581var response1 = await client.SendAsync(request1, CancellationToken.None); 1591var response2 = await client.SendAsync(request2, CancellationToken.None); 1648var response1 = await client.SendAsync(request1, CancellationToken.None); 1659var response2 = await client.SendAsync(request2, CancellationToken.None); 1705await client.SendAsync(request1, CancellationToken.None); 1719var response2 = await client.SendAsync(request2, CancellationToken.None); 1762var response1 = await client.SendAsync(request1, CancellationToken.None); 1822var response1 = await client.SendAsync(request1, CancellationToken.None); 1878var response1 = await client.SendAsync(request1, CancellationToken.None); 1935var responseTask1 = client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/1"), CancellationToken.None); 1985var response3 = await client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/3"), CancellationToken.None); 2044var responseTask = client.SendAsync(request1, CancellationToken.None); 2121var response1 = await client.SendAsync(request1, CancellationToken.None); 2199var responseTask = client.SendAsync(request, CancellationToken.None); 2299var responseTask = client.SendAsync(request, CancellationToken.None); 2351var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout();
Http3\Http3TlsTests.cs (7)
61var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 107var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 149var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 198var sendTask = client.SendAsync(request, CancellationToken.None); 248var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 327var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 500var response = await client.SendAsync(request, CancellationToken.None).DefaultTimeout();
Metrics (29)
Program.cs (6)
306var project = await workspace.OpenProjectAsync(projectFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 319var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false); 332var solution = await workspace.OpenSolutionAsync(solutionFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 352var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 353var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Metrics.Legacy (29)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Tools\Metrics\Program.cs (6)
306var project = await workspace.OpenProjectAsync(projectFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 319var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false); 332var solution = await workspace.OpenSolutionAsync(solutionFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 352var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 353var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.Analyzers.Extra.Tests (17)
CallAnalysis\LegacyLoggingTests.cs (11)
822var targetRoot = await targetDoc.GetSyntaxRootAsync(CancellationToken.None); 831CancellationToken.None); 842CancellationToken.None); 855CancellationToken.None); 868CancellationToken.None); 881CancellationToken.None); 894CancellationToken.None); 905CancellationToken.None); 918CancellationToken.None); 931CancellationToken.None); 942CancellationToken.None);
Resources\RoslynTestUtils.cs (6)
191var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 219var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 350var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 361var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 448cancellationToken: CancellationToken.None); 455var operations = await fixAllCodeAction!.GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Analyzers.Local.Tests (7)
Resources\RoslynTestUtils.cs (7)
191var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 219var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 261.GetAnalysisResultAsync(CancellationToken.None).ConfigureAwait(false); 351var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 362var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 449cancellationToken: CancellationToken.None); 456var operations = await fixAllCodeAction!.GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Arcade.Common (2)
ArcadeHttpMessageHandler.cs (1)
15public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request) => SendAsync(request, CancellationToken.None);
ExponentialRetry.cs (1)
32public CancellationToken DefaultCancellationToken { get; set; } = CancellationToken.None;
Microsoft.AspNetCore.Analyzer.Testing (2)
CodeFixRunner.cs (2)
29var context = new CodeFixContext(document, analyzerDiagnostic, (a, d) => actions.Add(a), CancellationToken.None); 63var operations = await codeAction.GetOperationsAsync(CancellationToken.None);
Microsoft.AspNetCore.App.Analyzers.Test (10)
TestDiagnosticAnalyzer.cs (5)
34var result = await Classifier.GetClassifiedSpansAsync(doc, textSpan, CancellationToken.None); 73var semanticModel = await document.GetSemanticModelAsync(CancellationToken.None).ConfigureAwait(false); 79var root = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false); 95return braceMatcher.FindBraces(model, token, caretPosition, CancellationToken.None); 103var highlights = highlighter.GetDocumentHighlights(model, token, caretPosition, CancellationToken.None);
Verifiers\CSharpAnalyzerVerifier.cs (1)
46await test.RunAsync(CancellationToken.None);
Verifiers\CSharpCodeFixVerifier.cs (2)
42await test.RunAsync(CancellationToken.None); 76await test.RunAsync(CancellationToken.None);
Verifiers\CSharpSourceGeneratorVerifier.cs (2)
31await test.RunAsync(CancellationToken.None); 45await test.RunAsync(CancellationToken.None);
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Helpers\CodeFixVerifier.Helper.cs (1)
28var operations = codeAction.GetOperationsAsync(CancellationToken.None).Result;
Verifiers\CodeFixVerifier.cs (1)
86var context = new CodeFixContext(document, analyzerDiagnostics[0], (a, d) => actions.Add(a), CancellationToken.None);
Microsoft.AspNetCore.Components.Forms (1)
EditContextDataAnnotationsExtensions.cs (1)
184var validationTask = _validatorTypeInfo.ValidateAsync(_editContext.Model, validateContext, CancellationToken.None);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Helpers\CodeFixVerifier.Helper.cs (1)
28var operations = codeAction.GetOperationsAsync(CancellationToken.None).Result;
Verifiers\CodeFixVerifier.cs (1)
86var context = new CodeFixContext(document, analyzerDiagnostics[0], (a, d) => actions.Add(a), CancellationToken.None);
Microsoft.AspNetCore.Components.Server (2)
Circuits\CircuitHost.cs (2)
213await OnConnectionDownAsync(CancellationToken.None); 223await OnCircuitDownAsync(CancellationToken.None);
Microsoft.AspNetCore.Components.Server.Tests (15)
Circuits\CircuitHostTest.cs (4)
765var updateTask = circuitHost.UpdateRootComponents(batch, store, false, CancellationToken.None); 799await circuitHost.UpdateRootComponents(new() { Operations = [addOperation] }, null, false, CancellationToken.None); 815await circuitHost.UpdateRootComponents(new() { Operations = [updateOperation] }, null, false, CancellationToken.None); 827await circuitHost.UpdateRootComponents(new() { Operations = [removeOperation] }, null, false, CancellationToken.None);
Circuits\RemoteJSDataStreamTest.cs (10)
24var remoteJSDataStream = await RemoteJSDataStream.CreateRemoteJSDataStreamAsync(_jsRuntime, jsStreamReference, totalLength: 100, signalRMaximumIncomingBytes: 10_000, jsInteropDefaultCallTimeout: TimeSpan.FromMinutes(1), cancellationToken: CancellationToken.None).DefaultTimeout(); 162var remoteJSDataStream = await RemoteJSDataStream.CreateRemoteJSDataStreamAsync(jsRuntime, jsStreamReference, totalLength: 100, signalRMaximumIncomingBytes: 10_000, jsInteropDefaultCallTimeout: TimeSpan.FromMinutes(1), cancellationToken: CancellationToken.None); 182var remoteJSDataStream = await RemoteJSDataStream.CreateRemoteJSDataStreamAsync(jsRuntime, jsStreamReference, totalLength: 100, signalRMaximumIncomingBytes: 10_000, jsInteropDefaultCallTimeout: TimeSpan.FromMinutes(1), cancellationToken: CancellationToken.None); 219cancellationToken: CancellationToken.None); 260cancellationToken: CancellationToken.None); 296var token1 = isToken1Cancelable ? cts.Token : CancellationToken.None; 297var token2 = isToken1Cancelable ? CancellationToken.None : cts.Token; 313CancellationToken.None, 314CancellationToken.None); 348var remoteJSDataStream = await RemoteJSDataStream.CreateRemoteJSDataStreamAsync(jsRuntime ?? _jsRuntime, jsStreamReference, totalLength: 100, signalRMaximumIncomingBytes: 10_000, jsInteropDefaultCallTimeout: TimeSpan.FromMinutes(1), cancellationToken: CancellationToken.None);
ProtectedBrowserStorageTest.cs (1)
366=> InvokeAsync<TValue>(identifier, cancellationToken: CancellationToken.None, args: args);
Microsoft.AspNetCore.Components.Web (1)
Virtualization\Virtualize.cs (1)
406cancellationToken = CancellationToken.None;
Microsoft.AspNetCore.Components.Web.Tests (1)
Image\ImageTest.cs (1)
182=> InvokeAsync<TValue>(identifier, CancellationToken.None, args ?? Array.Empty<object?>());
Microsoft.AspNetCore.Components.WebAssembly (1)
Hosting\WebAssemblyHost.cs (1)
111return RunAsyncCore(CancellationToken.None);
Microsoft.AspNetCore.Components.WebAssembly.Tests (3)
PullFromJSDataStreamTest.cs (3)
23var pullFromJSDataStream = PullFromJSDataStream.CreateJSDataStream(_jsRuntime, jsStreamReference, totalLength: 100, cancellationToken: CancellationToken.None); 108var pullFromJSDataStream = PullFromJSDataStream.CreateJSDataStream(runtime, jsStreamReference, totalLength: data.Length, cancellationToken: CancellationToken.None); 134=> await InvokeAsync<TValue>(identifier, CancellationToken.None, args);
Microsoft.AspNetCore.Components.WebView.Photino (2)
PhotinoSynchronizationContext.cs (1)
240}, CancellationToken.None, flags, TaskScheduler.Current);
PhotinoWebViewManager.cs (1)
43}, message, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.AspNetCore.Connections.Abstractions (2)
IConnectionFactory.cs (1)
19/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
IMultiplexedConnectionFactory.cs (1)
21/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
Microsoft.AspNetCore.DataProtection (3)
KeyManagement\Internal\CacheableKeyRing.cs (1)
49return new CacheableKeyRing(CancellationToken.None, now + extension, KeyRing);
KeyManagement\KeyRingProvider.cs (2)
369CancellationToken.None, // GetKeyRingFromCompletedTaskUnsynchronized will need to react if this becomes cancellable 411CancellationToken.None,
Microsoft.AspNetCore.DataProtection.Tests (22)
KeyManagement\CacheableKeyRingTests.cs (1)
51var cacheableKeyRing = new CacheableKeyRing(CancellationToken.None, DateTimeOffset.Now, keyRing);
KeyManagement\KeyRingBasedDataProtectorTests.cs (5)
263var keyRing = new CacheableKeyRing(CancellationToken.None, DateTimeOffset.MaxValue, key, new[] { key }); 294var keyRing = new CacheableKeyRing(CancellationToken.None, DateTimeOffset.MaxValue, key, new[] { key }); 298var keyRing2 = new CacheableKeyRing(CancellationToken.None, DateTimeOffset.MaxValue, key, new[] { key2 }); 330var keyRing = new CacheableKeyRing(CancellationToken.None, DateTimeOffset.MaxValue, key, new[] { key }); 334var keyRing2 = new CacheableKeyRing(CancellationToken.None, DateTimeOffset.MaxValue, key, new[] { key2 });
KeyManagement\KeyRingProviderTests.cs (16)
163getCacheExpirationTokenReturnValues: new[] { CancellationToken.None, CancellationToken.None }, 248getCacheExpirationTokenReturnValues: new[] { CancellationToken.None }, 501getCacheExpirationTokenReturnValues: new[] { CancellationToken.None, CancellationToken.None }, 536getCacheExpirationTokenReturnValues: new[] { CancellationToken.None, CancellationToken.None }, 582expirationToken: CancellationToken.None, 609expirationToken: CancellationToken.None, 615expirationToken: CancellationToken.None, 621expirationToken: CancellationToken.None, 650expirationToken: CancellationToken.None, 656expirationToken: CancellationToken.None, 701expirationToken: CancellationToken.None, 738.Returns(new CacheableKeyRing(CancellationToken.None, StringToDateTime("2015-03-02 00:00:00Z"), updatedKeyRing)); 831expirationToken: CancellationToken.None,
Microsoft.AspNetCore.Grpc.JsonTranscoding (4)
Internal\CallHandlers\UnaryServerCallHandler.cs (1)
54await JsonRequestHelpers.SendMessage(serverCallContext, SerializerOptions, response, CancellationToken.None);
Internal\HttpContextStreamWriter.cs (1)
39return WriteAsyncCore(message, CancellationToken.None);
Internal\JsonRequestHelpers.cs (2)
101await WriteResponseMessage(response, encoding, e, options, CancellationToken.None); 352await fs.DrainAsync(CancellationToken.None);
Microsoft.AspNetCore.Hosting.Abstractions (1)
HostingAbstractionsWebHostBuilderExtensions.cs (1)
176host.StartAsync(CancellationToken.None).GetAwaiter().GetResult();
Microsoft.AspNetCore.Http (1)
Features\FormFeature.cs (1)
156public Task<IFormCollection> ReadFormAsync() => ReadFormAsync(CancellationToken.None);
Microsoft.AspNetCore.Http.Connections (1)
Internal\Transports\WebSocketsServerTransport.cs (1)
281await socket.CloseOutputAsync(error != null ? WebSocketCloseStatus.InternalServerError : WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
Microsoft.AspNetCore.Http.Connections.Client (3)
HttpConnection.cs (2)
177/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 193/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HttpConnectionFactory.cs (1)
40/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
Microsoft.AspNetCore.Http.Connections.Tests (18)
ApplicationLifetime.cs (3)
35public CancellationToken ApplicationStarted => CancellationToken.None; 37public CancellationToken ApplicationStopping => CancellationToken.None; 39public CancellationToken ApplicationStopped => CancellationToken.None;
HttpConnectionDispatcherTests.cs (1)
1465await ws.Client.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
LongPollingTests.cs (3)
30var poll = new LongPollingServerTransport(CancellationToken.None, connection.Application.Input, LoggerFactory); 71var poll = new LongPollingServerTransport(CancellationToken.None, connection.Application.Input, LoggerFactory); 94var poll = new LongPollingServerTransport(CancellationToken.None, connection.Application.Input, LoggerFactory);
MapConnectionHandlerTests.cs (3)
402await client.ConnectAsync(new Uri(address), CancellationToken.None); 404await client.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None).DefaultTimeout(); 405var result = await client.ReceiveAsync(new ArraySegment<byte>(new byte[1024]), CancellationToken.None).DefaultTimeout();
WebSocketsTests.cs (8)
51cancellationToken: CancellationToken.None); 52await feature.Client.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None); 100await feature.Client.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None); 193await feature.Client.CloseAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None); 298await feature.Client.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, null, CancellationToken.None).DefaultTimeout(); 332await feature.Client.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, null, CancellationToken.None).DefaultTimeout(); 376var transport = ws.ProcessRequestAsync(context, CancellationToken.None); 386await feature.Client.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, null, CancellationToken.None).DefaultTimeout();
Microsoft.AspNetCore.Http.Extensions.Tests (5)
SendFileResponseExtensionsTests.cs (5)
26await response.SendFileAsync("bob", 1, 3, CancellationToken.None); 31Assert.Equal(CancellationToken.None, fakeFeature.Token); 42await response.SendFileAsync("testfile1kb.txt", 1, 3, CancellationToken.None); 82await response.SendFileAsync("testfile1kb.txt", 1, 3, CancellationToken.None); 97await response.SendFileAsync("testfile1kb.txt", 1, 3, CancellationToken.None);
Microsoft.AspNetCore.Http.Results.Tests (5)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (4)
273.Setup(s => s.SendFileAsync(path, 0, null, CancellationToken.None)) 313Assert.Equal(CancellationToken.None, sendFile.Token); 340Assert.Equal(CancellationToken.None, sendFile.Token); 360Assert.Equal(CancellationToken.None, sendFile.Token);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
348Assert.Equal(CancellationToken.None, sendFile.Token);
Microsoft.AspNetCore.HttpOverrides (1)
CertificateForwardingFeature.cs (1)
27get => GetClientCertificateAsync(CancellationToken.None).Result;
Microsoft.AspNetCore.Identity (4)
AspNetRoleManager.cs (1)
34_cancel = contextAccessor?.HttpContext?.RequestAborted ?? CancellationToken.None;
AspNetUserManager.cs (1)
42_cancel = services?.GetService<IHttpContextAccessor>()?.HttpContext?.RequestAborted ?? CancellationToken.None;
IdentityApiEndpointRouteBuilderExtensions.cs (2)
77await userStore.SetUserNameAsync(user, email, CancellationToken.None); 78await emailStore.SetEmailAsync(user, email, CancellationToken.None);
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Extensions\ResponseAssert.cs (1)
27.OpenAsync(ResponseFactory, CancellationToken.None);
Microsoft.AspNetCore.Identity.Test (91)
RoleManagerTest.cs (9)
17store.Setup(s => s.CreateAsync(role, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 18store.Setup(s => s.GetRoleNameAsync(role, CancellationToken.None)).Returns(Task.FromResult(role.Name)).Verifiable(); 19store.Setup(s => s.SetNormalizedRoleNameAsync(role, normalizer.NormalizeName(role.Name), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 37store.Setup(s => s.UpdateAsync(role, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 38store.Setup(s => s.GetRoleNameAsync(role, CancellationToken.None)).Returns(Task.FromResult(role.Name)).Verifiable(); 39store.Setup(s => s.SetNormalizedRoleNameAsync(role, normalizer.NormalizeName(role.Name), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 65store.Setup(s => s.FindByNameAsync(normalizer.NormalizeName("Foo"), CancellationToken.None)).Returns(Task.FromResult(role)).Verifiable(); 82store.Setup(s => s.FindByNameAsync(role.Name, CancellationToken.None)).Returns(Task.FromResult(role)).Verifiable(); 101store.Setup(s => s.FindByNameAsync(normalizer.NormalizeName("Foo"), CancellationToken.None)).Returns(Task.FromResult(role)).Verifiable();
UserManagerTest.cs (82)
72store.Setup(s => s.CreateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 73store.Setup(s => s.GetUserNameAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.UserName)).Verifiable(); 74store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.NormalizeName(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 91store.Setup(s => s.CreateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 92store.Setup(s => s.GetSecurityStampAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.SecurityStamp)).Verifiable(); 93store.Setup(s => s.SetSecurityStampAsync(user, It.IsAny<string>(), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 111store.Setup(s => s.CreateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 112store.Setup(s => s.GetUserNameAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.UserName)).Verifiable(); 113store.Setup(s => s.GetEmailAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.Email)).Verifiable(); 114store.Setup(s => s.SetNormalizedEmailAsync(user, normalizer.NormalizeEmail(user.Email), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 115store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.NormalizeName(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 135store.Setup(s => s.DeleteAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 162store.Setup(s => s.DeleteAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Failed(new IdentityErrorDescriber().ConcurrencyFailure())).Verifiable(); 188store.Setup(s => s.GetUserNameAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.UserName)).Verifiable(); 189store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.NormalizeName(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 190store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 208store.Setup(s => s.GetUserNameAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.UserName)).Verifiable(); 209store.Setup(s => s.GetEmailAsync(user, CancellationToken.None)).Returns(Task.FromResult(user.Email)).Verifiable(); 210store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.NormalizeName(user.UserName), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 211store.Setup(s => s.SetNormalizedEmailAsync(user, normalizer.NormalizeEmail(user.Email), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 212store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 230store.Setup(s => s.SetUserNameAsync(user, "foo", CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 231store.Setup(s => s.GetUserNameAsync(user, CancellationToken.None)).Returns(Task.FromResult("foo")).Verifiable(); 232store.Setup(s => s.SetNormalizedUserNameAsync(user, normalizer.NormalizeName("foo"), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 233store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).Returns(Task.FromResult(IdentityResult.Success)).Verifiable(); 250store.Setup(s => s.FindByIdAsync(user.Id, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 268store.Setup(s => s.FindByNameAsync(normalizer.NormalizeName(user.UserName), CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 285store.Setup(s => s.FindByNameAsync(user.UserName, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 304store.Setup(s => s.FindByEmailAsync(normalizer.NormalizeEmail(user.Email), CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 321store.Setup(s => s.FindByEmailAsync(user.Email, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 345store.Setup(s => s.FindByEmailAsync("@Foo", CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 363store.Setup(s => s.FindByNameAsync("#Foo", CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 383store.Setup(s => s.AddToRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 386store.Setup(s => s.AddToRoleAsync(user, normalizer.NormalizeName("B"), CancellationToken.None)) 389store.Setup(s => s.AddToRoleAsync(user, normalizer.NormalizeName("C"), CancellationToken.None)) 393store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 394store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 397store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("B"), CancellationToken.None)) 400store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("C"), CancellationToken.None)) 411store.Verify(s => s.AddToRoleAsync(user, normalizer.NormalizeName("C"), CancellationToken.None), Times.Once()); 421store.Setup(s => s.AddToRoleAsync(user, "#A", CancellationToken.None)) 424store.Setup(s => s.AddToRoleAsync(user, "#B", CancellationToken.None)) 427store.Setup(s => s.AddToRoleAsync(user, "#C", CancellationToken.None)) 431store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 432store.Setup(s => s.IsInRoleAsync(user, "#A", CancellationToken.None)) 435store.Setup(s => s.IsInRoleAsync(user, "#B", CancellationToken.None)) 438store.Setup(s => s.IsInRoleAsync(user, "#C", CancellationToken.None)) 450store.Verify(s => s.AddToRoleAsync(user, "#C", CancellationToken.None), Times.Once()); 461store.Setup(s => s.AddToRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 464store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("B"), CancellationToken.None)) 485store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 488store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.NormalizeName("B"), CancellationToken.None)) 491store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.NormalizeName("C"), CancellationToken.None)) 494store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 495store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 498store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("B"), CancellationToken.None)) 501store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("C"), CancellationToken.None)) 522store.Setup(s => s.RemoveFromRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 525store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("A"), CancellationToken.None)) 528store.Setup(s => s.IsInRoleAsync(user, normalizer.NormalizeName("B"), CancellationToken.None)) 548store.Setup(s => s.AddClaimsAsync(user, claims, CancellationToken.None)) 551store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 572store.Setup(s => s.AddClaimsAsync(user, It.IsAny<IEnumerable<Claim>>(), CancellationToken.None)) 575store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 604store.Setup(s => s.ReplaceClaimAsync(user, It.IsAny<Claim>(), It.IsAny<Claim>(), CancellationToken.None)) 607store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).Returns(Task.FromResult(IdentityResult.Success)).Verifiable(); 640store.Setup(s => s.GetPasswordHashAsync(user, CancellationToken.None)) 643store.Setup(s => s.SetPasswordHashAsync(user, It.IsAny<string>(), CancellationToken.None)).Returns(Task.FromResult(0)).Verifiable(); 736store.Setup(s => s.RemoveClaimsAsync(user, claims, CancellationToken.None)) 739store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 767store.Setup(s => s.RemoveClaimsAsync(user, It.IsAny<IEnumerable<Claim>>(), CancellationToken.None)) 770store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 795store.Setup(s => s.AddOrUpdatePasskeyAsync(user, passkey, CancellationToken.None)).Returns(Task.CompletedTask).Verifiable(); 796store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 815store.Setup(s => s.GetPasskeysAsync(user, CancellationToken.None)).Returns(Task.FromResult(passkeys)).Verifiable(); 833store.Setup(s => s.FindByPasskeyIdAsync(credentialId, CancellationToken.None)).Returns(Task.FromResult(user)).Verifiable(); 851store.Setup(s => s.RemovePasskeyAsync(user, credentialId, CancellationToken.None)).Returns(Task.CompletedTask).Verifiable(); 852store.Setup(s => s.UpdateAsync(user, CancellationToken.None)).ReturnsAsync(IdentityResult.Success).Verifiable(); 2160store.Setup(s => s.FindByEmailAsync("DUPE@EMAIL.COM", CancellationToken.None)) 2163store.Setup(s => s.GetUserIdAsync(user2, CancellationToken.None)) 2166store.Setup(s => s.GetUserNameAsync(user, CancellationToken.None)) 2169store.Setup(s => s.GetEmailAsync(user, CancellationToken.None))
Microsoft.AspNetCore.Identity.UI (8)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (2)
185await _userStore.SetUserNameAsync(user, Input.Email, CancellationToken.None); 186await _emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (2)
131await _userStore.SetUserNameAsync(user, Input.Email, CancellationToken.None); 132await _emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (2)
185await _userStore.SetUserNameAsync(user, Input.Email, CancellationToken.None); 186await _emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (2)
131await _userStore.SetUserNameAsync(user, Input.Email, CancellationToken.None); 132await _emailStore.SetEmailAsync(user, Input.Email, CancellationToken.None);
Microsoft.AspNetCore.Mvc.Core.Test (5)
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (4)
273.Setup(s => s.SendFileAsync(path, 0, null, CancellationToken.None)) 313Assert.Equal(CancellationToken.None, sendFile.Token); 340Assert.Equal(CancellationToken.None, sendFile.Token); 360Assert.Equal(CancellationToken.None, sendFile.Token);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (1)
348Assert.Equal(CancellationToken.None, sendFile.Token);
Microsoft.AspNetCore.Mvc.Formatters.Xml (4)
XmlDataContractSerializerInputFormatter.cs (2)
115await readStream.DrainAsync(CancellationToken.None); 134await readStream.DrainAsync(CancellationToken.None);
XmlSerializerInputFormatter.cs (2)
99await readStream.DrainAsync(CancellationToken.None); 118await readStream.DrainAsync(CancellationToken.None);
Microsoft.AspNetCore.Mvc.NewtonsoftJson (2)
NewtonsoftJsonInputFormatter.cs (2)
115await readStream.DrainAsync(CancellationToken.None); 134await readStream.DrainAsync(CancellationToken.None);
Microsoft.AspNetCore.OutputCaching (1)
Streams\OutputCacheStream.cs (1)
220=> TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (6)
EndToEndBenchmarks.cs (6)
130await OutputCacheEntryFormatter.StoreAsync(Key, entry, _tags, _options.DefaultExpirationTimeSpan, _store, NullLogger.Instance, CancellationToken.None); 140await WriteInRandomChunksAsync(Payload, oc, CancellationToken.None); 146await OutputCacheEntryFormatter.StoreAsync(Key, entry, _tags, _options.DefaultExpirationTimeSpan, _store, NullLogger.Instance, CancellationToken.None); 157await WriteInRandomChunks(Payload, pipe, CancellationToken.None); 163await OutputCacheEntryFormatter.StoreAsync(Key, entry, _tags, _options.DefaultExpirationTimeSpan, _store, NullLogger.Instance, CancellationToken.None); 174var entry = await OutputCacheEntryFormatter.GetAsync(Key, _store, CancellationToken.None);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
128var cache = await ConnectAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheEntryFormatterTests.cs (1)
74var payload = await store.GetAsync(key, CancellationToken.None);
Microsoft.AspNetCore.Owin (3)
OwinEnvironment.cs (2)
53_context.Items[OwinConstants.CallCancelled] = CancellationToken.None; 446{ OwinConstants.CommonKeys.LoadClientCertAsync, new FeatureMap<ITlsConnectionFeature>(feature => new Func<Task>(() => feature.GetClientCertificateAsync(CancellationToken.None))) },
WebSockets\OwinWebSocketAcceptAdapter.cs (1)
129adapter.UpstreamTask.ContinueWith(adapter.EnsureCompleted, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
Microsoft.AspNetCore.Owin.Tests (1)
OwinEnvironmentTests.cs (1)
125Assert.Equal(CancellationToken.None, env["owin.CallCancelled"]);
Microsoft.AspNetCore.ResponseCaching (2)
src\Shared\SegmentWriteStream.cs (1)
181=> TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
Streams\ResponseCachingStream.cs (1)
185=> TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
Microsoft.AspNetCore.ResponseCaching.Microbenchmarks (2)
ResponseCachingBenchmark.cs (2)
55var consumer = ConsumeAsync(pipe.Reader, CancellationToken.None); 73var consumer = ConsumeAsync(pipe.Reader, CancellationToken.None);
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionBody.cs (1)
172=> TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
Microsoft.AspNetCore.ResponseCompression.Tests (4)
ResponseCompressionBodyTest.cs (1)
71await stream.SendFileAsync(path, 0, null, CancellationToken.None);
ResponseCompressionMiddlewareTest.cs (3)
1052return sendFile.SendFileAsync("testfile1kb.txt", 0, null, CancellationToken.None); 1102return sendFile.SendFileAsync("testfile1kb.txt", 0, null, CancellationToken.None); 1152await feature.SendFileAsync("testfile1kb.txt", 0, null, CancellationToken.None);
Microsoft.AspNetCore.Server.HttpSys (5)
NativeInterop\DisconnectListener.cs (1)
33return CancellationToken.None;
RequestProcessing\RequestContext.cs (2)
51_disconnectToken = CancellationToken.None; 64_disconnectToken = CancellationToken.None;
RequestProcessing\RequestStream.cs (1)
184=> TaskToApm.Begin(ReadAsync(buffer, offset, size, CancellationToken.None), callback, state);
ResponseStream.cs (1)
74=> TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (33)
HttpsTests.cs (2)
84var cert = await tls.GetClientCertificateAsync(CancellationToken.None); 109var cert = await tls.GetClientCertificateAsync(CancellationToken.None);
MessagePumpTests.cs (6)
31server.StartAsync(new DummyApplication(), CancellationToken.None).Wait(); 52server.StartAsync(new DummyApplication(), CancellationToken.None).Wait(); 69server.StartAsync(new DummyApplication(), CancellationToken.None).Wait(); 90server.StartAsync(new DummyApplication(), CancellationToken.None).Wait(); 106server.StartAsync(new DummyApplication(), CancellationToken.None).Wait(); 117server.StartAsync(new DummyApplication(), CancellationToken.None).Wait();
RequestTests.cs (1)
613server.StartAsync(new DummyApplication(app), CancellationToken.None).Wait();
ResponseCachingTests.cs (2)
392await httpContext.Response.SendFileAsync(_absoluteFilePath, 0, null, CancellationToken.None); 412await httpContext.Response.SendFileAsync(_absoluteFilePath, 0, null, CancellationToken.None);
ResponseSendFileTests.cs (17)
45await sendFile.SendFileAsync(string.Empty, 0, null, CancellationToken.None); 68return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 87return sendFile.SendFileAsync(RelativeFilePath, 0, null, CancellationToken.None); 106return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 125sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None).Wait(); 126return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 145return sendFile.SendFileAsync(AbsoluteFilePath, 0, FileLength / 2, CancellationToken.None); 166sendFile.SendFileAsync(AbsoluteFilePath, 1234567, null, CancellationToken.None)); 185sendFile.SendFileAsync(AbsoluteFilePath, 0, 1234567, CancellationToken.None)); 202return sendFile.SendFileAsync(AbsoluteFilePath, 0, 0, CancellationToken.None); 222return sendFile.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None); 243return sendFile.SendFileAsync(AbsoluteFilePath, 0, 10, CancellationToken.None); 264return sendFile.SendFileAsync(AbsoluteFilePath, 0, 0, CancellationToken.None); 291return sendFile.SendFileAsync(AbsoluteFilePath, 0, 10, CancellationToken.None); 315await httpContext.Response.SendFileAsync(emptyFilePath, 0, null, CancellationToken.None); 317await httpContext.Response.Body.WriteAsync(new byte[10], 0, 10, CancellationToken.None); 650await httpContext.Response.SendFileAsync(AbsoluteFilePath, 0, null, CancellationToken.None);
ServerTests.cs (1)
348await server.StartAsync(new DummyApplication(), CancellationToken.None);
src\Shared\Http2cat\Http2CatHostedService.cs (1)
102}, CancellationToken.None);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
Utilities.cs (2)
131server.StartAsync(new DummyApplication(app), CancellationToken.None).Wait(); 161server.StartAsync(new DummyApplication(app), CancellationToken.None).Wait();
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Utilities.cs (1)
50server.StartAsync(new DummyApplication(app), CancellationToken.None).Wait();
Microsoft.AspNetCore.Server.IIS (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Common\DeploymentResult.cs (1)
43: this(loggerFactory, deploymentParameters: deploymentParameters, applicationBaseUri: applicationBaseUri, contentRoot: string.Empty, hostShutdownToken: CancellationToken.None)
Microsoft.AspNetCore.Server.Kestrel.Core (1)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (25)
AddressBinderTests.cs (5)
193AddressBinder.BindAsync(options.GetListenOptions(), addressBindContext, _noopUseHttps, CancellationToken.None)); 214var bindTask = AddressBinder.BindAsync(options.GetListenOptions(), addressBindContext, _noopUseHttps, CancellationToken.None); 242var bindTask = AddressBinder.BindAsync(options.GetListenOptions(), addressBindContext, _noopUseHttps, CancellationToken.None); 305await AddressBinder.BindAsync(options.GetListenOptions(), addressBindContext, _noopUseHttps, CancellationToken.None); 336await AddressBinder.BindAsync(options.GetListenOptions(), addressBindContext, _noopUseHttps, CancellationToken.None);
HttpRequestStreamTests.cs (1)
112mockMessageBody.Setup(m => m.ReadAsync(CancellationToken.None)).Returns(new ValueTask<ReadResult>(new ReadResult(default, isCanceled: false, isCompleted: true)));
HttpResponseStreamTests.cs (1)
114mockHttpResponseControl.Setup(m => m.WritePipeAsync(It.IsAny<ReadOnlyMemory<byte>>(), CancellationToken.None)).Returns(new ValueTask<FlushResult>(new FlushResult()));
KestrelServerTests.cs (15)
352async () => await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None)); 371await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None); 393async () => await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None)); 416await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None); 442await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None); 469await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None); 500await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None); 528await server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None); 577await server.StartAsync(new DummyApplication(), CancellationToken.None); 635await server.StartAsync(new DummyApplication(), CancellationToken.None); 826await server.StartAsync(new DummyApplication(), CancellationToken.None).DefaultTimeout(); 905await server.StopAsync(CancellationToken.None).DefaultTimeout(); 964await server.StartAsync(new DummyApplication(), CancellationToken.None).DefaultTimeout(); 971await server.StopAsync(CancellationToken.None).DefaultTimeout(); 986server.StartAsync(new DummyApplication(context => Task.CompletedTask), CancellationToken.None).GetAwaiter().GetResult();
TlsListenerTests.cs (3)
145var listenerTask = listener.OnTlsClientHelloAsync(transportConnection, CancellationToken.None); 189var listenerTask = listener.OnTlsClientHelloAsync(transportConnection, CancellationToken.None); 242await listener.OnTlsClientHelloAsync(transportConnection, CancellationToken.None);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (5)
QuicTestHelpers.cs (2)
62return (QuicConnectionListener)await transportFactory.BindAsync(endpoint, features, cancellationToken: CancellationToken.None); 77return (QuicConnectionListener)await transportFactory.BindAsync(endpoint, features, cancellationToken: CancellationToken.None);
QuicTransportFactoryTests.cs (3)
32var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => quicTransportFactory.BindAsync(new IPEndPoint(0, 0), features: null, cancellationToken: CancellationToken.None).AsTask()).DefaultTimeout(); 49var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => quicTransportFactory.BindAsync(new IPEndPoint(0, 0), features: features, cancellationToken: CancellationToken.None).AsTask()).DefaultTimeout(); 72await quicTransportFactory.BindAsync(new IPEndPoint(0, 0), features: features, cancellationToken: CancellationToken.None).AsTask().DefaultTimeout();
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\SegmentWriteStream.cs (1)
181=> TaskToApm.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
108FlushAsync(CancellationToken.None).GetAwaiter().GetResult();
Microsoft.AspNetCore.SignalR.Client.Core (66)
HubConnection.cs (8)
262/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 315/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 426/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 448/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 470/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 615CancellationToken.None, 668/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 1499var sendHandshakeResult = await startingConnectionState.Connection.Transport.Output.FlushAsync(CancellationToken.None).ConfigureAwait(false);
HubConnectionExtensions.InvokeAsync.cs (12)
22/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 36/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 51/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 67/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 84/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 102/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 121/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 141/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 162/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 184/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 207/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 221/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HubConnectionExtensions.InvokeAsyncGeneric.cs (12)
23/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 41/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 60/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 80/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 101/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 123/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 146/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 170/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 195/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 221/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 248/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 266/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HubConnectionExtensions.SendAsync.cs (11)
22/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 37/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 53/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 70/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 88/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 107/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 127/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 148/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 170/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 193/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 217/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HubConnectionExtensions.StreamAsChannelAsync.cs (12)
24/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 42/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 61/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 81/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 102/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 124/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 147/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 171/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 196/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 222/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 249/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 267/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HubConnectionExtensions.StreamAsync.cs (11)
22/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 39/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 57/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 76/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 96/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 117/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 139/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 162/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 186/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 211/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 237/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
Microsoft.AspNetCore.SignalR.Core (37)
ClientProxyExtensions.cs (22)
19/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 34/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 50/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 67/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 85/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 104/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 124/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 145/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 167/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 190/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 214/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 227/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 241/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 256/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 272/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 289/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 307/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 326/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 346/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 367/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 389/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 412/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HubConnectionContext.cs (1)
228/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
HubLifetimeManager.cs (11)
35/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 45/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 55/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 65/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 75/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 85/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 96/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 106/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 116/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 125/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 134/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
IClientProxy.cs (1)
21/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
IGroupManager.cs (2)
16/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 25/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
Microsoft.AspNetCore.SignalR.Tests (16)
EndToEndTests.cs (10)
100await ws.ConnectAsync(new Uri(socketUrl), CancellationToken.None).DefaultTimeout(); 104await ws.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Binary, endOfMessage: true, CancellationToken.None).DefaultTimeout(); 108var result = await ws.ReceiveAsync(buffer, CancellationToken.None).DefaultTimeout(); 114await ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None).DefaultTimeout(); 116result = await ws.ReceiveAsync(buffer, CancellationToken.None).DefaultTimeout(); 138await ws.ConnectAsync(new Uri(socketUrl), CancellationToken.None).DefaultTimeout(); 143await ws.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Binary, endOfMessage: false, CancellationToken.None).DefaultTimeout(); 147var result = await ws.ReceiveAsync(buffer, CancellationToken.None).DefaultTimeout(); 153await ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None).DefaultTimeout(); 155result = await ws.ReceiveAsync(buffer, CancellationToken.None).DefaultTimeout();
HubConnectionHandlerTestUtils\Hubs.cs (1)
352var result = await caller.InvokeAsync<int>("GetResult", 1, CancellationToken.None);
Internal\TypedClientBuilderTests.cs (5)
27Assert.Equal(CancellationToken.None, send.CancellationToken); 51Assert.Equal(CancellationToken.None, send.CancellationToken); 80Assert.Equal(CancellationToken.None, send1.CancellationToken); 88Assert.Equal(CancellationToken.None, send2.CancellationToken); 223Assert.Equal(CancellationToken.None, send.CancellationToken);
Microsoft.AspNetCore.SpaServices.Extensions (1)
Util\EventedStreamReader.cs (1)
30Task.Factory.StartNew(Run, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
SpaProxyTests.cs (1)
58var res = await SpaProxy.PerformProxyRequest(context, httpClient, baseUriTask, CancellationToken.None, true);
SpaServicesExtensionsTests.cs (1)
88public CancellationToken ApplicationStarted => CancellationToken.None;
Microsoft.AspNetCore.TestHost (1)
ResponseBodyReaderStream.cs (1)
69return ReadAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
Microsoft.AspNetCore.TestHost.Tests (31)
ClientHandlerTests.cs (6)
222var response = await invoker.SendAsync(message, CancellationToken.None); 317var responseTask = invoker.SendAsync(message, CancellationToken.None); 345Assert.Throws<NotSupportedException>(() => invoker.Send(message, CancellationToken.None)); 364HttpResponseMessage response = await invoker.SendAsync(message, CancellationToken.None); 367response = await invoker.SendAsync(message, CancellationToken.None); 503responseTask = invoker.SendAsync(message, CancellationToken.None);
TestClientTests.cs (25)
340var ex = await Assert.ThrowsAsync<InvalidOperationException>(() => client.SendAsync(message, CancellationToken.None)); 723var receiveResult = await websocket.ReceiveAsync(new System.ArraySegment<byte>(receiveArray), CancellationToken.None); 726await websocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Normal Closure", CancellationToken.None); 732await websocket.SendAsync(sendBuffer, receiveResult.MessageType, receiveResult.EndOfMessage, CancellationToken.None); 762var clientSocket = await client.ConnectAsync(new System.Uri("http://localhost"), CancellationToken.None); 764await clientSocket.SendAsync(new System.ArraySegment<byte>(hello), WebSocketMessageType.Text, true, CancellationToken.None); 766await clientSocket.SendAsync(new System.ArraySegment<byte>(world), WebSocketMessageType.Binary, true, CancellationToken.None); 767await clientSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "Normal Closure", CancellationToken.None); 773var result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None); 778result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None); 783result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None); 805await websocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Normal Closure", CancellationToken.None); 814await websocket.CloseAsync(WebSocketCloseStatus.InternalServerError, closeReason, CancellationToken.None); 834var clientSocket = await client.ConnectAsync(new Uri("wss://localhost"), CancellationToken.None); 836var result = await clientSocket.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None); 861var receiveResult = await websocket.ReceiveAsync(new ArraySegment<byte>(receiveArray), CancellationToken.None); 864await websocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "Normal Closure", CancellationToken.None); 870await websocket.SendAsync(sendBuffer, receiveResult.MessageType, receiveResult.EndOfMessage, CancellationToken.None); 946var clientSocket = await client.ConnectAsync(new System.Uri("http://localhost"), CancellationToken.None); 948await Assert.ThrowsAsync<IOException>(async () => await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None)); 965var receiveResult = await websocket.ReceiveAsync(new System.ArraySegment<byte>(receiveArray), CancellationToken.None); 967await websocket.SendAsync(sendBuffer, receiveResult.MessageType, receiveResult.EndOfMessage, CancellationToken.None); 986var clientSocket = await client.ConnectAsync(new System.Uri("http://localhost"), CancellationToken.None); 988await clientSocket.SendAsync(new System.ArraySegment<byte>(hello), WebSocketMessageType.Text, true, CancellationToken.None); 995var result = await clientSocket.ReceiveAsync(new System.ArraySegment<byte>(buffer), CancellationToken.None);
Microsoft.AspNetCore.WebSockets.Tests (74)
SendReceiveTests.cs (11)
19await pair.ClientSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Text, endOfMessage: true, cancellationToken: CancellationToken.None); 22var result = await pair.ServerSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None); 36await pair.ServerSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Text, endOfMessage: true, cancellationToken: CancellationToken.None); 39var result = await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None); 51await pair.ClientSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Binary, endOfMessage: true, cancellationToken: CancellationToken.None); 54var result = await pair.ServerSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None); 66await pair.ServerSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Binary, endOfMessage: true, cancellationToken: CancellationToken.None); 69var result = await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None); 81await pair.ServerSocket.SendAsync(new ArraySegment<byte>(sendBuffer), WebSocketMessageType.Binary, endOfMessage: true, cancellationToken: CancellationToken.None); 84var result = await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None); 94await pair.ClientSocket.ReceiveAsync(new ArraySegment<byte>(receiveBuffer), CancellationToken.None);
WebSocketCompressionMiddlewareTests.cs (2)
125var result = await webSocket.ReceiveAsync(serverBuffer, CancellationToken.None); 142await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
WebSocketMiddlewareTests.cs (61)
29await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 49await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 71var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 79await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 81await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 96var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 105await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 106await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 121var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 130await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 131await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 147var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 158await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 159await client.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 178var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 186new ArraySegment<byte>(serverBuffer, totalReceived, serverBuffer.Length - totalReceived), CancellationToken.None); 194new ArraySegment<byte>(serverBuffer, totalReceived, serverBuffer.Length - totalReceived), CancellationToken.None); 205await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 206await client.SendAsync(new ArraySegment<byte>(originalData, 0, 2), WebSocketMessageType.Binary, false, CancellationToken.None); 209await client.SendAsync(new ArraySegment<byte>(originalData, 2, 2), WebSocketMessageType.Binary, false, CancellationToken.None); 212await client.SendAsync(new ArraySegment<byte>(originalData, 4, 7), WebSocketMessageType.Binary, true, CancellationToken.None); 226await webSocket.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 231await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 233var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None); 251await webSocket.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 256await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 258var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None); 276await webSocket.SendAsync(new ArraySegment<byte>(originalData), WebSocketMessageType.Binary, true, CancellationToken.None); 281await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 287result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer, receivedCount, clientBuffer.Length - receivedCount), CancellationToken.None); 309await webSocket.SendAsync(new ArraySegment<byte>(originalData, 0, 2), WebSocketMessageType.Binary, false, CancellationToken.None); 310await webSocket.SendAsync(new ArraySegment<byte>(originalData, 2, 2), WebSocketMessageType.Binary, false, CancellationToken.None); 311await webSocket.SendAsync(new ArraySegment<byte>(originalData, 4, 7), WebSocketMessageType.Binary, true, CancellationToken.None); 316await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 318var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None); 325new ArraySegment<byte>(clientBuffer, totalReceived, clientBuffer.Length - totalReceived), CancellationToken.None); 332new ArraySegment<byte>(clientBuffer, totalReceived, clientBuffer.Length - totalReceived), CancellationToken.None); 353var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 363await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 364await client.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closeDescription, CancellationToken.None); 380await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closeDescription, CancellationToken.None); 385await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 387var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None); 409var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 416await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None); 421await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 422await client.CloseAsync(WebSocketCloseStatus.NormalClosure, closeDescription, CancellationToken.None); 439var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 446await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None); 451await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 452await client.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closeDescription, CancellationToken.None); 455await client.CloseAsync(WebSocketCloseStatus.NormalClosure, closeDescription, CancellationToken.None); 470await webSocket.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, closeDescription, CancellationToken.None); 473var result = await webSocket.ReceiveAsync(new ArraySegment<byte>(serverBuffer), CancellationToken.None); 483await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 485var result = await client.ReceiveAsync(new ArraySegment<byte>(clientBuffer), CancellationToken.None); 494await client.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None); 558await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 625await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 735await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None); 793await client.ConnectAsync(new Uri($"ws://127.0.0.1:{port}/"), CancellationToken.None);
Microsoft.AspNetCore.WebUtilities (2)
MultipartReader.cs (1)
82/// The default value is <see cref="CancellationToken.None"/>.</param>
MultipartSectionStreamExtensions.cs (1)
20=> section.ReadAsStringAsync(CancellationToken.None).AsTask();
Microsoft.Build.Framework (2)
FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.Build.Tasks.CodeAnalysis (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.Build.Tasks.CodeAnalysis.Sdk (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis (12)
Diagnostic\DiagnosticDescriptor.cs (1)
244var effectiveDiagnostic = compilationOptions.FilterDiagnostic(Diagnostic.Create(this, Location.None), CancellationToken.None);
DiagnosticAnalyzer\AsyncQueue.cs (1)
324CancellationToken.None,
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (7)
67public CancellationToken CancellationToken => CancellationToken.None; 235return GetAnalyzerDiagnosticsAsync(CancellationToken.None); 286return GetAllDiagnosticsAsync(CancellationToken.None); 1199var effectiveDiagnostic = compilation.Options.FilterDiagnostic(diagnostic, CancellationToken.None); 1241catch (Exception ex) when (AnalyzerExecutor.HandleAnalyzerException(ex, analyzer, info: null, wrappedOnAnalyzerException, analyzerExceptionFilter: null, CancellationToken.None)) 1253catch (Exception ex) when (AnalyzerExecutor.HandleAnalyzerException(ex, suppressor, info: null, wrappedOnAnalyzerException, analyzerExceptionFilter: null, CancellationToken.None)) 1260isEnabledWithAnalyzerConfigOptions: _ => false, getSupportedDiagnosticDescriptors, getSupportedSuppressionDescriptors, CancellationToken.None); ;
Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
SourceGeneration\GeneratorAdaptor.cs (1)
40GeneratorInitializationContext generatorInitContext = new GeneratorInitializationContext(CancellationToken.None);
Syntax\SyntaxTree.cs (1)
417return this.GetText(CancellationToken.None).ToString();
Microsoft.CodeAnalysis.Analyzers (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.AnalyzerUtilities (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.BannedApiAnalyzers (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.CodeStyle (19)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
164var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpCodeRefactoringVerifier`1.cs (1)
46return test.RunAsync(CancellationToken.None);
src\Features\DiagnosticsTestUtilities\CodeActions\VisualBasicCodeRefactoringVerifier`1.cs (1)
44return test.RunAsync(CancellationToken.None);
Microsoft.CodeAnalysis.Collections.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.Contracts.Package (2)
ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.CSharp (7)
Binder\Binder.cs (1)
265!csTree.IsGeneratedCode(this.Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None),
CommandLine\CSharpCompiler.cs (1)
74CancellationToken.None);
Compilation\CSharpCompilation.cs (1)
3874if (!FilterAndAppendAndFreeDiagnostics(diagnostics, ref runtimeMDVersionDiagnostics, CancellationToken.None))
Compilation\CSharpSemanticModel.cs (1)
5467=> lazyDefaultState ??= syntaxTree.IsGeneratedCode(Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None)
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (1)
75var code = tree.IsGeneratedCode(binder.Compilation.Options.SyntaxTreeOptionsProvider, CancellationToken.None)
Errors\MessageProvider.cs (1)
135CancellationToken.None, // We don't have a tree so there's no need to pass cancellation to the SyntaxTreeOptionsProvider
Symbols\Source\SourceMemberMethodSymbol.cs (1)
594this.ContainingSymbol.ForceComplete(locationOpt: null, filter: null, cancellationToken: CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
331? ((CompilationUnitSyntax)structure.SyntaxTree.GetRoot(CancellationToken.None)).EndOfFileToken
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
94return GenerateMemberAccess(nameof(CancellationToken.None));
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (6)
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (6)
1322var previewOperations = await action.GetPreviewOperationsAsync(CancellationToken.None); 1325var commitOperations = await action.GetOperationsAsync(CancellationToken.None); 1347var previewOperations = await action.GetPreviewOperationsAsync(CancellationToken.None); 1350var commitOperations = await action.GetOperationsAsync(CancellationToken.None); 1377var previewOperations = await action.GetPreviewOperationsAsync(CancellationToken.None); 1380var commitOperations = await action.GetOperationsAsync(CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
308Assert.True(compilerTreeOptions.TryGetDiagnosticValue(tree, "cs0169", CancellationToken.None, out var severity)); 310Assert.True(compilerTreeOptions.TryGetDiagnosticValue(tree, "warning01", CancellationToken.None, out severity));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
EventHookup\EventHookupCommandHandler_TypeCharCommand.cs (1)
34var cancellationToken = CancellationToken.None;
RawStringLiteral\RawStringLiteralCommandHandler_TypeChar.cs (1)
51var cancellationToken = CancellationToken.None;
SplitStringLiteral\SplitStringLiteralCommandHandler.cs (1)
82var parsedDocument = ParsedDocument.CreateSynchronously(document, CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (123)
ChangeSignature\RemoveParametersTests.cs (4)
262Assert.Contains("void Ext(this C5 c, string s)", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 266Assert.Contains(@"c.Ext(""two"");", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 349Assert.Contains("void Ext(this C5 c, string s, int newIntegerParameter)", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 353Assert.Contains(@"c.Ext(""two"", 123);", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString());
Classification\TotalClassifierTests.cs (1)
2981var tags = tagger!.GetAllTags(new NormalizedSnapshotSpanCollection(buffer.CurrentSnapshot.GetFullSpan()), CancellationToken.None);
CodeActions\ApplyChangesOperationTests.cs (3)
234var context = new CodeRefactoringContext(document, new TextSpan(), refactorings.Add, CancellationToken.None); 239var operations = await action.GetOperationsAsync(CancellationToken.None); 247var result = await operation.TryApplyAsync(workspace, originalSolution, CodeAnalysisProgress.None, CancellationToken.None);
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (2)
851var modifiedSolution = await moveTypeService.GetModifiedSolutionAsync(documentToModify, textSpan, MoveTypeOperationKind.MoveTypeNamespaceScope, CancellationToken.None).ConfigureAwait(false); 863var formattedDocument = await Formatter.FormatAsync(modifiedDocument, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).ConfigureAwait(false);
CodeActions\PreviewExceptionTests.cs (3)
69await suggestedAction.GetPreviewAsync(CancellationToken.None); 85_ = await suggestedAction.GetActionSetsAsync(CancellationToken.None); 110var context = new CodeRefactoringContext(document, span, (a) => codeActions.Add(a), CancellationToken.None);
CodeActions\PreviewTests.cs (3)
97var context = new CodeRefactoringContext(document, span, refactorings.Add, CancellationToken.None); 101var previews = await editHandler.GetPreviewsAsync(workspace, action.GetPreviewOperationsAsync(CancellationToken.None).Result, CancellationToken.None);
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
117var operations = await action.GetOperationsAsync(CancellationToken.None); 223var operations = await changeNamespaceAction.GetOperationsAsync(CancellationToken.None);
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
732var result = await NameDeclarationInfo.GetDeclarationInfoAsync(document, position, CancellationToken.None);
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (2)
3516var origComp = await workspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None); 3535var commit = await service.GetChangeAsync(document, completionItem, commitCharacter: null, CancellationToken.None);
Completion\CompletionProviders\SuggestionModeCompletionProviderTests.cs (1)
1296options: CompletionOptions.Default, cancellationToken: CancellationToken.None);
Debugging\LocationInfoGetterTests.cs (1)
31CancellationToken.None);
Debugging\NameResolverTests.cs (2)
25var results = await nameResolver.DoAsync(CancellationToken.None); 36var results = await debugInfo.ResolveBreakpointsAsync(workspace.CurrentSolution, "goo", CancellationToken.None);
Debugging\ProximityExpressionsGetterTests.cs (2)
111var actualTerms = await getter.GetProximityExpressionsAsync(document, position, CancellationToken.None); 119var actualValid = await getter.IsValidAsync(semanticSnapshot, position, expression, CancellationToken.None);
DecompiledSource\DecompiledSourceFormattingTests.cs (1)
244var formatted = await CSharpDecompiledSourceService.FormatDocumentAsync(document, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (4)
105var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 279var compilerEngineCompilation = (CSharpCompilation)compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None).Result; 338var compilerEngineCompilation = (CSharpCompilation)(await compilerEngineWorkspace.CurrentSolution.Projects.Single().GetRequiredCompilationAsync(CancellationToken.None)); 782var root = await document.GetRequiredSyntaxRootAsync(CancellationToken.None);
EditAndContinue\ActiveStatementTrackingServiceTests.cs (7)
72Assert.Same(snapshot1, document1.GetTextSynchronously(CancellationToken.None).FindCorrespondingEditorTextSnapshot()); 73Assert.Same(snapshot2, document2.GetTextSynchronously(CancellationToken.None).FindCorrespondingEditorTextSnapshot()); 88var spans2 = await trackingSession.GetSpansAsync(solution, document1.Id, document1.FilePath, CancellationToken.None); 91var spans3 = await trackingSession.GetSpansAsync(solution, document2.Id, document2.FilePath, CancellationToken.None); 95var spans4 = await trackingSession.GetAdjustedTrackingSpansAsync(document1, snapshot1, CancellationToken.None); 102AssertEx.Empty(await trackingSession.GetAdjustedTrackingSpansAsync(document2, snapshot2, CancellationToken.None)); 119var spans6 = await trackingSession.GetAdjustedTrackingSpansAsync(document1, snapshot1, CancellationToken.None);
Extensions\ContextQuery\IsPossibleDeconstructionDesignationTests.cs (1)
20var actual = syntaxTree.IsPossibleDeconstructionDesignation(position, CancellationToken.None);
Extensions\ContextQuery\NamespaceContextTests.cs (1)
18=> Assert.Equal(validLocation, syntaxTree.IsNamespaceContext(position, CancellationToken.None));
Extensions\ContextQuery\PossibleTupleContextTests.cs (1)
20var leftToken = syntaxTree.FindTokenOnLeftOfPosition(position, CancellationToken.None);
Extensions\ContextQuery\TypeContextTests.cs (1)
18=> Assert.Equal(validLocation, syntaxTree.IsTypeContext(position, CancellationToken.None));
Extensions\SyntaxTreeExtensionsTests.cs (2)
21Assert.False(tree.IsInInactiveRegion(pos, CancellationToken.None)); 30Assert.True(tree.IsInInactiveRegion(pos, CancellationToken.None));
ExtractMethod\ExtractMethodBase.cs (7)
130CodeCleanupOptions = await document.GetCodeCleanupOptionsAsync(CancellationToken.None), 134document, testDocument.SelectedSpans.Single(), localFunction, options, CancellationToken.None); 150var (doc, _) = await result.GetDocumentAsync(CancellationToken.None); 167var semanticDocument = await SemanticDocument.CreateAsync(document, CancellationToken.None); 170var (result, status) = await validator.GetValidSelectionAsync(CancellationToken.None); 192var semanticDocument = await SemanticDocument.CreateAsync(document, CancellationToken.None); 199var (_, status) = await validator.GetValidSelectionAsync(CancellationToken.None);
ExtractMethod\ExtractMethodTests.cs (2)
10043var tree = await service.ExtractMethodAsync(document: null!, textSpan: default, localFunction: false, options: default, CancellationToken.None); 10061await service.ExtractMethodAsync(document, textSpan: default, localFunction: false, ExtractMethodGenerationOptions.GetDefault(project.Services), CancellationToken.None);
Formatting\CodeCleanupTests.cs (2)
842document, enabledDiagnostics, CodeAnalysisProgress.None, CancellationToken.None); 950document, enabledDiagnostics, CodeAnalysisProgress.None, CancellationToken.None);
Formatting\FormattingEngineTests.cs (3)
343var syntaxRoot = await document.GetRequiredSyntaxRootAsync(CancellationToken.None); 345var node = Formatter.Format(syntaxRoot, spans, workspace.Services.SolutionServices, options, rules: default, CancellationToken.None); 2097var formattedRoot = Formatter.Format(root, workspace.Services.SolutionServices, options, CancellationToken.None);
Formatting\Indentation\CSharpFormatterTestsBase.cs (2)
74var documentSyntax = await ParsedDocument.CreateAsync(document, CancellationToken.None); 96var changes = formatter.FormatToken(token, CancellationToken.None);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (2)
3112var documentSyntax = await ParsedDocument.CreateAsync(document, CancellationToken.None); 3142var changes = formatter.FormatRange(tokenRange.Value.Item1, tokenRange.Value.Item2, CancellationToken.None);
Formatting\RazorLineFormattingOptionsTests.cs (1)
71var formattedDocument = await Formatter.FormatAsync(document, spans: null, options: null, CancellationToken.None);
Intents\IntentTestsBase.cs (2)
118var changes = await textDiffService.GetTextChangesAsync(currentDocument!, priorDocument, CancellationToken.None).ConfigureAwait(false); 129var results = await intentSource.ComputeIntentsAsync(intentContext, CancellationToken.None).ConfigureAwait(false);
LineSeparators\LineSeparatorTests.cs (1)
504var spans = await lineSeparatorService.GetLineSeparatorsAsync(document, root.FullSpan, CancellationToken.None);
MoveToNamespace\MoveToNamespaceTests.cs (2)
1284CancellationToken.None); 1438var changedRoot = await changedDocument.GetRequiredSyntaxRootAsync(CancellationToken.None);
NavigateTo\NavigateToSearcherTests.cs (8)
151await searcher.SearchAsync(NavigateToSearchScope.Solution, CancellationToken.None); 191await searcher.SearchAsync(NavigateToSearchScope.Solution, CancellationToken.None); 228await searcher.SearchAsync(NavigateToSearchScope.Solution, CancellationToken.None); 265await searcher.SearchAsync(NavigateToSearchScope.Solution, CancellationToken.None); 296await searcher.SearchAsync(NavigateToSearchScope.Solution, CancellationToken.None); 355await searcher.SearchAsync(NavigateToSearchScope.Project, CancellationToken.None); 405await searcher.SearchAsync(NavigateToSearchScope.Document, CancellationToken.None); 465await searcher.SearchAsync(NavigateToSearchScope.Document, CancellationToken.None);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (2)
132var file = await service.GetGeneratedFileAsync(workspace, project, symbol, signaturesOnly: false, options: MetadataAsSourceOptions.Default, cancellationToken: CancellationToken.None).ConfigureAwait(false); 224var mainCompilation = await project.GetRequiredCompilationAsync(CancellationToken.None).ConfigureAwait(false);
PdbSourceDocument\PdbFileLocatorServiceTests.cs (6)
38using var result = await service.GetDocumentDebugInfoReaderAsync(GetDllPath(path), useDefaultSymbolServers: false, new TelemetryMessage(CancellationToken.None), CancellationToken.None); 65using var result = await service.GetDocumentDebugInfoReaderAsync(GetDllPath(path), useDefaultSymbolServers: false, new TelemetryMessage(CancellationToken.None), CancellationToken.None); 90using var result = await service.GetDocumentDebugInfoReaderAsync(GetDllPath(path), useDefaultSymbolServers: false, new TelemetryMessage(CancellationToken.None), CancellationToken.None);
PdbSourceDocument\PdbSourceDocumentLoaderServiceTests.cs (4)
45var result = await service.LoadSourceDocumentAsync(path, sourceDocument, Encoding.UTF8, new TelemetryMessage(CancellationToken.None), useExtendedTimeout: false, CancellationToken.None); 73var result = await service.LoadSourceDocumentAsync(path, sourceDocument, Encoding.UTF8, new TelemetryMessage(CancellationToken.None), useExtendedTimeout: false, CancellationToken.None);
PdbSourceDocument\PdbSourceDocumentTests.cs (8)
787var file = await service.GetGeneratedFileAsync(workspace, project, symbol, signaturesOnly: false, options: options, cancellationToken: CancellationToken.None).ConfigureAwait(false); 845var mainCompilation = await project.GetRequiredCompilationAsync(CancellationToken.None).ConfigureAwait(false); 868var file = await service.GetGeneratedFileAsync(project.Solution.Workspace, project, symbol, signaturesOnly: false, options: MetadataAsSourceOptions.Default, cancellationToken: CancellationToken.None); 889var file = await service.GetGeneratedFileAsync(project.Solution.Workspace, project, symbol, signaturesOnly: false, options: MetadataAsSourceOptions.Default, cancellationToken: CancellationToken.None); 911var file = await service.GetGeneratedFileAsync(project.Solution.Workspace, project, symbol, signaturesOnly: false, options: MetadataAsSourceOptions.Default, cancellationToken: CancellationToken.None); 932var fileOne = await service.GetGeneratedFileAsync(project.Solution.Workspace, project, symbol, signaturesOnly: false, options: MetadataAsSourceOptions.Default, cancellationToken: CancellationToken.None); 937var compilation = await project.GetCompilationAsync(CancellationToken.None); 939var fileTwo = await service.GetGeneratedFileAsync(project.Solution.Workspace, project, symbolTwo, signaturesOnly: false, MetadataAsSourceOptions.Default, CancellationToken.None);
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
179var info = await provider.GetQuickInfoAsync(new QuickInfoContext(document, position, SymbolDescriptionOptions.Default, CancellationToken.None));
QuickInfo\SemanticQuickInfoSourceTests.cs (3)
75var info = await service.GetQuickInfoAsync(document, position, SymbolDescriptionOptions.Default, CancellationToken.None); 137var info = await service.GetQuickInfoAsync(document, position, SymbolDescriptionOptions.Default, CancellationToken.None); 306var info = await service.GetQuickInfoAsync(document, position, SymbolDescriptionOptions.Default, CancellationToken.None);
QuickInfo\SyntacticQuickInfoSourceTests.cs (3)
559Assert.Null(await provider.GetQuickInfoAsync(new QuickInfoContext(document, position, SymbolDescriptionOptions.Default, CancellationToken.None))); 570var info = await provider.GetQuickInfoAsync(new QuickInfoContext(document, position, SymbolDescriptionOptions.Default, CancellationToken.None)); 586navigationActionFactory, CancellationToken.None);
Rename\CSharpInlineRenameServiceTests.cs (1)
95CancellationToken.None);
Semantics\SpeculationAnalyzerTests.cs (1)
496=> new SpeculationAnalyzer((ExpressionSyntax)initialNode, (ExpressionSyntax)replacementNode, initialModel, CancellationToken.None).ReplacementChangesSemantics();
StringIndentation\StringIndentationTests.cs (1)
34var regions = await service.GetStringIndentationRegionsAsync(document, root.FullSpan, CancellationToken.None).ConfigureAwait(false);
Structure\CommentStructureTests.cs (1)
35var root = await document.GetRequiredSyntaxRootAsync(CancellationToken.None);
Structure\MetadataAsSource\InvalidIdentifierStructureTests.cs (1)
32return (await outliningService.GetBlockStructureAsync(document, options, CancellationToken.None)).Spans;
SymbolKey\SymbolKeyCompilationsTests.cs (1)
532var symkey = SymbolKey.Create(typeSym02, CancellationToken.None);
SymbolKey\SymbolKeyErrorTypeTests.cs (1)
318var resolution = SymbolKey.ResolveString(symbolKey, emptyCompilation, ignoreAssemblyKey: true, out var failureReason, CancellationToken.None);
SymbolKey\SymbolKeyTestBase.cs (3)
82var sid = SymbolKey.Create(originalSymbol, CancellationToken.None); 96var sid1 = SymbolKey.Create(symbol1, CancellationToken.None); 97var sid2 = SymbolKey.Create(symbol2, CancellationToken.None);
TypeInferrer\TypeInferrerTests.cs (4)
36inferredType = typeInference.InferType(await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None), position, objectAsDefault: true, cancellationToken: CancellationToken.None); 40inferredType = typeInference.InferType(await document.ReuseExistingSpeculativeModelAsync(node?.Span ?? textSpan, CancellationToken.None), node, objectAsDefault: true, cancellationToken: CancellationToken.None);
TypeInferrer\TypeInferrerTests.Delegate.cs (1)
32var delegateType = typeInference.InferDelegateType(await document.GetSemanticModelAsync(), node, CancellationToken.None);
Workspaces\WorkspaceTests_EditorFeatures.cs (4)
228.GetSyntaxTreeAsync(CancellationToken.None); 235.GetSyntaxTreeAsync(CancellationToken.None); 661var partialDoc2Z = doc2Z.WithFrozenPartialSemantics(CancellationToken.None); 718var syntaxTree = await doc.GetSyntaxTreeAsync(CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (7)
Recommendations\DynamicKeywordRecommenderTests.cs (1)
23this.RecommendKeywordsAsync = (position, context) => Task.FromResult(_recommender.RecommendKeywords(position, context, CancellationToken.None));
Recommendations\NativeIntegerKeywordRecommenderTests.cs (1)
21RecommendKeywordsAsync = (position, context) => Task.FromResult(Recommender.RecommendKeywords(position, context, CancellationToken.None));
Recommendations\NotnullKeywordRecommenderTests.cs (1)
22this.RecommendKeywordsAsync = (position, context) => Task.FromResult(_recommender.RecommendKeywords(position, context, CancellationToken.None));
Recommendations\RecommenderTests.cs (2)
72if (tree.IsInNonUserCode(position, CancellationToken.None) && !absent) 78var context = CSharpSyntaxContext.CreateContext(document, semanticModel, position, CancellationToken.None);
Recommendations\ScopedKeywordRecommenderTests.cs (1)
20this.RecommendKeywordsAsync = (position, context) => Task.FromResult(_recommender.RecommendKeywords(position, context, CancellationToken.None));
Recommendations\VarKeywordRecommenderTests.cs (1)
23this.RecommendKeywordsAsync = (position, context) => Task.FromResult(_recommender.RecommendKeywords(position, context, CancellationToken.None));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (12)
CodeGen\CodeGenAsyncMainTests.cs (9)
603var entry = compilation.GetEntryPoint(CancellationToken.None); 625var entry = compilation.GetEntryPoint(CancellationToken.None); 714var entry = compilation.GetEntryPoint(CancellationToken.None); 791var entry = compilation.GetEntryPoint(CancellationToken.None); 841var entry = compilation.GetEntryPoint(CancellationToken.None); 885var entry = compilation.GetEntryPoint(CancellationToken.None); 905var entry = compilation.GetEntryPoint(CancellationToken.None); 969var entry = compilation.GetEntryPoint(CancellationToken.None); 989var entry = compilation.GetEntryPoint(CancellationToken.None);
CodeGen\CodeGenFunctionPointersTests.cs (1)
9861var method = comp.GetEntryPoint(System.Threading.CancellationToken.None);
CodeGen\CodeGenTests.cs (1)
13291cancellationToken: CancellationToken.None);
Emit\CompilationEmitTests.cs (1)
2730var symbolSynthesized = class1.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Emit\EditAndContinue\AssemblyReferencesTests.cs (2)
84compilation1.EmitDifference(baseline, edits, s => false, mdStream, ilStream, pdbStream, EmitDifferenceOptions.Default, CancellationToken.None); 160compilation1.EmitDifference(baseline, edits, s => false, mdStream, ilStream, pdbStream, EmitDifferenceOptions.Default, CancellationToken.None);
Emit\EditAndContinue\EditAndContinueTests.cs (4)
13081CancellationToken.None); 13097CancellationToken.None); 13113CancellationToken.None); 13169CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (50)
Diagnostics\CompilationEventTests.cs (1)
32var te = queue.DequeueAsync(CancellationToken.None);
Diagnostics\DiagnosticAnalyzerTests.cs (34)
3270var analysisResult = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel1, filterSpan: null, analyzers, CancellationToken.None); 3316var analysisResult = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel1, filterSpan: null, analyzers, CancellationToken.None); 3357var tree1SemanticDiagnostics = await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel1, filterSpan: null, ImmutableArray.Create<DiagnosticAnalyzer>(analyzer1), CancellationToken.None); 3608var diagnostics = await compWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(model, filterSpan: null, CancellationToken.None); 3700await compilationWithAnalyzers.GetAnalysisResultAsync(tree1, analyzersToQuery, CancellationToken.None) : 3701await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel1, filterSpan: null, analyzersToQuery, CancellationToken.None); 3706await compilationWithAnalyzers.GetAnalysisResultAsync(tree1, CancellationToken.None) : 3707await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel1, filterSpan: null, CancellationToken.None); 3762CancellationToken.None); 3777CancellationToken.None); 3818CancellationToken.None); 3889var diagnostics = await compilation.WithAnalyzers(analyzers, options).GetAnalyzerDiagnosticsAsync(CancellationToken.None); 3892var analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(additionalFile, CancellationToken.None); 3896analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(CancellationToken.None); 3931var diagnostics = await compilation.WithAnalyzers(analyzers, options).GetAnalyzerDiagnosticsAsync(CancellationToken.None); 3934var analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(additionalFile1, CancellationToken.None); 3936analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(additionalFile2, CancellationToken.None); 3940analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(additionalFile1, singleAnalyzerArray, CancellationToken.None); 3942analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(additionalFile2, singleAnalyzerArray, CancellationToken.None); 3945analysisResult = await compilation.WithAnalyzers(analyzers, options).GetAnalysisResultAsync(CancellationToken.None); 4338? await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel.SyntaxTree, filterSpan, analyzers, CancellationToken.None) 4339: await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel.SyntaxTree, filterSpan, CancellationToken.None); 4344? await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(semanticModel.SyntaxTree, filterSpan, analyzers, CancellationToken.None) 4345: await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(semanticModel.SyntaxTree, filterSpan, CancellationToken.None); 4352? await compilationWithAnalyzers.GetAnalysisResultAsync(additionalTextFile, filterSpan, analyzers, CancellationToken.None) 4353: await compilationWithAnalyzers.GetAnalysisResultAsync(additionalTextFile, filterSpan, CancellationToken.None); 4360? await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, filterSpan, analyzers, CancellationToken.None) 4361: await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, filterSpan, CancellationToken.None); 4366? await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel, filterSpan, analyzers, CancellationToken.None) 4367: await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel, filterSpan, CancellationToken.None); 4400analyzerExceptionFilter: null, reportAnalyzer: false, severityFilter, trackSuppressedDiagnosticIds: false, out var newCompilation, CancellationToken.None); 4403_ = newCompilation.GetDiagnostics(CancellationToken.None); 4404_ = await driver.GetDiagnosticsAsync(newCompilation, CancellationToken.None); 4441var diagnostics = await compWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(model, filterSpan: null, CancellationToken.None);
Diagnostics\DiagnosticSuppressorTests.cs (2)
719var diagnostics1 = await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel, filterSpan: null, analyzers, CancellationToken.None); 723var diagnostics2 = await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(semanticModel, filterSpan: null, analyzers, CancellationToken.None);
Diagnostics\GetDiagnosticsTests.cs (13)
800tasks[i] = Task.Run(() => compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(model, null, CancellationToken.None)); 853tasks[i] = Task.Run(() => compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(model, null, CancellationToken.None)); 881var diagnostics = await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(tree, CancellationToken.None); 911_ = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, span, CancellationToken.None); 920_ = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, filterSpan: null, CancellationToken.None); 964var result = await compilationWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None); 1190var result = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, span, CancellationToken.None); 1198result = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, filterSpan: null, CancellationToken.None); 1207result = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, span, CancellationToken.None); 1251var result = await compilationWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None); 1649var syntaxResult = await compilationWithAnalyzers.GetAnalysisResultAsync(tree1, CancellationToken.None); 1678var result = await compilationWithAnalyzers.GetAnalysisResultAsync(model1, filterSpan: localDecl.Span, CancellationToken.None); 1824var result = await compilationWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Features (2)
Completion\KeywordRecommenders\AbstractSyntacticSingleKeywordRecommender.cs (1)
82=> _recommender.RecommendKeywords(position, context, CancellationToken.None);
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
94return GenerateMemberAccess(nameof(CancellationToken.None));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (17)
Diagnostics\Suppression\SuppressionTests.cs (2)
489document, span, DiagnosticKind.All, CancellationToken.None); 492var allFixes = (await fixService.GetFixesAsync(document, span, CancellationToken.None))
EditAndContinue\BreakpointSpansTests.cs (1)
42tree, position.Value, CancellationToken.None, out var breakpointSpan);
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
124return await analyzer.AnalyzeDocumentAsync(newDocument.Id, oldProject, newDocument.Project, baseActiveStatements, newActiveStatementSpans.NullToEmpty(), lazyCapabilities, log, CancellationToken.None); 758var result = await analyzer.AnalyzeDocumentAsync(newDocument.Id, oldProject, newDocument.Project, baseActiveStatements, [], capabilities, log, CancellationToken.None);
EnableNullable\EnableNullableTests.cs (2)
33if (!Regex.IsMatch(document.GetTextSynchronously(CancellationToken.None).ToString(), "#nullable ?enable")) 49if (!Regex.IsMatch(document.GetTextSynchronously(CancellationToken.None).ToString(), "#nullable ?restore"))
src\Analyzers\CSharp\Tests\NamingStyles\NamingStylesTests.cs (6)
1322var previewOperations = await action.GetPreviewOperationsAsync(CancellationToken.None); 1325var commitOperations = await action.GetOperationsAsync(CancellationToken.None); 1347var previewOperations = await action.GetPreviewOperationsAsync(CancellationToken.None); 1350var commitOperations = await action.GetOperationsAsync(CancellationToken.None); 1377var previewOperations = await action.GetPreviewOperationsAsync(CancellationToken.None); 1380var commitOperations = await action.GetOperationsAsync(CancellationToken.None);
Testing\CSharpTestMethodFinderTests.cs (4)
469var testMethods = await testMethodFinder.GetPotentialTestMethodsAsync(workspace.CurrentSolution.GetRequiredDocument(testDocument.Id), span, CancellationToken.None); 483var testMethods = await testMethodFinder.GetPotentialTestMethodsAsync(workspace.CurrentSolution.GetRequiredDocument(testDocument.Id), span, CancellationToken.None); 484var semanticModel = await workspace.CurrentSolution.GetRequiredDocument(testDocument.Id).GetRequiredSemanticModelAsync(CancellationToken.None); 490var matchFound = testMethods.Any(m => testMethodFinder.IsMatch(semanticModel, m, expectedTestName, CancellationToken.None));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (18)
Semantics\SemanticErrorTests.cs (6)
25163}, CancellationToken.None) 25171comp.GetDiagnostics(CompilationStage.Declare, includeEarlierStages: true, symbolFilter: null, CancellationToken.None) 25232}, CancellationToken.None) 25242comp.GetDiagnostics(CompilationStage.Declare, includeEarlierStages: true, symbolFilter: null, CancellationToken.None) 25322}, CancellationToken.None) 25336comp.GetDiagnostics(CompilationStage.Declare, includeEarlierStages: true, symbolFilter: null, CancellationToken.None)
SourceGeneration\GeneratorDriverTests.cs (7)
1694var result = userFunc(10, CancellationToken.None); 1695var userResult = userFunc(10, CancellationToken.None); 1700Assert.Throws<InvalidOperationException>(() => throwsFunc(20, CancellationToken.None)); 1701Assert.Throws<UserFunctionException>(() => userThrowsFunc(20, CancellationToken.None)); 1705userThrowsFunc(20, CancellationToken.None); 1717Assert.Throws<OperationCanceledException>(() => otherTimeoutFunc(30, CancellationToken.None)); 1718Assert.Throws<UserFunctionException>(() => userOtherTimeoutFunc(30, CancellationToken.None));
SourceGeneration\SyntaxAwareGeneratorTests.cs (5)
186GeneratorInitializationContext init = new GeneratorInitializationContext(CancellationToken.None); 194init = new GeneratorInitializationContext(CancellationToken.None); 202init = new GeneratorInitializationContext(CancellationToken.None); 210init = new GeneratorInitializationContext(CancellationToken.None); 2056driver = driver.RunGenerators(compilation, CancellationToken.None);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (29)
Compilation\CompilationAPITests.cs (1)
897error = comp.GetDiagnostics(cancellationToken: CancellationToken.None);
DeclarationTests.cs (1)
942_root = CloneNodeAsRoot(_underlyingTree.GetCompilationUnitRoot(CancellationToken.None));
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (2)
355var bridge = @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Single(); 387Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length); //not needed
Symbols\IndexerTests.cs (2)
150var bridgeMethods = sourceType.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods; 161bridgeMethods = sourceType.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods;
Symbols\InterfaceImplementationTests.cs (8)
942Assert.False(derivedClass.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Any()); 1013var synthesizedExplicitImpls = (from m in derivedClass.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods orderby m.MethodKind select m).ToArray(); 1082var synthesizedExplicitImpls = (from m in @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods orderby m.Name select m).ToArray(); 1655var synthesizedExplicitImpl = classC.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Single(); 1715Assert.Equal(0, classC.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length); 1867derived.ForceComplete(locationOpt: null, filter: null, cancellationToken: CancellationToken.None); 1900var bridgeMethod = derivedType.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Single(); 2036var synthesized = derivedType.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Single();
Symbols\Source\ClsComplianceTests.cs (2)
3462comp.GetDiagnosticsForSyntaxTree(CompilationStage.Declare, tree, null, includeEarlierStages: false, cancellationToken: CancellationToken.None); 3557comp.GetDiagnosticsForSyntaxTree(CompilationStage.Declare, tree1, null, includeEarlierStages: false, cancellationToken: CancellationToken.None).Verify(
Symbols\Source\CompletionTests.cs (1)
94a.ForceComplete(null, filter: null, CancellationToken.None);
Symbols\Source\CustomModifierCopyTests.cs (12)
65var method2ExplicitImpl = @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Single(); 112var method2ExplicitImpls = @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods; 159Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length); 208Assert.Equal(0, baseClass.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length); 221Assert.Equal(0, derivedClass.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length); 528var class1SynthesizedExplicitImpls = class1.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods; 543var class2Method2SynthesizedExplicitImpl = class2.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Single(); 556var class3SynthesizedExplicitImpls = (from m in class3.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods orderby m.Name select m).ToArray(); 604Assert.False(@class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Any()); 701Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length); 735var explicitImpls = @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods; 775Assert.Equal(0, @class.GetSynthesizedExplicitImplementations(CancellationToken.None).ForwardingMethods.Length);
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (1)
52CancellationToken = CancellationToken.None;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
331? ((CompilationUnitSyntax)structure.SyntaxTree.GetRoot(CancellationToken.None)).EndOfFileToken
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (32)
CodeGeneration\AddAttributesTests.cs (1)
60var formatted = await Formatter.FormatAsync(changedDoc, SyntaxAnnotation.ElasticAnnotation, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
CodeGeneration\AddImportsTests.cs (12)
90? await ImportAdder.AddImportsFromSymbolAnnotationAsync(doc, addImportOptions, CancellationToken.None) 91: await ImportAdder.AddImportsFromSyntaxesAsync(doc, addImportOptions, CancellationToken.None); 95var formatted = await Formatter.FormatAsync(imported, SyntaxAnnotation.ElasticAnnotation, formattingOptions, CancellationToken.None); 102var reduced = await Simplifier.ReduceAsync(imported, simplifierOptions, CancellationToken.None); 103var formatted = await Formatter.FormatAsync(reduced, SyntaxAnnotation.ElasticAnnotation, formattingOptions, CancellationToken.None); 868var compilation = await document.Project.GetCompilationAsync(CancellationToken.None); 869var compilerDiagnostics = compilation.GetDiagnostics(CancellationToken.None); 874var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false); 878var editor = await DocumentEditor.CreateAsync(document, CancellationToken.None).ConfigureAwait(false); 889? await ImportAdder.AddImportsFromSymbolAnnotationAsync(documentWithAttribute, addImportOptions, CancellationToken.None).ConfigureAwait(false) 890: await ImportAdder.AddImportsFromSyntaxesAsync(documentWithAttribute, addImportOptions, CancellationToken.None).ConfigureAwait(false); 892var formatted = await Formatter.FormatAsync(imported, formattingOptions, CancellationToken.None);
CodeGeneration\SymbolEditorTests.cs (3)
56document = await Simplifier.ReduceAsync(document, CSharpSimplifierOptions.Default, CancellationToken.None); 57document = await Formatter.FormatAsync(document, Formatter.Annotation, CSharpSyntaxFormattingOptions.Default, CancellationToken.None); 58document = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
CodeGeneration\SyntaxGeneratorTests.cs (1)
4901var elasticOnlyFormatted = Formatter.Format(newRoot, SyntaxAnnotation.ElasticAnnotation, _workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).ToFullString();
Formatting\FormattingElasticTriviaTests.cs (5)
71var newCompilation = Formatter.Format(compilation, workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None); 130var formatted = Formatter.Format(newRoot, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString(); 133var elasticOnlyFormatted = Formatter.Format(newRoot, SyntaxAnnotation.ElasticAnnotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString(); 136var annotationFormatted = Formatter.Format(newRoot, Formatter.Annotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString(); 180var newCompilation = Formatter.Format(compilation, workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingMultipleSpanTests.cs (1)
158var result = Formatter.Format(root, TextSpan.FromBounds(0, 0), workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingTests.cs (3)
4846var newProperty = Formatter.Format(property, workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None); 8412Formatter.Format(block, new AdhocWorkspace().Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None); 9554=> Formatter.Format(SyntaxFactory.StructDeclaration("S"), DefaultWorkspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingTreeEditTests.cs (2)
46var result1 = Formatter.Format(root1, document.Project.Solution.Services, options, CancellationToken.None); 59var result2 = Formatter.Format(root2, document.Project.Solution.Services, options, CancellationToken.None);
Formatting\FormattingTriviaTests.cs (2)
1586var formatted = Formatter.Format(tree, workspace.Services.SolutionServices, options, CancellationToken.None); 1622var formatted = Formatter.Format(tree, workspace.Services.SolutionServices, options, CancellationToken.None);
OrganizeImports\OrganizeUsingsTests.cs (2)
40var newDocument = await organizeImportsService.OrganizeImportsAsync(document, options, CancellationToken.None); 90var newDocument = await organizeImportsService.OrganizeImportsAsync(document, options, CancellationToken.None);
Microsoft.CodeAnalysis.Debugging.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.EditorFeatures (51)
Adornments\AbstractAdornmentManager.cs (2)
106using (Logger.LogBlock(FunctionId.Tagger_AdornmentManager_OnLayoutChanged, CancellationToken.None)) 202using (Logger.LogBlock(FunctionId.Tagger_AdornmentManager_UpdateInvalidSpans, CancellationToken.None))
AutomaticCompletion\BraceCompletionSessionProvider.cs (2)
96return CancellationToken.None; 102return CancellationToken.None;
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (3)
284using (Logger.LogBlock(FunctionId.Tagger_SyntacticClassification_TagComputer_GetTags, CancellationToken.None)) 343span.Snapshot.AsText(), span.Span.ToTextSpan(), classifiedSpans, CancellationToken.None); 355var cancellationToken = CancellationToken.None;
DocumentationComments\AbstractDocumentationCommentCommandHandler.cs (2)
130CompleteComment(args.SubjectBuffer, args.TextView, InsertOnCharacterTyped, CancellationToken.None); 183CompleteComment(args.SubjectBuffer, args.TextView, InsertOnEnterTyped, CancellationToken.None);
EditAndContinue\EditAndContinueLanguageService.cs (1)
63await proxy.SetFileLoggingDirectoryAsync(logDirectory, CancellationToken.None).ConfigureAwait(false);
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
72CancellationToken.None).ConfigureAwait(true); 87_threadingContext, workspace, result.NavigationDocumentId, position: 0, CancellationToken.None).ConfigureAwait(false);
GoToDefinition\GoToDefinitionCommandHandler.cs (1)
142await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
InlineDiagnostics\InlineDiagnosticsTag.cs (1)
137_ = _navigateToLinkService.TryNavigateToLinkAsync(uri, CancellationToken.None);
InlineRename\InlineRenameSession.cs (6)
153_inlineRenameSessionDurationLogBlock = Logger.LogBlock(FunctionId.Rename_InlineSession, CancellationToken.None); 202using (Logger.LogBlock(FunctionId.Rename_CreateOpenTextBufferManagerForAllOpenDocs, CancellationToken.None)) 561var replacementInfo = await _conflictResolutionTask.JoinAsync(CancellationToken.None).ConfigureAwait(false); 662var cancellationToken = CancellationToken.None; 841cancellationToken = CancellationToken.None; 942var document = await finalSolution.GetDocumentAsync(documentId, includeSourceGenerated: true, CancellationToken.None).ConfigureAwait(true);
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
189new InlineRenameLocation(document, span), GetTriggerText(document, span), CancellationToken.None); 214var sourceText = document.GetTextSynchronously(CancellationToken.None); 228using (Logger.LogBlock(FunctionId.Rename_OnTextBufferChanged, CancellationToken.None))
IntelliSense\AsyncCompletion\CompletionSource.cs (1)
298_ = _expandedItemsTaskCancellationSeries.CreateNext(CancellationToken.None);
IntelliSense\QuickInfo\QuickInfoHyperLink.cs (1)
45_ = navigateToLinkService.TryNavigateToLinkAsync(Uri, CancellationToken.None);
NavigateTo\NavigateToItemDisplay.cs (1)
80if (document.TryGetTextSynchronously(document.Workspace.CurrentSolution, CancellationToken.None) is { } sourceText)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (2)
70await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 177await _stateMachine.ThreadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
81using (Logger.LogBlock(FunctionId.Rename_Tracking_BufferChanged, CancellationToken.None))
SemanticSearch\SemanticSearchEditorWorkspace.cs (1)
63await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
Shared\Preview\PreviewWorkspace.cs (6)
102var text = document.GetTextSynchronously(CancellationToken.None); 103var version = document.GetTextVersionSynchronously(CancellationToken.None); 111var text = document.GetTextSynchronously(CancellationToken.None); 112var version = document.GetTextVersionSynchronously(CancellationToken.None); 120var text = document.GetTextSynchronously(CancellationToken.None); 121var version = document.GetTextVersionSynchronously(CancellationToken.None);
Shared\Tagging\EventSources\TaggerEventSources.WorkspaceChangedEventSource.cs (1)
36CancellationToken.None);
SignatureHelp\Presentation\Parameter.cs (1)
22public string Documentation => _documentation ??= _parameter.DocumentationFactory(CancellationToken.None).GetFullText();
SignatureHelp\Presentation\Signature.cs (1)
185var documentation = _signatureHelpItem.DocumentationFactory(CancellationToken.None).ToList();
SmartIndent\SmartIndent.cs (1)
24=> GetDesiredIndentation(line, CancellationToken.None);
src\Workspaces\Remote\ServiceHub\Services\EditAndContinue\EditAndContinueLogReporter.cs (1)
49CancellationToken.None);
Suggestions\RefineUsingCopilot\RefineUsingCopilotCodeAction.cs (1)
105await copilotCodeAnalysisService.StartRefinementSessionAsync(oldDocument, newDocument, convertedPrimaryDiagnostic, CancellationToken.None).ConfigureAwait(false);
Tagging\AbstractAsynchronousTaggerProvider.cs (1)
291=> _provider.ProduceTagsAsync(context, CancellationToken.None);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (2)
374cancellationToken = CancellationToken.None; 602using (Logger.LogBlock(FunctionId.Tagger_TagSource_ProcessNewTags, CancellationToken.None))
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (5)
47using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetExtentOfWord, CancellationToken.None)) 105using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfEnclosing, CancellationToken.None)) 137using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfFirstChild, CancellationToken.None)) 173using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfNextSibling, CancellationToken.None)) 225using (Logger.LogBlock(FunctionId.TextStructureNavigator_GetSpanOfPreviousSibling, CancellationToken.None))
Workspaces\ITextBufferVisibilityTracker.cs (1)
72CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (54)
BraceMatching\AbstractBraceMatcherTests.cs (1)
31var foundSpan = await braceMatcher.FindMatchingSpanAsync(document, position, braceMatchingOptions, CancellationToken.None);
BracePairs\AbstractBracePairsTests.cs (1)
36await service.AddBracePairsAsync(document, new TextSpan(0, text.Length), bracePairs, CancellationToken.None);
ChangeSignature\AddedParameterOrExistingIndex.cs (1)
64var semanticModel = document.GetRequiredSemanticModelAsync(CancellationToken.None).AsTask().Result;
Classification\AbstractClassifierTests.cs (4)
267await service.AddSemanticClassificationsAsync(document, spans, options, result, CancellationToken.None); 268await service.AddEmbeddedLanguageClassificationsAsync(document, spans, options, result, CancellationToken.None); 274var root = await document.GetRequiredSyntaxRootAsync(CancellationToken.None); 278service.AddSyntacticClassifications(root, spans, results, CancellationToken.None);
CodeLens\AbstractCodeLensTest.cs (4)
36declarationSyntaxNode, cap, CancellationToken.None); 63annotatedDocument.Id, declarationSyntaxNode, CancellationToken.None); 89annotatedDocument.Id, declarationSyntaxNode, CancellationToken.None); 115annotatedDocument.Id, declarationSyntaxNode, CancellationToken.None);
Completion\AbstractArgumentProviderTests`1.cs (4)
64var root = await document.GetRequiredSyntaxRootAsync(CancellationToken.None); 65var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None); 66var parameter = GetParameterSymbolInfo(workspace, semanticModel, root, position, CancellationToken.None); 69var context = new ArgumentContext(provider, semanticModel, position, parameter, previousDefaultValue, CancellationToken.None);
Completion\AbstractCompletionProviderTests.cs (2)
645var commit = await service.GetChangeAsync(document, completionItem, commitChar, CancellationToken.None); 746var textChange = (await service.GetChangeAsync(document, firstItem, commitChar, CancellationToken.None)).TextChange;
Debugging\AbstractDataTipInfoGetterTests.cs (2)
35var result = await service.GetDataTipInfoAsync(document, position, includeKind: true, CancellationToken.None); 52var result = await DataTipInfoGetter.GetInfoAsync(document, position, includeKind: true, CancellationToken.None);
ExtractInterface\ExtractInterfaceTestState.cs (6)
82CancellationToken.None); 95CancellationToken.None); 103CancellationToken.None); 107var options = (ExtractInterfaceOptionsResult)action.GetOptions(CancellationToken.None); 116this.OriginalSolution, changedOptions, CodeAnalysisProgress.None, CancellationToken.None); 119operation.Apply(Workspace, CancellationToken.None);
FindUsages\StubStreamingFindUsagesPresenter.cs (1)
26=> (new SimpleFindUsagesContext(), CancellationToken.None);
Formatting\AbstractNewDocumentFormattingServiceTests.cs (2)
35await document.GetCodeCleanupOptionsAsync(CancellationToken.None); 38var formattedDocument = await formattingService.FormatNewDocumentAsync(document, hintDocument: null, cleanupOptions, CancellationToken.None);
Formatting\CoreFormatterTestsBase.cs (4)
183var documentSyntax = await ParsedDocument.CreateAsync(document, CancellationToken.None).ConfigureAwait(false); 214var newRootNode = Formatter.Format(root, spans, workspace.Services.SolutionServices, options, rules, CancellationToken.None); 227var result = Formatter.GetFormattedTextChanges(root, spans, workspace.Services.SolutionServices, options, rules, CancellationToken.None); 289var result = Formatter.Format(node, workspace.Services.SolutionServices, options, CancellationToken.None);
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (2)
39var parsedDocument = await ParsedDocument.CreateAsync(document, CancellationToken.None); 63var parsedDocument = await ParsedDocument.CreateAsync(document, CancellationToken.None);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
62service.AddHighlights(root, position, highlightSpans, CancellationToken.None);
MoveStaticMembers\TestMoveStaticMembersService.cs (1)
65var destination = selectedType.ContainingNamespace.GetAllTypes(CancellationToken.None).First(t => t.ToDisplayString() == DestinationName);
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
38var result = await service.GetLocationsAsync(document, textSpans, CancellationToken.None);
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
37var result = await service.GetLocationsAsync(document, textSpans, CancellationToken.None);
RefactoringHelpers\RefactoringHelpersTestBase.cs (1)
107var relevantNodes = await document.GetRelevantNodesAsync<TNode>(selection, allowEmptyNodes, CancellationToken.None).ConfigureAwait(false);
Rename\RenamerTests.cs (1)
88solution = await documentRenameResult.UpdateSolutionAsync(solution, CancellationToken.None);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (5)
160var items = await signatureHelpProvider.GetItemsAsync(document, cursorPosition, triggerInfo, options, CancellationToken.None); 177_ = await signatureHelpProvider.GetItemsAsync(document, cursorPosition, triggerInfo, options, CancellationToken.None); 229Assert.Equal(expectedTestItem.MethodDocumentation, actualSignatureHelpItem.DocumentationFactory(CancellationToken.None).GetFullText()); 249var classifiedSpans = actualSignatureHelpItem.DocumentationFactory(CancellationToken.None).ToClassifiedSpans().ToList(); 401var items = await signatureHelpProvider.GetItemsAsync(document, cursorPosition, triggerInfo, options, CancellationToken.None);
SpellCheck\AbstractSpellCheckFixerProviderTests.cs (1)
44var result = await service.GetTestAccessor().TryRenameAsync(buffer.CurrentSnapshot.GetSpan(span.Single().ToSpan()), replacement, CancellationToken.None);
SpellCheck\AbstractSpellCheckSpanTests.cs (1)
31var actual = await service.GetSpansAsync(document, CancellationToken.None);
Structure\AbstractSyntaxNodeStructureProviderTests.cs (2)
24var root = await document.GetSyntaxRootAsync(CancellationToken.None); 47outliner.CollectBlockSpans(previousToken, node, actualRegions, options, CancellationToken.None);
Structure\AbstractSyntaxTriviaStructureProviderTests.cs (1)
26outliner.CollectBlockSpans(trivia, actualRegions, options, CancellationToken.None);
TaskList\AbstractTaskListTests.cs (1)
40var items = await service.GetTaskListItemsAsync(document, TaskListItemDescriptor.Parse(descriptors), CancellationToken.None);
Threading\TaskJoinExtensions.cs (1)
45CancellationToken.None,
Threading\WpfTestRunner.cs (1)
63using (await SharedData.TestSerializationGate.DisposableWaitAsync(CancellationToken.None))
Workspaces\EditorTestHostDocument.cs (1)
170var document = threadingContext.JoinableTaskFactory.Run(() => workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(testDocument.Id, CancellationToken.None).AsTask());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (199)
CodeFixes\CodeFixServiceTests.cs (21)
60document, TextSpan.FromBounds(0, 0), new DefaultCodeActionRequestPriorityProvider(), CancellationToken.None); 85_ = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 112var fixCollections = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 145cancellationToken: CancellationToken.None); 152cancellationToken: CancellationToken.None); 181cancellationToken: CancellationToken.None); 211cancellationToken: CancellationToken.None); 280var fixes = await tuple.codeFixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 305document, TextSpan.FromBounds(0, 0), new DefaultCodeActionRequestPriorityProvider(), CancellationToken.None); 752return await fixService.GetFixesAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 853var txtDocumentCodeFixes = await tuple.codeFixService.GetFixesAsync(txtDocument, TextSpan.FromBounds(0, 1), CancellationToken.None); 861var solution = await codeAction.GetChangedSolutionInternalAsync(txtDocument.Project.Solution, CodeAnalysisProgress.None, CancellationToken.None); 863Assert.Equal("Additional Document", txtDocument.GetTextSynchronously(CancellationToken.None).ToString()); 864Assert.Equal($"Additional Document{fixer1.Title}", changedtxtDocument.GetTextSynchronously(CancellationToken.None).ToString()); 870var logDocumentCodeFixes = await tuple.codeFixService.GetFixesAsync(logDocument, TextSpan.FromBounds(0, 1), CancellationToken.None); 1020var root = await sourceDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1030var diagnostics = await analyzerService.ForceAnalyzeProjectAsync(sourceDocument.Project, CancellationToken.None); 1055root = await sourceDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1063includeLocalDocumentDiagnostics: true, CancellationToken.None); 1068var normalPriFixes = await tuple.codeFixService.GetFixesAsync(sourceDocument, testSpan, priorityProvider, CancellationToken.None); 1070var lowPriFixes = await tuple.codeFixService.GetFixesAsync(sourceDocument, testSpan, priorityProvider, CancellationToken.None);
CodeGeneration\AbstractCodeGenerationTests.cs (1)
43var simplifiedDocument = Simplifier.ReduceAsync(annotatedDocument, options, CancellationToken.None).Result;
CodeGeneration\CodeGenerationTests.cs (30)
52CancellationToken.None); 86CancellationToken.None); 91var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 93var newRoot = testContext.Service.AddField(root, field, info, CancellationToken.None); 128CancellationToken.None); 173CancellationToken.None); 217CancellationToken.None); 252CancellationToken.None); 298CancellationToken.None); 315var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 317var newSyntax = testContext.Service.AddStatements(oldSyntax, parsedStatements, info, CancellationToken.None); 330var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 333var newMemberSyntax = testContext.Service.AddParameters(oldMemberSyntax, parameterSymbols, info, CancellationToken.None); 366CancellationToken.None); 406CancellationToken.None); 499CancellationToken.None); 528CancellationToken.None); 556var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 558var newNode = codeGenerator.AddAttributes(oldNode, [attributeData], target, info, CancellationToken.None) 575var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 577var newNode = codeGenerator.RemoveAttribute(declarationNode, attribute, info, CancellationToken.None) 597var options = await testContext.Document.GetCodeGenerationOptionsAsync(CancellationToken.None); 601updatedDeclarationNode = codeGenerator.UpdateDeclarationAccessibility(declarationNode, accessibility.Value, info, CancellationToken.None); 605updatedDeclarationNode = codeGenerator.UpdateDeclarationModifiers(declarationNode, modifiers, info, CancellationToken.None); 609updatedDeclarationNode = codeGenerator.UpdateDeclarationType(declarationNode, getType(testContext.SemanticModel), info, CancellationToken.None); 627updatedDeclarationNode = codeGenerator.UpdateDeclarationMembers(declarationNode, allMembers, info, CancellationToken.None); 664testContext.Result = await testContext.Service.AddMembersAsync(solutionContext, (INamedTypeSymbol)destination, members, CancellationToken.None); 668testContext.Result = await testContext.Service.AddNamespaceOrTypeAsync(solutionContext, (INamespaceSymbol)destination, symbol, CancellationToken.None); 976var simplified = Simplifier.ReduceAsync(this.Document, Simplifier.Annotation, simplifierOptions, CancellationToken.None).Result; 977var actual = Formatter.FormatAsync(simplified, Formatter.Annotation, formattingOptions, CancellationToken.None).Result.GetSyntaxRootAsync().Result.ToFullString();
CodeRefactorings\CodeRefactoringServiceTest.cs (13)
51var refactorings = await refactoringService.GetRefactoringsAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 90var refactorings = await refactoringService.GetRefactoringsAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 111var result = await refactoringService.GetRefactoringsAsync(document, TextSpan.FromBounds(0, 0), CancellationToken.None); 174var txtRefactorings = await refactoringService.GetRefactoringsAsync(txtAdditionalDocument, TextSpan.FromBounds(0, 0), CancellationToken.None); 182var solution = await codeAction.GetChangedSolutionInternalAsync(project.Solution, CodeAnalysisProgress.None, CancellationToken.None); 184Assert.Empty(txtAdditionalDocument.GetTextSynchronously(CancellationToken.None).ToString()); 185Assert.Equal(refactoring1.Title, changedtxtDocument.GetTextSynchronously(CancellationToken.None).ToString()); 189var logRefactorings = await refactoringService.GetRefactoringsAsync(logAdditionalDocument, TextSpan.FromBounds(0, 0), CancellationToken.None); 213var editorConfigRefactorings = await refactoringService.GetRefactoringsAsync(editorConfig, TextSpan.FromBounds(0, 0), CancellationToken.None); 221var solution = await codeAction.GetChangedSolutionInternalAsync(project.Solution, CodeAnalysisProgress.None, CancellationToken.None); 223Assert.Empty(editorConfig.GetTextSynchronously(CancellationToken.None).ToString()); 224Assert.Equal(refactoring1.Title, changedEditorConfig.GetTextSynchronously(CancellationToken.None).ToString()); 228var globalConfigRefactorings = await refactoringService.GetRefactoringsAsync(globalConfig, TextSpan.FromBounds(0, 0), CancellationToken.None);
CommentSelection\CommentUncommentSelectionCommandHandlerTests.cs (1)
715null, service, textView.TextBuffer, textView.Selection.GetSnapshotSpansOnBuffer(textView.TextBuffer), operation, CancellationToken.None);
Completion\FileSystemCompletionHelperTests.cs (13)
60AssertItemsEqual(fsc.GetTestAccessor().GetItems("", CancellationToken.None), 71AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"X:\A\", CancellationToken.None), 76AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"X:\B\", CancellationToken.None), 79AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"Z:\", CancellationToken.None), 83AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"Z:", CancellationToken.None), 86AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"\", CancellationToken.None), 117AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"", CancellationToken.None), 153AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"", CancellationToken.None), 179AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"\\server\share\", CancellationToken.None), 183AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"\\server\share\C\", CancellationToken.None), 218AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"", CancellationToken.None), 227AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"/", CancellationToken.None), 233AssertItemsEqual(fsc.GetTestAccessor().GetItems(@"/B/", CancellationToken.None),
Completion\GlobalAssemblyCacheCompletionHelperTests.cs (1)
39return helper.GetItems(pathSoFar, CancellationToken.None);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (19)
69includeLocalDocumentDiagnostics: true, CancellationToken.None); 186var diagnostics = await service.ForceAnalyzeProjectAsync(document.Project, CancellationToken.None); 220var diagnostics = await service.ForceAnalyzeProjectAsync(document.Project, CancellationToken.None); 260var diagnostics = await service.ForceAnalyzeProjectAsync(project, CancellationToken.None); 343var diagnostics = await service.ForceAnalyzeProjectAsync(project, CancellationToken.None); 392var diagnostics = await service.ForceAnalyzeProjectAsync(project, CancellationToken.None); 473var diagnostics = await service.ForceAnalyzeProjectAsync(project, CancellationToken.None); 560var document = isSourceGenerated ? (await project.GetSourceGeneratedDocumentsAsync(CancellationToken.None)).Single() : project.Documents.Single(); 595var diagnostics = await service.ForceAnalyzeProjectAsync(project, CancellationToken.None); 640cancellationToken: CancellationToken.None); 676cancellationToken: CancellationToken.None); 712cancellationToken: CancellationToken.None); 747cancellationToken: CancellationToken.None); 801cancellationToken: CancellationToken.None); 845var root = await document.GetRequiredSyntaxRootAsync(CancellationToken.None); 867CancellationToken.None); 871var expectedText = additionalDocument.GetTextSynchronously(CancellationToken.None).ToString(); 935logPerformanceInfo: false, getTelemetryInfo: false, cancellationToken: CancellationToken.None); 966var diagnostics = await service.ForceAnalyzeProjectAsync(project, CancellationToken.None);
Diagnostics\DiagnosticDataTests.cs (5)
171var diagnostic = await diagnosticData.ToDiagnosticAsync(document.Project, CancellationToken.None); 206var diagnostic = await diagnosticData.ToDiagnosticAsync(document.Project, CancellationToken.None); 235var document = await project.GetSourceGeneratedDocumentAsync(documentId, CancellationToken.None); 256var diagnostic = await diagnosticData.ToDiagnosticAsync(project, CancellationToken.None); 304var diagnostic = await diagnosticData.ToDiagnosticAsync(firstDocument.Project, CancellationToken.None);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (17)
128var syntaxTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 141await localService.StartSessionAsync(CancellationToken.None); 153await localService.EnterBreakStateAsync(CancellationToken.None); 171var syntaxTree = solution.GetRequiredDocument(documentId).GetSyntaxTreeSynchronously(CancellationToken.None)!; 225var updates = await localService.GetUpdatesAsync(runningProjects: [runningProjectInfo], CancellationToken.None); 260var syntaxTree = solution.GetRequiredDocument(documentId).GetSyntaxTreeSynchronously(CancellationToken.None)!; 290updates = await localService.GetUpdatesAsync(runningProjects: [runningProjectInfo], CancellationToken.None); 328await localService.CommitUpdatesAsync(CancellationToken.None); 337await localService.DiscardUpdatesAsync(CancellationToken.None); 345await localService.EndSessionAsync(CancellationToken.None); 382_ = await document1.GetTextAsync(CancellationToken.None); 386await languageService.StartSessionAsync(CancellationToken.None); 387await languageService.EnterBreakStateAsync(CancellationToken.None); 399Assert.Equal(source1, documentState.GetTextSynchronously(CancellationToken.None).ToString()); 403var (document, state) = await debuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(document1, CancellationToken.None); 406Assert.Equal(source1, document.GetTextSynchronously(CancellationToken.None).ToString()); 408await languageService.EndSessionAsync(CancellationToken.None);
FindReferences\FindReferencesCommandHandlerTests.cs (1)
56=> (_context, CancellationToken.None);
FindSymbols\SymbolTreeInfoTests.cs (16)
28solution, reference1, checksum: null, CancellationToken.None); 31solution, reference2, checksum: null, CancellationToken.None); 34Assert.Equal(info1.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None)); 35Assert.Equal(info2.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None)); 48var checksum1 = SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None); 50solution, reference1, checksum1, CancellationToken.None); 52var checksum2 = SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None); 54solution, reference2, checksum2, CancellationToken.None); 71var checksum1 = SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None); 73solution, reference1, checksum1, CancellationToken.None); 76solution, reference2, checksum: null, CancellationToken.None); 80Assert.Equal(info2.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None)); 94solution, reference1, checksum: null, CancellationToken.None); 96var checksum2 = SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference2, CancellationToken.None); 98solution, reference2, checksum2, CancellationToken.None); 101Assert.Equal(info1.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.Services, reference1, CancellationToken.None));
Formatting\InferredIndentationTests.cs (3)
26var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None); 39var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None); 53var options = await testWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetLineFormattingOptionsAsync(CancellationToken.None);
InheritanceMargin\InheritanceMarginTests.cs (4)
57var cancellationToken = CancellationToken.None; 88var cancellationToken = CancellationToken.None; 169var docSpan = await actualDocumentSpans[i].TryRehydrateAsync(workspace.CurrentSolution, CancellationToken.None); 215var cancellationToken = CancellationToken.None;
LanguageServer\VSTypeScriptHandlerTests.cs (2)
56var response = await testLspServer.ExecuteRequestAsync<TSRequest, int>(TypeScriptHandler.MethodName, request, CancellationToken.None); 80var response = await testLspServer.ExecuteRequestAsync<VSInternalDocumentDiagnosticsParams, VSInternalDiagnosticReport[]>(VSInternalMethods.DocumentPullDiagnosticName, documentPullRequest, CancellationToken.None);
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (6)
91return _metadataAsSourceService.GetGeneratedFileAsync(Workspace, project, symbol, signaturesOnly, MetadataAsSourceOptions.Default, CancellationToken.None); 103var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 132var result = await _metadataAsSourceService.GetGeneratedFileAsync(Workspace, project, symbol, signaturesOnly, MetadataAsSourceOptions.Default, CancellationToken.None); 171compilation = await this.DefaultProject.GetRequiredCompilationAsync(CancellationToken.None); 317var syntaxRoot = await document.GetRequiredSyntaxRootAsync(CancellationToken.None); 318var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None);
MetadataAsSource\MetadataAsSourceTests.cs (1)
1882await Formatter.FormatAsync(document, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Preview\PreviewWorkspaceTests.cs (3)
119var storage = await persistentService.GetStorageAsync(SolutionKey.ToSolutionKey(previewWorkspace.CurrentSolution), CancellationToken.None); 168var compilation = project.GetRequiredCompilationAsync(CancellationToken.None).Result; 170var result = compilationWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None).Result;
RenameTracking\RenameTrackingTestState.cs (3)
173document, span, actions.Add, CancellationToken.None); 196var operations = (await codeAction.GetOperationsAsync(CancellationToken.None)).ToArray(); 199await operations[0].TryApplyAsync(this.Workspace, this.Workspace.CurrentSolution, CodeAnalysisProgress.None, CancellationToken.None);
Snippets\RoslynLSPSnippetConvertTests.cs (3)
320[], new TextChange(new TextSpan(8, 0), "quux"), triggerLocation: 12, CancellationToken.None).Result; 331[], new TextChange(new TextSpan(4, 4), "bar quux"), triggerLocation: 12, CancellationToken.None).Result; 401var lspSnippetString = await RoslynLSPSnippetConverter.GenerateLSPSnippetAsync(document, cursorPosition!.Value, placeholders, textChange, stringSpan.Start, CancellationToken.None).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerTests.cs (13)
25var result = await StackTraceAnalyzer.AnalyzeAsync(inputLine, CancellationToken.None); 32var reparsedResult = await StackTraceAnalyzer.AnalyzeAsync(stackFrame.ToString(), CancellationToken.None); 40var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, stackFrame, StackFrameSymbolPart.Method, CancellationToken.None); 47var root = await doc.GetRequiredSyntaxRootAsync(CancellationToken.None); 49var semanticModel = await doc.GetRequiredSemanticModelAsync(CancellationToken.None); 791var result = await StackTraceAnalyzer.AnalyzeAsync(line, CancellationToken.None); 813var result = await StackTraceAnalyzer.AnalyzeAsync(line, CancellationToken.None); 818var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, parsedFrame, StackFrameSymbolPart.Method, CancellationToken.None); 827var result = await StackTraceAnalyzer.AnalyzeAsync(activityLogException, CancellationToken.None); 843var result = await StackTraceAnalyzer.AnalyzeAsync("at System.String.ToLower()", CancellationToken.None); 848var definition = await service.TryFindDefinitionAsync(workspace.CurrentSolution, frame, StackFrameSymbolPart.Method, CancellationToken.None); 881var result = await StackTraceAnalyzer.AnalyzeAsync("at Path.To.Component.M() in C:/path/to/Component.razor:line 5", CancellationToken.None); 920var result = await StackTraceAnalyzer.AnalyzeAsync("at Path.To.Component.M() in Component.razor:line 5", CancellationToken.None);
Structure\BlockStructureServiceTests.cs (1)
123var structure = await outliningService.GetBlockStructureAsync(document, options, CancellationToken.None);
SymbolFinder\SymbolFinderTests.cs (7)
657var results = await SymbolFinder.FindDerivedClassesArrayAsync(firstType, solution, transitive: true, ImmutableHashSet.Create(csProject), CancellationToken.None); 662results = await SymbolFinder.FindDerivedClassesArrayAsync(firstType, solution, transitive: true, ImmutableHashSet.Create(otherProject), CancellationToken.None); 768var interfaceMembers = await SymbolFinder.FindImplementedInterfaceMembersArrayAsync(methodSymbol, solution, CancellationToken.None); 798var implementedMembers = await SymbolFinder.FindImplementedInterfaceMembersArrayAsync(namespaceSymbol, solution, CancellationToken.None); 828var sourceDefinition = await SymbolFinder.FindSourceDefinitionAsync(classInSource, solution, CancellationToken.None); 867.Project.Solution.WithFrozenPartialCompilations(CancellationToken.None); 876var sourceDefinition = await SymbolFinder.FindSourceDefinitionAsync(classInSource, solution, CancellationToken.None);
SymbolKey\SymbolKeyCrossLanguageTests.cs (3)
44var semanticModel = await csDocument.GetRequiredSemanticModelAsync(CancellationToken.None); 52var vbCompilation = await vbProject.GetRequiredCompilationAsync(CancellationToken.None); 54var resolved = SymbolKey.ResolveString(methodSymbol.GetSymbolKey().ToString(), vbCompilation, out var failureReason, CancellationToken.None);
TextEditor\OpenDocumentTests.cs (4)
65Assert.Equal("Hello, World!", newDocumentWithChanges.GetTextSynchronously(CancellationToken.None).ToString()); 66Assert.Equal("Hello, World!", newDocumentWithChanges.GetLinkedDocuments().Single().GetTextSynchronously(CancellationToken.None).ToString()); 71Assert.Equal("Hello", originalDocumentWithChanges.GetTextSynchronously(CancellationToken.None).ToString()); 72Assert.Equal("Hello", originalDocumentWithChanges.GetLinkedDocuments().Single().GetTextSynchronously(CancellationToken.None).ToString());
UnusedReferences\UnusedReferencesRemoverTests.cs (1)
174CancellationToken.None).ConfigureAwait(false);
Utilities\AsynchronousOperationListenerTests.cs (2)
304}, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default); 314}, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
Workspaces\TextFactoryTests.cs (5)
88var handle = await temporaryStorageService.WriteToTemporaryStorageAsync(text, CancellationToken.None); 91var text2 = await handle.ReadFromTemporaryStorageAsync(CancellationToken.None); 108var handle = await temporaryStorageService.WriteToTemporaryStorageAsync(text, CancellationToken.None); 111var text2 = await handle.ReadFromTemporaryStorageAsync(CancellationToken.None); 121var text = textFactoryService.CreateText(stream, defaultEncoding, SourceHashAlgorithms.Default, CancellationToken.None);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.Extensions.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (2)
Internal\Editor\FSharpSmartIndentProvider.cs (1)
68=> GetDesiredIndentation(line, CancellationToken.None);
VS\IFSharpWorkspaceProjectContextFactory.cs (1)
72CancellationToken.None)));
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
NavigateTo\OmniSharpNavigateToSearchService.cs (1)
32disposalToken: CancellationToken.None);
Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler (1)
GeneratorExtensions.cs (1)
26action(hpc, source, CancellationToken.None);
Microsoft.CodeAnalysis.Features (17)
ChangeSignature\AbstractChangeSignatureService.cs (1)
412cancellationToken: CancellationToken.None);
Completion\CompletionService.ProviderManager.cs (1)
47CancellationToken.None);
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
34_ = ExtensionMethodImportCompletionHelper.WarmUpCacheAsync(document.Project, CancellationToken.None);
Completion\Providers\ImportCompletionProvider\DefaultExtensionMethodImportCompletionCacheServiceFactory.cs (1)
22listenerProvider, ExtensionMethodImportCompletionHelper.BatchUpdateCacheAsync, CancellationToken.None);
Completion\Providers\ImportCompletionProvider\DefaultTypeImportCompletionCacheServiceFactory.cs (1)
18listenerProvider, AbstractTypeImportCompletionService.BatchUpdateCacheAsync, CancellationToken.None);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingAsyncWorkItemQueue.cs (2)
201cancellationToken = CancellationToken.None; 224cancellationToken = CancellationToken.None;
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingLowPriorityProcessor.cs (1)
201_lowPriorityProcessor.ProcessProjectAsync(analyzers, item, CancellationToken.None).Wait();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
380_normalPriorityProcessor.ProcessDocumentAsync(analyzers, item, CancellationToken.None).Wait();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (3)
62CancellationToken.None, 289using (gate.DisposableWait(CancellationToken.None)) 352CancellationToken.None,
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentNavigationServiceWrapper.cs (1)
26=> this.TryNavigateToPosition(workspace, documentId, position, virtualSpace, options, CancellationToken.None);
Shared\Extensions\DocumentExtensions.cs (1)
37Debug.Assert(document.GetRequiredSyntaxRootSynchronously(CancellationToken.None) == root);
src\Analyzers\Core\CodeFixes\UseNullPropagation\AbstractUseNullPropagationCodeFixProvider.cs (1)
164var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None).ConfigureAwait(false);
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (2)
692_service._reportAndSwallowExceptionUnlessCanceled(new FormatException($"Database element invalid. Missing '{ContentAttributeName}' attribute"), CancellationToken.None); 711_service._reportAndSwallowExceptionUnlessCanceled(new FormatException($"Checksum mismatch: expected != actual. {expectedChecksum} != {actualChecksum}"), CancellationToken.None);
Microsoft.CodeAnalysis.Features.Test.Utilities (18)
EditAndContinue\EditAndContinueTestVerifier.cs (3)
102CancellationToken.None); 191var result = Analyzer.AnalyzeDocumentAsync(newDocument.Id, oldProject, newProject, lazyOldActiveStatementMap, newActiveStatementSpans, lazyCapabilities, log, CancellationToken.None).Result; 278EditSession.MergePartialEdits(oldProject.GetCompilationAsync().Result!, newProject.GetCompilationAsync().Result!, allEdits, out var mergedEdits, out _, CancellationToken.None);
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (3)
181CancellationToken.None); 231var results = await session.EmitSolutionUpdateAsync(solution, runningProjects, activeStatementSpanProvider ?? s_noActiveSpans, CancellationToken.None); 299project.Documents.Select(d => (d.GetTextSynchronously(CancellationToken.None), d.FilePath ?? throw ExceptionUtilities.UnexpectedValue(null))),
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
43}, CancellationToken.None);
Snippets\AbstractSnippetProviderTests.cs (9)
36var metadataReferences = await referenceAssemblies.ResolveAsync(LanguageName, CancellationToken.None); 64var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None); 65var syntaxContext = syntaxContextService.CreateContext(document, semanticModel, snippetRequestPosition, CancellationToken.None); 68var isValidSnippetLocation = snippetProvider.IsValidSnippetLocation(snippetContext, CancellationToken.None); 71var snippetChange = await snippetProvider.GetSnippetChangeAsync(document, snippetRequestPosition, CancellationToken.None); 126var metadataReferences = await referenceAssemblies.ResolveAsync(LanguageName, CancellationToken.None); 141var semanticModel = await document.GetRequiredSemanticModelAsync(CancellationToken.None); 142var syntaxContext = syntaxContextService.CreateContext(document, semanticModel, snippetRequestPosition, CancellationToken.None); 145var isValidSnippetLocation = snippetProvider.IsValidSnippetLocation(snippetContext, CancellationToken.None);
SolutionExplorer\AbstractSolutionExplorerSymbolTreeItemProviderTests.cs (2)
27var root = await document.GetRequiredSyntaxRootAsync(CancellationToken.None); 35var items = service.GetItems(document.Id, node, CancellationToken.None);
Microsoft.CodeAnalysis.Features.UnitTests (211)
EditAndContinue\ActiveStatementsMapTests.cs (2)
145var oldSpans = await map.GetOldActiveStatementsAsync(analyzer, document, CancellationToken.None); 197var oldSpans = await map.GetOldActiveStatementsAsync(analyzer, document, CancellationToken.None);
EditAndContinue\CompileTimeSolutionProviderTests.cs (1)
69var compileTimeDocument = await CompileTimeSolutionProvider.TryGetCompileTimeDocumentAsync(designTimeDocument, compileTimeSolution, CancellationToken.None, sourceGeneratedPathPrefix);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (137)
139var sessionId = await service.StartDebuggingSessionAsync(solution, _debuggerService, NullPdbMatchingSourceTextProvider.Instance, captureMatchingDocuments, captureAllDocuments, reportDiagnostics: true, CancellationToken.None); 174var diagnostics = await service.GetDocumentDiagnosticsAsync(document1, s_noActiveSpans, CancellationToken.None); 181diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 218var diagnostics2 = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 249var diagnostics = await service.GetDocumentDiagnosticsAsync(document1, s_noActiveSpans, CancellationToken.None); 262diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 335var diagnostics1 = await service.GetDocumentDiagnosticsAsync(generatedDocument, s_noActiveSpans, CancellationToken.None); 415var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None); 500var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None); 576var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None); 680var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None); 846var diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 944var sessionId = await service.StartDebuggingSessionAsync(solution, _debuggerService, NullPdbMatchingSourceTextProvider.Instance, captureMatchingDocuments: openDocumentIds, captureAllMatchingDocuments: false, reportDiagnostics: true, CancellationToken.None); 970var activeStatementMap = await debuggingSession.EditSession.BaseActiveStatements.GetValueAsync(CancellationToken.None); 974var asSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [designTimeOnlyDocumentId], CancellationToken.None); 978Assert.Empty(await service.GetDocumentDiagnosticsAsync(designTimeOnlyDocument2, s_noActiveSpans, CancellationToken.None)); 1036var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1118var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1167var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1231var diagnostics2 = await service.GetDocumentDiagnosticsAsync(documentB, s_noActiveSpans, CancellationToken.None); 1320var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(document2Id), s_noActiveSpans, CancellationToken.None); 1479var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1545var (document, state) = await debuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(solution.GetRequiredDocument(documentId), CancellationToken.None); 1577var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1651var diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1658diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1665diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1683diagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1722var docDiagnostics = await service.GetDocumentDiagnosticsAsync(generatedDocument, s_noActiveSpans, CancellationToken.None); 1774var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1791docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1858var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1902var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1918docDiagnostics = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 1980var docDiagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None); 2011Assert.Empty(await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None)); 2017Assert.Empty(await service.GetDocumentDiagnosticsAsync(solution.GetRequiredDocument(documentId), s_noActiveSpans, CancellationToken.None)); 2064var diagnostics1 = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 2104var diagnostics1 = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 2171Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2173Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, sourceFilePath: pathCommon, CancellationToken.None)); 2174Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, sourceFilePath: pathB, CancellationToken.None)); 2175Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, sourceFilePath: pathC, CancellationToken.None)); 2176Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, sourceFilePath: "NonexistentFile.cs", CancellationToken.None)); 2188Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2191Assert.True(await EditSession.HasChangesAsync(solution, solution.RemoveProject(projectD.Id), CancellationToken.None)); 2199Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2202Assert.False(await EditSession.HasChangesAsync(solution, oldSolution, CancellationToken.None)); 2274Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2275Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, pathX, CancellationToken.None)); 2278Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, generatedDocument.FilePath, CancellationToken.None)); 2284await EditSession.GetChangedDocumentsAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), CancellationToken.None).ToImmutableArrayAsync(CancellationToken.None)); 2287await EditSession.GetProjectDifferencesAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), projectDifferences, diagnostics, CancellationToken.None); 2308Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2309Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, pathX, CancellationToken.None)); 2315await EditSession.GetChangedDocumentsAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), CancellationToken.None).ToImmutableArrayAsync(CancellationToken.None)); 2317await EditSession.GetProjectDifferencesAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), projectDifferences, diagnostics, CancellationToken.None); 2336Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2337Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, pathX, CancellationToken.None)); 2340await EditSession.GetChangedDocumentsAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), CancellationToken.None).ToImmutableArrayAsync(CancellationToken.None)); 2342await EditSession.GetProjectDifferencesAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), projectDifferences, diagnostics, CancellationToken.None); 2362Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2363Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, pathX, CancellationToken.None)); 2368await EditSession.GetChangedDocumentsAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), CancellationToken.None).ToImmutableArrayAsync(CancellationToken.None)); 2370await EditSession.GetProjectDifferencesAsync(log, oldSolution.GetProject(projectId), solution.GetProject(projectId), projectDifferences, diagnostics, CancellationToken.None); 2423var generatedDocuments = await project.Solution.CompilationState.GetSourceGeneratedDocumentStatesAsync(project.State, CancellationToken.None); 2425var generatedText = generatedDocuments.States.Single().Value.GetTextSynchronously(CancellationToken.None).ToString(); 2429var generatorDiagnostics = await solution.CompilationState.GetSourceGeneratorDiagnosticsAsync(project.State, CancellationToken.None); 2447Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2450AssertEx.Empty(await EditSession.GetChangedDocumentsAsync(log, oldProject, project, CancellationToken.None).ToImmutableArrayAsync(CancellationToken.None)); 2453await EditSession.GetProjectDifferencesAsync(log, oldProject, project, diffences, diagnostics, CancellationToken.None); 2460generatedDocuments = await solution.CompilationState.GetSourceGeneratedDocumentStatesAsync(project.State, CancellationToken.None); 2463generatorDiagnostics = await solution.CompilationState.GetSourceGeneratorDiagnosticsAsync(project.State, CancellationToken.None); 2486Assert.True(await EditSession.HasChangesAsync(oldSolution, solution, CancellationToken.None)); 2487Assert.False(await EditSession.HasChangesAsync(oldSolution, solution, sourceFilePath: sourcePath, CancellationToken.None)); 2506Assert.True(await EditSession.HasChangesAsync(solution0, solution1, CancellationToken.None)); 2510Assert.True(await EditSession.HasChangesAsync(solution1, solution2, CancellationToken.None)); 2514Assert.True(await EditSession.HasChangesAsync(solution2, solution3, CancellationToken.None)); 2548var results = await debuggingSession.EmitSolutionUpdateAsync(solution, runningProjects, s_noActiveSpans, CancellationToken.None); 2589var results = await debuggingSession.EmitSolutionUpdateAsync(solution, runningProjects, s_noActiveSpans, CancellationToken.None); 2654var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [documentAId, documentBId], CancellationToken.None); 2664var currentSpans = await debuggingSession.GetAdjustedActiveStatementSpansAsync(documentB2, (_, _, _) => new(trackedActiveSpans), CancellationToken.None); 2669var diagnostics = await service.GetDocumentDiagnosticsAsync(documentB2, s_noActiveSpans, CancellationToken.None); 2710var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 2718diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 2738diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 2747diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 2763diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 2860var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 2893var diagnostics1 = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 3060var diagnostics = await service.GetDocumentDiagnosticsAsync(document3, s_noActiveSpans, CancellationToken.None); 3077var (doc, state) = await debuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(currentDocument, CancellationToken.None); 3143var diagnostics = await service.GetDocumentDiagnosticsAsync(document1, s_noActiveSpans, CancellationToken.None); 3200var diagnostics = await service.GetDocumentDiagnosticsAsync(document3, s_noActiveSpans, CancellationToken.None); 3233var diagnostics1 = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 3567var docDiagnostics = await service.GetDocumentDiagnosticsAsync(documentB, s_noActiveSpans, CancellationToken.None); 3648var diagnostics = await service.GetDocumentDiagnosticsAsync(documentB, s_noActiveSpans, CancellationToken.None); 3660var results = await debuggingSession.EmitSolutionUpdateAsync(solution, runningProjects, s_noActiveSpans, CancellationToken.None); 3702_ = await solution.Projects.Single().GetCompilationAsync(CancellationToken.None); 3759_ = await solution.Projects.Single().GetCompilationAsync(CancellationToken.None); 4057var diagnostics1 = await service.GetDocumentDiagnosticsAsync(document2, s_noActiveSpans, CancellationToken.None); 4101var diagnostics = await service.GetDocumentDiagnosticsAsync(solution.GetDocument(documentId), s_noActiveSpans, CancellationToken.None); 4517var sourceTextV1 = document1.GetTextSynchronously(CancellationToken.None); 4530Assert.True((await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [document1.Id], CancellationToken.None)).IsDefault); 4553var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [document1.Id], CancellationToken.None); 4562var currentSpans = await debuggingSession.GetAdjustedActiveStatementSpansAsync(document1, (_, _, _) => new(trackedActiveSpans1), CancellationToken.None); 4574currentSpans = await debuggingSession.GetAdjustedActiveStatementSpansAsync(document2, (_, _, _) => new(trackedActiveSpans2), CancellationToken.None); 4597var sourceTextV1 = await document1.GetTextAsync(CancellationToken.None); 4626var baseSpans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [documentId], CancellationToken.None)).Single(); 4638var currentSpans = await debuggingSession.GetAdjustedActiveStatementSpansAsync(document2, (_, _, _) => ValueTask.FromResult(baseSpans), CancellationToken.None); 4674var currentSpans = await debuggingSession.GetAdjustedActiveStatementSpansAsync(document, s_noActiveSpans, CancellationToken.None); 4677var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [document.Id], CancellationToken.None); 4683baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [document.Id], CancellationToken.None); 4742var baseActiveStatementsMap = await debuggingSession.EditSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 4773var spans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [doc1.Id, doc2.Id, docId3, docId4, docId5], CancellationToken.None); 4846var baseActiveStatementMap = await debuggingSession.EditSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 4865var baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [document.Id], CancellationToken.None); 4872baseSpans = await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [document.Id], CancellationToken.None); 5030var docDiagnostics = await service.GetDocumentDiagnosticsAsync(document, s_noActiveSpans, CancellationToken.None); 5050docDiagnostics = await service.GetDocumentDiagnosticsAsync(document, s_noActiveSpans, CancellationToken.None); 5168var spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [documentId], CancellationToken.None)).Single(); 5257var spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [documentId], CancellationToken.None)).Single(); 5283spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [documentId], CancellationToken.None)).Single(); 5292var diagnostics = await service.GetDocumentDiagnosticsAsync(document1, s_noActiveSpans, CancellationToken.None); 5381var spans = (await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [documentId], CancellationToken.None)).Single(); 5506CancellationToken.None); 5510var result1 = await encService.EmitSolutionUpdateAsync(sessionId, solution1, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_noActiveSpans, CancellationToken.None); 5517var result2 = await encService.EmitSolutionUpdateAsync(sessionId, solution2, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_noActiveSpans, CancellationToken.None); 5540await Assert.ThrowsAsync<ObjectDisposedException>(async () => await debuggingSession.EmitSolutionUpdateAsync(solution, runningProjects: ImmutableDictionary<ProjectId, RunningProjectOptions>.Empty, s_noActiveSpans, CancellationToken.None)); 5547Assert.Empty(await debuggingSession.GetDocumentDiagnosticsAsync(document, s_noActiveSpans, CancellationToken.None)); 5548Assert.Empty(await debuggingSession.GetAdjustedActiveStatementSpansAsync(document, s_noActiveSpans, CancellationToken.None)); 5549Assert.True((await debuggingSession.GetBaseActiveStatementSpansAsync(solution, [], CancellationToken.None)).IsDefault);
EditAndContinue\EditSessionActiveStatementsTests.cs (9)
189var baseActiveStatementsMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 235var oldActiveStatements1 = await baseActiveStatementsMap.GetOldActiveStatementsAsync(analyzer, document1, CancellationToken.None).ConfigureAwait(false); 243var oldActiveStatements2 = await baseActiveStatementsMap.GetOldActiveStatementsAsync(analyzer, document2, CancellationToken.None).ConfigureAwait(false); 353var baseActiveStatementMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 368var oldActiveStatements = await baseActiveStatementMap.GetOldActiveStatementsAsync(analyzer, document, CancellationToken.None).ConfigureAwait(false); 533var baseActiveStatementMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 551var oldActiveStatements = await baseActiveStatementMap.GetOldActiveStatementsAsync(analyzer, document, CancellationToken.None).ConfigureAwait(false); 674var baseActiveStatementMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 703var oldActiveStatements = await baseActiveStatementMap.GetOldActiveStatementsAsync(analyzer, document, CancellationToken.None).ConfigureAwait(false);
EditAndContinue\EmitSolutionUpdateResultsTests.cs (1)
79var tree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None);
EditAndContinue\RemoteEditAndContinueServiceTests.cs (17)
93var syntaxTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 154CancellationToken.None); 165await sessionProxy.BreakStateOrCapabilitiesChangedAsync(inBreakState: true, CancellationToken.None); 167var activeStatement = (await remoteDebuggeeModuleMetadataProvider!.GetActiveStatementsAsync(CancellationToken.None)).Single(); 172var availability = await remoteDebuggeeModuleMetadataProvider!.GetAvailabilityAsync(moduleId1, CancellationToken.None); 204var syntaxTree = solution.GetRequiredDocument(documentId).GetSyntaxTreeSynchronously(CancellationToken.None)!; 226var results = await sessionProxy.EmitSolutionUpdateAsync(localWorkspace.CurrentSolution, runningProjects1, activeStatementSpanProvider, CancellationToken.None); 255await sessionProxy.CommitSolutionUpdateAsync(CancellationToken.None); 261await sessionProxy.DiscardSolutionUpdateAsync(CancellationToken.None); 274var baseActiveSpans = await sessionProxy.GetBaseActiveStatementSpansAsync(localWorkspace.CurrentSolution, [documentId, inProcOnlyDocumentId], CancellationToken.None); 282AssertEx.Equal(activeSpans1, activeStatementSpanProvider(documentId, "test.cs", CancellationToken.None).AsTask().Result); 286Assert.Empty(await sessionProxy.GetAdjustedActiveStatementSpansAsync(inProcOnlyDocument, activeStatementSpanProvider, CancellationToken.None)); 288var documentActiveSpans = await sessionProxy.GetAdjustedActiveStatementSpansAsync(document, activeStatementSpanProvider, CancellationToken.None); 295documentActiveSpans = await sessionProxy.GetAdjustedActiveStatementSpansAsync(document, activeStatementSpanProvider, CancellationToken.None); 302Assert.Empty(await proxy.GetDocumentDiagnosticsAsync(inProcOnlyDocument, activeStatementSpanProvider, CancellationToken.None)); 303Assert.Equal(diagnostic.GetMessage(), (await proxy.GetDocumentDiagnosticsAsync(document, activeStatementSpanProvider, CancellationToken.None)).Single().Message); 307await sessionProxy.EndDebuggingSessionAsync(CancellationToken.None);
EditAndContinue\UnitTestingHotReloadServiceTests.cs (4)
48await hotReload.StartSessionAsync(solution, ["Baseline", "AddDefinitionToExistingType", "NewTypeDefinition"], CancellationToken.None); 61var result = await hotReload.EmitSolutionUpdateAsync(solution, commitUpdates: true, CancellationToken.None); 68result = await hotReload.EmitSolutionUpdateAsync(solution, commitUpdates: true, CancellationToken.None); 78result = await hotReload.EmitSolutionUpdateAsync(solution, commitUpdates: true, CancellationToken.None);
EditAndContinue\WatchHotReloadServiceTests.cs (11)
67await hotReload.StartSessionAsync(solution, CancellationToken.None); 80var result = await hotReload.GetUpdatesAsync(solution, runningProjects: ImmutableDictionary<ProjectId, WatchHotReloadService.RunningProjectInfo>.Empty, CancellationToken.None); 94result = await hotReload.GetUpdatesAsync(solution, runningProjects: ImmutableDictionary<ProjectId, WatchHotReloadService.RunningProjectInfo>.Empty, CancellationToken.None); 109result = await hotReload.GetUpdatesAsync(solution, runningProjects, CancellationToken.None); 128result = await hotReload.GetUpdatesAsync(solution, runningProjects, CancellationToken.None); 142result = await hotReload.GetUpdatesAsync(solution, runningProjects, CancellationToken.None); 195var generatedDocuments = await project.Solution.CompilationState.GetSourceGeneratedDocumentStatesAsync(project.State, CancellationToken.None); 197var generatedText = generatedDocuments.States.Single().Value.GetTextSynchronously(CancellationToken.None).ToString(); 201var generatorDiagnostics = await solution.CompilationState.GetSourceGeneratorDiagnosticsAsync(project.State, CancellationToken.None); 206await hotReload.StartSessionAsync(solution, CancellationToken.None); 213var result = await hotReload.GetUpdatesAsync(solution, runningProjects, CancellationToken.None);
FindUsages\DefinitionItemFactoryTests.cs (29)
140var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(a, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 176var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(m, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 218var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(m, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 254var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(m, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 296var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(symbol, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 338var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(n, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 391var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(n, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 445var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(symbol, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 485var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(symbol, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 525var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(c, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 567var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(c, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 625var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(c, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 671var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(c, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 711var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(tuple, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 773var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(tuple, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 829var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(type, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 883var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(type, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 943var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(p, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 987var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(m, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1042var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(m, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1094var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(p, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1158var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(g, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1215var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(g, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1270var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(p, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1350var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(p, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1409var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(p, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1461var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(f, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1528var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(x, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None); 1599var item = await DefinitionItemFactory.ToClassifiedDefinitionItemAsync(r, classificationOptions, solution, searchOptions, isPrimary: true, includeHiddenLocations: true, CancellationToken.None);
Microsoft.CodeAnalysis.InteractiveHost (10)
Interactive\Core\InteractiveHost.Service.cs (2)
757? script.RunAsync(serviceState.Globals, catchException: e => true, cancellationToken: CancellationToken.None) 758: script.RunFromAsync(state, catchException: e => true, cancellationToken: CancellationToken.None);
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
Microsoft.CodeAnalysis.LanguageServer (18)
FileBasedPrograms\VirtualProjectXmlProvider.cs (2)
41using (await _gate.DisposableWaitAsync(CancellationToken.None)) 64using (await _gate.DisposableWaitAsync(CancellationToken.None))
HostWorkspace\FileWatching\LspFileChangeWatcher.cs (2)
260await _changeWatcher._clientLanguageServerManager.SendRequestAsync("client/unregisterCapability", unregistrationParams, CancellationToken.None); 267}, CancellationToken.None, TaskContinuationOptions.OnlyOnRanToCompletion, TaskScheduler.Default).Unwrap().ReportNonFatalErrorAsync().CompletesAsyncOperation(asyncToken);
HostWorkspace\LanguageServerProjectLoader.cs (4)
115CancellationToken.None); // TODO: do we need to introduce a shutdown cancellation token for this? 409using (await _gate.DisposableWaitAsync(CancellationToken.None)) 432using (await _gate.DisposableWaitAsync(CancellationToken.None)) 449using (await _gate.DisposableWaitAsync(CancellationToken.None))
HostWorkspace\LanguageServerProjectSystem.cs (1)
61var (_, projects) = await SolutionFileReader.ReadSolutionFileAsync(solutionFilePath, DiagnosticReportingMode.Throw, CancellationToken.None);
HostWorkspace\LanguageServerWorkspaceFactory.cs (2)
54CancellationToken.None); // TODO: do we need to introduce a shutdown cancellation token for this? 63miscellaneousFilesWorkspace, fileChangeWatcher, static (_, _) => Task.CompletedTask, _ => { }, CancellationToken.None);
HostWorkspace\LoadedProject.cs (1)
126var disposableBatchScope = await _projectSystemProject.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false);
HostWorkspace\ProjectInitializationHandler.cs (1)
49await languageServerManager.SendNotificationAsync(ProjectInitializationCompleteName, CancellationToken.None);
HostWorkspace\WorkspaceProjectFactoryService.cs (1)
58await workspaceProject.SetBuildSystemPropertiesAsync(creationInfo.BuildSystemProperties, CancellationToken.None);
Logging\LspLogMessageLogger.cs (1)
84}, CancellationToken.None);
Program.cs (2)
43return await command.Parse(args).InvokeAsync(invocationConfiguration, CancellationToken.None); 94await Task.Delay(100, CancellationToken.None);
Testing\TestRunner.DebugTestHostLauncher.cs (1)
21return AttachDebugger(pid, CancellationToken.None);
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Handler\ServerLifetime\LspServiceLifeCycleManager.cs (1)
44var cancellationToken = CancellationToken.None;
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (2)
178_ = resultTask.ContinueWith(_ => combinedTokenSource.Dispose(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); 400}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
Workspaces\LspWorkspaceManager.cs (1)
589return _manager._lspMiscellaneousFilesWorkspaceProvider!.IsMiscellaneousFilesDocumentAsync(document, CancellationToken.None);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (208)
CodeActions\CodeActionResolveTests.cs (1)
519LSP.Methods.CodeActionResolveName, unresolvedCodeAction, CancellationToken.None);
CodeActions\CodeActionsTests.cs (2)
308LSP.Methods.TextDocumentCodeActionName, codeActionParams, CancellationToken.None); 317LSP.Methods.CodeActionResolveName, codeAction, CancellationToken.None);
CodeActions\RunCodeActionsTests.cs (1)
75LSP.Methods.WorkspaceExecuteCommandName, command, CancellationToken.None);
CodeLens\AbstractCodeLensTests.cs (4)
30var actualCodeLenses = await testLspServer.ExecuteRequestAsync<LSP.CodeLensParams, LSP.CodeLens[]?>(LSP.Methods.TextDocumentCodeLensName, codeLensParams, CancellationToken.None); 48var resolvedCodeLens = await testLspServer.ExecuteRequestAsync<LSP.CodeLens, LSP.CodeLens>(LSP.Methods.CodeLensResolveName, matchingCodeLens, CancellationToken.None); 65var actualCodeLenses = await testLspServer.ExecuteRequestAsync<LSP.CodeLensParams, LSP.CodeLens[]?>(LSP.Methods.TextDocumentCodeLensName, codeLensParams, CancellationToken.None); 88var actualCodeLenses = await testLspServer.ExecuteRequestAsync<LSP.CodeLensParams, LSP.CodeLens[]?>(LSP.Methods.TextDocumentCodeLensName, codeLensParams, CancellationToken.None);
CodeLens\CSharpCodeLensTests.cs (2)
436var actualCodeLenses = await testLspServer.ExecuteRequestAsync<LSP.CodeLensParams, LSP.CodeLens[]?>(LSP.Methods.TextDocumentCodeLensName, codeLensParamsDoc1, CancellationToken.None); 446var firstDocumentResult2 = Assert.ThrowsAsync<StreamJsonRpc.RemoteInvocationException>(async () => await testLspServer.ExecuteRequestAsync<LSP.CodeLens, LSP.CodeLens>(LSP.Methods.CodeLensResolveName, firstCodeLens, CancellationToken.None));
Commands\ExecuteWorkspaceCommandTests.cs (1)
41var response = await server.ExecuteRequestAsync<ExecuteCommandParams, object>(Methods.WorkspaceExecuteCommandName, request, CancellationToken.None);
Completion\CompletionFeaturesTests.cs (28)
94var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 128var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 150var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false); 215var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 237var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false); 279var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 300var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false); 343var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 366results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 421var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 471var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 540var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 562var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false); 665var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 709var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 725var resolvedItem1 = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, itemFromNS1, CancellationToken.None).ConfigureAwait(false); 733var resolvedItem2 = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, itemFromNS2, CancellationToken.None).ConfigureAwait(false); 772var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 806var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 821results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 859var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 875results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false); 975var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 979var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false); 1045var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 1052var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false); 1103var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None); 1118results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None);
Completion\CompletionResolveTests.cs (3)
199document, new TestCaretOutOfScopeCompletionService(testLspServer.TestWorkspace.Services.SolutionServices), selectedItem, snippetsSupported: true, insertNewPositionPlaceholder: true, CancellationToken.None).ConfigureAwait(false); 399completionItem, CancellationToken.None); 483completionParams, CancellationToken.None);
Completion\CompletionTests.cs (1)
1604completionParams, CancellationToken.None);
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
102await server.ExecuteRequestAsync<DidChangeConfigurationParams, object>(Methods.WorkspaceDidChangeConfigurationName, new DidChangeConfigurationParams(), CancellationToken.None).ConfigureAwait(false);
DataTips\DataTipRangeHandlerTests.cs (1)
27CancellationToken.None);
Definitions\GoToDefinitionTests.cs (1)
380CreateTextDocumentPositionParams(caret), CancellationToken.None);
Definitions\GoToTypeDefinitionTests.cs (2)
291CreateTextDocumentPositionParams(caret), CancellationToken.None); 296var (lspWorkspace, _, _) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = fileUri }, CancellationToken.None);
Diagnostics\AbstractPullDiagnosticTestsBase.cs (4)
93CancellationToken.None).ConfigureAwait(false); 127CancellationToken.None).ConfigureAwait(false); 260CancellationToken.None).ConfigureAwait(false); 277CancellationToken.None).ConfigureAwait(false);
Diagnostics\BuildOnlyDiagnosticIdsHandlerTests.cs (2)
29CancellationToken.None); 45CancellationToken.None);
Diagnostics\PullDiagnosticTests.cs (4)
662var text = tree.GetText(CancellationToken.None).ToString(); 700var workspaceText = await document.GetTextAsync(CancellationToken.None); 1295var openDocumentDiagnostic2 = await CreateDocumentDiagnostic("ENC_OPEN_DOC2", openDocument).ToDiagnosticAsync(project, CancellationToken.None); 2266var text = await testLspServer.GetCurrentSolution().GetDocument(documentId)!.GetTextAsync(CancellationToken.None);
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (3)
43Assert.Equal(documentText, document.GetTextSynchronously(CancellationToken.None).ToString()); 96""", document.GetTextSynchronously(CancellationToken.None).ToString()); 106var (_, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new TextDocumentIdentifier { DocumentUri = uri }, CancellationToken.None).ConfigureAwait(false);
FoldingRanges\FoldingRangesTests.cs (1)
89request, CancellationToken.None);
FormatNewFile\FormatNewFileTests.cs (1)
82return await testLspServer.ExecuteRequestAsync<FormatNewFileParams, string?>(FormatNewFileHandler.FormatNewFileMethodName, parameters, CancellationToken.None);
Formatting\FormatDocumentOnTypeTests.cs (1)
115CancellationToken.None);
Formatting\FormatDocumentRangeTests.cs (1)
92CancellationToken.None);
Formatting\FormatDocumentTests.cs (1)
315CreateDocumentFormattingParams(uri, insertSpaces, tabSize), CancellationToken.None);
HandlerTests.cs (12)
48var response = await server.ExecuteRequestAsync<TestRequestTypeOne, string>(TestDocumentHandler.MethodName, request, CancellationToken.None); 57var response = await server.ExecuteRequest0Async<string>(TestRequestHandlerWithNoParams.MethodName, CancellationToken.None); 95var response = await server.ExecuteRequestAsync<TestRequestTypeOne, string>(TestDocumentHandler.MethodName, request, CancellationToken.None); 108var response = await server.ExecuteRequestAsync<TestRequestTypeTwo, string>(TestDocumentHandler.MethodName, request, CancellationToken.None); 123await Assert.ThrowsAsync<StreamJsonRpc.RemoteInvocationException>(async () => await server.ExecuteRequestAsync<TestRequestTypeThree, string>(TestNonMutatingDocumentHandler.MethodName, request, CancellationToken.None)); 133await Assert.ThrowsAnyAsync<Exception>(async () => await server.ExecuteRequestAsync<TestRequestTypeThree, string>(TestDocumentHandler.MethodName, request, CancellationToken.None)); 160=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 188=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 216=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 246=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 274=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 293await Assert.ThrowsAnyAsync<Exception>(async () => await testLspServer.ExecuteRequestAsync<TestRequestTypeOne, string>(TestDocumentHandler.MethodName, request, CancellationToken.None)).ConfigureAwait(false);
Highlights\DocumentHighlightTests.cs (1)
104CreateTextDocumentPositionParams(caret), CancellationToken.None);
Hover\HoverTests.cs (1)
609CreateTextDocumentPositionParams(caret, projectContext), CancellationToken.None);
Initialize\LocaleTests.cs (5)
32var result = await testLspServer.ExecuteRequestAsync<Request, Response>(LocaleTestHandler.MethodName, new Request(), CancellationToken.None); 49var resultOne = await testLspServerOne.ExecuteRequestAsync<Request, Response>(LocaleTestHandler.MethodName, new Request(), CancellationToken.None); 50var resultTwo = await testLspServerTwo.ExecuteRequestAsync<Request, Response>(LocaleTestHandler.MethodName, new Request(), CancellationToken.None); 64var result = await testLspServer.ExecuteRequestAsync<Request, Response>(LocaleTestHandler.MethodName, new Request(), CancellationToken.None); 77var result = await testLspServer.ExecuteRequestAsync<Request, Response>(LocaleTestHandler.MethodName, new Request(), CancellationToken.None);
InlayHint\AbstractInlayHintTests.cs (3)
27var text = await document.GetTextAsync(CancellationToken.None); 36var actualInlayHints = await testLspServer.ExecuteRequestAsync<LSP.InlayHintParams, LSP.InlayHint[]?>(LSP.Methods.TextDocumentInlayHintName, inlayHintParams, CancellationToken.None); 60var resolvedInlayHint = await testLspServer.ExecuteRequestAsync<LSP.InlayHint, LSP.InlayHint>(LSP.Methods.InlayHintResolveName, matchingInlayHint, CancellationToken.None);
InlayHint\CSharpInlayHintTests.cs (5)
123var actualInlayHints = await testLspServer.ExecuteRequestAsync<LSP.InlayHintParams, LSP.InlayHint[]?>(LSP.Methods.TextDocumentInlayHintName, inlayHintParams, CancellationToken.None); 135await testLspServer.ExecuteRequestAsync<LSP.InlayHintParams, LSP.InlayHint[]?>(LSP.Methods.TextDocumentInlayHintName, inlayHintParams, CancellationToken.None); 136await testLspServer.ExecuteRequestAsync<LSP.InlayHintParams, LSP.InlayHint[]?>(LSP.Methods.TextDocumentInlayHintName, inlayHintParams, CancellationToken.None); 137var lastInlayHints = await testLspServer.ExecuteRequestAsync<LSP.InlayHintParams, LSP.InlayHint[]?>(LSP.Methods.TextDocumentInlayHintName, inlayHintParams, CancellationToken.None); 145var firstResolvedHint = await testLspServer.ExecuteRequestAsync<LSP.InlayHint, LSP.InlayHint>(LSP.Methods.InlayHintResolveName, firstInlayHint, CancellationToken.None);
InlineCompletions\InlineCompletionsTests.cs (1)
274LSP.VSInternalMethods.TextDocumentInlineCompletionName, request, CancellationToken.None);
LanguageServerTargetTests.cs (3)
88await server.ExecuteRequestAsync<InitializedParams, object>(Methods.InitializedName, initializedParams, CancellationToken.None); 101await server.ExecuteRequestAsync<DidOpenTextDocumentParams, object>(Methods.TextDocumentDidOpenName, didOpenParams, CancellationToken.None); 117var ex = await Assert.ThrowsAsync<RemoteInvocationException>(async () => await server.ExecuteRequestAsync<DidOpenTextDocumentParams, object>(Methods.TextDocumentDidOpenName, didOpenParams, CancellationToken.None));
MapCode\MapCodeTests.cs (1)
98var results = await testLspServer.ExecuteRequestAsync<LSP.VSInternalMapCodeParams, LSP.WorkspaceEdit>(VSInternalMethods.WorkspaceMapCodeName, mapCodeParams, CancellationToken.None);
Metadata\LspMetadataAsSourceWorkspaceTests.cs (5)
43CreateTextDocumentPositionParams(location), CancellationToken.None); 80CreateTextDocumentPositionParams(location), CancellationToken.None); 113CreateTextDocumentPositionParams(locationOfStringKeyword), CancellationToken.None); 122var (lspWorkspace, _, _) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = fileUri }, CancellationToken.None); 128var docs = await testLspServer.GetManagerAccessor().GetMiscellaneousDocumentsAsync(static p => p.Documents).ToImmutableArrayAsync(CancellationToken.None);
OnAutoInsert\OnAutoInsertTests.cs (1)
390CreateDocumentOnAutoInsertParams(characterTyped, locationTyped, insertSpaces, tabSize), CancellationToken.None);
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (2)
174var treeWithConfig = projectWithConfig.Documents.Single().GetSyntaxTreeSynchronously(CancellationToken.None); 213var treeWithoutConfig = projectWithoutConfig.Documents.Single().GetSyntaxTreeSynchronously(CancellationToken.None);
Ordering\RequestOrderingTests.cs (3)
264await testLspServer.ExecuteRequestAsync<LSP.DidOpenTextDocumentParams, object>(Methods.TextDocumentDidOpenName, didOpenParams, CancellationToken.None); 270var response = await testLspServer.ExecuteRequestAsync<TestRequest, TestResponse>(request.MethodName, request, CancellationToken.None); 274var (_, solution) = await testLspServer.GetManager().GetLspSolutionInfoAsync(CancellationToken.None).ConfigureAwait(false);
ProjectContext\GetTextDocumentWithContextHandlerTests.cs (1)
109CreateGetProjectContextParams(uri), cancellationToken: CancellationToken.None);
ProtocolConversionsTests.cs (1)
341var (_, _, textDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new TextDocumentIdentifier { DocumentUri = uri }, CancellationToken.None);
References\FindAllReferencesHandlerTests.cs (2)
400CreateReferenceParams(caret, progress), CancellationToken.None); 417CreateReferenceParams(caret, progress), CancellationToken.None);
References\FindImplementationsTests.cs (1)
167CreateTextDocumentPositionParams(caret), CancellationToken.None);
RelatedDocuments\RelatedDocumentsTests.cs (1)
35CancellationToken.None).ConfigureAwait(false);
Rename\PrepareRenameTests.cs (1)
104return await testLspServer.ExecuteRequestAsync<LSP.PrepareRenameParams, LSP.Range?>(LSP.Methods.TextDocumentPrepareRenameName, prepareRenameParams, CancellationToken.None);
Rename\RenameTests.cs (3)
320var renameLocation = await ProtocolConversions.TextSpanToLocationAsync(generatedDocument, spans["caret"].First(), isStale: false, CancellationToken.None); 363var renameLocation = await ProtocolConversions.TextSpanToLocationAsync(generatedDocument, spans["caret"].First(), isStale: false, CancellationToken.None); 384return await testLspServer.ExecuteRequestAsync<LSP.RenameParams, LSP.WorkspaceEdit>(LSP.Methods.TextDocumentRenameName, renameParams, CancellationToken.None);
SemanticTokens\AbstractSemanticTokensTests.cs (3)
32CreateSemanticTokensFullParams(caret), CancellationToken.None); 40CreateSemanticTokensRangeParams(location), CancellationToken.None); 48CreateSemanticTokensRangesParams(caret, ranges!), CancellationToken.None);
SemanticTokens\SemanticTokensRangeTests.cs (6)
130document, spans, isVS, options, CancellationToken.None); 186document, spans, isVS, options, CancellationToken.None); 238document, spans, isVS, options, CancellationToken.None); 299document, spans, isVS, options, CancellationToken.None); 382document, spans, isVS, options, CancellationToken.None); 493document, spans: [text.Lines.GetLinePositionSpan(new(0, text.Length))], isVS, options: options, cancellationToken: CancellationToken.None);
SignatureHelp\SignatureHelpTests.cs (1)
110CreateTextDocumentPositionParams(caret), CancellationToken.None);
SimplifyMethod\SimplifyMethodTests.cs (1)
52return await testLspServer.ExecuteRequestAsync<SimplifyMethodParams, TextEdit[]>(SimplifyMethodHandler.SimplifyMethodMethodName, @params, CancellationToken.None);
SpellCheck\SpellCheckTests.cs (4)
210var (_, lspSolution) = await testLspServer.GetManager().GetLspSolutionInfoAsync(CancellationToken.None).ConfigureAwait(false); 513var (_, lspSolution) = await testLspServer.GetManager().GetLspSolutionInfoAsync(CancellationToken.None).ConfigureAwait(false); 622CancellationToken.None).ConfigureAwait(false); 643CancellationToken.None).ConfigureAwait(false);
Symbols\DocumentSymbolsTests.cs (1)
230request, CancellationToken.None);
Symbols\WorkspaceSymbolsTests.cs (1)
243request, CancellationToken.None);
UriTests.cs (23)
53var (_, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = looseFileUri }, CancellationToken.None); 79var (_, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = looseFileUri }, CancellationToken.None); 111var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = expectedDocumentUri }, CancellationToken.None); 122var (_, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = lowercaseUri }, CancellationToken.None); 149var (workspace, _, fileDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = fileDocumentUri }, CancellationToken.None); 156var (gitWorkspace, _, gitDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = gitDocumentUri }, CancellationToken.None); 185var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = unencodedUri }, CancellationToken.None).ConfigureAwait(false); 189var originalText = await lspDocument.GetTextAsync(CancellationToken.None); 196new CustomResolveParams(new LSP.TextDocumentIdentifier { DocumentUri = encodedUri }), CancellationToken.None); 200var (encodedWorkspace, _, encodedDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = encodedUri }, CancellationToken.None).ConfigureAwait(false); 204var encodedText = await encodedDocument.GetTextAsync(CancellationToken.None); 233var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false); 237var originalText = await lspDocument.GetTextAsync(CancellationToken.None); 242new CustomResolveParams(new LSP.TextDocumentIdentifier { DocumentUri = lowerCaseUri }), CancellationToken.None); 246var (lowerCaseWorkspace, _, lowerCaseDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = lowerCaseUri }, CancellationToken.None).ConfigureAwait(false); 250var lowerCaseText = await lowerCaseDocument.GetTextAsync(CancellationToken.None); 279var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false); 283var originalText = await lspDocument.GetTextAsync(CancellationToken.None); 289new CustomResolveParams(new LSP.TextDocumentIdentifier { DocumentUri = lowerCaseUri }), CancellationToken.None)); 303var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = looseFileUri }, CancellationToken.None); 315new CustomResolveParams(new LSP.TextDocumentIdentifier { DocumentUri = looseFileUri }), CancellationToken.None)); 345new CustomResolveParams(new LSP.TextDocumentIdentifier { DocumentUri = invalidUri }), CancellationToken.None); 351var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = invalidUri }, CancellationToken.None);
ValidateBreakableRange\ValidateBreakableRangeTests.cs (1)
268CancellationToken.None);
Workspaces\LspWorkspaceManagerTests.cs (31)
37Assert.Equal("LSP text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 43Assert.Equal("More textLSP text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 63var firstDocumentInitialVersion = await firstDocument.GetSyntaxVersionAsync(CancellationToken.None); 64var secondDocumentInitialVersion = await secondDocument.GetSyntaxVersionAsync(CancellationToken.None); 93Assert.NotEqual(firstDocumentInitialVersion, await firstDocumentWithChange.GetSyntaxVersionAsync(CancellationToken.None)); 94Assert.Equal($"Some more text{markupOne}", (await firstDocumentWithChange.GetTextAsync(CancellationToken.None)).ToString()); 97Assert.Equal(secondDocumentInitialVersion, await secondDocumentUnchanged.GetSyntaxVersionAsync(CancellationToken.None)); 124Assert.Equal("LSP text", (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 162Assert.Equal(markup, (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 195Assert.Equal("LSP text", (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 354var changedFirstDocumentText = await changedFirstDocument.GetTextAsync(CancellationToken.None); 355var firstDocumentText = await firstDocument.GetTextAsync(CancellationToken.None); 450Assert.Equal("Server one text", (await documentServerTwo.GetTextAsync(CancellationToken.None)).ToString()); 454Assert.Equal("Original text", (await documentServerTwo.GetTextAsync(CancellationToken.None)).ToString()); 486Assert.Equal("Text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 511Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 521(await document1.GetTextAsync(CancellationToken.None)).ToString(), 530Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 534(await document1.GetTextAsync(CancellationToken.None)).ToString(), 538Assert.Empty(await testLspServer.GetManagerAccessor().GetMiscellaneousDocumentsAsync(static p => p.Documents).ToImmutableArrayAsync(CancellationToken.None)); 548Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 569Assert.Equal("Text", (await document.GetTextAsync(CancellationToken.None)).ToString()); 583Assert.Equal("Text", (await document.GetTextAsync(CancellationToken.None)).ToString()); 608var originalSourceText = await originalDocument.GetTextAsync(CancellationToken.None); 609var originalRoot = await originalDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 619var newSourceText = await newDocument.GetTextAsync(CancellationToken.None); 620var newRoot = await newDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 706Assert.Equal(generatorText, (await sourceGeneratedDocument.GetTextAsync(CancellationToken.None)).ToString()); 717Assert.Equal(openText, (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 728var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(CreateTextDocumentIdentifier(uri), CancellationToken.None).ConfigureAwait(false); 734return testLspServer.GetManager().GetLspSolutionInfoAsync(CancellationToken.None);
Workspaces\SourceGeneratedDocumentTests.cs (17)
33new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 49new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 74new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 97CreateTextDocumentPositionParams(location), CancellationToken.None); 118new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 134new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 141new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: text.ResultId), CancellationToken.None); 163new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 176new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: text.ResultId), CancellationToken.None); 210new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 220new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: text.ResultId), CancellationToken.None); 249new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 265new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: text.ResultId), CancellationToken.None); 335new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 343new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: text.ResultId), CancellationToken.None); 361new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: null), CancellationToken.None); 373new SourceGeneratorGetTextParams(new LSP.TextDocumentIdentifier { DocumentUri = sourceGeneratorDocumentUri }, ResultId: text.ResultId), CancellationToken.None);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (21)
ServerInitializationTests.cs (3)
29}, CancellationToken.None); 45}, CancellationToken.None); 53}, CancellationToken.None);
TelemetryReporterTests.cs (1)
58service.LogBlockEnd(blockId: 0, [], CancellationToken.None);
Utilities\AbstractLanguageServerHostTests.cs (2)
50var initializeResponse = await testLspServer.ExecuteRequestAsync<InitializeParams, InitializeResult>(Methods.InitializeName, new InitializeParams { Capabilities = clientCapabilities }, CancellationToken.None); 54await testLspServer.ExecuteRequestAsync<InitializedParams, object>(Methods.InitializedName, new InitializedParams(), CancellationToken.None);
Utilities\LanguageServerTestComposition.cs (1)
35var exportProvider = await LanguageServerExportProviderBuilder.CreateExportProviderAsync(TestPaths.GetLanguageServerDirectory(), extensionManager, assemblyLoader, devKitDependencyPath, cacheDirectory, loggerFactory, CancellationToken.None);
Utilities\LspClientExtensions.cs (4)
13=> lspClient.ExecuteRequestAsync<InitializedParams, object>(Methods.InitializedName, new InitializedParams(), CancellationToken.None); 17return await lspClient.ExecuteRequestAsync<InitializeParams, InitializeResult>(Methods.InitializeName, new InitializeParams { Capabilities = clientCapabilities }, CancellationToken.None); 27var result = await lspClient.ExecuteRequestAsync<CodeActionParams, CodeAction[]>(Methods.TextDocumentCodeActionName, codeActionParams, CancellationToken.None); 36var result = (VSInternalCodeAction?)await lspClient.ExecuteRequestAsync<CodeAction, CodeAction>(Methods.CodeActionResolveName, unresolvedCodeAction, CancellationToken.None);
VirtualProjectXmlProviderTests.cs (5)
71var contentNullable = await projectProvider.GetVirtualProjectContentAsync(appFile.Path, LoggerFactory.CreateLogger<VirtualProjectXmlProviderTests>(), CancellationToken.None); 96var contentNullable = await projectProvider.GetVirtualProjectContentAsync(appFile.Path, logger, CancellationToken.None); 128var contentNullable = await projectProvider.GetVirtualProjectContentAsync(appFile.Path, LoggerFactory.CreateLogger<VirtualProjectXmlProviderTests>(), CancellationToken.None); 153var content = await projectProvider.GetVirtualProjectContentAsync(Path.Combine(tempDir.Path, "BAD"), LoggerFactory.CreateLogger<VirtualProjectXmlProviderTests>(), CancellationToken.None); 179var contentNullable = await projectProvider.GetVirtualProjectContentAsync(appFile.Path, LoggerFactory.CreateLogger<VirtualProjectXmlProviderTests>(), CancellationToken.None);
WorkspaceProjectFactoryServiceTests.cs (5)
38CancellationToken.None); 40using var batch = await workspaceProject.StartBatchAsync(CancellationToken.None); 45await workspaceProject.AddSourceFilesAsync([new SourceFileInfo(sourceFilePath, ["Folder"])], CancellationToken.None); 46await workspaceProject.AddAdditionalFilesAsync([new SourceFileInfo(additionalFilePath, FolderNames: ["Folder"])], CancellationToken.None); 47await batch.ApplyAsync(CancellationToken.None);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.PooledObjects.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.PublicApiAnalyzers (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
107CancellationToken.None);
Microsoft.CodeAnalysis.Remote.ServiceHub (12)
Host\RemoteWorkspace.cs (2)
176using (await _gate.DisposableWaitAsync(CancellationToken.None).ConfigureAwait(false)) 334=> _remoteWorkspace.UpdateWorkspaceCurrentSolutionAsync(newSolution, CancellationToken.None);
Host\SolutionAssetCache.cs (3)
64Task.Run(CleanAssetsAsync, CancellationToken.None); 78using (Logger.LogBlock(FunctionId.AssetStorage_TryGetAsset, Checksum.GetChecksumLogInfo, checksum, CancellationToken.None)) 114var cancellationToken = CancellationToken.None;
Host\TestUtils.cs (6)
50var assetMapFromNewSolution = await solutionFromScratch.GetAssetMapAsync(projectConeId, CancellationToken.None).ConfigureAwait(false); 51var assetMapFromIncrementalSolution = await incrementalSolutionBuilt.GetAssetMapAsync(projectConeId, CancellationToken.None).ConfigureAwait(false); 108AssetPath.FullLookupForTesting, checksum, CancellationToken.None).ConfigureAwait(false))); 119AssetPathKind.SolutionCompilationStateChecksums, solutionChecksum, CancellationToken.None).ConfigureAwait(false); 121AssetPathKind.SolutionStateChecksums, solutionCompilationChecksums.SolutionState, CancellationToken.None).ConfigureAwait(false); 129assetPath: projectId, projectChecksum, CancellationToken.None).ConfigureAwait(false);
Services\EditAndContinue\EditAndContinueLogReporter.cs (1)
49CancellationToken.None);
Microsoft.CodeAnalysis.Remote.ServiceHub.UnitTests (2)
TelemetryLoggerTests.cs (2)
67logger.LogBlockStart(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, KeyValueLogMessage.Create(p => p.Add("test", "start"), logLevel: LogLevel.Information), blockId: 1, CancellationToken.None); 72logger.LogBlockEnd(FunctionId.Debugging_EncSession_EditSession_EmitDeltaErrorId, KeyValueLogMessage.Create(p => p.Add("test", "end")), blockId: 1, delta: 100, CancellationToken.None);
Microsoft.CodeAnalysis.Remote.Workspaces (1)
CancellationTokenSourceExtensions.cs (1)
37CancellationToken.None,
Microsoft.CodeAnalysis.ResxSourceGenerator (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Microsoft.CodeAnalysis.Test.Utilities (4)
Compilation\CompilationExtensions.cs (2)
166CancellationToken.None); 209model.ComputeDeclarationsInNode(root, associatedSymbol: null, getSymbol: true, builder: declarationsBuilder, cancellationToken: CancellationToken.None);
Compilation\FlowAnalysis\BasicBlockReachabilityDataFlowAnalyzer.cs (1)
20_ = CustomDataFlowAnalysis<bool>.Run(controlFlowGraph, analyzer, CancellationToken.None);
Diagnostics\DiagnosticExtensions.cs (1)
172var newCompilation = c.GetCompilationWithAnalyzerDiagnostics(analyzers, options, onAnalyzerException, reportSuppressedDiagnostics, includeCompilerDiagnostics: false, CancellationToken.None, out var diagnostics);
Microsoft.CodeAnalysis.Threading.Package (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.UnitTests (3)
Diagnostics\CompilationWithAnalyzersTests.cs (2)
64var analysisResult = compWithAnalyzers.GetAnalysisResultAsync(CancellationToken.None).Result; 68var analyzerTelemetry = compWithAnalyzers.GetAnalyzerTelemetryInfoAsync(analyzer, CancellationToken.None).Result;
Diagnostics\DiagnosticLocalizationTests.cs (1)
314var descriptors = analyzerManager.GetSupportedDiagnosticDescriptors(analyzer, analyzerExecutor, CancellationToken.None);
Microsoft.CodeAnalysis.VisualBasic (9)
CommandLine\VisualBasicCompiler.vb (1)
117CancellationToken.None)
Errors\MessageProvider.vb (1)
126CancellationToken.None, ' We don't have a tree so there's no need to pass cancellation to the SyntaxTreeOptionsProvider
Symbols\Source\SourceFile.vb (1)
135Return GetBoundInformation(CancellationToken.None)
Symbols\Source\SourceMethodSymbol.vb (1)
1446Dim entryPointMethod As MethodSymbol = compilation.GetEntryPoint(CancellationToken.None)
Symbols\Source\SourceModuleSymbol.vb (4)
553EnsureImportsAreBound(CancellationToken.None) 560EnsureImportsAreBound(CancellationToken.None) 568EnsureImportsAreBound(CancellationToken.None) 576EnsureImportsAreBound(CancellationToken.None)
Syntax\VisualBasicSyntaxTree.vb (1)
579Interlocked.CompareExchange(_lazySymbolsMap, ConditionalSymbolsMap.Create(Me.GetRoot(CancellationToken.None), Options), ConditionalSymbolsMap.Uninitialized)
Microsoft.CodeAnalysis.Workspaces (73)
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (1)
151CancellationToken.None);
Shared\TestHooks\AsynchronousOperationListener.cs (6)
85CancellationToken.None, 93using (_gate.DisposableWait(CancellationToken.None)) 158using (_gate.DisposableWait(CancellationToken.None)) 202using (_gate.DisposableWait(CancellationToken.None)) 219using (_gate.DisposableWait(CancellationToken.None)) 230using (_gate.DisposableWait(CancellationToken.None))
Shared\TestHooks\AsynchronousOperationListener+AsyncToken.cs (1)
30using (Listener._gate.DisposableWait(CancellationToken.None))
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (3)
123remoteHostClient = await remoteHostClientProvider.TryGetRemoteHostClientAsync(CancellationToken.None).ConfigureAwait(false); 136CancellationToken.None).ConfigureAwait(false); 141CancellationToken.None).AsTask());
Shared\TestHooks\AsynchronousOperationListenerProvider+NullOperationListener.cs (1)
52CancellationToken.None,
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Telemetry\TelemetryLogging.cs (2)
31_ = PostCollectedTelemetryAsync(CancellationToken.None); 147_ = PostCollectedTelemetryAsync(CancellationToken.None).ReportNonFatalErrorAsync();
TemporaryStorage\TemporaryStorageService.cs (1)
152using (Logger.LogBlock(FunctionId.TemporaryStorageServiceFactory_WriteStream, CancellationToken.None))
TemporaryStorage\TemporaryStorageService.TemporaryStorageStreamHandle.cs (1)
23using (Logger.LogBlock(FunctionId.TemporaryStorageServiceFactory_ReadStream, CancellationToken.None))
Workspace\AdhocWorkspace.cs (9)
154var text = doc.GetTextSynchronously(CancellationToken.None); 167var text = doc.GetTextSynchronously(CancellationToken.None); 168var version = doc.GetTextVersionSynchronously(CancellationToken.None); 182var text = doc.GetTextSynchronously(CancellationToken.None); 195var text = doc.GetTextSynchronously(CancellationToken.None); 196var version = doc.GetTextVersionSynchronously(CancellationToken.None); 210var text = doc.GetTextSynchronously(CancellationToken.None); 223var text = doc.GetTextSynchronously(CancellationToken.None); 224var version = doc.GetTextVersionSynchronously(CancellationToken.None);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
494_project.Id, _project._filePath, projectSystemPath, CancellationToken.None).ConfigureAwait(false);
Workspace\ProjectSystem\ProjectSystemProject.cs (6)
271var isFullyLoadedTask = workspaceStatusService.IsFullyLoadedAsync(CancellationToken.None); 836CancellationToken.None).VerifyCompleted(); 940projectId: Id, projectFilePath: _filePath, filePath: dynamicFilePath, CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None); 1017projectId: Id, projectFilePath: _filePath, filePath: dynamicFilePath, CancellationToken.None).Wait(CancellationToken.None);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
184var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false); 340CancellationToken.None).ConfigureAwait(false);
Workspace\Solution\ProjectState.cs (3)
376return GetAnalyzerOptionsForPath(sourceFilePath, CancellationToken.None); 382=> projectState._analyzerConfigOptionsCache.Lazy.GetValue(CancellationToken.None); 454=> projectState._analyzerConfigOptionsCache.Lazy.GetValue(CancellationToken.None);
Workspace\Solution\SolutionCompilationState.CompilationTracker.CompilationTrackerState.cs (2)
105Contract.ThrowIfTrue(this.CompilationWithoutGeneratedDocuments.SyntaxTrees.Contains(generatedDocument.GetSyntaxTree(CancellationToken.None))); 205Contract.ThrowIfTrue(compilationWithoutGeneratedDocuments.SyntaxTrees.Contains(generatedDocument.GetSyntaxTree(CancellationToken.None)));
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
946if (inProgressState.LazyStaleCompilationWithGeneratedDocuments.GetValue(CancellationToken.None) is Compilation staleCompilationWithGeneratedDocuments)
Workspace\Solution\VersionSource\RecoverableTextAndVersion.RecoverableText.cs (1)
32CancellationToken.None);
Workspace\Workspace.cs (12)
243CancellationToken.None); 491CancellationToken.None); 1558using (Logger.LogBlock(FunctionId.Workspace_ApplyChanges, CancellationToken.None)) 1588var solutionWithLinkedFileChangesMerged = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, solutionChanges, cancellationToken: CancellationToken.None).Result; 1968var text = document.GetTextSynchronously(CancellationToken.None); 1977var text = document.GetTextSynchronously(CancellationToken.None); 1986var text = document.GetTextSynchronously(CancellationToken.None); 2003var currentText = newDoc.GetTextSynchronously(CancellationToken.None); // needs wait 2013var currentText = newDoc.GetTextSynchronously(CancellationToken.None); // needs wait 2035var currentText = newDoc.GetTextSynchronously(CancellationToken.None); // needs wait 2042var textChanges = newDoc.GetTextChangesSynchronously(oldDoc, CancellationToken.None); 2070=> CreateDocumentInfoWithoutText(doc).WithTextLoader(TextLoader.From(TextAndVersion.Create(doc.GetTextSynchronously(CancellationToken.None), VersionStamp.Create(), doc.FilePath)));
Workspace\Workspace_Editor.cs (2)
588var oldText = oldDocument.GetTextSynchronously(CancellationToken.None); 596var version = oldDocument.GetTextVersionSynchronously(CancellationToken.None);
Microsoft.CodeAnalysis.Workspaces.MSBuild (16)
MSBuild\BuildHostProcessManager.cs (1)
511await BuildHost.ShutdownAsync(CancellationToken.None).ConfigureAwait(false);
MSBuild\MSBuildWorkspace.cs (15)
355var buildHost = _applyChangesBuildHostProcessManager.GetBuildHostWithFallbackAsync(projectPath, CancellationToken.None).Result; 356_applyChangesProjectFile = buildHost.LoadProjectFileAsync(projectPath, languageName, CancellationToken.None).Result; 373_applyChangesProjectFile.SaveAsync(CancellationToken.None).Wait(); 477_applyChangesProjectFile.AddDocumentAsync(relativePath, logicalPath: null, CancellationToken.None).Wait(); 518_applyChangesProjectFile.RemoveDocumentAsync(document.FilePath, CancellationToken.None).Wait(); 589_applyChangesProjectFile.AddMetadataReferenceAsync(identity.GetDisplayName(), metadataReference.Properties.Aliases, hintPath: null, CancellationToken.None).Wait(); 595_applyChangesProjectFile.AddMetadataReferenceAsync(fileName, metadataReference.Properties.Aliases, hintPath: null, CancellationToken.None).Wait(); 601_applyChangesProjectFile.AddMetadataReferenceAsync(fileName, metadataReference.Properties.Aliases, relativePath, CancellationToken.None).Wait(); 621_applyChangesProjectFile.RemoveMetadataReferenceAsync(identity.Name, identity.GetDisplayName(), peRef.FilePath, CancellationToken.None).Wait(); 640var compilation = project.GetCompilationAsync(CancellationToken.None).WaitAndGetResult_CanCallOnBackground(CancellationToken.None); 659_applyChangesProjectFile.AddProjectReferenceAsync(project.Name, reference, CancellationToken.None).Wait(); 672_applyChangesProjectFile.RemoveProjectReferenceAsync(project.Name, project.FilePath, CancellationToken.None).Wait(); 684_applyChangesProjectFile.AddAnalyzerReferenceAsync(fileRef.FullPath, CancellationToken.None).Wait(); 696_applyChangesProjectFile.RemoveAnalyzerReferenceAsync(fileRef.FullPath, CancellationToken.None).Wait();
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (4)
Rpc\RpcServer.cs (2)
86CancellationToken.None, 134arguments[i] = CancellationToken.None;
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (34)
NetCoreTests.cs (3)
112var buildHost = await buildHostProcessManager.GetBuildHostAsync(BuildHostProcessManager.BuildHostProcessKind.NetCore, CancellationToken.None); 113var projectFile = await buildHost.LoadProjectAsync(projectFilePath, content, LanguageNames.CSharp, CancellationToken.None); 114var projectFileInfo = (await projectFile.GetProjectFileInfosAsync(CancellationToken.None)).Single();
NewlyCreatedProjectsFromDotNetNew.cs (2)
216var project = await workspace.OpenProjectAsync(projectFilePath, cancellationToken: CancellationToken.None); 220var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None);
RpcTests.cs (13)
73var result = await rpcPair.Client.InvokeAsync<string>(targetObject: 0, nameof(ObjectWithHelloMethod.Hello), [s], CancellationToken.None); 84var result = await rpcPair.Client.InvokeAsync<int>(targetObject: 0, nameof(ObjectWithAddMethod.Add), [1, 1], CancellationToken.None); 97var result = await rpcPair.Client.InvokeNullableAsync<string>(targetObject: 0, nameof(ObjectWithNullableHelloMethod.TryHello), ["World"], CancellationToken.None); 101result = await rpcPair.Client.InvokeNullableAsync<string>(targetObject: 0, nameof(ObjectWithNullableHelloMethod.TryHello), [null], CancellationToken.None); 113await rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithVoidMethod.SetMessage), ["Hello, World!"], CancellationToken.None); 125var result = await rpcPair.Client.InvokeAsync<string>(targetObject: 0, nameof(ObjectWithAsyncHelloMethods.HelloAsync), ["World"], CancellationToken.None); 128result = await rpcPair.Client.InvokeAsync<string>(targetObject: 0, nameof(ObjectWithAsyncHelloMethods.HelloWithCancellationAsync), ["World"], CancellationToken.None); 140var call1 = rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithRealAsyncMethod.WaitAsync), [], CancellationToken.None); 147var call2 = rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithRealAsyncMethod.WaitAsync), [], CancellationToken.None); 170var call1 = rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithRealAsyncMethod.WaitAsync), [], CancellationToken.None); 177var call2 = rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithRealAsyncMethod.WaitAsync), [], CancellationToken.None); 199var exception = await Assert.ThrowsAsync<RemoteInvocationException>(() => rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithThrowingMethod.ThrowException), [], CancellationToken.None)); 227await rpcPair.Client.InvokeAsync(targetObject: 0, nameof(ObjectWithMethodThatShutsDownServer.Shutdown), [], CancellationToken.None);
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (2)
86CancellationToken.None, 134arguments[i] = CancellationToken.None;
Utilities\DotNetSdkMSBuildInstalled.cs (2)
45var buildHost = buildHostProcessManager.GetBuildHostAsync(BuildHostProcessManager.BuildHostProcessKind.NetCore, CancellationToken.None).Result; 47return buildHost.HasUsableMSBuildAsync(solution, CancellationToken.None).Result;
Utilities\VisualStudioMSBuildInstalled.cs (2)
35var buildHost = buildHostProcessManager.GetBuildHostAsync(BuildHostProcessManager.BuildHostProcessKind.NetFramework, CancellationToken.None).Result; 38return buildHost.HasUsableMSBuildAsync("NonExistent.sln", CancellationToken.None).Result;
VisualStudioMSBuildWorkspaceTests.cs (10)
970await Task.Delay(delay).ContinueWith(t => file.Close(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); 1000Assert.NotNull(await doc.State.GetFailedToLoadExceptionMessageAsync(CancellationToken.None)); 2356var documentText = document.GetTextSynchronously(CancellationToken.None); 2360var additionalDocumentText = additionalDocument.GetTextSynchronously(CancellationToken.None); 2376var text = doc.State.GetTextSynchronously(CancellationToken.None); 2379var atext = adoc.State.GetTextSynchronously(CancellationToken.None); 2838var compilation = document.GetObjectReference(static d => d.GetSemanticModelAsync(CancellationToken.None).Result); 3111var buildHost = await buildHostProcessManager.GetBuildHostWithFallbackAsync(projectFilePath, CancellationToken.None); 3112var projectFile = await buildHost.LoadProjectFileAsync(projectFilePath, LanguageNames.CSharp, CancellationToken.None); 3113var projectFileInfo = (await projectFile.GetProjectFileInfosAsync(CancellationToken.None)).Single();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Formatting\FormattingTestBase.cs (2)
56var syntaxTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 69var newRootNode = Formatter.Format(root, spans, services, options, rules: default, CancellationToken.None);
Remote\InProcRemostHostClient.cs (1)
48var client = (InProcRemoteHostClient?)await TryGetClientAsync(workspace, CancellationToken.None).ConfigureAwait(false);
Workspaces\TestHostDocument.cs (1)
44var sourceGeneratedDocuments = project.GetSourceGeneratedDocumentsAsync(CancellationToken.None).AsTask().Result;
Workspaces\TestWorkspace`1.cs (1)
518var document = await CurrentSolution.GetSourceGeneratedDocumentAsync(documentId, CancellationToken.None);
Microsoft.CodeAnalysis.Workspaces.UnitTests (352)
CodeCleanup\AddMissingTokensTests.cs (1)
2580var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], await document.GetCodeCleanupOptionsAsync(CancellationToken.None), codeCleanups);
CodeCleanup\CodeCleanupTests.cs (14)
41var cleanDocument = await CodeCleaner.CleanupAsync(document, [], await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 50var cleanDocument = await CodeCleaner.CleanupAsync(document, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 60var cleanDocument = await CodeCleaner.CleanupAsync(document, root.FullSpan, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 70var cleanDocument = await CodeCleaner.CleanupAsync(document, [root.FullSpan], await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 97var cleanDocument = await CodeCleaner.CleanupAsync(document, [], await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 109var cleanDocument = await CodeCleaner.CleanupAsync(document, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 122var cleanDocument = await CodeCleaner.CleanupAsync(document, root.FullSpan, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 135var cleanDocument = await CodeCleaner.CleanupAsync(document, [root.FullSpan], await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 147var cleanDocument = await CodeCleaner.CleanupAsync(document, annotation, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 162var cleanDocument = await CodeCleaner.CleanupAsync(document, annotation, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 313var newSemanticModel = await document.ReuseExistingSpeculativeModelAsync(accessor.Statements[0], CancellationToken.None); 323newSemanticModel = await document.ReuseExistingSpeculativeModelAsync(accessor.Statements[0], CancellationToken.None); 327var cleanDocument = await CodeCleaner.CleanupAsync(document, await document.GetCodeCleanupOptionsAsync(CancellationToken.None)); 409await document.GetCodeCleanupOptionsAsync(CancellationToken.None),
CodeCleanup\FixIncorrectTokenTests.cs (1)
725var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], await document.GetCodeCleanupOptionsAsync(CancellationToken.None), codeCleanups);
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
926var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], await document.GetCodeCleanupOptionsAsync(CancellationToken.None), codeCleanups);
CodeCleanup\ReduceTokenTests.cs (1)
1986var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], await document.GetCodeCleanupOptionsAsync(CancellationToken.None), codeCleanups);
CodeCleanup\RemoveUnnecessaryLineContinuationTests.cs (2)
1327var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], await document.GetCodeCleanupOptionsAsync(CancellationToken.None), codeCleanups); 1329var actualResult = (await cleanDocument.GetRequiredSyntaxRootAsync(CancellationToken.None)).ToFullString();
Editing\SyntaxEditorTests.cs (1)
30var formatted = Formatter.Format(node, EmptyWorkspace.Services.SolutionServices, options, CancellationToken.None);
FindAllDeclarationsTests.cs (1)
629project, Checksum.Null, cancellationToken: CancellationToken.None);
Formatter\FormatterTests.cs (8)
55var formattedDocument = await Formatter.FormatAsync(document, spans: null, options: null, CancellationToken.None); 92var formattedDocument = await Formatter.FormatAsync(document, spans: null, options, CancellationToken.None); 121ValidateCSharpOptions((CSharpSyntaxFormattingOptions)(await Formatter.GetFormattingOptionsAsync(csDocument, updatedOptions, CancellationToken.None)).Syntax!); 122ValidateVisualBasicOptions((VisualBasicSyntaxFormattingOptions)(await Formatter.GetFormattingOptionsAsync(vbDocument, updatedOptions, CancellationToken.None)).Syntax!); 131ValidateCSharpOptions((CSharpSyntaxFormattingOptions)(await Formatter.GetFormattingOptionsAsync(csDocumentWithUpdatedOptions, optionSet: null, CancellationToken.None)).Syntax!); 132ValidateVisualBasicOptions((VisualBasicSyntaxFormattingOptions)(await Formatter.GetFormattingOptionsAsync(vbDocumentWithUpdatedOptions, optionSet: null, CancellationToken.None)).Syntax!); 133ValidateOrganizeImportsOptions(await Formatter.GetOrganizeImportsOptionsAsync(csDocumentWithUpdatedOptions, CancellationToken.None)); 134ValidateOrganizeImportsOptions(await Formatter.GetOrganizeImportsOptionsAsync(vbDocumentWithUpdatedOptions, CancellationToken.None));
FormattingTests.cs (1)
76var formattedRoot = Formatter.Format(tree.GetRoot(), workspace.Services.SolutionServices, options, CancellationToken.None);
GeneratedCodeRecognitionTests.cs (2)
84Assert.True(document.IsGeneratedCode(CancellationToken.None), string.Format("Expected file '{0}' to be interpreted as generated code", fileName)); 88Assert.False(document.IsGeneratedCode(CancellationToken.None), string.Format("Did not expect file '{0}' to be interpreted as generated code", fileName));
SemanticModelReuse\SemanticModelReuseTests.cs (53)
42var model = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 54var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 55var model2 = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 68var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 69var model2 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 88var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 94var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 105var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 111var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 117var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 128var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 134var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 140var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 151var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 157var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 163var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 174var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 180var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 186var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 197var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 203var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 209var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 221var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 227var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 231CSharpSyntaxContext.CreateContext(document2, model2, source.IndexOf("void"), CancellationToken.None); 248var model1 = await document1.ReuseExistingSpeculativeModelAsync(source1.IndexOf("return"), CancellationToken.None); 254var model2 = await document2.ReuseExistingSpeculativeModelAsync(source2.IndexOf("{ return"), CancellationToken.None); 258CSharpSyntaxContext.CreateContext(document2, model2, source2.IndexOf("{ return"), CancellationToken.None); 271var model = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 289var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 290var model2 = await document.ReuseExistingSpeculativeModelAsync(null, CancellationToken.None); 309var model1 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 310var model2 = await document.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 335var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 347var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 364var model1 = await document1.ReuseExistingSpeculativeModelAsync(source1.IndexOf("return"), CancellationToken.None); 377var model2 = await document2.ReuseExistingSpeculativeModelAsync(source2.IndexOf("return"), CancellationToken.None); 389var model3 = await document3.ReuseExistingSpeculativeModelAsync(source2.IndexOf("return"), CancellationToken.None); 406var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 418var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 430var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 449var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 463var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 477var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 496var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 510var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 524var model3 = await document3.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 542var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 554var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 558VisualBasicSyntaxContext.CreateContext(document2, model2, source.IndexOf("sub"), CancellationToken.None); 575var model1 = await document1.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 588var model2 = await document2.ReuseExistingSpeculativeModelAsync(source.IndexOf("return"), CancellationToken.None); 592VisualBasicSyntaxContext.CreateContext(document2, model2, source.IndexOf("return"), CancellationToken.None);
Simplifier\SimplifierTests.cs (6)
36var semanticModel = await GetDocument().GetRequiredSemanticModelAsync(CancellationToken.None); 47var semanticModel = await GetDocument().GetRequiredSemanticModelAsync(CancellationToken.None); 85ValidateCSharpOptions((CSharpSimplifierOptions)await Simplifier.GetOptionsAsync(csDocument, updatedOptions, CancellationToken.None)); 86ValidateVisualBasicOptions((VisualBasicSimplifierOptions)await Simplifier.GetOptionsAsync(vbDocument, updatedOptions, CancellationToken.None)); 94ValidateCSharpOptions((CSharpSimplifierOptions)await Simplifier.GetOptionsAsync(csDocumentWithUpdatedOptions, optionSet: null, CancellationToken.None)); 95ValidateVisualBasicOptions((VisualBasicSimplifierOptions)await Simplifier.GetOptionsAsync(vbDocumentWithUpdatedOptions, optionSet: null, CancellationToken.None));
SolutionTests\ProjectDependencyGraphTests.cs (2)
56var projectIds = projectDependencyGraph.GetTopologicallySortedProjects(CancellationToken.None); 91var projectIds = projectDependencyGraph.GetDependencySets(CancellationToken.None);
SolutionTests\SolutionTests.cs (126)
338Assert.Throws<ArgumentException>(() => provider.TryGetDiagnosticValue(tree, "CA1234", CancellationToken.None, out _)); 439var root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 440var root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 462root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 463root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 483root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 484root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 527var root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 528var root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 550root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 551root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 571root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 572root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 606var root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 607var root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 633root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 634root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 657root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 658root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 692var root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 693var root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 716root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 717root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 737root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 738root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 769var root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 770var root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 792root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 793root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 813root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 814root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 857var root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 858var root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 879root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 880root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 902root1 = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 903root2 = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 1013Assert.Equal("new text", newSolution1.GetDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 1035Assert.Equal("new text", newSolution1.GetAdditionalDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 1057Assert.Equal("new text", newSolution1.GetAnalyzerConfigDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 1230var newText1 = newDocument1.GetTextSynchronously(CancellationToken.None); 1239var newText3 = newDocument3.GetTextSynchronously(CancellationToken.None); 1243Assert.Equal("class NewD3;", newDocument3.GetTextSynchronously(CancellationToken.None).ToString()); 1251var newAddText1 = newAddDocument1.GetTextSynchronously(CancellationToken.None); 1260var newAddText3 = newAddDocument3.GetTextSynchronously(CancellationToken.None); 1264Assert.Equal("new text3", newAddDocument3.GetTextSynchronously(CancellationToken.None).ToString()); 1272var newConfigText1 = newConfigDocument1.GetTextSynchronously(CancellationToken.None); 1281var newConfigText3 = newConfigDocument3.GetTextSynchronously(CancellationToken.None); 1285Assert.Equal("#new empty3", newConfigDocument3.GetTextSynchronously(CancellationToken.None).ToString()); 1789var oldTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1795var newTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1827var oldTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1842var newTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1865var oldTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1867var newTree = await newDocument.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1884var oldTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1886var newTree = await newDocument.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1903var oldTree = await document.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1905var newTree = await newDocument.GetRequiredSyntaxTreeAsync(CancellationToken.None); 2333var sourcePathOptions = project2.State.GetAnalyzerOptionsForPath(Path.Combine(s_projectDir, "x.cs"), CancellationToken.None); 2344sourcePathOptions = project2.State.GetAnalyzerOptionsForPath(Path.Combine(s_projectDir, "subfolder", "x.cs"), CancellationToken.None); 2892referenced, solution.GetProjectState(project.Id), includeCrossLanguage: true, CancellationToken.None); 2963await solution.GetProject(projectIds[0]).GetCompilationAsync(CancellationToken.None); 2964await solution.GetProject(projectIds[2]).GetCompilationAsync(CancellationToken.None); 2979var namespacesAndTypes = assemblyReference.GlobalNamespace.GetAllNamespacesAndTypes(CancellationToken.None); 3193var newRoot = await Formatter.FormatAsync(document, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).Result.GetSyntaxRootAsync(); 3259var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None); 3275var tree = await documentWithAttribute.GetSyntaxTreeAsync(CancellationToken.None); 3276var root = await documentWithAttribute.GetRequiredSyntaxRootAsync(CancellationToken.None); 3461var tree = CSharp.SyntaxFactory.ParseSyntaxTree("public class C {}").GetRoot(CancellationToken.None); 3951var exceptionMessage = await doc.State.GetFailedToLoadExceptionMessageAsync(CancellationToken.None).ConfigureAwait(false); 3957var compilation = await doc.Project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 4049Assert.False(await project.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4080Assert.True(await project1.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4081Assert.True(await project2.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4109Assert.True(await project1.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4110Assert.False(await project2.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4122var frozenDocument = documentToFreeze.WithFrozenPartialSemantics(CancellationToken.None); 4147var frozenDocument = documentToFreeze.WithFrozenPartialSemantics(CancellationToken.None); 4163var frozenDocument2 = frozenDocument.WithFrozenPartialSemantics(CancellationToken.None); 4182var frozenDocument = documentToFreezeChanged.WithFrozenPartialSemantics(CancellationToken.None); 4227var frozenDocument = documentToFreezeChanged.WithFrozenPartialSemantics(CancellationToken.None); 4288var frozenSolution = document.WithFrozenPartialSemantics(CancellationToken.None).Project.Solution; 4290Assert.True(await frozenSolution.GetProject(project1.Id).HasSuccessfullyLoadedAsync(CancellationToken.None)); 4291Assert.True(await frozenSolution.GetProject(project2.Id).HasSuccessfullyLoadedAsync(CancellationToken.None)); 4307var frozenDocument = project.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 4321var frozenDocument = project.Documents.First().WithFrozenPartialSemantics(CancellationToken.None); 4340var frozenDocument = forkedProject.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 4364var frozenDocument = forkedProject.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 4391var frozenDocument = document.WithFrozenPartialSemantics(CancellationToken.None); 4423var frozen = solution.GetRequiredDocument(documentIdToFreeze).WithFrozenPartialSemantics(CancellationToken.None); 4476var doc1Root = await document1.GetRequiredSyntaxRootAsync(CancellationToken.None); 4477var doc2Root = await document2.GetRequiredSyntaxRootAsync(CancellationToken.None); 4484var frozenDoc1 = document1.WithFrozenPartialSemantics(CancellationToken.None); 4487var frozenDoc1Root = await frozenDoc1.GetRequiredSyntaxRootAsync(CancellationToken.None); 4488var frozenDoc2Root = await frozenDoc2.GetRequiredSyntaxRootAsync(CancellationToken.None); 4499var frozenDoc2 = document2.WithFrozenPartialSemantics(CancellationToken.None); 4502var frozenDoc1Root = await frozenDoc1.GetRequiredSyntaxRootAsync(CancellationToken.None); 4503var frozenDoc2Root = await frozenDoc2.GetRequiredSyntaxRootAsync(CancellationToken.None); 4519Assert.False(await csBrokenProject.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4522Assert.True(await vbNormalProject.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4525Assert.True(await dependsOnBrokenProject.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4528Assert.True(await dependsOnVbNormalProject.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4532Assert.True(await transitivelyDependsOnBrokenProjects.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4536Assert.True(await transitivelyDependsOnNormalProjects.HasSuccessfullyLoadedAsync(CancellationToken.None)); 4566var unused = await loader.LoadTextAndVersionAsync(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None); 4580var unused = loader.LoadTextAndVersionSynchronously(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None); 4603var strongTree = factory.ParseSyntaxTree("dummy", dummyProject.ParseOptions, text, CancellationToken.None); 4728Assert.True(provider.TryGetDiagnosticValue(newSyntaxTree, "CA1234", CancellationToken.None, out var severity)); 4757Assert.True(provider.TryGetDiagnosticValue(syntaxTreeAfterAddingEditorConfig, "CA1234", CancellationToken.None, out var severity)); 4766Assert.False(provider.TryGetDiagnosticValue(syntaxTreeAfterAddingEditorConfig, "CA1234", CancellationToken.None, out _)); 4798Assert.True(provider.TryGetDiagnosticValue(syntaxTreeBeforeEditorConfigChange, "CA1234", CancellationToken.None, out var severity)); 4811Assert.True(provider.TryGetDiagnosticValue(syntaxTreeBeforeEditorConfigChange, "CA6789", CancellationToken.None, out severity)); 4916Assert.Null(document.GetSyntaxTreeSynchronously(CancellationToken.None)); 5569var documentOptions = await document.GetOptionsAsync(CancellationToken.None); 5628var frozenSolution = project.Solution.WithFrozenPartialCompilations(CancellationToken.None); 5647var frozenSolution = project.Solution.WithFrozenPartialCompilations(CancellationToken.None); 5669var frozenSolution = project1.Solution.WithFrozenPartialCompilations(CancellationToken.None); 5699var frozenSolution = project1.Solution.WithFrozenPartialCompilations(CancellationToken.None); 5729var frozenSolution = project1.Solution.WithFrozenPartialCompilations(CancellationToken.None); 5759var frozenSolution = project1.Solution.WithFrozenPartialCompilations(CancellationToken.None); 5794Assert.Equal("// source1", generatedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 5797? project1.Solution.WithFrozenPartialCompilations(CancellationToken.None) 5816Assert.Equal("// source1", forkedGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 5820Assert.Equal("// source2", forkedGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 5832var frozenSolution = project.Solution.WithFrozenPartialCompilations(CancellationToken.None);
SolutionTests\SolutionWithSourceGeneratorTests.cs (59)
57originalCompilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 62var newCompilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 91Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees); 96Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees); 101Assert.Empty((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees); 139Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees); 144Assert.Equal(2, (await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees.Count()); 149Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees); 166Assert.Equal(2, (await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees.Count()); 185var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 206compilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 230compilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 267var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 269var regularDocumentSyntaxTree = await project.GetRequiredDocument(documentId).GetRequiredSyntaxTreeAsync(CancellationToken.None); 320var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 341var fullCompilation = await project.GetRequiredCompilationAsync(CancellationToken.None); 345var partialProject = project.Documents.Single().WithFrozenPartialSemantics(forceFreeze, CancellationToken.None).Project; 354var partialCompilation = await partialProject.GetRequiredCompilationAsync(CancellationToken.None); 427var compilationWithReference = await solution.GetRequiredProject(projectIdWithReference).GetRequiredCompilationAsync(CancellationToken.None); 431var compilationWithGenerator = await solution.GetRequiredProject(projectIdWithGenerator).GetRequiredCompilationAsync(CancellationToken.None); 446var syntaxTree = Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees); 465project = project.Documents.Single(d => d.Name == "RegularDocument.cs").WithFrozenPartialSemantics(CancellationToken.None).Project; 469var syntaxTree = Assert.Single((await project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees, t => t.FilePath != "RegularDocument.cs"); 535var compilationAfterFirstChange = await project.GetRequiredCompilationAsync(CancellationToken.None); 539var compilationAfterSecondChange = await project.GetRequiredCompilationAsync(CancellationToken.None); 602var compilation = await generatedDocument.Project.GetRequiredCompilationAsync(CancellationToken.None); 649var compilation = await generatedDocument.Project.GetRequiredCompilationAsync(CancellationToken.None); 678var compilationWithReference = await projectWithReference.GetRequiredCompilationAsync(CancellationToken.None); 701var document = await workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(generatedDocument.Identity.DocumentId, CancellationToken.None); 735var frozenDocument = documentToFreeze.WithFrozenPartialSemantics(CancellationToken.None); 737await frozenDocument.GetSemanticModelAsync(CancellationToken.None); 758var document = project.Documents.Single().WithFrozenPartialSemantics(forceFreeze: true, CancellationToken.None); 764var compilation = await document.Project.GetRequiredCompilationAsync(CancellationToken.None); 768Assert.Equal("// Something else", (await document.GetRequiredSyntaxRootAsync(CancellationToken.None)).ToFullString()); 787var document = project.Documents.Single().WithFrozenPartialSemantics(CancellationToken.None); 793var compilation = await document.Project.GetRequiredCompilationAsync(CancellationToken.None); 797Assert.Equal("// Something else", (await document.GetRequiredSyntaxRootAsync(CancellationToken.None)).ToFullString()); 816var frozenSolution = originalDocument2.WithFrozenPartialSemantics(CancellationToken.None).Project.Solution; 827var compilation = await document.Project.GetRequiredCompilationAsync(CancellationToken.None); 888var syntaxTrees = (await frozenWithSingleDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 948var checksum0 = await project0.Solution.SolutionState.GetChecksumAsync(CancellationToken.None); 951var checksum1 = await project1.Solution.SolutionState.GetChecksumAsync(CancellationToken.None); 957var checksum2 = await project2.Solution.SolutionState.GetChecksumAsync(CancellationToken.None); 967var checksum3 = await project3.Solution.SolutionState.GetChecksumAsync(CancellationToken.None); 1026var root = await sourceGeneratedDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1057var root = await sourceGeneratedDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1067var newTree = await sourceGeneratedDocument.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1075newTree = await updatedDocument.GetRequiredSyntaxTreeAsync(CancellationToken.None); 1096var root = await sourceGeneratedDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1126var root = await sourceGeneratedDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1130var newRoot = await sourceGeneratedDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1267var syntaxTrees = (await newDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 1276var syntaxTrees = (await frozenWithSingleDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 1300var root = await newDocument.GetRequiredSyntaxRootAsync(CancellationToken.None); 1304var syntaxTrees = (await newDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 1313var syntaxTrees = (await frozenWithSingleDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 1344var syntaxTrees = (await frozenWithSingleDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 1379var syntaxTrees = (await frozenWithSingleDocument.Project.GetRequiredCompilationAsync(CancellationToken.None)).SyntaxTrees; 1417CancellationToken.None).ConfigureAwait(false);
SolutionTests\TextLoaderTests.cs (8)
110await Assert.ThrowsAsync<NotImplementedException>(() => loader.LoadTextAndVersionAsync(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None)); 111await Assert.ThrowsAsync<NotImplementedException>(() => loader.LoadTextAndVersionAsync(workspace: null, documentId: null, CancellationToken.None)); 118Assert.Same(LoaderOverridesObsolete.Value, await loader.LoadTextAndVersionAsync(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None)); 119Assert.Same(LoaderOverridesObsolete.Value, await loader.LoadTextAndVersionAsync(workspace: null, documentId: null, CancellationToken.None)); 126Assert.Same(LoaderOverridesObsolete2.Value, await loader.LoadTextAndVersionAsync(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None)); 127Assert.Same(LoaderOverridesObsolete2.Value, await loader.LoadTextAndVersionAsync(workspace: null, documentId: null, CancellationToken.None)); 134Assert.Same(LoaderOverridesNew.Value, await loader.LoadTextAndVersionAsync(new LoadTextOptions(SourceHashAlgorithms.Default), CancellationToken.None)); 135Assert.Same(LoaderOverridesNew.Value, await loader.LoadTextAndVersionAsync(workspace: null, documentId: null, CancellationToken.None));
SymbolKeyTests.cs (4)
858var firstReusedModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 868var testModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 905var firstReusedModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None); 915var testModel = await document.ReuseExistingSpeculativeModelAsync(position, CancellationToken.None);
SyntaxNodeTests.cs (2)
35}, CancellationToken.None); 67}, CancellationToken.None);
SyntaxPathTests.cs (23)
83Assert.True(path.TryResolve(tree, CancellationToken.None, out SyntaxNode node)); 97Assert.True(path.TryResolve(newTree, CancellationToken.None, out SyntaxNode node)); 111Assert.True(path.TryResolve(newTree, CancellationToken.None, out SyntaxNode node)); 124Assert.True(path.TryResolve(tree, CancellationToken.None, out SyntaxNode node)); 161Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 162Assert.True(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode n2)); 163Assert.True(path3.TryResolve(tree, CancellationToken.None, out SyntaxNode n3)); 197Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 198Assert.True(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode n2)); 234Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 235Assert.True(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode n2)); 266Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 267Assert.False(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode _)); 298Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 299Assert.False(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode _)); 300Assert.False(path3.TryResolve(tree, CancellationToken.None, out SyntaxNode _)); 329Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 330Assert.True(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode n2)); 360Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 361Assert.True(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode n2)); 399Assert.True(path1.TryResolve(tree, CancellationToken.None, out SyntaxNode n1)); 400Assert.True(path2.TryResolve(tree, CancellationToken.None, out SyntaxNode n2)); 418Assert.True(path.TryResolve(newTree, CancellationToken.None, out SyntaxNode node));
SyntaxReferenceTests.cs (6)
55var tree = await solution.Projects.First().Documents.First().GetRequiredSyntaxTreeAsync(CancellationToken.None); 77var tree = await solution.Projects.First().Documents.First().GetRequiredSyntaxTreeAsync(CancellationToken.None); 101var tree = await solution.Projects.First().Documents.First().GetRequiredSyntaxTreeAsync(CancellationToken.None); 124var tree = await solution.Projects.First().Documents.First().GetRequiredSyntaxTreeAsync(CancellationToken.None); 148var tree = await solution.Projects.First().Documents.First().GetRequiredSyntaxTreeAsync(CancellationToken.None); 175var tree = await solution.Projects.First().Documents.First().GetRequiredSyntaxTreeAsync(CancellationToken.None);
UtilityTest\AsyncLazyTests.cs (11)
26var t = lazy.GetValueAsync(CancellationToken.None); 78}, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Current); 96CancellationToken.None, 256var secondRequestResult = lazy.GetValue(CancellationToken.None); 268var firstRequestResult = lazy.GetValue(CancellationToken.None); 269var secondRequestResult = lazy.GetValue(CancellationToken.None); 295? await Assert.ThrowsAsync<ArgumentException>(async () => await lazy.GetValueAsync(CancellationToken.None)) 296: Assert.Throws<ArgumentException>(() => lazy.GetValue(CancellationToken.None)); 329var synchronousRequest = Task.Run(() => lazy.GetValue(CancellationToken.None)); 344var asynchronousRequest = lazy.GetValueAsync(CancellationToken.None); 401var synchronousRequest = Task.Run(() => lazy.GetValue(CancellationToken.None));
UtilityTest\SerializableBytesTests.cs (3)
25using var stream = await SerializableBytes.CreateReadableStreamAsync(expected, CancellationToken.None); 46using var stream = await SerializableBytes.CreateReadableStreamAsync(expected, CancellationToken.None); 77using var stream = await SerializableBytes.CreateReadableStreamAsync(expected, CancellationToken.None);
UtilityTest\SourceTextSerializationTests.cs (2)
38originalText.WriteTo(writer, CancellationToken.None); 44var recovered = SourceTextExtensions.ReadFrom(textService, reader, originalText.Encoding, originalText.ChecksumAlgorithm, CancellationToken.None);
UtilityTest\SpecializedTasksTests.cs (8)
131gate.Wait(CancellationToken.None); 158gate.Wait(CancellationToken.None); 214gate.Wait(CancellationToken.None); 274gate.Wait(CancellationToken.None); 341gate.Wait(CancellationToken.None); 417gate.Wait(CancellationToken.None); 500gate.Wait(CancellationToken.None); 543gate.Wait(CancellationToken.None);
UtilityTest\TaskExtensionsTests.cs (3)
19Assert.Equal(42, Task.FromResult(42).WaitAndGetResult_CanCallOnBackground(CancellationToken.None)); 20Assert.Throws<TaskCanceledException>(() => Task.FromCanceled<int>(new CancellationToken(canceled: true)).WaitAndGetResult_CanCallOnBackground(CancellationToken.None)); 22var ex = Assert.Throws<TestException>(() => Task.Run(() => ThrowTestException()).WaitAndGetResult_CanCallOnBackground(CancellationToken.None));
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (2)
77var handle = temporaryStorageService.WriteToTemporaryStorage(text, CancellationToken.None); 80var text2 = handle.ReadFromTemporaryStorage(CancellationToken.None);
WorkspaceTests\AdhocWorkspaceTests.cs (1)
390var frozen = pws.CurrentSolution.GetDocument(docid1).WithFrozenPartialSemantics(CancellationToken.None);
Microsoft.CommonLanguageServerProtocol.Framework.Example (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CommonLanguageServerProtocol.Framework.Package (4)
RequestExecutionQueue.cs (2)
178_ = resultTask.ContinueWith(_ => combinedTokenSource.Dispose(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); 400}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (10)
RequestExecutionQueueTests.cs (8)
56await Assert.ThrowsAsync<NotImplementedException>(() => requestExecutionQueue.ExecuteAsync(JToken.FromObject(new MockRequest(1)), ThrowingHandler.Name, lspServices, CancellationToken.None)); 82await requestExecutionQueue.ExecuteAsync(JToken.FromObject(new MockRequest(1)), MutatingHandler.Name, lspServices, CancellationToken.None); 105var response = (MockResponse?)await requestExecutionQueue.ExecuteAsync(JToken.FromObject(new MockRequest(1)), TestMethodHandler.Name, lspServices, CancellationToken.None); 115var response = (MockResponse?)await requestExecutionQueue.ExecuteAsync(serializedRequest: null, TestParameterlessMethodHandler.Name, lspServices, CancellationToken.None); 125var response = await requestExecutionQueue.ExecuteAsync(JToken.FromObject(new MockRequest(1)), TestNotificationHandler.Name, lspServices, CancellationToken.None); 135var response = await requestExecutionQueue.ExecuteAsync(serializedRequest: null, TestParameterlessNotificationHandler.Name, lspServices, CancellationToken.None); 146var task1 = requestExecutionQueue.ExecuteAsync(request, TestMethodHandler.Name, lspServices, CancellationToken.None); 147var task2 = requestExecutionQueue.ExecuteAsync(request, TestMethodHandler.Name, lspServices, CancellationToken.None);
TestExampleLanguageServer.cs (2)
145=> ExecuteNotificationAsync(Methods.ShutdownName, CancellationToken.None); 157var result = await ExecuteRequestAsync<InitializeParams, InitializeResult>(Methods.InitializeName, request, CancellationToken.None);
Microsoft.DotNet.Build.Tasks.Feed.Tests (1)
TestDoubles\MockRetryHandler.cs (1)
28=> RunAsync(actionSuccessfulAsync, CancellationToken.None);
Microsoft.DotNet.Build.Tasks.Packaging (3)
UpdatePackageIndex.cs (2)
192IEnumerable<Version> stablePackageVersions = NuGetUtility.GetAllVersionsForPackageId(package.Key, includePrerelease: false, includeUnlisted: false, Log, CancellationToken.None); 271IEnumerable<Version> allStableVersions = NuGetUtility.GetAllVersionsForPackageId(id, includePrerelease: false, includeUnlisted: false, Log, CancellationToken.None);
ValidateHarvestVersionIsLatestForRelease.cs (1)
137IEnumerable<Version> packageVersions = NuGetUtility.GetAllVersionsForPackageId(packageId, includePrerelease: false, includeUnlisted: false, Log, CancellationToken.None);
Microsoft.DotNet.Helix.Sdk (2)
AzureDevOpsTask.cs (2)
99CancellationToken.None); 115CancellationToken.None);
Microsoft.DotNet.SignCheckLibrary (1)
Verification\NupkgVerifier.cs (1)
40VerifySignaturesResult verifySignatureResult = await packageSignatureVerifier.VerifySignaturesAsync(pr, verifierSettings, CancellationToken.None);
Microsoft.Extensions.AI (7)
ChatCompletion\ChatClientStructuredOutputExtensions.cs (6)
45/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 64/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 84/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 104/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 125/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 146/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
ChatCompletion\FunctionInvokingChatClient.cs (1)
833/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Microsoft.Extensions.AI.Abstractions (24)
ChatCompletion\ChatClientExtensions.cs (4)
87/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 107/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 127/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 147/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
ChatCompletion\ChatResponseExtensions.cs (2)
102/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 154/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
ChatCompletion\IChatClient.cs (2)
38/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 50/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Embeddings\EmbeddingGeneratorExtensions.cs (3)
96/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 121/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 173/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Embeddings\IEmbeddingGenerator{TInput,TEmbedding}.cs (1)
34/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Functions\AIFunction.cs (1)
61/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Functions\AIFunctionFactory.cs (1)
605/// <summary>A boxed <see cref="CancellationToken.None"/>.</summary>
Image\IImageGenerator.cs (1)
22/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Image\ImageGeneratorExtensions.cs (4)
104/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 126/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 150/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 175/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
SpeechToText\ISpeechToTextClient.cs (2)
34/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 44/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
SpeechToText\SpeechToTextClientExtensions.cs (2)
38/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 60/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (1)
42/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Microsoft.Extensions.AI.Abstractions.Tests (7)
ChatCompletion\DelegatingChatClientTests.cs (2)
26var expectedCancellationToken = CancellationToken.None; 58var expectedCancellationToken = CancellationToken.None;
Functions\DelegatingAIFunctionTests.cs (1)
81object? result = await actual.InvokeAsync(new(), CancellationToken.None);
Image\DelegatingImageGeneratorTests.cs (1)
25var expectedCancellationToken = CancellationToken.None;
Image\ImageGeneratorExtensionsTests.cs (1)
210Assert.Equal(CancellationToken.None, ct); // Default cancellation token
SpeechToText\DelegatingSpeechToTextClientTests.cs (2)
27var expectedCancellationToken = CancellationToken.None; 59var expectedCancellationToken = CancellationToken.None;
Microsoft.Extensions.AI.OpenAI (3)
MicrosoftExtensionsAIChatExtensions.cs (2)
118/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 247/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
MicrosoftExtensionsAIResponsesExtensions.cs (1)
53/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
Microsoft.Extensions.AI.Tests (18)
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
763var response = await client.GetStreamingResponseAsync(messages, options, CancellationToken.None).ToChatResponseAsync();
ChatReduction\MessageCountingChatReducerTests.cs (9)
35await Assert.ThrowsAsync<ArgumentNullException>(() => reducer.ReduceAsync(null!, CancellationToken.None)); 42var result = await reducer.ReduceAsync([], CancellationToken.None); 60var result = await reducer.ReduceAsync(messages, CancellationToken.None); 96var result = await reducer.ReduceAsync(messages, CancellationToken.None); 135var result = await reducer.ReduceAsync(messages, CancellationToken.None); 170var result = await reducer.ReduceAsync(messages, CancellationToken.None); 205var result = await reducer.ReduceAsync(messages, CancellationToken.None); 229var result = await reducer.ReduceAsync(messages, CancellationToken.None); 248var result = await reducer.ReduceAsync(messages, CancellationToken.None);
ChatReduction\SummarizingChatReducerTests.cs (8)
47await Assert.ThrowsAsync<ArgumentNullException>(() => reducer.ReduceAsync(null!, CancellationToken.None)); 56var result = await reducer.ReduceAsync([], CancellationToken.None); 78var result = await reducer.ReduceAsync(messages, CancellationToken.None); 101var result = await reducer.ReduceAsync(messages, CancellationToken.None); 134var result = await reducer.ReduceAsync(messages, CancellationToken.None); 194var result = await reducer.ReduceAsync(messages, CancellationToken.None); 235var reducedMessages = await reducer.ReduceAsync(messages, CancellationToken.None); 262reducedMessages = await reducer.ReduceAsync(messages, CancellationToken.None);
Microsoft.Extensions.Caching.Hybrid (2)
Internal\DefaultHybridCache.StampedeState.cs (1)
54SharedToken = CancellationToken.None;
Internal\DefaultHybridCache.StampedeStateT.cs (1)
317await System.Threading.Tasks.Task.Delay(1, CancellationToken.None).ConfigureAwait(false);
Microsoft.Extensions.Caching.Hybrid.Tests (14)
StampedeTests.cs (14)
92var token = cts?.Token ?? CancellationToken.None; 102if (!await semaphore.WaitAsync(5_000, CancellationToken.None)) 138if (!await semaphore.WaitAsync(5_000, CancellationToken.None)) 191if (!await semaphore.WaitAsync(5_000, CancellationToken.None)) 269if (!await semaphore.WaitAsync(5_000, CancellationToken.None)) 334var token = cts?.Token ?? CancellationToken.None; 342await semaphore.WaitAsync(CancellationToken.None); 349await semaphore.WaitAsync(CancellationToken.None); 374var token = cts?.Token ?? CancellationToken.None; 382await semaphore.WaitAsync(CancellationToken.None); 389await semaphore.WaitAsync(CancellationToken.None); 418var token = cts?.Token ?? CancellationToken.None; 426await semaphore.WaitAsync(CancellationToken.None); 433await semaphore.WaitAsync(CancellationToken.None);
Microsoft.Extensions.Caching.Memory (3)
CacheEntry.CacheEntryTokens.cs (1)
110CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
CacheEntry.cs (1)
288}, obj, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
MemoryCache.cs (1)
398CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\StackGuard.cs (1)
68Task<R> task = Task.Factory.StartNew((Func<object?, R>)action, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.Extensions.Diagnostics.HealthChecks.Common.Tests (16)
ApplicationLifecycleHealthCheckTests.cs (4)
19Assert.Equal(HealthStatus.Unhealthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status); 22Assert.Equal(HealthStatus.Healthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status); 25Assert.Equal(HealthStatus.Unhealthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status); 28Assert.Equal(HealthStatus.Unhealthy, (await healthCheck.CheckHealthAsync(context, CancellationToken.None)).Status);
ManualHealthCheckTests.cs (11)
20var healthCheckResult = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 38Assert.Equal(HealthStatus.Unhealthy, (await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None)).Status); 42var healthCheckResultUnhealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 47var healthCheckResultHealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 62Assert.Equal(HealthStatus.Unhealthy, (await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None)).Status); 67var healthCheckResultUnhealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 73var healthCheckResultHealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 89Assert.Equal(HealthStatus.Unhealthy, (await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None)).Status); 96var healthCheckResult2Unhealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 103var healthCheckResult1Unhealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None); 110var healthCheckResultHealthy = await manualHealthCheckService.CheckHealthAsync(context, CancellationToken.None);
TelemetryHealthChecksPublisherTests.cs (1)
101await publisher.PublishAsync(CreateHealthReport(healthStatuses), CancellationToken.None);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (18)
ResourceMonitoringServiceTests.cs (18)
213_ = tracker.StartAsync(CancellationToken.None); 219await tracker.StopAsync(CancellationToken.None); 253await tracker.StartAsync(CancellationToken.None); 289await tracker.PublishUtilizationAsync(CancellationToken.None); 332await tracker.StartAsync(CancellationToken.None); 342await tracker.StopAsync(CancellationToken.None); 368await tracker.StartAsync(CancellationToken.None); 372await tracker.StopAsync(CancellationToken.None); 453_ = tracker.StartAsync(CancellationToken.None); 479await tracker.StopAsync(CancellationToken.None); 562_ = tracker.StartAsync(CancellationToken.None); 583await tracker.StopAsync(CancellationToken.None); 623_ = tracker.StartAsync(CancellationToken.None); 627await tracker.StopAsync(CancellationToken.None); 628await tracker.StopAsync(CancellationToken.None); 724await s.StopAsync(CancellationToken.None); 725await s.StopAsync(CancellationToken.None); 726await s.StopAsync(CancellationToken.None);
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFilesWatcher.cs (1)
463CancellationToken.None,
Microsoft.Extensions.Hosting.Abstractions (1)
HostingAbstractionsHostExtensions.cs (1)
115await host.StopAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Extensions.Hosting.Testing.Tests (4)
HostTerminatorServiceTests.cs (4)
24await sut.StartAsync(CancellationToken.None); 25await sut.StopAsync(CancellationToken.None); 41var task = RunProtectedExecuteAsync(sut, CancellationToken.None); 60await RunProtectedExecuteAsync(sut, CancellationToken.None);
Microsoft.Extensions.Http.Diagnostics (1)
Logging\Internal\HttpResponseBodyReader.cs (1)
205=> Task.Run(() => WriteStreamToPipeImplAsync(stream, writer, cancellationToken), CancellationToken.None);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (48)
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (16)
47var response = await _hugeNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 57var response = await _hugeNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 67var response = await _hugeLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 77var response = await _hugeLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 87var response = await _hugeLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 97var response = await _hugeLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 107var response = await _hugeLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 117var response = await _hugeLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 127var response = await _hugeNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 137var response = await _hugeNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 147var response = await _hugeLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 157var response = await _hugeLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 167var response = await _hugeLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 177var response = await _hugeLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 187var response = await _hugeLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 197var response = await _hugeLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Benchmarks\MediumHttpClientLoggingBenchmark.cs (16)
47var response = await _mediumNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 57var response = await _mediumNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 67var response = await _mediumLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 77var response = await _mediumLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 87var response = await _mediumLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 97var response = await _mediumLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 107var response = await _mediumLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 117var response = await _mediumLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 127var response = await _mediumNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 137var response = await _mediumNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 147var response = await _mediumLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 157var response = await _mediumLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 167var response = await _mediumLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 177var response = await _mediumLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 187var response = await _mediumLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 197var response = await _mediumLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Benchmarks\SmallHttpClientLoggingBenchmark.cs (16)
47var response = await _smallNoLog.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 57var response = await _smallNoLog.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 67var response = await _smallLogAll.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 77var response = await _smallLogAll.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 87var response = await _smallLogRequest.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 97var response = await _smallLogRequest.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 107var response = await _smallLogResponse.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 117var response = await _smallLogResponse.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 127var response = await _smallNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 137var response = await _smallNoLogChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 147var response = await _smallLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 157var response = await _smallLogAllChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 167var response = await _smallLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 177var response = await _smallLogRequestChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None) 187var response = await _smallLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseHeadersRead, CancellationToken.None) 197var response = await _smallLogResponseChunked.SendAsync(Request, HttpCompletionOption.ResponseContentRead, CancellationToken.None)
Microsoft.Extensions.Http.Diagnostics.Tests (32)
Logging\HttpClientLoggerTest.cs (2)
439var act = () => client.SendAsync(httpRequestMessage, CancellationToken.None); 825var act = () => client.SendAsync(httpRequestMessage, CancellationToken.None);
Logging\HttpClientLoggingExtensionsTest.cs (1)
327.StartAsync(CancellationToken.None);
Logging\HttpRequestBodyReaderTest.cs (8)
46var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 66var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 90var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 139var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 163var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 193var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 217var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None); 238var requestBody = await httpRequestBodyReader.ReadAsync(httpRequest, CancellationToken.None);
Logging\HttpRequestReaderTest.cs (15)
102await reader.ReadRequestAsync(logRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 103await reader.ReadResponseAsync(logRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None); 159await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 160await reader.ReadResponseAsync(actualRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None); 230await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 231await reader.ReadResponseAsync(actualRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None); 305await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 306await reader.ReadResponseAsync(actualRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None); 365await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 435await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 436await reader.ReadResponseAsync(actualRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None); 502await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 503await reader.ReadResponseAsync(actualRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None); 570await reader.ReadRequestAsync(actualRecord, httpRequestMessage, requestHeadersBuffer, CancellationToken.None); 571await reader.ReadResponseAsync(actualRecord, httpResponseMessage, responseHeadersBuffer, CancellationToken.None);
Logging\HttpResponseBodyReaderTest.cs (6)
53var responseBody = await httpResponseBodyReader.ReadAsync(httpResponse, CancellationToken.None); 72var responseBody = await httpResponseBodyReader.ReadAsync(httpResponse, CancellationToken.None); 90var responseBody = await httpResponseBodyReader.ReadAsync(httpResponse, CancellationToken.None); 114var responseBody = await httpResponseBodyReader.ReadAsync(httpResponse, CancellationToken.None); 159var responseBody = await httpResponseBodyReader.ReadAsync(httpResponse, CancellationToken.None); 227var responseBody = await httpResponseBodyReader.ReadAsync(httpResponse, CancellationToken.None);
Microsoft.Extensions.Http.Polly.Tests (11)
PolicyHttpMessageHandlerTest.cs (11)
49var response = await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 94var response = await handler.SendAsync(expectedRequest, CancellationToken.None); 142var response = await invoke.SendAsync(new HttpRequestMessage(), CancellationToken.None); 194var response = await invoke.SendAsync(new HttpRequestMessage(), CancellationToken.None); 216await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 264var response = await handler.SendAsync(new HttpRequestMessage(), CancellationToken.None); 291var response = await handler.SendAsync(request, CancellationToken.None); 322var response = await handler.SendAsync(request, CancellationToken.None); 344await handler.SendAsync(request, CancellationToken.None); 370await handler.SendAsync(request, CancellationToken.None); 403handler.SendAsync(request, CancellationToken.None).GetAwaiter().GetResult();
Microsoft.Extensions.Http.Resilience.PerformanceTests (6)
HedgingBenchmark.cs (1)
37public Task<HttpResponseMessage> HedgingCall() => _client.SendAsync(Request, CancellationToken.None);
HttpResilienceBenchmark.cs (5)
48return _client.SendAsync(Request, CancellationToken.None); 54return _singleHandlerClient.SendAsync(Request, CancellationToken.None); 60return _standardClient.SendAsync(Request, CancellationToken.None); 66return _hedgingClientNoRoutes.SendAsync(Request, CancellationToken.None); 72return _hedgingClientOrdered.SendAsync(Request, CancellationToken.None);
Microsoft.Extensions.Identity.Core (2)
RoleManager.cs (1)
28protected virtual CancellationToken CancellationToken => CancellationToken.None;
UserManager.cs (1)
56protected virtual CancellationToken CancellationToken => CancellationToken.None;
Microsoft.Extensions.Options.Contextual.Tests (2)
AcceptanceTests.cs (2)
96Assert.Equal("Fahrenheit", (await forecastService.GetForecast(new WeatherForecastContext { Country = "US" }, CancellationToken.None)).First().TemperatureScale); 97Assert.Equal("Celsius", (await forecastService.GetForecast(new WeatherForecastContext { Country = "CA" }, CancellationToken.None)).First().TemperatureScale);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (3)
DnsServiceEndpointResolverTests.cs (3)
25var initialResult = await resolver.GetEndpointsAsync("https://localhost", CancellationToken.None); 29var secondResult = await resolver.GetEndpointsAsync("https://localhost", CancellationToken.None); 33var thirdResult = await resolver.GetEndpointsAsync("https://localhost", CancellationToken.None);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Fuzzers\DnsResponseFuzzer.cs (1)
40ValueTask<AddressResult[]> task = _resolver!.ResolveIPAddressesAsync("www.example.com", AddressFamily.InterNetwork, CancellationToken.None);
Microsoft.Extensions.ServiceDiscovery.Tests (9)
ExtensionsServicePublicApiTests.cs (1)
158var action = async () => await serviceEndpointResolver.GetEndpointsAsync(serviceName, CancellationToken.None);
ServiceEndpointResolverTests.cs (8)
114var initialResult = await watcher.GetEndpointsAsync(CancellationToken.None); 163var initialResult = await resolver.GetEndpointsAsync("http://basket", CancellationToken.None); 201var endpoint = await resolver.GetEndpointAsync(httpRequest, CancellationToken.None); 247var initialEndpointsTask = watcher.GetEndpointsAsync(CancellationToken.None); 259var resolveTask = watcher.GetEndpointsAsync(CancellationToken.None); 273var resolveTask = watcher.GetEndpointsAsync(CancellationToken.None); 275var next = await channel.Reader.ReadAsync(CancellationToken.None); 282var task = watcher.GetEndpointsAsync(CancellationToken.None);
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (7)
YarpServiceDiscoveryTests.cs (7)
47var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None); 78var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None); 108var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None); 143var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None); 226var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None); 256var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None); 301var result = await yarpResolver.ResolveDestinationsAsync(destinationConfigs, CancellationToken.None);
Microsoft.Extensions.TimeProvider.Testing.Tests (7)
FakeTimeProviderTests.cs (7)
292var t = timeProvider.Delay(TimeSpan.Zero, CancellationToken.None); 303var delay = timeProvider.Delay(TimeSpan.FromMilliseconds(1), CancellationToken.None); 364await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() => source.Task.WaitAsync(TimeSpan.FromTicks(-1), timeProvider, CancellationToken.None)); 366await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() => source.Task.WaitAsync(TimeSpan.FromMilliseconds(-2), timeProvider, CancellationToken.None)); 375var t = source.Task.WaitAsync(TimeSpan.FromSeconds(100000), timeProvider, CancellationToken.None); 395var t = source.Task.WaitAsync(TimeSpan.FromMilliseconds(-1), timeProvider, CancellationToken.None); 414var t = source.Task.WaitAsync(TimeSpan.FromMilliseconds(1), timeProvider, CancellationToken.None);
Microsoft.Extensions.Validation.GeneratorTests (34)
ValidationsGenerator.ClassAttributes.cs (4)
105await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 123await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 140await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 161await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None);
ValidationsGenerator.SkipValidation.cs (10)
128await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 146await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 168await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 192await validatableTypeInfo.ValidateAsync(rootInstance, context, CancellationToken.None); 220await validatableTypeInfo.ValidateAsync(rootInstance, context, CancellationToken.None); 240await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 269await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 346await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 370await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 388await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None);
ValidationsGenerator.ValidatableType.cs (20)
108await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 127await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 146await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 168await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 197await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 249await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 279await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 298await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 325await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 375await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 477await validatableTypeInfo.ValidateAsync(instance, context, CancellationToken.None); 496await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 515await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 537await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 566await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 618await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 648await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 667await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 694await validatableInfo.ValidateAsync(instance, context, CancellationToken.None); 744await validatableInfo.ValidateAsync(instance, context, CancellationToken.None);
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 486var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Gen.ContextualOptions.Unit.Tests (9)
ParserTests.cs (1)
100new ContextReceiver(CancellationToken.None),
SyntaxContextReceiverTests.cs (4)
21var sut = new ContextReceiver(CancellationToken.None); 44var sut = new ContextReceiver(CancellationToken.None); 60var sut = new ContextReceiver(CancellationToken.None); 82var sut = new ContextReceiver(CancellationToken.None);
test\Generators\Shared\RoslynTestUtils.cs (4)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 486var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Gen.Logging.Unit.Tests (9)
LogParserUtilitiesTests.cs (3)
72var parser = new Parser(null!, diagMock.Object, CancellationToken.None); 120var parser = new Parser(null!, diagMock.Object, CancellationToken.None); 187var parser = new Parser(null!, diagMock.Object, CancellationToken.None);
ParserUtilitiesTests.cs (2)
53var result = ParserUtilities.PropertyHasModifier(symbolMock.Object, SyntaxKind.ProtectedKeyword, CancellationToken.None); 74var result = ParserUtilities.PropertyHasModifier(symbolMock.Object, SyntaxKind.ProtectedKeyword, CancellationToken.None);
test\Generators\Shared\RoslynTestUtils.cs (4)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 486var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Gen.MetadataExtractor.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 486var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Gen.Metrics.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 486var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.Gen.MetricsReports.Unit.Tests (8)
EmitterTests.cs (4)
95Assert.Equal(string.Empty, emitter.GenerateReport(null!, CancellationToken.None)); 102Assert.Equal(string.Empty, emitter.GenerateReport(Array.Empty<ReportedMetricClass>(), CancellationToken.None)); 125Assert.Throws<NotSupportedException>(() => emitter.GenerateReport(new[] { metricClass }, CancellationToken.None)); 181string json = emitter.GenerateReport(_metricClasses, CancellationToken.None);
test\Generators\Shared\RoslynTestUtils.cs (4)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 486var context = new CodeFixContext(doc!, d, (action, _) => actions.Add(action), CancellationToken.None); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.JSInterop (11)
JSObjectReferenceExtensions.cs (5)
98var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 116var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 166var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 184var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 203var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None;
JSRuntime.cs (1)
120return await InvokeAsync<TValue>(targetInstanceId, identifier, callType, CancellationToken.None, args);
JSRuntimeExtensions.cs (5)
98var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 116var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 166var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 184var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None; 203var cancellationToken = cancellationTokenSource?.Token ?? CancellationToken.None;
Microsoft.JSInterop.Tests (4)
JSObjectReferenceTest.cs (1)
52await Assert.ThrowsAsync<ObjectDisposedException>(async () => await jsObject.InvokeAsync<object>("test", CancellationToken.None, "arg1", "arg2"));
JSRuntimeExtensionsTest.cs (2)
124Assert.True(cts == CancellationToken.None); 168Assert.True(cts == CancellationToken.None);
JSRuntimeTest.cs (1)
421var exception = await Assert.ThrowsAsync<NotSupportedException>(async () => await runtime.ReadJSDataAsStreamAsync(dataReference, 10, CancellationToken.None));
Microsoft.Maui.Controls (1)
Internals\AsyncValue.cs (1)
58 _valueTask.ContinueWith(t => OnPropertyChanged(nameof(Value)), CancellationToken.None, TaskContinuationOptions.OnlyOnRanToCompletion, scheduler);
Microsoft.VisualStudio.LanguageServices (66)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
89}, CancellationToken.None).CompletesAsyncOperation(asyncToken);
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (1)
173document.Project.GetCompilationAsync(System.Threading.CancellationToken.None);
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
56var provider = await _providerFactory.GetOrCreateProviderAsync(CancellationToken.None).ConfigureAwait(false);
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
92return solution.GetDocument(currentDocumentId).State.GetTextSynchronously(CancellationToken.None).Lines;
FindReferences\Entries\DocumentSpanEntry.cs (2)
184var sourceText = document.GetTextSynchronously(CancellationToken.None); 190var excerpt = this.Presenter.ThreadingContext.JoinableTaskFactory.Run(() => excerptService.TryExcerptAsync(document, sourceSpan, ExcerptMode.Tooltip, classificationOptions, CancellationToken.None));
GenerateType\GenerateTypeDialogViewModel.cs (2)
494.Where(d => d != _document && !d.IsGeneratedCode(CancellationToken.None)) 500.Where(d => !d.IsGeneratedCode(CancellationToken.None))
Implementation\AbstractEditorFactory.cs (1)
372formattedText.Write(textWriter, cancellationToken: CancellationToken.None);
Implementation\AbstractVsTextViewFilter.cs (1)
75using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_GetDataTipText, CancellationToken.None))
LanguageService\AbstractLanguageService`2.IVsLanguageContextProvider.cs (1)
39var cancellationToken = CancellationToken.None;
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (4)
83using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_GetNameOfLocation, CancellationToken.None)) 127using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_GetProximityExpressions, CancellationToken.None)) 187using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_ResolveName, CancellationToken.None)) 243using (Logger.LogBlock(FunctionId.Debugging_VsLanguageDebugInfo_ValidateBreakpointLocation, CancellationToken.None))
Library\AbstractLibraryManager_IVsSimpleLibrary2.cs (1)
56() => GetListAsync(listType, flags, pobSrch, CancellationToken.None));
Library\AbstractObjectList.cs (6)
150() => TryFillDescriptionAsync(index, (_VSOBJDESCOPTIONS)grfOptions, pobDesc, CancellationToken.None)); 159GetBrowseObjectAsync(index, CancellationToken.None)); 212() => GetExpandableAsync(index, listTypeExcluded, CancellationToken.None)) ? 1 : 0; 237() => GetListAsync(index, listType, flags, pobSrch, CancellationToken.None)); 251var ppNavInfo = await GetNavInfoAsync(index, CancellationToken.None).ConfigureAwait(true); 272TryGetPropertyAsync(index, (_VSOBJLISTELEMPROPID)propid, CancellationToken.None));
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
285var documentationComment = symbol.GetDocumentationComment(compilation, expandIncludes: true, expandInheritdoc: true, cancellationToken: CancellationToken.None);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (1)
313this.Workspace.CurrentSolution, _languageName, CancellationToken.None).ConfigureAwait(true);
Preview\FileChange.cs (4)
58? left.GetTextSynchronously(CancellationToken.None) 59: right.GetTextSynchronously(CancellationToken.None); 63this.Children = ComputeChildren(left, right, CancellationToken.None); 127var text = document.GetTextSynchronously(CancellationToken.None).ToString();
Preview\PreviewEngine.cs (1)
67_newSolution = newSolution.WithMergedLinkedFileChangesAsync(oldSolution, cancellationToken: CancellationToken.None).Result;
Preview\PreviewUpdater.cs (4)
57if (existingDocument.GetTextSynchronously(CancellationToken.None).ContentEquals(document.GetTextSynchronously(CancellationToken.None))) 68var currentDocumentText = currentDocument.GetTextSynchronously(CancellationToken.None); 86var documentText = document.GetTextSynchronously(CancellationToken.None).ToString();
Preview\TopLevelChange.cs (2)
77var updatedDocumentTextOpt = updatedTextDocument?.GetTextSynchronously(CancellationToken.None); 151var oldText = oldDocument.GetTextSynchronously(CancellationToken.None).ToString();
ProjectSystem\FileChangeTracker.cs (5)
95_ = _fileChangeCookie.GetValue(CancellationToken.None); 113uint? result = await ((IVsAsyncFileChangeEx2)self._fileChangeService).AdviseFileChangeAsync(self.FilePath, self._fileChangeFlags, self, CancellationToken.None).ConfigureAwait(false); 138s_lastBackgroundTask = s_lastBackgroundTask.ContinueWith(_ => _fileChangeCookie.GetValueAsync(CancellationToken.None), CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default).Unwrap(); 171var fileChangeCookie = _fileChangeCookie.GetValue(CancellationToken.None);
ProjectSystem\FileChangeWatcher.cs (1)
55CancellationToken.None);
ProjectSystem\Legacy\AbstractLegacyProject.cs (1)
121CancellationToken.None));
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
115var textManager = _threadingContext.JoinableTaskFactory.Run(() => _textManagerService.GetValueOrNullAsync(CancellationToken.None));
ProjectSystem\VisualStudioProjectFactory.cs (2)
87cancellationToken = CancellationToken.None; 117await ((IVsTypeScriptVisualStudioProjectFactory)this).CreateAndAddToWorkspaceAsync(projectSystemName, language, projectFilePath, hierarchy, projectGuid, CancellationToken.None).ConfigureAwait(false));
ProjectSystem\VisualStudioWorkspaceImpl.cs (4)
586var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChangesAsync(solutionChanges, CancellationToken.None)); 693return editorAdaptersService.TryGetUndoManager(this, documentId, CancellationToken.None); 987var text = document.GetTextSynchronously(CancellationToken.None); 1176var textBuffer = document.GetTextSynchronously(CancellationToken.None).Container.TryGetTextBuffer();
Remote\VisualStudioWorkspaceServiceHubConnector.cs (1)
63CancellationToken.None,
Snippets\AbstractSnippetCommandHandler.cs (1)
286var textManager = this.ThreadingContext.JoinableTaskFactory.Run(() => _textManager.GetValueOrNullAsync(CancellationToken.None));
Snippets\SnippetExpansionClient.cs (3)
176var cancellationToken = CancellationToken.None; 220SubjectBuffer.FormatAndApplyToBuffer(formattingSpan, EditorOptionsService, CancellationToken.None); 706_threadingContext.JoinableTaskFactory.Run(() => OnModelUpdatedAsync(e.NewModel, CancellationToken.None));
Snippets\SnippetFunctions\AbstractSnippetFunction.IVsExpansionFunction.cs (2)
14=> GetDefaultValue(CancellationToken.None, out bstrValue, out fHasDefaultValue); 17=> GetCurrentValue(CancellationToken.None, out bstrValue, out fHasCurrentValue);
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
159ApplyUnusedReferenceUpdates(_threadingContext.JoinableTaskFactory, solution, projectFilePath, referenceChanges, CancellationToken.None);
ValueTracking\ValueTrackingCommandHandler.cs (1)
82using var logger = Logger.LogBlock(FunctionId.ValueTracking_Command, CancellationToken.None, LogLevel.Information);
Venus\ContainedDocument.cs (5)
769var parsedDocument = ParsedDocument.CreateSynchronously(document, CancellationToken.None); 796var root = document.GetSyntaxRootSynchronously(CancellationToken.None); 813CancellationToken.None).GetTextChanges(CancellationToken.None); 816var newChanges = FilterTextChanges(document.GetTextSynchronously(CancellationToken.None), visibleSpans, changes.ToReadOnlyCollection()).Where(t => visibleSpan.Contains(t.Span));
Venus\ContainedDocument.DocumentServiceProvider.cs (1)
78var mappedSpanResults = await MapSpansAsync(oldDocument, textChanges.Select(tc => tc.Span), CancellationToken.None).ConfigureAwait(false);
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (1)
71var container = document.GetTextSynchronously(CancellationToken.None).Container;
Workspace\SourceGeneratedFileManager.cs (1)
201_threadingContext.JoinableTaskFactory.Run(() => openFile.RefreshFileAsync(CancellationToken.None).AsTask());
Microsoft.VisualStudio.LanguageServices.CSharp (25)
CodeModel\CSharpCodeModelService.cs (13)
651var compilation = project.GetRequiredCompilationAsync(CancellationToken.None).Result; 1274var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 1354var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 1412var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 2764return document.ReplaceNodeSynchronously(fieldDeclaration, newFieldDeclaration, CancellationToken.None); 2785return document.ReplaceNodeSynchronously(enumDeclaration, newEnumDeclaration, CancellationToken.None); 2796var text = document.GetTextSynchronously(CancellationToken.None); 2811return document.ReplaceNodeSynchronously(attributeList, newAttributeList, CancellationToken.None); 2822return document.ReplaceNodeSynchronously(argumentList, newArgumentList, CancellationToken.None); 2832return document.ReplaceNodeSynchronously(parameterList, newParameterList, CancellationToken.None); 2837var text = document.GetTextSynchronously(CancellationToken.None); 3778var typeInfo = semanticModel.GetTypeInfo(type.Type, CancellationToken.None); 3866var typeInfo = semanticModel.GetTypeInfo(type.Type, CancellationToken.None);
LanguageService\CSharpCreateServicesOnTextViewConnection.cs (1)
48await ExtensionMethodImportCompletionHelper.WarmUpCacheAsync(project, CancellationToken.None).ConfigureAwait(false);
LanguageService\CSharpDebuggerIntelliSenseContext.cs (2)
69var tree = document.GetSyntaxTreeSynchronously(CancellationToken.None); 70var token = tree.FindTokenOnLeftOfPosition(contextPoint, CancellationToken.None);
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
133var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None).ConfigureAwait(true);
SemanticSearch\SemanticSearchQueryExecutor.cs (3)
117await presenterContext.OnCompletedAsync(CancellationToken.None).ConfigureAwait(false); 192CancellationToken.None).ConfigureAwait(false); 196await presenterContext.OnCompletedAsync(CancellationToken.None).ConfigureAwait(false);
SemanticSearch\SemanticSearchToolWindowImpl.cs (5)
406await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 416cancellationToken: CancellationToken.None); 446await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 463await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 495await threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (20)
DesignerAttribute\DesignerAttributeServiceTests.cs (2)
107var compilation = await document.Project.GetRequiredCompilationAsync(CancellationToken.None); 109compilation.DesignerCategoryAttributeType() != null, document.Project, document.Id, existingCategory, CancellationToken.None);
DocumentOutline\DocumentOutlineTests.cs (6)
62mocks.TextBuffer, mocks.LanguageServiceBrokerCallback, mocks.FilePath, CancellationToken.None); 127var searchedSymbols = DocumentOutlineViewModel.SearchDocumentSymbolData(model.DocumentSymbolData, string.Empty, CancellationToken.None); 131searchedSymbols = DocumentOutlineViewModel.SearchDocumentSymbolData(model.DocumentSymbolData, "foo", CancellationToken.None); 136searchedSymbols = DocumentOutlineViewModel.SearchDocumentSymbolData(model.DocumentSymbolData, "Method", CancellationToken.None); 142searchedSymbols = DocumentOutlineViewModel.SearchDocumentSymbolData(model.DocumentSymbolData, "app", CancellationToken.None); 148searchedSymbols = DocumentOutlineViewModel.SearchDocumentSymbolData(model.DocumentSymbolData, "xyz", CancellationToken.None);
F1Help\F1HelpTests.cs (1)
30var actualText = await service.GetHelpTermAsync(workspace.CurrentSolution.Projects.First().Documents.First(), workspace.Documents.First().SelectedSpans.First(), CancellationToken.None);
PersistentStorage\AbstractPersistentStorageTests.cs (2)
1013SolutionKey.ToSolutionKey(solution), configuration, faultInjector, CancellationToken.None); 1031solutionKey, configuration, faultInjector, CancellationToken.None);
ProjectSystemShim\CPS\SourceFileHandlingTests.cs (6)
131var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false); 173var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false); 224var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false); 263var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false); 334var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false); 382var disposableBatchScope = await project.CreateBatchScopeAsync(CancellationToken.None).ConfigureAwait(false);
ProjectSystemShim\CSharpHelpers.cs (2)
91CancellationToken.None); 111CancellationToken.None);
ProjectSystemShim\LegacyProject\AnalyzersTests.cs (1)
265waiter.ExpeditedWaitAsync().JoinUsingDispatcher(CancellationToken.None);
Microsoft.VisualStudio.LanguageServices.Implementation (48)
CodeModel\AbstractCodeModelObject_CodeGen.cs (9)
47var method = CodeGenerationService.CreateMethodDeclaration(newMethodSymbol, destination, info, CancellationToken.None); 61var method = CodeGenerationService.CreateMethodDeclaration(newMethodSymbol, destination, info, CancellationToken.None); 80return CodeGenerationService.CreateNamedTypeDeclaration(newTypeSymbol, destination, info, CancellationToken.None); 126return CodeGenerationService.CreateEventDeclaration(newEventSymbol, destination, info, CancellationToken.None); 141return CodeGenerationService.CreateFieldDeclaration(newFieldSymbol, destination, info, CancellationToken.None); 167var method = CodeGenerationService.CreateMethodDeclaration(newMethodSymbol, destination, info, CancellationToken.None); 227return CodeGenerationService.CreatePropertyDeclaration(newPropertySymbol, destination, info, CancellationToken.None); 236return CodeGenerationService.CreateNamespaceDeclaration(newNamespaceSymbol, destination, info, CancellationToken.None); 263return CodeGenerationService.CreateNamedTypeDeclaration(newTypeSymbol, destination, codeGenOptions, CancellationToken.None);
CodeModel\AbstractCodeModelService.AbstractCodeModelEventCollector.cs (2)
38CollectCore(oldTree.GetRoot(CancellationToken.None), newTree.GetRoot(CancellationToken.None), eventQueue);
CodeModel\AbstractCodeModelService.cs (3)
279var obj = project.GetRequiredCompilationAsync(CancellationToken.None).Result.GetSpecialType(SpecialType.System_Object); 329return symbolId.Resolve(project.GetRequiredCompilationAsync(CancellationToken.None).Result).Symbol; 599if (!document.IsGeneratedCode(CancellationToken.None))
CodeModel\ExternalElements\AbstractExternalCodeElement.cs (1)
43return project.GetCompilationAsync(CancellationToken.None).Result;
CodeModel\FileCodeModel.cs (13)
346var formattingOptions = await result.GetSyntaxFormattingOptionsAsync(CancellationToken.None).ConfigureAwait(false); 347var formatted = await Formatter.FormatAsync(result, Formatter.Annotation, formattingOptions, CancellationToken.None).ConfigureAwait(true); 348formatted = await Formatter.FormatAsync(formatted, SyntaxAnnotation.ElasticAnnotation, formattingOptions, CancellationToken.None).ConfigureAwait(true); 415() => Workspace.CurrentSolution.GetSourceGeneratedDocumentAsync(GetDocumentId(), CancellationToken.None).AsTask()); 427return GetDocument().GetRequiredSyntaxTreeSynchronously(CancellationToken.None); 432return GetDocument().GetRequiredSyntaxRootSynchronously(CancellationToken.None); 439.GetRequiredSemanticModelAsync(CancellationToken.None).AsTask(); 446.GetCodeGenerationOptionsAsync(CancellationToken.None).AsTask(); 453.GetRequiredCompilationAsync(CancellationToken.None); 553var line = GetDocument().GetTextSynchronously(CancellationToken.None).Lines[lineNumber]; 703var simplifierOptions = await _batchDocument.GetSimplifierOptionsAsync(CancellationToken.None).ConfigureAwait(false); 704return await Simplifier.ReduceAsync(_batchDocument, Simplifier.Annotation, simplifierOptions, CancellationToken.None).ConfigureAwait(false); 723elementAndPath.Item1.ReacquireNodeKey(elementAndPath.Item2, CancellationToken.None);
CodeModel\FileCodeModel_CodeGen.cs (6)
28document, IsBatchOpen, insertionIndex, containerNode, attributeNode, CancellationToken.None, out var newDocument); 39document, IsBatchOpen, insertionIndex, containerNode, attributeArgumentNode, CancellationToken.None, out var newDocument); 50document, IsBatchOpen, insertionIndex, containerNode, importNode, CancellationToken.None, out var newDocument); 61document, IsBatchOpen, insertionIndex, containerNode, memberNode, CancellationToken.None, out var newDocument); 72document, IsBatchOpen, insertionIndex, containerNode, parameterNode, CancellationToken.None, out var newDocument); 97return CodeModelService.UpdateNode(document, node, updatedNode, CancellationToken.None);
CodeModel\FileCodeModel_Events.cs (1)
42var newTree = document.GetRequiredSyntaxTreeSynchronously(CancellationToken.None);
CodeModel\InternalElements\AbstractCodeElement.cs (1)
142=> State.ThreadingContext.JoinableTaskFactory.Run(() => GetDocument().GetLineFormattingOptionsAsync(CancellationToken.None).AsTask());
CodeModel\InternalElements\AbstractCodeMember.cs (2)
176ReacquireNodeKey(nodePath, CancellationToken.None); 202ReacquireNodeKey(nodePath, CancellationToken.None);
CodeModel\InternalElements\AbstractKeyedCodeElement.cs (1)
88ReacquireNodeKey(nodePath, CancellationToken.None);
CodeModel\InternalElements\CodeFunction.IMethodXML.cs (1)
19using (Logger.LogBlock(FunctionId.WinformDesigner_GenerateXML, CancellationToken.None))
CodeModel\InternalElements\CodeFunctionWithEventHandler.cs (2)
65return CodeModelService.AddHandlesClause(document, bstrEventName, node, CancellationToken.None); 78return CodeModelService.RemoveHandlesClause(document, bstrEventName, node, CancellationToken.None);
CodeModel\InternalElements\CodeParameter.cs (1)
59_parentHandle.Value.ReacquireNodeKey(parentNodePath, CancellationToken.None);
Options\AbstractOptionPreviewViewModel.cs (2)
141var root = document.GetSyntaxRootSynchronously(CancellationToken.None); 142var formatted = Formatter.Format(root, document.Project.Solution.Services, formattingOptions, CancellationToken.None);
ProjectSystem\CPS\CPSProjectFactory.cs (1)
111cancellationToken = CancellationToken.None;
RoslynVisualStudioWorkspace.cs (1)
74needsUndoDisabled = document.IsGeneratedCode(CancellationToken.None);
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItem.cs (1)
63item._threadingContext, item.Workspace, item.DocumentId, position: 0, CancellationToken.None).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.LiveShare (6)
Client\RemoteLanguageServiceWorkspace.cs (5)
155using (await s_RemotePathsGate.DisposableWaitAsync(CancellationToken.None).ConfigureAwait(false)) 168var roots = await session.ListRootsAsync(CancellationToken.None).ConfigureAwait(false); 231await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(CancellationToken.None); 399await _session.DownloadFileAsync(_session.ConvertLocalPathToSharedUri(doc.FilePath), CancellationToken.None).ConfigureAwait(true); 481var sourceText = document.GetTextSynchronously(CancellationToken.None);
Client\RemoteLanguageServiceWorkspaceHost.cs (1)
72LoadProjectsAsync(CancellationToken.None).Forget();
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\XamlProjectService.cs (1)
162name, StringConstants.XamlLanguageName, projectInfo, CancellationToken.None));
Replay (4)
Replay.cs (2)
108await foreach (var buildData in BuildAllAsync(options, compilerCalls, compilerServerLogger, CancellationToken.None).ConfigureAwait(false)) 130cancellationToken: CancellationToken.None).ConfigureAwait(false);
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
Roslyn.Diagnostics.Analyzers (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (1)
331? ((CompilationUnitSyntax)structure.SyntaxTree.GetRoot(CancellationToken.None)).EndOfFileToken
Roslyn.VisualStudio.DiagnosticsWindow (4)
OptionPages\ForceLowMemoryMode.cs (1)
80return Task.Factory.StartNew(() => this.PopulateAndMonitorWorkerAsync(size), CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default).Unwrap();
OptionPages\PerformanceLoggersPage.cs (2)
67var client = threadingContext.JoinableTaskFactory.Run(() => RemoteHostClient.TryGetClientAsync(workspaceServices, CancellationToken.None)); 74CancellationToken.None).ConfigureAwait(false));
Panels\WorkspacePanel.xaml.cs (1)
48return await DiagnoseAsync(CancellationToken.None).ConfigureAwait(false);
Roslyn.VisualStudio.Next.UnitTests (307)
Remote\RemoteHostClientServiceFactoryTests.cs (5)
39var checksumUpdater = new SolutionChecksumUpdater(workspace, listenerProvider, CancellationToken.None); 43using var client = await service.TryGetRemoteHostClientAsync(CancellationToken.None); 50var oldText = document.GetTextSynchronously(CancellationToken.None); 76var client = await service.TryGetRemoteHostClientAsync(CancellationToken.None); 81CancellationToken.None));
Remote\SerializationValidator.cs (9)
85var data = await AssetStorage.GetTestAccessor().GetRequiredAssetAsync(checksum, CancellationToken.None).ConfigureAwait(false); 98Serializer.Serialize(data.Value, writer, CancellationToken.None); 106var result = Serializer.Deserialize(data.Kind, reader, CancellationToken.None); 114scope.SolutionChecksum, this.Services.SolutionServices, CancellationToken.None).ConfigureAwait(false); 145(v, k, s) => new SolutionAsset(s.CreateChecksum(v, CancellationToken.None), v)); 149(v, k, s) => new SolutionAsset(s.CreateChecksum(v, CancellationToken.None), v)); 155(v, k, s) => new SolutionAsset(s.CreateChecksum(v, CancellationToken.None), v)); 162(v, k, s) => new SolutionAsset(s.CreateChecksum(v, CancellationToken.None), v)); 169(v, k, s) => new SolutionAsset(s.CreateChecksum(v, CancellationToken.None), v));
Remote\SnapshotSerializationTests.cs (49)
75var data = await scope.GetTestAccessor().GetAssetAsync(checksum, CancellationToken.None); 88using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 108using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 121using var scope = await validator.AssetStorage.StoreAssetsAsync(project.Solution, CancellationToken.None); 143using var snapshot = await validator.AssetStorage.StoreAssetsAsync(project.Solution, CancellationToken.None); 157using var scope = await validator.AssetStorage.StoreAssetsAsync(document.Project.Solution, CancellationToken.None); 177using var scope = await validator.AssetStorage.StoreAssetsAsync(document.Project.Solution, CancellationToken.None); 187var firstProjectChecksum = await solution.GetProject(solution.ProjectIds[0]).State.GetChecksumAsync(CancellationToken.None); 188var secondProjectChecksum = await solution.GetProject(solution.ProjectIds[1]).State.GetChecksumAsync(CancellationToken.None); 192using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 211using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 223using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 237using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 258using (var scope1 = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None).ConfigureAwait(false)) 264using (var scope2 = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None).ConfigureAwait(false)) 285var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 299var scope1 = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 307using var scope2 = await validator.AssetStorage.StoreAssetsAsync(recovered, CancellationToken.None); 321using var scope3 = await validator.AssetStorage.StoreAssetsAsync(roundtrip, CancellationToken.None); 339var scope1 = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 347using var scope2 = await validator.AssetStorage.StoreAssetsAsync(recovered, CancellationToken.None); 362using var scope3 = await validator.AssetStorage.StoreAssetsAsync(roundtrip, CancellationToken.None); 381var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 395var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 409var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 430var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 451var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 466var assetFromFile = new SolutionAsset(serializer.CreateChecksum(reference, CancellationToken.None), reference); 491using var snapshot = await validator.AssetStorage.StoreAssetsAsync(project.Solution, CancellationToken.None); 511using var snapshot = await validator.AssetStorage.StoreAssetsAsync(project.Solution, CancellationToken.None); 524using var snapshot = await validator.AssetStorage.StoreAssetsAsync(project.Solution, CancellationToken.None); 537var metadata = serializer.CreateChecksum(new MissingMetadataReference(), CancellationToken.None); 538var analyzer = serializer.CreateChecksum(new AnalyzerFileReference(Path.Combine(TempRoot.Root, "missing"), new MissingAnalyzerLoader()), CancellationToken.None); 552var checksum = await project.State.GetChecksumAsync(CancellationToken.None); 590using var scope = await validator.AssetStorage.StoreAssetsAsync(solution, CancellationToken.None); 594var compilation = await recovered.Projects.First().GetCompilationAsync(CancellationToken.None); 615serializer.Serialize(serializableSourceText, objectWriter, CancellationToken.None); 622var newText = (SerializableSourceText)serializer.Deserialize(serializableSourceText.GetWellKnownSynchronizationKind(), objectReader, CancellationToken.None); 623Assert.Equal(sourceText.ToString(), newText.GetText(CancellationToken.None).ToString()); 633serializer.Serialize(serializableSourceText, objectWriter, CancellationToken.None); 640var newText = (SerializableSourceText)serializer.Deserialize(serializableSourceText.GetWellKnownSynchronizationKind(), objectReader, CancellationToken.None); 641Assert.Equal(sourceText.ToString(), newText.GetText(CancellationToken.None).ToString()); 662serializer.Serialize(originalOptions, objectWriter, CancellationToken.None); 667var recoveredOptions = (CompilationOptions)serializer.Deserialize(originalOptions.GetWellKnownSynchronizationKind(), objectReader, CancellationToken.None); 669var original = serializer.CreateChecksum(originalOptions, CancellationToken.None); 670var recovered = serializer.CreateChecksum(recoveredOptions, CancellationToken.None); 681serializer.Serialize(asset.Value, writer, CancellationToken.None); 686var recovered = serializer.Deserialize(asset.Kind, reader, CancellationToken.None); 687var checksum = recovered is SerializableSourceText text ? text.ContentChecksum : serializer.CreateChecksum(recovered, CancellationToken.None);
Services\AssetProviderTests.cs (18)
54var stored = await provider.GetAssetAsync<object>(AssetPath.FullLookupForTesting, checksum, CancellationToken.None); 58await provider.GetAssetsAsync<object, VoidResult>(AssetPath.FullLookupForTesting, [checksum], (checksum, asset, _) => stored2.Add((checksum, asset)), default, CancellationToken.None); 74await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 76var map = await solution.GetAssetMapAsync(projectConeId: null, CancellationToken.None); 85await service.GetAssetsAsync<object>(AssetPath.FullLookupForTesting, [.. map.Keys], CancellationToken.None); 102await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 104var map = await solution.GetAssetMapAsync(projectConeId: null, CancellationToken.None); 113await service.SynchronizeSolutionAssetsAsync(await solution.CompilationState.GetChecksumAsync(CancellationToken.None), CancellationToken.None); 127await project.State.GetChecksumAsync(CancellationToken.None); 129var map = await project.GetAssetMapAsync(CancellationToken.None); 140allProjectChecksums.Add(await project.State.GetStateChecksumsAsync(CancellationToken.None)); 142await service.SynchronizeProjectAssetsAsync(allProjectChecksums, CancellationToken.None); 156await project.State.GetChecksumAsync(CancellationToken.None); 158var map = await project.GetAssetMapAsync(CancellationToken.None); 169var stateChecksums = await project.State.GetStateChecksumsAsync(CancellationToken.None); 175AssetPath.FullLookupForTesting, textChecksums, CancellationToken.None); 180AssetPath.FullLookupForTesting, textChecksumsReversed, CancellationToken.None);
Services\ServiceHubServicesTests.cs (48)
82await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 83await remoteWorkpace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 104var oldState = await oldDocument.State.GetStateChecksumsAsync(CancellationToken.None); 112var newState = await newDocument.State.GetStateChecksumsAsync(CancellationToken.None); 117CancellationToken.None); 121Assert.Equal(newText.ToString(), (await serializableRemoteText.GetTextAsync(CancellationToken.None)).ToString()); 127await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 130await solution.AppendAssetMapAsync(map, CancellationToken.None); 155var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 156await remoteWorkspace.UpdatePrimaryBranchSolutionAsync(assetProvider, solutionChecksum, CancellationToken.None); 206var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 207await remoteWorkspace.UpdatePrimaryBranchSolutionAsync(assetProvider, solutionChecksum, CancellationToken.None); 218CancellationToken.None); 252await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 253await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 258await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 259await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 278await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 279await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 286await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 287await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 294await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 295await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 328await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 329await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 342await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 343await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 356await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 357await remoteWorkspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 733CancellationToken.None).ConfigureAwait(false); 757Assert.Equal("// generated document 2", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 762Assert.Equal("// generated document 1", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 817CancellationToken.None).ConfigureAwait(false); 842Assert.Equal("// generated document 1", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 872CancellationToken.None).ConfigureAwait(false); 896Assert.Equal("// generated document 2", sourceGeneratedDocuments.Single().GetTextSynchronously(CancellationToken.None).ToString()); 1428CancellationToken.None).ConfigureAwait(false); 1498CancellationToken.None).ConfigureAwait(false); 1582CancellationToken.None).ConfigureAwait(false); 1661CancellationToken.None).ConfigureAwait(false); 1787await solution.CompilationState.GetChecksumAsync(CancellationToken.None), 1788await remoteSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 1869""")], CancellationToken.None); 1882using (CopilotChangeAnalysisUtilities.LogCopilotChangeAnalysis("TestCode", accepted: true, "TestProposalId", result, CancellationToken.None)) 1967var map = await solution.GetAssetMapAsync(projectConeId: null, CancellationToken.None); 1985return SourceText.From(document.State.GetTextSynchronously(CancellationToken.None).ToString() + csAddition); 1988return SourceText.From(document.State.GetTextSynchronously(CancellationToken.None).ToString() + vbAddition); 2012CancellationToken.None);
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (40)
41await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 44await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 61await extensionMessageHandlerService.UnregisterExtensionAsync("TempPath", CancellationToken.None); 79workspace.CurrentSolution, "MessageName", "JsonMessage", CancellationToken.None); 102workspace.CurrentSolution.Projects.Single().Documents.Single(), "MessageName", "JsonMessage", CancellationToken.None); 119await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath", CancellationToken.None); 136await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 138await extensionMessageHandlerService.UnregisterExtensionAsync("TempPath", CancellationToken.None); 141await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath", CancellationToken.None); 178await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 181var result = await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath", CancellationToken.None); 207await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 210var result = await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath", CancellationToken.None); 235await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 239async () => await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath", CancellationToken.None)); 272await extensionMessageHandlerService.RegisterExtensionAsync("TempPath", CancellationToken.None); 275var result = await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath", CancellationToken.None); 351"NonRegisteredHandlerName", jsonMessage: "0", CancellationToken.None); 377"HandlerName", jsonMessage: "[]", CancellationToken.None); 412"HandlerName", jsonMessage: "0", CancellationToken.None); 450"HandlerName", jsonMessage: "0", CancellationToken.None); 497"HandlerName", jsonMessage: "0", CancellationToken.None); 508"HandlerName", jsonMessage: "0", CancellationToken.None); 542"HandlerName", jsonMessage: "0", CancellationToken.None)); 573"HandlerName", jsonMessage: "0", CancellationToken.None); 603await extensionMessageHandlerService.UnregisterExtensionAsync("TempPath", CancellationToken.None); 609"HandlerName", jsonMessage: "0", CancellationToken.None); 644await extensionMessageHandlerService.RegisterExtensionAsync("TempPath1", CancellationToken.None); 647await extensionMessageHandlerService.RegisterExtensionAsync("TempPath2", CancellationToken.None); 650var messageNames1 = await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath1", CancellationToken.None); 653var messageNames2 = await extensionMessageHandlerService.GetExtensionMessageNamesAsync("TempPath2", CancellationToken.None); 662"HandlerName", jsonMessage: "0", CancellationToken.None); 686"HandlerName", jsonMessage: "0", CancellationToken.None); 692"HandlerName", jsonMessage: "0", CancellationToken.None); 729await extensionMessageHandlerService.RegisterExtensionAsync(@"TempPath\a.dll", CancellationToken.None); 730await extensionMessageHandlerService.GetExtensionMessageNamesAsync(@"TempPath\a.dll", CancellationToken.None); 734await extensionMessageHandlerService.RegisterExtensionAsync(@"TempPath\b.dll", CancellationToken.None); 735await extensionMessageHandlerService.GetExtensionMessageNamesAsync(@"TempPath\b.dll", CancellationToken.None); 739await extensionMessageHandlerService.UnregisterExtensionAsync(@"TempPath\a.dll", CancellationToken.None); 744await extensionMessageHandlerService.UnregisterExtensionAsync(@"TempPath\b.dll", CancellationToken.None);
Services\SolutionAssetCacheTests.cs (1)
75var checksums = await solution.CompilationState.GetStateChecksumsAsync(CancellationToken.None);
Services\SolutionServiceTests.cs (135)
53var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 54var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 56Assert.Equal(solutionChecksum, await synched.CompilationState.GetChecksumAsync(CancellationToken.None)); 68var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 71var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch, cancellationToken: CancellationToken.None); 72Assert.Equal(solutionChecksum, await synched.CompilationState.GetChecksumAsync(CancellationToken.None)); 92var solutionChecksum = await workspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 93var solution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 121var solutionChecksum = await workspace.CurrentSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 122var solution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 144var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 146var first = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 147var second = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 444await solution1.CompilationState.GetChecksumAsync(CancellationToken.None), 446CancellationToken.None); 457var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 458await remoteWorkspace.UpdatePrimaryBranchSolutionAsync(assetProvider, solutionChecksum, CancellationToken.None); 461return await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 467Assert.Equal(await givenSolution.CompilationState.GetChecksumAsync(CancellationToken.None), await remoteSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 481var solutionChecksum1 = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 491var solutionChecksum2 = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 507var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 508var synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 509Assert.Equal(solutionChecksum, await synched.CompilationState.GetChecksumAsync(CancellationToken.None)); 517solutionChecksum = await frozenSolution1.CompilationState.GetChecksumAsync(CancellationToken.None); 518synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 519Assert.Equal(solutionChecksum, await synched.CompilationState.GetChecksumAsync(CancellationToken.None)); 526solutionChecksum = await frozenSolution2.CompilationState.GetChecksumAsync(CancellationToken.None); 527synched = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 528Assert.Equal(solutionChecksum, await synched.CompilationState.GetChecksumAsync(CancellationToken.None)); 551await solution.AppendAssetMapAsync(map, CancellationToken.None); 553var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 554var syncedFullSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 556Assert.Equal(solutionChecksum, await syncedFullSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 560var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 561await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 562var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 566var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 567await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 568var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 592await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 593var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 594var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 599await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 600var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 601var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 605await solution.AppendAssetMapAsync(map, CancellationToken.None); 606var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 607var syncedFullSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 609Assert.Equal(solutionChecksum, await syncedFullSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 633await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 634var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 635var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 640await solution.AppendAssetMapAsync(map, project3.Id, CancellationToken.None); 641var project3Checksum = await solution.CompilationState.GetChecksumAsync(project3.Id, CancellationToken.None); 642var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, CancellationToken.None); 667await solution.AppendAssetMapAsync(map, project3.Id, CancellationToken.None); 668var project3Checksum = await solution.CompilationState.GetChecksumAsync(project3.Id, CancellationToken.None); 669var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, CancellationToken.None); 673await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 674var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 675var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 680await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 681var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 682var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 709await solution.AppendAssetMapAsync(map, project3.Id, CancellationToken.None); 710var project3Checksum = await solution.CompilationState.GetChecksumAsync(project3.Id, CancellationToken.None); 711var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, CancellationToken.None); 715await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 716var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 717var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 721await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 722var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 723var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 749await solution.AppendAssetMapAsync(map, project3.Id, CancellationToken.None); 750var project3Checksum = await solution.CompilationState.GetChecksumAsync(project3.Id, CancellationToken.None); 751var project3SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project3Checksum, updatePrimaryBranch: false, CancellationToken.None); 755await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 756var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 757var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 761await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 762var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 763var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 787await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 788var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 789var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 794await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 795var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 796var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 820await solution.AppendAssetMapAsync(map, CancellationToken.None); 821var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 822var fullSyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 832await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 833var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 834var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 844await solution.AppendAssetMapAsync(map, project2.Id, CancellationToken.None); 845var project2Checksum = await solution.CompilationState.GetChecksumAsync(project2.Id, CancellationToken.None); 846var project2SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project2Checksum, updatePrimaryBranch: false, CancellationToken.None); 875await solution.AppendAssetMapAsync(map, CancellationToken.None); 876var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 877var fullSyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 888await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 889var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 890var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 921var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 944await solution.AppendAssetMapAsync(map, CancellationToken.None); 945var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 946var fullSyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: true, CancellationToken.None); 957await solution.AppendAssetMapAsync(map, project1.Id, CancellationToken.None); 958var project1Checksum = await solution.CompilationState.GetChecksumAsync(project1.Id, CancellationToken.None); 959var project1SyncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, project1Checksum, updatePrimaryBranch: false, CancellationToken.None); 1103var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 1104var syncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 1132var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 1133var syncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch, CancellationToken.None); 1159var checksumUpdater = new SolutionChecksumUpdater(workspace, listenerProvider, CancellationToken.None); 1163var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 1164var syncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch, CancellationToken.None); 1213var checksumUpdater = new SolutionChecksumUpdater(workspace, listenerProvider, CancellationToken.None); 1217var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 1218var syncedSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch, CancellationToken.None); 1278var solutionChecksum = await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 1281await remoteWorkspace.UpdatePrimaryBranchSolutionAsync(assetProvider, solutionChecksum, CancellationToken.None); 1282var recoveredSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, solutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 1286Assert.Equal(solutionChecksum, await recoveredSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 1290var newSolutionChecksum = await newSolution.CompilationState.GetChecksumAsync(CancellationToken.None); 1291await newSolution.AppendAssetMapAsync(map, CancellationToken.None); 1294var recoveredNewSolution = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, newSolutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 1296Assert.Equal(newSolutionChecksum, await recoveredNewSolution.CompilationState.GetChecksumAsync(CancellationToken.None)); 1299await remoteWorkspace.UpdatePrimaryBranchSolutionAsync(assetProvider, newSolutionChecksum, CancellationToken.None); 1300var third = await remoteWorkspace.GetTestAccessor().GetSolutionAsync(assetProvider, newSolutionChecksum, updatePrimaryBranch: false, CancellationToken.None); 1302Assert.Equal(newSolutionChecksum, await third.CompilationState.GetChecksumAsync(CancellationToken.None)); 1310await solution.CompilationState.GetChecksumAsync(CancellationToken.None); 1313await solution.AppendAssetMapAsync(map, CancellationToken.None);
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
166var result = await diagnosticAnalyzerService.GetTestAccessor().AnalyzeProjectInProcessAsync(project, compilationWithAnalyzers, logPerformanceInfo: false, getTelemetryInfo: false, cancellationToken: CancellationToken.None); 206logPerformanceInfo: false, getTelemetryInfo: false, cancellationToken: CancellationToken.None);
Security.TransportSecurity.IntegrationTests (2)
Tcp\StreamingTests.4.1.0.cs (2)
385Task.Factory.StartNew(() => StreamingTests.NetTcp_TransportSecurity_Streamed_RoundTrips_String(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait(); 403Task.Factory.StartNew(() => StreamingTests.NetTcp_TransportSecurity_Streamed_Async_RoundTrips_String(), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()).Wait();
SemanticSearch.BuildTask (2)
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
System.Collections.Concurrent (16)
System\Collections\Concurrent\BlockingCollection.cs (16)
255TryAddWithNoTimeValidation(item, Timeout.Infinite, CancellationToken.None); 304return TryAddWithNoTimeValidation(item, 0, CancellationToken.None); 328return TryAddWithNoTimeValidation(item, (int)timeout.TotalMilliseconds, CancellationToken.None); 350return TryAddWithNoTimeValidation(item, millisecondsTimeout, CancellationToken.None); 513if (!TryTake(out item, Timeout.Infinite, CancellationToken.None)) 557return TryTake(out item, 0, CancellationToken.None); 580return TryTakeWithNoTimeValidation(out item, (int)timeout.TotalMilliseconds, CancellationToken.None, null); 601return TryTakeWithNoTimeValidation(out item, millisecondsTimeout, CancellationToken.None, null); 765TryAddToAny(collections, item, Timeout.Infinite, CancellationToken.None); 835return TryAddToAny(collections, item, 0, CancellationToken.None); 865return TryAddToAnyCore(collections, item, (int)timeout.TotalMilliseconds, CancellationToken.None); 892return TryAddToAnyCore(collections, item, millisecondsTimeout, CancellationToken.None); 1138return TakeFromAny(collections, out item, CancellationToken.None); 1227return TryTakeFromAnyCore(collections, out item, (int)timeout.TotalMilliseconds, false, CancellationToken.None); 1257return TryTakeFromAnyCore(collections, out item, millisecondsTimeout, false, CancellationToken.None); 1600return GetConsumingEnumerable(CancellationToken.None);
System.ComponentModel.EventBasedAsync (1)
System\ComponentModel\BackgroundWorker.cs (1)
131CancellationToken.None,
System.Data.Common (12)
System\Data\Common\DbCommand.cs (4)
119public Task<int> ExecuteNonQueryAsync() => ExecuteNonQueryAsync(CancellationToken.None); 151ExecuteReaderAsync(CommandBehavior.Default, CancellationToken.None); 157ExecuteReaderAsync(behavior, CancellationToken.None); 192ExecuteScalarAsync(CancellationToken.None);
System\Data\Common\DbConnection.cs (1)
322public Task OpenAsync() => OpenAsync(CancellationToken.None);
System\Data\Common\DbDataReader.cs (4)
248GetFieldValueAsync<T>(ordinal, CancellationToken.None); 273public Task<bool> IsDBNullAsync(int ordinal) => IsDBNullAsync(ordinal, CancellationToken.None); 298public Task<bool> ReadAsync() => ReadAsync(CancellationToken.None); 319public Task<bool> NextResultAsync() => NextResultAsync(CancellationToken.None);
System\Data\Common\DbTransaction.cs (3)
91/// An optional token to cancel the asynchronous operation. The default value is <see cref="CancellationToken.None" />. 117/// An optional token to cancel the asynchronous operation. The default value is <see cref="CancellationToken.None" />. 144/// An optional token to cancel the asynchronous operation. The default value is <see cref="CancellationToken.None" />.
System.Diagnostics.Process (2)
System\Diagnostics\ProcessWaitState.Unix.cs (2)
285_waitInProgress = WaitForExitAsync(CancellationToken.None); 465CancellationToken.None :
System.Formats.Tar (8)
System\Formats\Tar\TarEntry.cs (1)
215/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
System\Formats\Tar\TarFile.cs (4)
58/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 127/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 199/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 285/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
System\Formats\Tar\TarReader.cs (1)
165/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
System\Formats\Tar\TarWriter.cs (2)
154/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 248/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
System.IO.Compression (6)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
155TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
System\IO\Compression\DeflateZLib\DeflateStream.cs (3)
394TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); 801TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); 915this(deflateStream, destination, bufferSize, CancellationToken.None)
System\IO\Compression\GZipStream.cs (2)
87TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); 115TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
System.IO.Compression.Brotli (8)
System\IO\Compression\BrotliStream.cs (1)
106await WriteAsyncMemoryCore(ReadOnlyMemory<byte>.Empty, CancellationToken.None, isFinalBlock: true).ConfigureAwait(false);
System\IO\Compression\dec\BrotliStream.Decompress.cs (3)
99TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); 114/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param> 127/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param>
System\IO\Compression\enc\BrotliStream.Compress.cs (4)
113TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); 125/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param> 138/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param> 211/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param>
System.IO.Hashing (1)
System\IO\Hashing\NonCryptographicHashAlgorithm.cs (1)
116/// The default value is <see cref="CancellationToken.None"/>.
System.IO.Pipelines (6)
System\IO\Pipelines\PipeReader.cs (2)
175/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param> 197/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param>
System\IO\Pipelines\PipeWriter.cs (3)
57/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param> 111/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param> 121/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param>
System\IO\Pipelines\StreamPipeExtensions.cs (1)
15/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="System.Threading.CancellationToken.None" />.</param>
System.IO.Pipes (6)
System\IO\Pipes\NamedPipeClientStream.cs (3)
126ConnectInternal(timeout, CancellationToken.None, Environment.TickCount); 168return ConnectAsync(Timeout.Infinite, CancellationToken.None); 173return ConnectAsync(timeout, CancellationToken.None);
System\IO\Pipes\NamedPipeServerStream.cs (1)
159return WaitForConnectionAsync(CancellationToken.None);
System\IO\Pipes\PipeStream.Unix.cs (2)
106=> TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); 180=> TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
System.IO.Ports (3)
System\IO\Ports\SerialStream.Unix.cs (3)
426Task<int> t = ReadAsync(array, offset, count, cts?.Token ?? CancellationToken.None); 563Task t = WriteAsync(array, offset, count, cts?.Token ?? CancellationToken.None); 684CancellationToken.None,
System.Linq.AsyncEnumerable (97)
System\Linq\AggregateAsync.cs (6)
17/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 58/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 101/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 138/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 180/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 227/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\AllAsync.cs (2)
17/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 54/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\AnyAsync.cs (3)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 41/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 78/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\AverageAsync.cs (10)
15/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 50/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 85/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 118/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 151/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 184/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 216/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 248/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 279/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 310/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ContainsAsync.cs (1)
18/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\CountAsync.cs (6)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 48/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 83/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 118/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 149/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 183/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ElementAtAsync.cs (4)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 34/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 54/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param> 83/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.</param>
System\Linq\FirstAsync.cs (9)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 47/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 86/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 125/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 137/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 164/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 181/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 199/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 236/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\LastAsync.cs (9)
15/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 53/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 107/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 160/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 175/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 210/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 224/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 239/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 292/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\MaxAsync.cs (5)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 127/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 168/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 209/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 232/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\MaxByAsync.cs (2)
18/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 128/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\MinAsync.cs (5)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 124/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 169/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 214/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 239/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\MinByAsync.cs (2)
18/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 128/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\SequenceEqualAsync.cs (1)
17/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\SingleAsync.cs (9)
18/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 58/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 111/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 163/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 179/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 222/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 244/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 263/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 313/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\SumAsync.cs (10)
15/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 41/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 67/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 92/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 117/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 142/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 171/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 200/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 228/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 256/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ToArrayAsync.cs (1)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ToDictionaryAsync.cs (6)
20/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 54/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 71/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 110/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 152/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 198/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ToHashSetAsync.cs (1)
17/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ToListAsync.cs (1)
16/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System\Linq\ToLookupAsync.cs (4)
24/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 72/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 123/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param> 176/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
System.Linq.Expressions (1)
System\Linq\Expressions\StackGuard.cs (1)
68Task<R> task = Task.Factory.StartNew(action!, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.Linq.Parallel (2)
System\Linq\Parallel\QueryOperators\QuerySettings.cs (1)
199get { return new QuerySettings(null, null, CancellationToken.None, null, null); }
System\Linq\Parallel\Scheduling\QueryTask.cs (1)
84return Task.Factory.StartNew(s_baseWorkDelegate, this, CancellationToken.None, TaskCreationOptions.AttachedToParent | TaskCreationOptions.PreferFairness, taskScheduler);
System.Net.Http (39)
System\Net\Http\HttpBaseStream.cs (1)
63WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
System\Net\Http\HttpClient.cs (10)
163GetStringAsync(requestUri, CancellationToken.None); 235GetByteArrayAsync(requestUri, CancellationToken.None); 313GetStreamAsync(requestUri, CancellationToken.None); 366GetAsync(requestUri, completionOption, CancellationToken.None); 384PostAsync(requestUri, content, CancellationToken.None); 400PutAsync(requestUri, content, CancellationToken.None); 416PatchAsync(requestUri, content, CancellationToken.None); 432DeleteAsync(requestUri, CancellationToken.None); 497SendAsync(request, DefaultCompletionOption, CancellationToken.None); 503SendAsync(request, completionOption, CancellationToken.None);
System\Net\Http\HttpContent.cs (8)
89ReadAsStringAsync(CancellationToken.None); 185ReadAsByteArrayAsync(CancellationToken.None); 201ReadAsStream(CancellationToken.None); 231ReadAsStreamAsync(CancellationToken.None); 333CopyToAsync(stream, CancellationToken.None); 339CopyToAsync(stream, context, CancellationToken.None); 439LoadIntoBufferAsync(maxBufferSize, CancellationToken.None); 1117TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
System\Net\Http\MessageProcessingHandler.cs (1)
103}, tcs, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
System\Net\Http\MultipartContent.cs (2)
241CreateContentReadStreamAsyncCore(async: true, CancellationToken.None).AsTask(); 530TaskToAsyncResult.Begin(ReadAsync(array, offset, count, CancellationToken.None), asyncCallback, asyncState);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (1)
1011CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
144SerializeToStreamAsync(stream, context, CancellationToken.None);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
2014CancellationToken requestBodyCancellationToken = duplex ? CancellationToken.None : cancellationToken;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (10)
174}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); 497}, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Current); 499await _clientControl.WriteAsync(_pool.Settings.Http3SettingsFrame, CancellationToken.None).ConfigureAwait(false); 549streamTask = _connection!.AcceptInboundStreamAsync(CancellationToken.None); 598bytesRead = await stream.ReadAsync(buffer.AvailableMemory, CancellationToken.None).ConfigureAwait(false); 674bytesRead = await stream.ReadAsync(buffer.AvailableMemory, CancellationToken.None).ConfigureAwait(false); 808bytesRead = await stream.ReadAsync(buffer.AvailableMemory, CancellationToken.None).ConfigureAwait(false); 841bytesRead = await stream.ReadAsync(buffer.AvailableMemory, CancellationToken.None).ConfigureAwait(false); 892bytesRead = await stream.ReadAsync(buffer.AvailableMemory, CancellationToken.None).ConfigureAwait(false); 921int bytesRead = await stream.ReadAsync(buffer.AvailableMemory, CancellationToken.None).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (2)
1212if (_responseDataPayloadRemaining <= 0 && !ReadNextDataFrameAsync(response, CancellationToken.None).AsTask().GetAwaiter().GetResult()) 1267HandleReadResponseContentException(ex, CancellationToken.None);
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
208CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs (1)
49SerializeToStreamAsync(stream, context, CancellationToken.None);
System.Net.Http.Json (1)
System\Net\Http\Json\JsonContent.cs (1)
105=> SerializeToStreamAsyncCore(stream, CancellationToken.None);
System.Net.HttpListener (1)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
371CancellationToken.None,
System.Net.Mail (2)
System\Net\DelegatedStream.cs (2)
61return TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); 70return TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
System.Net.NameResolution (7)
System\Net\Dns.cs (7)
95GetHostEntryAsync(hostNameOrAddress, AddressFamily.Unspecified, CancellationToken.None); 143}, hostNameOrAddress, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default); 170}, address, CancellationToken.None); 225(Task<IPAddress[]>)GetHostEntryOrAddressesCoreAsync(hostNameOrAddress, justReturnParsedIp: true, throwOnIIPAny: true, justAddresses: true, AddressFamily.Unspecified, CancellationToken.None); 279TaskToAsyncResult.Begin(GetHostEntryCoreAsync(hostName, justReturnParsedIp: true, throwOnIIPAny: true, AddressFamily.Unspecified, CancellationToken.None), requestCallback, stateObject); 348TaskToAsyncResult.Begin(GetHostEntryCoreAsync(hostName, justReturnParsedIp: false, throwOnIIPAny: false, AddressFamily.Unspecified, CancellationToken.None), requestCallback, stateObject); 778}, key, CancellationToken.None, TaskContinuationOptions.OnlyOnCanceled | TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\UnixIPGlobalProperties.cs (1)
55CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.Net.Ping (5)
System\Net\NetworkInformation\Ping.cs (5)
530}, AsyncOperationManager.CreateOperation(userToken), CancellationToken.None, TaskContinuationOptions.DenyChildAttach, TaskScheduler.Default); 565return SendPingAsync(address, timeout, buffer, options, CancellationToken.None); 581/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 605return SendPingAsync(hostNameOrAddress, timeout, buffer, options, CancellationToken.None); 624/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
System.Net.Quic (2)
System\Net\Quic\Internal\ResettableValueTaskSource.cs (1)
328}, handle, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
System\Net\Quic\QuicStream.cs (1)
358/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
System.Net.Requests (6)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (1)
371CancellationToken.None,
System\Net\FileWebRequest.cs (4)
161this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 174}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 222this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 235}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System\Net\TaskExtensions.cs (1)
37}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
System.Net.Security (4)
System\Net\Security\SslStream.cs (4)
254return BeginAuthenticateAsClient(options, CancellationToken.None, asyncCallback, asyncState); 293return BeginAuthenticateAsServer(options, CancellationToken.None, asyncCallback, asyncState); 847return TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState); 859return TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), asyncCallback, asyncState);
System.Net.Sockets (6)
System\Net\Sockets\Socket.cs (1)
2831public bool AcceptAsync(SocketAsyncEventArgs e) => AcceptAsync(e, CancellationToken.None);
System\Net\Sockets\Socket.Tasks.cs (3)
32public Task<Socket> AcceptAsync() => AcceptAsync((Socket?)null, CancellationToken.None).AsTask(); 46public Task<Socket> AcceptAsync(Socket? acceptSocket) => AcceptAsync(acceptSocket, CancellationToken.None).AsTask(); 126public Task ConnectAsync(IPAddress[] addresses, int port) => ConnectAsync(addresses, port, CancellationToken.None).AsTask();
System\Net\Sockets\TCPListener.cs (2)
224public Task<Socket> AcceptSocketAsync() => AcceptSocketAsync(CancellationToken.None).AsTask(); 236public Task<TcpClient> AcceptTcpClientAsync() => AcceptTcpClientAsync(CancellationToken.None).AsTask();
System.Net.WebSockets (5)
System\Net\WebSockets\ManagedWebSocket.cs (2)
263Task lockTask = mutex.EnterAsync(CancellationToken.None); 1876CancellationToken.None,
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (1)
48return SendFrameAsync(opcode, endOfMessage: true, disableCompression: true, payload, CancellationToken.None);
System\Net\WebSockets\WebSocketStream.cs (2)
264ct = CancellationToken.None; 322return WebSocket.SendAsync(ReadOnlyMemory<byte>.Empty, _messageType, endOfMessage: true, CancellationToken.None);
System.Private.CoreLib (40)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.Threads.cs (2)
18m_dispatchTask = Task.Factory.StartNew(() => DispatchEventsToEventListeners(sessionID, syncTimeUtc, syncTimeQPC, timeQPCFrequency, previousDispatchTask, m_dispatchTaskCancellationSource.Token), CancellationToken.None, TaskCreationOptions.LongRunning, TaskScheduler.Default); 24previousDispatchTask?.Wait(CancellationToken.None);
src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (2)
728TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); 1141TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (9)
823/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 842/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 896/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 906/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 1137/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 1153/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 1271/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 1377/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 1392/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (2)
459=> TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); 742=> TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (5)
81public Task CopyToAsync(Stream destination, int bufferSize) => CopyToAsync(destination, bufferSize, CancellationToken.None); 189public Task FlushAsync() => FlushAsync(CancellationToken.None); 301public Task<int> ReadAsync(byte[] buffer, int offset, int count) => ReadAsync(buffer, offset, count, CancellationToken.None); 657base(function, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach) 721public Task WriteAsync(byte[] buffer, int offset, int count) => WriteAsync(buffer, offset, count, CancellationToken.None);
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
1070Task<int> task = ReadAsyncInternal(new Memory<char>(buffer, index, count), CancellationToken.None).AsTask();
src\libraries\System.Private.CoreLib\src\System\IO\StreamWriter.cs (1)
940return (_asyncWriteTask = FlushAsyncInternal(flushStream: true, flushEncoder: true, CancellationToken.None));
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (7)
543}, new TupleSlim<TextWriter, char>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 550}, new TupleSlim<TextWriter, string?>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 589}, new TupleSlim<TextWriter, char[], int, int>(this, buffer, index, count), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 606}, new TupleSlim<TextWriter, char>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 613}, new TupleSlim<TextWriter, string?>(this, value), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 653}, new TupleSlim<TextWriter, char[], int, int>(this, buffer, index, count), CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 673CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (2)
86=> TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); 89=> TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (1)
347}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (3)
358Wait(Timeout.Infinite, CancellationToken.None); 409return Wait((int)totalMilliseconds, CancellationToken.None); 463return Wait(millisecondsTimeout, CancellationToken.None);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (3)
181WaitCore(Timeout.Infinite, CancellationToken.None); 230return WaitCore(totalMilliseconds, CancellationToken.None); 282return WaitCore(millisecondsTimeout, CancellationToken.None);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
311Task.Factory.StartNew(continuation, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, scheduler);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCanceledException.cs (1)
73base(SR.TaskCanceledException_ctor_DefaultMessage, task != null ? task.CancellationToken : CancellationToken.None)
System.Security.Cryptography (64)
System\Security\Cryptography\CryptographicOperations.cs (5)
281/// The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />. 332/// The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />. 629/// The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />. 672/// The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />. 721/// The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None" />.
System\Security\Cryptography\CryptoStream.cs (3)
125/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 252TaskToAsyncResult.Begin(ReadAsync(buffer, offset, count, CancellationToken.None), callback, state); 491TaskToAsyncResult.Begin(WriteAsync(buffer, offset, count, CancellationToken.None), callback, state);
System\Security\Cryptography\HMACMD5.cs (3)
248/// The default value is <see cref="System.Threading.CancellationToken.None" />. 275/// The default value is <see cref="System.Threading.CancellationToken.None" />. 300/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA1.cs (3)
247/// The default value is <see cref="System.Threading.CancellationToken.None" />. 273/// The default value is <see cref="System.Threading.CancellationToken.None" />. 297/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA256.cs (3)
239/// The default value is <see cref="System.Threading.CancellationToken.None" />. 265/// The default value is <see cref="System.Threading.CancellationToken.None" />. 289/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA3_256.cs (3)
279/// The default value is <see cref="System.Threading.CancellationToken.None" />. 306/// The default value is <see cref="System.Threading.CancellationToken.None" />. 330/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA3_384.cs (3)
279/// The default value is <see cref="System.Threading.CancellationToken.None" />. 306/// The default value is <see cref="System.Threading.CancellationToken.None" />. 330/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA3_512.cs (3)
279/// The default value is <see cref="System.Threading.CancellationToken.None" />. 306/// The default value is <see cref="System.Threading.CancellationToken.None" />. 330/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA384.cs (3)
256/// The default value is <see cref="System.Threading.CancellationToken.None" />. 282/// The default value is <see cref="System.Threading.CancellationToken.None" />. 306/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\HMACSHA512.cs (3)
253/// The default value is <see cref="System.Threading.CancellationToken.None" />. 279/// The default value is <see cref="System.Threading.CancellationToken.None" />. 303/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\Kmac128.cs (3)
395/// The default value is <see cref="System.Threading.CancellationToken.None" />. 442/// The default value is <see cref="System.Threading.CancellationToken.None" />. 488/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\Kmac256.cs (3)
395/// The default value is <see cref="System.Threading.CancellationToken.None" />. 442/// The default value is <see cref="System.Threading.CancellationToken.None" />. 488/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\KmacXof128.cs (3)
395/// The default value is <see cref="System.Threading.CancellationToken.None" />. 442/// The default value is <see cref="System.Threading.CancellationToken.None" />. 488/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\KmacXof256.cs (3)
395/// The default value is <see cref="System.Threading.CancellationToken.None" />. 442/// The default value is <see cref="System.Threading.CancellationToken.None" />. 488/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\MD5.cs (2)
183/// The default value is <see cref="System.Threading.CancellationToken.None" />. 210/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA1.cs (2)
176/// The default value is <see cref="System.Threading.CancellationToken.None" />. 202/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA256.cs (2)
176/// The default value is <see cref="System.Threading.CancellationToken.None" />. 202/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA3_256.cs (2)
217/// The default value is <see cref="System.Threading.CancellationToken.None" />. 247/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA3_384.cs (2)
218/// The default value is <see cref="System.Threading.CancellationToken.None" />. 248/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA3_512.cs (2)
217/// The default value is <see cref="System.Threading.CancellationToken.None" />. 247/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA384.cs (2)
175/// The default value is <see cref="System.Threading.CancellationToken.None" />. 201/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\SHA512.cs (2)
175/// The default value is <see cref="System.Threading.CancellationToken.None" />. 201/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\Shake128.cs (2)
399/// The default value is <see cref="System.Threading.CancellationToken.None" />. 435/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System\Security\Cryptography\Shake256.cs (2)
399/// The default value is <see cref="System.Threading.CancellationToken.None" />. 435/// The default value is <see cref="System.Threading.CancellationToken.None" />.
System.Security.Cryptography.Cose (7)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (2)
228/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 810/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
System\Security\Cryptography\Cose\CoseSign1Message.cs (3)
188/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 821/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 884/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
System\Security\Cryptography\Cose\CoseSignature.cs (2)
495/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> 559/// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
System.ServiceModel.Federation (5)
System\Runtime\OperationWithTimeoutAsyncResult.cs (1)
25_ = Task.Factory.StartNew(s_scheduledCallback, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System\Runtime\TaskHelpers.cs (4)
33}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 63}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 87}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 119}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
System.ServiceModel.Http (4)
System\ServiceModel\Channels\MessageContent.cs (1)
198}, this, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (3)
101Task task = CloseOutputAsync(CancellationToken.None); 345return WebSocket.CloseAsync(_webSocketCloseDetails.OutputCloseStatus, _webSocketCloseDetails.OutputCloseStatusDescription, CancellationToken.None); 554CancellationToken.None);
System.ServiceModel.Primitives (12)
Internals\System\Runtime\ActionItem.cs (1)
86Task<Task>.Factory.StartNew(callback, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, IOThreadScheduler.IOTaskScheduler);
Internals\System\Runtime\IOThreadScheduler.cs (1)
131Task.Factory.StartNew(callback, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Internals\System\Runtime\TaskHelpers.cs (4)
48}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 78}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 102}, callback, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default); 134}, continuationState, CancellationToken.None, TaskContinuationOptions.HideScheduler, TaskScheduler.Default);
Internals\System\Runtime\TimeoutHelper.cs (1)
47_cancellationToken = CancellationToken.None;
System\ServiceModel\Channels\ProducerConsumerStream.cs (2)
46return ReadAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult(); 97WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
System\ServiceModel\Channels\TimeoutStream.cs (2)
34var valueTask = ReadAsyncInternal(buffer, offset, count, CancellationToken.None); 84var valueTask = WriteAsyncInternal(buffer, offset, count, CancellationToken.None);
System\ServiceModel\Dispatcher\DuplexChannelBinder.cs (1)
1202Task.Factory.StartNew(s_receiveThreadSchedulerCallback, result, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.ServiceModel.Primitives.Tests (1)
ServiceModel\ThrowingOnCloseBindingElement.cs (1)
175}, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
System.Text.RegularExpressions (11)
System\Threading\StackHelper.cs (11)
40.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 51.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 64.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 79.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 96.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 115.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 123.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 133.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 145.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 159.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 175.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
System.Text.RegularExpressions.Generator (11)
src\libraries\System.Text.RegularExpressions\src\System\Threading\StackHelper.cs (11)
40.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 51.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 64.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 79.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 96.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 115.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 123.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 133.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 145.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 159.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 175.ContinueWith(t => t.GetAwaiter().GetResult(), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default)
System.Threading (6)
System\Threading\Barrier.cs (3)
483SignalAndWait(CancellationToken.None); 538return SignalAndWait(timeout, CancellationToken.None); 598return SignalAndWait(millisecondsTimeout, CancellationToken.None);
System\Threading\CountdownEvent.cs (3)
411Wait(Timeout.Infinite, CancellationToken.None); 463return Wait((int)totalMilliseconds, CancellationToken.None); 514return Wait(millisecondsTimeout, CancellationToken.None);
System.Threading.Channels (2)
System\Threading\Channels\AsyncOperation.cs (2)
251CancellationToken.None, TaskCreationOptions.DenyChildAttach, ts); 382Task.Factory.StartNew(continuation, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, ts);
System.Threading.Tasks.Dataflow (57)
Base\DataflowBlock.cs (17)
261return SendAsync<TInput>(target, item, CancellationToken.None); 513CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 527CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 788return ReceiveAsync(source, Common.InfiniteTimeSpan, CancellationToken.None); 825return ReceiveAsync(source, timeout, CancellationToken.None); 866return Receive(source, Common.InfiniteTimeSpan, CancellationToken.None); 905return Receive(source, timeout, CancellationToken.None); 1296}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default); 1307}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default); 1328}, this, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default); 1384return OutputAvailableAsync<TOutput>(source, CancellationToken.None); 1889CancellationToken.None, Common.GetCreationOptionsForTask(), scheduler); 1923CancellationTokenSource cts = CancellationTokenSource.CreateLinkedTokenSource(dataflowBlockOptions.CancellationToken, CancellationToken.None); 1988}, CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default); 2057}, CancellationToken.None, Common.GetContinuationOptions(), scheduler); 2386CancellationToken.None, 2399CancellationToken.None,
Base\DataflowBlockOptions.cs (4)
40/// <description><see cref="System.Threading.CancellationToken.None"/></description> 71private CancellationToken _cancellationToken = CancellationToken.None; 218/// <description><see cref="System.Threading.CancellationToken.None"/></description> 350/// <description><see cref="System.Threading.CancellationToken.None"/></description>
Blocks\ActionBlock.cs (1)
190}, this, CancellationToken.None, Common.GetContinuationOptions(TaskContinuationOptions.ExecuteSynchronously), TaskScheduler.Default);
Blocks\BatchBlock.cs (4)
75CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default); 86}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 547}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 655exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\BatchedJoinBlock.cs (2)
104}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 353}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default);
Blocks\BroadcastBlock.cs (6)
93}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 271exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 404}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 650}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 864}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 947this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\BufferBlock.cs (3)
75}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 272exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 407}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\JoinBlock.cs (5)
86CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default); 97}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 305CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default); 316}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 1335}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Blocks\TransformBlock.cs (3)
145}, _source, CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default); 156}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 261}, Tuple.Create(this, messageWithId), CancellationToken.None,
Blocks\TransformManyBlock.cs (3)
144}, source, CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default); 155}, this, CancellationToken.None, Common.GetContinuationOptions() | TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.Default); 245CancellationToken.None,
Blocks\TransformManyBlock.netstandard21.cs (1)
40t.ContinueWith(static t => Debug.Assert(t.IsCompletedSuccessfully), CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default);
Blocks\WriteOnceBlock.cs (1)
142Tuple.Create(this, exceptions), CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Internal\Common.cs (1)
574target, CancellationToken.None, Common.GetContinuationOptions(), TaskScheduler.Default);
Internal\SourceCore.cs (3)
523}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 786}, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 920this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
Internal\SpscTargetCore.cs (1)
168this, CancellationToken.None, Common.GetCreationOptionsForTask(isReplica));
Internal\TargetCore.cs (2)
390exception, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default); 746this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
System.Threading.Tasks.Parallel (3)
System\Threading\Tasks\Parallel.cs (1)
49_cancellationToken = CancellationToken.None;
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
602return _lock.WaitAsync(CancellationToken.None);
System\Threading\Tasks\TaskReplicator.cs (1)
79_pendingTask = new Task(s => ((Replica)s!).Execute(), this, CancellationToken.None, TaskCreationOptions.None);
System.Windows.Forms.Tests (2)
System\Windows\Forms\ControlTests_InvokeAsync.cs (2)
379control.InvokeAsync(ct => default, CancellationToken.None)).ConfigureAwait(true); 384CancellationToken.None)).ConfigureAwait(false);
Test.Utilities (24)
CodeMetricsTestsBase.cs (2)
41var references = Task.Run(() => defaultReferences.ResolveAsync(language, CancellationToken.None)).GetAwaiter().GetResult(); 75var compilation = project.GetCompilationAsync(CancellationToken.None).Result!;
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
TestDiscoveryWorker (1)
Program.cs (1)
124while (await _channel.Reader.WaitToReadAsync(CancellationToken.None).ConfigureAwait(false))
Text.Analyzers (23)
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
140/// The default value is <see cref="CancellationToken.None"/>.
src\Dependencies\Contracts\ErrorReporting\FatalError.cs (2)
232CancellationToken.None, 242CancellationToken.None,
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (1)
489return _lock.WaitAsync(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\Extensions\DiagnosticExtensions.cs (1)
232parameters = [tree, rule.Id, CancellationToken.None, null];
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentDictionary.cs (1)
35public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledConcurrentSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\RoslynAnalyzers\Utilities\Compiler\PooledObjects\PooledSortedSet.cs (1)
30public void Dispose() => Free(CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\DiagnosticDescriptorExtensions.cs (2)
158if (provider.TryGetDiagnosticValue(tree, descriptor.Id, CancellationToken.None, out severity) || 159provider.TryGetGlobalDiagnosticValue(descriptor.Id, CancellationToken.None, out severity))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (1)
84? ((ICompilationUnitSyntax)token.Parent!.SyntaxTree!.GetRoot(CancellationToken.None)).EndOfFileToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (1)
47using (Logger.LogBlock(FunctionId.Formatting_ContextInitialization, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (1)
56return this.GetTextChanges(CancellationToken.None).Count > 0;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (1)
51using (Logger.LogBlock(FunctionId.Formatting_TokenStreamConstruction, CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (1)
229var indentation = Finder.GetIndentationOfCurrentPosition(this.Tree, token, LineToBeIndented.Start, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.cs (1)
332using var reader = SymbolKeyReader.GetReader(key, compilation: null!, ignoreAssemblyKey: false, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (1)
250=> base.Initialize(data, CancellationToken.None);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (5)
274using (TakeLock(CancellationToken.None)) 297CompleteWithTask(Task.FromException<T>(ex), CancellationToken.None); 302CompleteWithTask(Task.FromResult(result), CancellationToken.None); 419using (TakeLock(CancellationToken.None)) 509using (TakeLock(CancellationToken.None))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
80channel, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
VBCSCompiler (2)
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (2)
111_listenTask.ContinueWith(_ => { }, CancellationToken.None, TaskContinuationOptions.ExecuteSynchronously, TaskScheduler.Default) 112.Wait(CancellationToken.None);
VBCSCompiler.UnitTests (4)
BuildProtocolTest.cs (4)
87await request.WriteAsync(memoryStream, CancellationToken.None); 89var read = await BuildRequest.ReadAsync(memoryStream, CancellationToken.None); 100await response.WriteAsync(memoryStream, CancellationToken.None); 103var read = await BuildResponse.ReadAsync(memoryStream, CancellationToken.None);
Wasm.Performance.Driver (1)
Program.cs (1)
27var stressRunCancellation = CancellationToken.None;
WebSocketSample (5)
Program.cs (5)
28await ws.ConnectAsync(new Uri(url), CancellationToken.None); 38await ws.SendAsync(new ArraySegment<byte>(bytes), WebSocketMessageType.Text, endOfMessage: true, cancellationToken: CancellationToken.None); 41await ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None); 55var result = await ws.ReceiveAsync(new ArraySegment<byte>(buffer), CancellationToken.None); 66await ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, "", CancellationToken.None);
WebTransportInteractiveSampleApp (2)
Program.cs (2)
62var session = await feature.AcceptAsync(CancellationToken.None); 74stream = await session.AcceptStreamAsync(CancellationToken.None);
WebTransportSampleApp (3)
Program.cs (3)
31var session = await feature.AcceptAsync(CancellationToken.None); 34var stream = await session.AcceptStreamAsync(CancellationToken.None); 38var test = await stream.Transport.Input.AsStream().ReadAsync(memory, CancellationToken.None);