7231 references to ConfigureAwait
AnalyzerRunner (21)
CodeRefactoringRunner.cs (4)
60var newDocument = await RefactorDocumentAsync(document, cancellationToken).ConfigureAwait(false); 66updatedSolution = updatedSolution.WithDocumentSyntaxRoot(document.Id, await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)); 79var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 96document.Project.Solution, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
DiagnosticAnalyzerRunner.cs (12)
69await GetAnalysisResultAsync(solution, _analyzers, _options, cancellationToken).ConfigureAwait(false); 86var analysisResult = await GetAnalysisResultAsync(solution, _analyzers, _options, cancellationToken).ConfigureAwait(false); 100_ = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 121var currentDocumentPerformance = await TestDocumentPerformanceAsync(_analyzers, project, documentId, _options, cancellationToken).ConfigureAwait(false); 185var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 192SyntaxTree tree = await project.GetDocument(documentId).GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 193await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(tree, cancellationToken).ConfigureAwait(false); 194await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(compilation.GetSemanticModel(tree), null, cancellationToken).ConfigureAwait(false); 342await resultTask.ConfigureAwait(false); 350var result = await task.Value.ConfigureAwait(false); 393var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 397var analystResult = await compilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false);
Program.cs (5)
78await workspace.OpenSolutionAsync(options.SolutionPath, progress: null, cancellationToken).ConfigureAwait(false); 150var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 194var documentStatistics = GetSolutionStatisticsAsync(document, cancellationToken).ConfigureAwait(false).GetAwaiter().GetResult(); 206var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 208var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
aspire (19)
Backchannel\AppHostBackchannel.cs (9)
41var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 54var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 68var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 88var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 154var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 174var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 181cancellationToken).ConfigureAwait(false); 189var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 202var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
Backchannel\ExtensionBackchannel.cs (1)
79await Task.WhenAny(_connectionSetupTcs.Task, cancellationTask).ConfigureAwait(false);
Commands\PublishCommandBase.cs (1)
170return await backchannelCompletionSource.Task.ConfigureAwait(false);
Interaction\ExtensionInteractionService.cs (8)
68var value = await task.ConfigureAwait(false); 93var result = await Backchannel.PromptForStringAsync(promptText.RemoveSpectreFormatting(), defaultValue, validator, required, _cancellationToken).ConfigureAwait(false); 102return await tcs.Task.ConfigureAwait(false); 106return await _consoleInteractionService.PromptForStringAsync(promptText, defaultValue, validator, isSecret, required, cancellationToken).ConfigureAwait(false); 120var result = await Backchannel.ConfirmAsync(promptText.RemoveSpectreFormatting(), defaultValue, _cancellationToken).ConfigureAwait(false); 130return await tcs.Task.ConfigureAwait(false); 149var result = await Backchannel.PromptForSelectionAsync(promptText.RemoveSpectreFormatting(), choices, choiceFormatter, _cancellationToken).ConfigureAwait(false); 159return await tcs.Task.ConfigureAwait(false);
Aspire.Azure.Messaging.WebPubSub (1)
AspireWebPubSubExtensions.cs (1)
169await _client.ConnectionExistsAsync("0", new RequestContext() { CancellationToken = cancellationToken }).ConfigureAwait(false);
Aspire.Azure.Search.Documents (1)
AzureSearchIndexHealthCheck.cs (1)
25_ = await _searchIndexClient.GetServiceStatisticsAsync(cancellationToken).ConfigureAwait(false);
Aspire.Cli.Tests (1)
TestServices\TestAppHostBackchannel.cs (1)
219return await GetCapabilitiesAsyncCallback(cancellationToken).ConfigureAwait(false);
Aspire.Components.Common.TestUtilities (1)
ConformanceTests.cs (1)
140}).ConfigureAwait(false);
Aspire.Confluent.Kafka (2)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedProducer.cs (2)
56result = await this.producer.ProduceAsync(topic, message, cancellationToken).ConfigureAwait(false); 103result = await this.producer.ProduceAsync(topicPartition, message, cancellationToken).ConfigureAwait(false);
Aspire.Dashboard (51)
Authentication\AspirePolicyEvaluator.cs (2)
46var result = await context.AuthenticateAsync(scheme).ConfigureAwait(false); 114var result = await _authorization.AuthorizeAsync(context.User, resource, policy).ConfigureAwait(false);
Authentication\FrontendCompositeAuthenticationHandler.cs (2)
21var result = await Context.AuthenticateAsync(ConnectionTypeAuthenticationDefaults.AuthenticationSchemeFrontend).ConfigureAwait(false); 31result = await Context.AuthenticateAsync().ConfigureAwait(false);
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
28var result = await Context.AuthenticateAsync(scheme).ConfigureAwait(false);
Components\Controls\Chart\PlotlyChart.razor.cs (1)
229_plotlyChart.CancellationToken).ConfigureAwait(false);
Components\Controls\PropertyValues\SpanIdButtonValue.razor.cs (1)
45CancellationToken.None).ConfigureAwait(false);
Components\Controls\SpanDetails.razor.cs (1)
180_cts.Token).ConfigureAwait(false);
Components\Dialogs\ExemplarsDialog.razor.cs (1)
46_cts.Token).ConfigureAwait(false);
Components\Layout\MainLayout.razor.cs (3)
188_openPageDialog = await DialogService.ShowDialogAsync<HelpDialog>(parameters).ConfigureAwait(true); 228_openPageDialog = await DialogService.ShowPanelAsync<SettingsDialog>(parameters).ConfigureAwait(true); 232_openPageDialog = await DialogService.ShowDialogAsync<SettingsDialog>(parameters).ConfigureAwait(true);
Components\Pages\IPageWithSessionAndUrlState.cs (1)
105var result = await page.SessionStorage.GetAsync<TSerializableViewModel>(page.SessionStorageKey).ConfigureAwait(false);
DashboardEndpointsBuilder.cs (2)
28return await ValidateTokenMiddleware.TryAuthenticateAsync(token, httpContext, dashboardOptions).ConfigureAwait(false); 72requestCulture = await GlobalizationHelpers.ResolveSetCultureToAcceptedCultureAsync(acceptLanguage, availableCultures).ConfigureAwait(false);
Model\ConsoleLogsManager.cs (1)
47var filtersResult = await _sessionStorage.GetAsync<ConsoleLogsFilters>(BrowserStorageKeys.ConsoleLogFilters).ConfigureAwait(false);
Model\DashboardCommandExecutor.cs (3)
91var dialogReference = await dialogService.ShowConfirmationAsync(command.ConfirmationMessage).ConfigureAwait(false); 92var result = await dialogReference.Result.ConfigureAwait(false); 140response = await dashboardClient.ExecuteResourceCommandAsync(resource.Name, resource.ResourceType, command, CancellationToken.None).ConfigureAwait(false);
Model\ResourceOutgoingPeerResolver.cs (1)
30var (snapshot, subscription) = await resourceService.SubscribeResourcesAsync(_watchContainersTokenSource.Token).ConfigureAwait(false);
Model\ThemeManager.cs (1)
106var browserThemeSettings = await _themeResolver.GetThemeSettingsAsync(CancellationToken.None).ConfigureAwait(false);
Model\TraceLinkHelpers.cs (5)
32cancellationToken).ConfigureAwait(false); 43var isAvailable = await isAvailableCallback(cancellationToken).ConfigureAwait(false); 63}).ConfigureAwait(false); 70isAvailable = await isAvailableCallback(cancellationToken).ConfigureAwait(false); 85var result = await reference.Result.ConfigureAwait(false);
Model\ValidateTokenMiddleware.cs (1)
40if (await TryAuthenticateAsync(value.ToString(), context, dashboardOptions).ConfigureAwait(false))
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
123}).ConfigureAwait(false);
ServiceClient\DashboardClient.cs (3)
321if (await action(retryContext, cancellationToken).ConfigureAwait(false) == RetryResult.DoNotRetry) 437if (await IsUnimplemented(call).ConfigureAwait(false)) 511await call.ResponseHeadersAsync.ConfigureAwait(false);
Telemetry\DashboardTelemetrySender.cs (4)
94var isEnabled = await TryStartTelemetrySessionCoreAsync().ConfigureAwait(false); 142var response = await Client.GetAsync(TelemetryEndpoints.TelemetryEnabled).ConfigureAwait(false); 143var isTelemetryEnabled = response.IsSuccessStatusCode && await response.Content.ReadFromJsonAsync<TelemetryEnabledResponse>().ConfigureAwait(false) is { IsEnabled: true }; 151var telemetryStartedStatusCode = (await Client.PostAsync(TelemetryEndpoints.TelemetryStart, content: null).ConfigureAwait(false)).StatusCode;
Telemetry\DashboardTelemetryService.cs (14)
69await _telemetrySender.TryStartTelemetrySessionAsync().ConfigureAwait(false); 115var response = await PostRequestAsync<StartOperationRequest, StartOperationResponse>(client, TelemetryEndpoints.TelemetryStartOperation, new StartOperationRequest(eventName, scopeSettings)).ConfigureAwait(false); 136await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryEndOperation, new EndOperationRequest(Id: (string)propertyGetter(operationId), Result: result, ErrorMessage: errorMessage)).ConfigureAwait(false); 161var response = await PostRequestAsync<StartOperationRequest, StartOperationResponse>(client, TelemetryEndpoints.TelemetryStartUserTask, new StartOperationRequest(eventName, scopeSettings)).ConfigureAwait(false); 182await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryEndUserTask, new EndOperationRequest(Id: (string)propertyGetter(operationId), Result: result, ErrorMessage: errorMessage)).ConfigureAwait(false); 208var response = await PostRequestAsync<PostOperationRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostOperation, request).ConfigureAwait(false); 236var response = await PostRequestAsync<PostOperationRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostUserTask, request).ConfigureAwait(false); 264var response = await PostRequestAsync<PostFaultRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostFault, request).ConfigureAwait(false); 293var response = await PostRequestAsync<PostAssetRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostAsset, request).ConfigureAwait(false); 314await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostProperty, request).ConfigureAwait(false); 332await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostRecurringProperty, request).ConfigureAwait(false); 350await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostCommandLineFlags, request).ConfigureAwait(false); 356var httpResponseMessage = await client.PostAsJsonAsync(endpoint, request).ConfigureAwait(false); 358var response = await httpResponseMessage.Content.ReadFromJsonAsync<TResponse>().ConfigureAwait(false);
Utils\CallbackThrottler.cs (1)
70if (!await TryQueueAsync(_cancellationToken).ConfigureAwait(false))
Utils\DashboardUIHelpers.cs (1)
87}).ConfigureAwait(false);
Aspire.Dashboard.Components.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Dashboard.Tests (3)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
tests\Shared\Playwright\PlaywrightProvider.cs (1)
36return await playwright.Chromium.LaunchAsync(options).ConfigureAwait(false);
Aspire.EndToEnd.Tests (6)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
36return await playwright.Chromium.LaunchAsync(options).ConfigureAwait(false);
tests\Shared\TemplatesTesting\AspireProject.cs (4)
121var res = await cmd.ExecuteAsync(cmdString).ConfigureAwait(false); 278var resultTask = await Task.WhenAny(successfulStartupTask, AppExited.Task, startupTimeoutTask).ConfigureAwait(false); 299var completedTask = await Task.WhenAny(allOutputCompleteTask, allOutputCompleteTimeoutTask).ConfigureAwait(false); 456(await cmd.ExecuteAsync($"container list --all").ConfigureAwait(false))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
164var completedTask = await Task.WhenAny(waitForExitTask, Task.Delay(TimeSpan.FromSeconds(5), token)).ConfigureAwait(false);
Aspire.Hosting (144)
ApplicationModel\ExpressionResolver.cs (9)
26await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false), 27await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)), 29await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false), 30await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)), 132ConnectionStringReference cs => await ResolveConnectionStringReferenceAsync(cs).ConfigureAwait(false), 134ReferenceExpression ex => await EvalExpressionAsync(ex).ConfigureAwait(false), 135EndpointReference endpointReference when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false), 136EndpointReferenceExpression ep when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false), 137IValueProvider vp => await EvalValueProvider(vp).ConfigureAwait(false),
ApplicationModel\ParameterResource.cs (1)
90return await WaitForValueTcs.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
ApplicationModel\ResourceCommandService.cs (4)
52return await ExecuteCommandCoreAsync(resourceEvent.ResourceId, resourceEvent.Resource, commandName, cancellationToken).ConfigureAwait(false); 68return await ExecuteCommandCoreAsync(names[0], resource, commandName, cancellationToken).ConfigureAwait(false); 79var results = await Task.WhenAll(tasks).ConfigureAwait(false); 138var result = await annotation.ExecuteCommand(context).ConfigureAwait(false);
ApplicationModel\ResourceExtensions.cs (5)
303(DistributedApplicationOperation.Run, IValueProvider provider) => await GetValue(key: null, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false), 304(DistributedApplicationOperation.Run, IResourceBuilder<IResource> rb) when rb.Resource is IValueProvider provider => await GetValue(key: null, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false), 362(DistributedApplicationOperation.Run, IValueProvider provider) => await GetValue(key, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false), 363(DistributedApplicationOperation.Run, IResourceBuilder<IResource> rb) when rb.Resource is IValueProvider provider => await GetValue(key, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false), 416IValueProvider valueProvider => (await GetValue(key: null, valueProvider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false))?.Value,
ApplicationModel\ResourceNotificationService.cs (7)
152await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && re.Snapshot.HealthStatus == HealthStatus.Healthy, cancellationToken).ConfigureAwait(false); 157resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && re.Snapshot.ResourceReadyEvent is not null, cancellationToken: cancellationToken).ConfigureAwait(false); 190cancellationToken).ConfigureAwait(false); 221var resourceEvent = await WaitForResourceCoreAsync(resourceName, re => ShouldYield(waitBehavior, re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false); 267var resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && IsKnownTerminalState(re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false); 322var resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && IsContinuableState(waitBehavior, re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false); 433var resourceEvent = await WaitForResourceCoreAsync(resourceName, predicate, cancellationToken).ConfigureAwait(false);
Backchannel\AppHostRpcTarget.cs (2)
37var channel = await _logChannelTcs.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 129cancellationToken).ConfigureAwait(false);
Dashboard\DashboardLifecycleHook.cs (1)
504var resourceServiceUrl = await dashboardEndpointProvider.GetResourceServiceUriAsync(context.CancellationToken).ConfigureAwait(false);
Dashboard\DashboardService.cs (1)
329var (result, errorMessage) = await serviceData.ExecuteCommandAsync(request.ResourceName, request.CommandName, context.CancellationToken).ConfigureAwait(false);
Dashboard\DashboardServiceData.cs (1)
101var result = await _resourceCommandService.ExecuteCommandAsync(resourceId, type, cancellationToken).ConfigureAwait(false);
Dashboard\DashboardServiceHost.cs (1)
189var uri = await _resourceServiceUri.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
Dcp\DcpDependencyCheck.cs (2)
77processResult = await task.WaitAsync(TimeSpan.FromSeconds(_dcpOptions.DependencyCheckTimeout), cancellationToken).ConfigureAwait(false); 81processResult = await task.WaitAsync(cancellationToken).ConfigureAwait(false);
Dcp\DcpExecutor.cs (20)
137_dcpInfo = await _dcpDependencyCheckService.GetDcpInfoAsync(cancellationToken: cancellationToken).ConfigureAwait(false); 768var dcpSvc = await _kubernetesService.GetAsync<Service>(sar.Service.Metadata.Name, cancellationToken: cancellationToken).ConfigureAwait(false); 793await _kubernetesService.CreateAsync(cn, cancellationToken).ConfigureAwait(false); 1210await _kubernetesService.CreateAsync(containerExe, cancellationToken).ConfigureAwait(false); 1239(var appHostArgs, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false); 1253(spec.Env, var failedToApplyConfiguration) = await BuildEnvVarsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false); 1263await _kubernetesService.CreateAsync(exe, cancellationToken).ConfigureAwait(false); 1496spec.CreateFiles = await BuildCreateFilesAsync(modelContainerResource, cancellationToken).ConfigureAwait(false); 1498(spec.RunArgs, var failedToApplyRunArgs) = await BuildRunArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false); 1500(var args, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false); 1504(spec.Env, var failedToApplyConfiguration) = await BuildEnvVarsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false); 1521await _kubernetesService.CreateAsync(dcpContainerResource, cancellationToken).ConfigureAwait(false); 1711await _kubernetesService.CreateAsync(res, cancellationToken).ConfigureAwait(false); 1754await _kubernetesService.PatchAsync(c, patch, attemptCancellationToken).ConfigureAwait(false); 1755var cu = await _kubernetesService.GetAsync<Container>(c.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1769await _kubernetesService.PatchAsync(e, patch, attemptCancellationToken).ConfigureAwait(false); 1770var eu = await _kubernetesService.GetAsync<Executable>(e.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1867var r = await _kubernetesService.DeleteAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1888var r = await _kubernetesService.GetAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1951cancellationToken).ConfigureAwait(false);
Dcp\DcpHost.cs (4)
73var dcpInfo = await _dependencyCheckService.GetDcpInfoAsync(cancellationToken: cancellationToken).ConfigureAwait(false); 102dcpInfo = await _dependencyCheckService.GetDcpInfoAsync(force: true, cancellationToken: timeoutCancellation.Token).ConfigureAwait(false); 442var dcpInfo = await _dependencyCheckService.GetDcpInfoAsync(force: true, cancellationToken: notificationCts.Token).ConfigureAwait(false); 468await notificationTask.ConfigureAwait(false);
Dcp\DcpKubernetesClient.cs (6)
76var httpResponse = await SendRequest<object?>(url, HttpMethod.Get, customHeaders: null, body: null, cancellationToken).ConfigureAwait(false); 82Body = await httpResponse.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false) 103var httpResponse = await SendRequestRaw(null, httpRequest, cancellationToken).ConfigureAwait(false); 104var content = await httpResponse.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); 133var httpResponse = await SendRequestRaw(content, httpRequest, cancellationToken).ConfigureAwait(false); 146var responseContent = await httpResponse.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
Dcp\HostDashboardEndpointProvider.cs (1)
21return await _dashboardServiceHost.GetResourceServiceUriAsync(cancellationToken).ConfigureAwait(false);
Dcp\KubernetesService.cs (18)
110cancellationToken: cancellationToken).ConfigureAwait(false) 117cancellationToken: cancellationToken).ConfigureAwait(false); 143cancellationToken: cancellationToken).ConfigureAwait(false) 150cancellationToken: cancellationToken).ConfigureAwait(false); 177cancellationToken: cancellationToken).ConfigureAwait(false) 185cancellationToken: cancellationToken).ConfigureAwait(false); 209cancellationToken: cancellationToken).ConfigureAwait(false) 215cancellationToken: cancellationToken).ConfigureAwait(false); 240cancellationToken: cancellationToken).ConfigureAwait(false) 247cancellationToken: cancellationToken).ConfigureAwait(false); 349).ConfigureAwait(false); 374).ConfigureAwait(false); 398).ConfigureAwait(false); 402).ConfigureAwait(false); 424return await _kubernetes!.GetExecutionDocumentAsync(cancellationToken).ConfigureAwait(false); 478return await operation(_kubernetes!).ConfigureAwait(false); 564await _kubeconfigReadSemaphore.WaitAsync(-1, cancellationToken).ConfigureAwait(false); 590var config = await KubernetesClientConfiguration.BuildConfigFromConfigFileAsync(kubeconfig: fileInfo, useRelativePaths: false).ConfigureAwait(false);
Dcp\ResourceLogSource.cs (4)
37var startupStderrStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStartupStdErr, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false); 38var startupStdoutStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStartupStdOut, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false); 46var stdoutStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStdOut, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false); 47var stderrStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStdErr, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
Devcontainers\DevcontainerSettingsWriter.cs (2)
67var acquired = await _writeLock.WaitAsync(WriteLockTimeoutMs, cancellationToken).ConfigureAwait(false); 76var settingsContent = await File.ReadAllTextAsync(settingsPath, cancellationToken).ConfigureAwait(false);
Exec\ExecResourceManager.cs (2)
61execResource = await _execResourceInitialized.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 104await _resourceNotificationService.WaitForResourceAsync(execResource!.Name, targetStates: KnownResourceStates.TerminalStates, cancellationToken).ConfigureAwait(false);
ExternalServiceBuilderExtensions.cs (1)
299return await _uriHealthCheck.CheckHealthAsync(context, cancellationToken).ConfigureAwait(false);
Health\ResourceHealthCheckService.cs (3)
138await state.DelayAsync(currentEvent: null, delay, cancellationToken).ConfigureAwait(false); 148).ConfigureAwait(false); 215lastDelayInterrupted = await state.DelayAsync(currentEvent, delayInterval, cancellationToken).ConfigureAwait(false);
InteractionService.cs (8)
42return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false); 51return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false); 68var completion = await newState.CompletionTcs.Task.ConfigureAwait(false); 77return await PromptInputAsync(title, message, new InteractionInput { Name = inputLabel, InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false); 82var result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false); 107var completion = await newState.CompletionTcs.Task.ConfigureAwait(false); 127var completion = await newState.CompletionTcs.Task.ConfigureAwait(false); 202if (!await RunValidationAsync(interactionState, result, cancellationToken).ConfigureAwait(false))
Orchestrator\ApplicationOrchestrator.cs (1)
97var completedTask = await Task.WhenAny(waitForDependenciesTask, waitForNonWaitingStateTask).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (2)
138.ConfigureAwait(false); 169.ConfigureAwait(false);
OtlpConfigurationExtensions.cs (1)
79var dcpInfo = await dcpDependencyCheckService.GetDcpInfoAsync(cancellationToken: context.CancellationToken).ConfigureAwait(false);
Publishing\DockerContainerRuntime.cs (10)
29var createBuilderResult = await CreateBuildkitInstanceAsync(builderName, cancellationToken).ConfigureAwait(false); 97.ConfigureAwait(false); 114await RemoveBuildkitInstanceAsync(builderName, cancellationToken).ConfigureAwait(false); 126cancellationToken).ConfigureAwait(false); 137if (!await CheckDockerDaemonAsync(cancellationToken).ConfigureAwait(false)) 143return await CheckDockerBuildxAsync(cancellationToken).ConfigureAwait(false); 168var dockerResult = await pendingDockerResult.WaitAsync(cancellationToken).ConfigureAwait(false); 203var buildxResult = await pendingBuildxResult.WaitAsync(cancellationToken).ConfigureAwait(false); 242.ConfigureAwait(false); 283.ConfigureAwait(false);
Publishing\PodmanContainerRuntime.cs (3)
68.ConfigureAwait(false); 88cancellationToken).ConfigureAwait(false); 122var processResult = await pending.WaitAsync(token).ConfigureAwait(false);
Publishing\Publisher.cs (2)
33cancellationToken).ConfigureAwait(false); 41.ConfigureAwait(false);
Publishing\PublishingStep.cs (1)
105return await Reporter.CreateTaskAsync(this, statusText, cancellationToken).ConfigureAwait(false);
Publishing\ResourceContainerImageBuilder.cs (14)
133cancellationToken).ConfigureAwait(false); 142cancellationToken).ConfigureAwait(false); 146var containerRuntimeHealthy = await ContainerRuntime.CheckIfRunningAsync(cancellationToken).ConfigureAwait(false); 154cancellationToken).ConfigureAwait(false); 162cancellationToken).ConfigureAwait(false); 224).ConfigureAwait(false); 226var success = await ExecuteDotnetPublishAsync(resource, options, cancellationToken).ConfigureAwait(false); 234await publishingTask.FailAsync($"Building image for {resource.Name} failed", cancellationToken).ConfigureAwait(false); 238await publishingTask.SucceedAsync($"Building image for {resource.Name} completed", cancellationToken).ConfigureAwait(false); 308.ConfigureAwait(false); 331).ConfigureAwait(false); 346await publishingTask.SucceedAsync($"Building image for {resourceName} completed", cancellationToken).ConfigureAwait(false); 351await publishingTask.FailAsync($"Building image for {resourceName} failed", cancellationToken).ConfigureAwait(false); 387return await step.CreateTaskAsync(description, cancellationToken).ConfigureAwait(false);
ResourceBuilderExtensions.cs (2)
1940var response = await httpClient.SendAsync(request, context.CancellationToken).ConfigureAwait(false); 1952return await commandOptions.GetCommandResult(resultContext).ConfigureAwait(false);
Utils\PeriodicRestartAsyncEnumerable.cs (2)
29var enumerable = await enumerableFactory(lastValue, cts.Token).ConfigureAwait(false); 85var enumerable = await enumerableFactory(lastValue, cts.Token).ConfigureAwait(false);
VersionChecking\PackageFetcher.cs (1)
53.ConfigureAwait(false);
VersionChecking\VersionCheckService.cs (2)
103packages = await _packageFetcher.TryFetchPackagesAsync(appHostDirectory, cancellationToken).ConfigureAwait(false); 145cancellationToken: cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure (57)
AzureDeployingContext.cs (16)
30var userSecrets = await userSecretsManager.LoadUserSecretsAsync(cancellationToken).ConfigureAwait(false); 31var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(userSecrets, cancellationToken).ConfigureAwait(false); 38if (!await TryProvisionAzureBicepResources(bicepResources, provisioningContext, cancellationToken).ConfigureAwait(false)) 44if (!await TryDeployContainerImages(model, cancellationToken).ConfigureAwait(false)) 50if (!await TryDeployComputeResources(model, provisioningContext, cancellationToken).ConfigureAwait(false)) 65var deployingStep = await activityReporter.CreateStepAsync("Deploying Azure resources", cancellationToken).ConfigureAwait(false); 76var resourceTask = await deployingStep.CreateTaskAsync($"Provisioning {resource.Name}", cancellationToken).ConfigureAwait(false); 93await deployingStep.FailAsync(errorMessage, cancellationToken).ConfigureAwait(false); 145var computeStep = await activityReporter.CreateStepAsync("Deploying compute resources", cancellationToken).ConfigureAwait(false); 169var resourceTask = await parentStep.CreateTaskAsync($"Deploying {computeResource.Name}", cancellationToken).ConfigureAwait(false); 231var acrStep = await activityReporter.CreateStepAsync($"Pushing images to {registryName}", cancellationToken).ConfigureAwait(false); 250var loginTask = await parentStep.CreateTaskAsync($"Logging in to container registry", cancellationToken).ConfigureAwait(false); 263var result = await pendingResult.WaitAsync(cancellationToken).ConfigureAwait(false); 267await loginTask.FailAsync($"Login to ACR {registryName} failed with exit code {result.ExitCode}", cancellationToken: cancellationToken).ConfigureAwait(false); 285var pushTask = await parentStep.CreateTaskAsync($"Pushing {resource.Name}", cancellationToken).ConfigureAwait(false); 322await pendingResult.WaitAsync(cancellationToken).ConfigureAwait(false);
AzurePublishingContext.cs (9)
91).ConfigureAwait(false); 95var writeTask = await step.CreateTaskAsync("Writing Azure Bicep templates", cancellationToken).ConfigureAwait(false); 105await writeTask.SucceedAsync($"Azure Bicep templates written successfully to {outputPath}.", cancellationToken).ConfigureAwait(false); 109await writeTask.FailAsync($"Failed to write Azure Bicep templates: {ex.Message}", cancellationToken).ConfigureAwait(false); 230).ConfigureAwait(false); 243.ConfigureAwait(false); 277).ConfigureAwait(false); 317.ConfigureAwait(false); 341).ConfigureAwait(false);
AzureResourcePreparer.cs (1)
142var azureReferences = await GetAzureReferences(resource, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\BaseProvisioningContextProvider.cs (4)
90var (subscriptionResource, tenantResource) = await armClient.GetSubscriptionAndTenantAsync(cancellationToken).ConfigureAwait(false); 126var response = await resourceGroups.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false); 144var operation = await resourceGroups.CreateOrUpdateAsync(WaitUntil.Completed, resourceGroupName, rgData, cancellationToken).ConfigureAwait(false); 150var principal = await _userPrincipalProvider.GetUserPrincipalAsync(cancellationToken).ConfigureAwait(false);
Provisioning\Internal\BicepCompiler.cs (2)
47if (!await ExecuteCommand(templateSpec).ConfigureAwait(false)) 62var result = await task.ConfigureAwait(false);
Provisioning\Internal\DefaultArmClientProvider.cs (2)
31var subscription = await armClient.GetDefaultSubscriptionAsync(cancellationToken).ConfigureAwait(false); 67var subscription = await armClient.GetSubscriptions().GetAsync(subscriptionId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\DefaultSubscriptionResource.cs (2)
34var response = await resourceGroupCollection.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false); 40var operation = await resourceGroupCollection.CreateOrUpdateAsync(waitUntil, resourceGroupName, data, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\DefaultUserSecretsManager.cs (1)
41? JsonNode.Parse(await File.ReadAllTextAsync(userSecretsPath, cancellationToken).ConfigureAwait(false),
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (7)
72return await base.CreateProvisioningContextAsync(userSecrets, cancellationToken).ConfigureAwait(false); 106var availableSubscriptions = await armClient.GetAvailableSubscriptionsAsync(cancellationToken).ConfigureAwait(false); 134cancellationToken).ConfigureAwait(false); 175cancellationToken).ConfigureAwait(false); 190var availableLocations = await armClient.GetAvailableLocationsAsync(_options.SubscriptionId!, cancellationToken).ConfigureAwait(false); 233cancellationToken).ConfigureAwait(false); 290cancellationToken).ConfigureAwait(false);
Provisioning\Internal\RunModeProvisioningContextProvider.cs (3)
98return await base.CreateProvisioningContextAsync(userSecrets, cancellationToken).ConfigureAwait(false); 121.ConfigureAwait(false); 160cancellationToken).ConfigureAwait(false);
Provisioning\Provisioners\AzureProvisioner.cs (4)
90var rolesFailed = await WaitForRoleAssignments(resource).ConfigureAwait(false); 172var userSecrets = await userSecretsManager.LoadUserSecretsAsync(cancellationToken).ConfigureAwait(false); 219else if (await bicepProvisioner.ConfigureResourceAsync(configuration, bicepResource, cancellationToken).ConfigureAwait(false)) 238var provisioningContext = await provisioningContextLazy.Value.ConfigureAwait(false);
Provisioning\Provisioners\BicepProvisioner.cs (4)
113var response = await context.Subscription.GetResourceGroups().GetAsync(existingResourceGroupName, cancellationToken).ConfigureAwait(false); 145var armTemplateContents = await bicepCompiler.CompileBicepToArmAsync(path, cancellationToken).ConfigureAwait(false); 181var operation = await deployments.CreateOrUpdateAsync(WaitUntil.Started, deploymentName, deploymentContent, cancellationToken).ConfigureAwait(false); 301var secret = await client.GetSecretAsync(secretRef.SecretName, cancellationToken: ct).ConfigureAwait(false);
Provisioning\ResourceDeploymentGraph.cs (2)
65var completedTask = await Task.WhenAny(inProgress.Values).ConfigureAwait(false); 80var completedTask = await Task.WhenAny(inProgress.Values).ConfigureAwait(false);
Aspire.Hosting.Azure.AIFoundry (2)
AzureAIFoundryExtensions.cs (1)
297_ = await manager.LoadModelAsync(deployment.ModelId, ct: ct).ConfigureAwait(false);
LocalModelHealthCheck.cs (1)
18var loadedModels = await manager.ListLoadedModelsAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (1)
AzureContainerAppsInfrastructure.cs (1)
47var containerApp = await containerAppEnvironmentContext.CreateContainerAppAsync(r, provisioningOptions.Value, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceInfrastructure.cs (1)
47var website = await appServiceEnvironmentContext.CreateAppServiceAsync(resource, provisioningOptions.Value, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.CosmosDB (3)
AzureCosmosDBExtensions.cs (3)
112await cosmosClient.ReadAccountAsync().WaitAsync(ct).ConfigureAwait(false); 116var db = (await cosmosClient.CreateDatabaseIfNotExistsAsync(database.DatabaseName, cancellationToken: ct).ConfigureAwait(false)).Database; 122await db.CreateContainerIfNotExistsAsync(containerProperties, cancellationToken: ct).ConfigureAwait(false);
Aspire.Hosting.Azure.KeyVault (1)
AzureKeyVaultSecretReference.cs (1)
31return await secretResolver(this, cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.Storage (2)
AzureStorageExtensions.cs (2)
198await blobContainerClient.CreateIfNotExistsAsync(cancellationToken: ct).ConfigureAwait(false); 204await queueClient.CreateIfNotExistsAsync(cancellationToken: ct).ConfigureAwait(false);
Aspire.Hosting.Docker (7)
DockerComposeInfrastructure.cs (2)
42var dashboardService = await dockerComposeEnvironmentContext.CreateDockerComposeServiceResourceAsync(dashboard, executionContext, cancellationToken).ConfigureAwait(false); 59var serviceResource = await dockerComposeEnvironmentContext.CreateDockerComposeServiceResourceAsync(r, executionContext, cancellationToken).ConfigureAwait(false);
DockerComposePublishingContext.cs (5)
103var files = await a.Callback(new() { Model = serviceResource.TargetResource, ServiceProvider = executionContext.ServiceProvider }, CancellationToken.None).ConfigureAwait(false); 131cancellationToken: cancellationToken).ConfigureAwait(false); 137cancellationToken: cancellationToken).ConfigureAwait(false); 175cancellationToken: cancellationToken).ConfigureAwait(false); 180cancellationToken: cancellationToken).ConfigureAwait(false);
Aspire.Hosting.GitHub.Models (3)
GitHubModelsHealthCheck.cs (3)
55using var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false); 60HttpStatusCode.NotFound or HttpStatusCode.Forbidden or HttpStatusCode.BadRequest => await HandleErrorCode(response, cancellationToken).ConfigureAwait(false), 78var content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.GitHub.Models.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.Kafka.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.Kubernetes (7)
KubernetesInfrastructure.cs (1)
41var serviceResource = await environmentContext.CreateKubernetesResourceAsync(r, executionContext, cancellationToken).ConfigureAwait(false);
KubernetesResource.cs (2)
238var value = await this.ProcessValueAsync(environmentContext, executionContext, arg).ConfigureAwait(false); 264var value = await this.ProcessValueAsync(environmentContext, executionContext, environmentVariable.Value).ConfigureAwait(false);
KubernetesServiceResourceExtensions.cs (4)
26: await context.CreateKubernetesResourceAsync(ep.Resource, executionContext, default).ConfigureAwait(false); 56: await context.CreateKubernetesResourceAsync(epExpr.Endpoint.Resource, executionContext, default).ConfigureAwait(false); 69return (await resource.ProcessValueAsync(context, executionContext, expr.ValueProviders[0]).ConfigureAwait(false)).ToString() ?? string.Empty; 77var val = await resource.ProcessValueAsync(context, executionContext, vp).ConfigureAwait(false);
Aspire.Hosting.MySql (3)
MySqlBuilderExtensions.cs (3)
155await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 161await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 261var tempConfigFile = await WritePhpMyAdminConfiguration(mySqlInstances, ct).ConfigureAwait(false);
Aspire.Hosting.MySql.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.Nats (1)
src\Components\Aspire.NATS.Net\NatsHealthCheck.cs (1)
17NatsConnectionState.Closed => await TryConnect(connection).ConfigureAwait(false),
Aspire.Hosting.NodeJs.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.OpenAI (6)
OpenAIModelHealthCheck.cs (3)
45using var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false); 51HttpStatusCode.NotFound => await HandleNotFound(response, cancellationToken).ConfigureAwait(false), 70var content = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
StatusPageHealthCheck.cs (3)
54resp = await client.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token).ConfigureAwait(false); 72using var stream = await resp.Content.ReadAsStreamAsync(cts.Token).ConfigureAwait(false); 73using var doc = await JsonDocument.ParseAsync(stream, cancellationToken: cts.Token).ConfigureAwait(false);
Aspire.Hosting.OpenAI.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.PostgreSQL (3)
PostgresBuilderExtensions.cs (3)
214Contents = await WritePgAdminServerJson(postgresInstances, cancellationToken).ConfigureAwait(false), 329Entries = await WritePgWebBookmarks(postgresInstances, ct).ConfigureAwait(false) 578await command.ExecuteNonQueryAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.PostgreSQL.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.Qdrant (1)
src\Components\Aspire.Qdrant.Client\QdrantHealthCheck.cs (1)
22var response = await _client.HealthAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
62return connection ??= await CreateConnection(connectionString!).ConfigureAwait(false);
Aspire.Hosting.RabbitMQ.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.SqlServer (3)
SqlServerBuilderExtensions.cs (3)
259await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 280await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 300await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false);
Aspire.Hosting.Testing (9)
DistributedApplicationEntryPointInvoker.cs (2)
39return await invoker.InvokeAsync(ct).ConfigureAwait(false); 132return await _appTcs.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
DistributedApplicationFactory.cs (3)
51return await _builderTcs.Task.WaitAsync(linkedCts.Token).ConfigureAwait(false); 61return await _appTcs.Task.WaitAsync(linkedCts.Token).ConfigureAwait(false); 427var app = await factory(_args, cts.Token).ConfigureAwait(false);
DistributedApplicationTestingBuilder.cs (4)
109return await factory.CreateBuilderAsync(cancellationToken).ConfigureAwait(false); 182var innerBuilder = await ResolveBuilderAsync(cancellationToken).ConfigureAwait(false); 208return await ResolveApplicationAsync(cancellationToken).ConfigureAwait(false); 247var innerApp = await factory.BuildAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Tests (3)
Helpers\JsonDocumentManifestPublisher.cs (1)
26_manifestDocument = await JsonDocument.ParseAsync(stream, cancellationToken: cancellationToken).ConfigureAwait(false);
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.Valkey.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Hosting.Yarp (1)
YarpJsonConfigGeneratorBuilder.cs (1)
66return await File.ReadAllTextAsync(_configFilePath, ct).ConfigureAwait(false);
Aspire.Milvus.Client (1)
MilvusHealthCheck.cs (1)
24var milvusHealthState = await _milvusClient.HealthAsync(cancellationToken).ConfigureAwait(false);
Aspire.NATS.Net (1)
NatsHealthCheck.cs (1)
17NatsConnectionState.Closed => await TryConnect(connection).ConfigureAwait(false),
Aspire.Playground.Tests (2)
tests\Shared\AsyncTestHelpers.cs (2)
134return await task.ConfigureAwait(false); 139return await task.WaitAsync(timeout).ConfigureAwait(false);
Aspire.Qdrant.Client (1)
QdrantHealthCheck.cs (1)
22var response = await _client.HealthAsync(cancellationToken).ConfigureAwait(false);
Aspire.Seq (1)
SeqHealthCheck.cs (1)
22.ConfigureAwait(false);
Aspire.Templates.Tests (8)
TemplateTestsBase.cs (2)
236var actualState = await stateCell.InnerTextAsync().ConfigureAwait(false); 296project.LogPath).ConfigureAwait(false);
tests\Shared\Playwright\PlaywrightProvider.cs (1)
36return await playwright.Chromium.LaunchAsync(options).ConfigureAwait(false);
tests\Shared\TemplatesTesting\AspireProject.cs (4)
121var res = await cmd.ExecuteAsync(cmdString).ConfigureAwait(false); 278var resultTask = await Task.WhenAny(successfulStartupTask, AppExited.Task, startupTimeoutTask).ConfigureAwait(false); 299var completedTask = await Task.WhenAny(allOutputCompleteTask, allOutputCompleteTimeoutTask).ConfigureAwait(false); 456(await cmd.ExecuteAsync($"container list --all").ConfigureAwait(false))
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
164var completedTask = await Task.WhenAny(waitForExitTask, Task.Delay(TimeSpan.FromSeconds(5), token)).ConfigureAwait(false);
Binding.Tcp.IntegrationTests (1)
NetTcpBindingTests.4.0.0.cs (1)
69result = await serviceProxy.EchoAsync(testString).ConfigureAwait(false);
ConfigurationSchemaGenerator (1)
Program.cs (1)
14return await rootCommand.Parse(args).InvokeAsync(CancellationToken.None).ConfigureAwait(false);
csc (7)
src\Compilers\Shared\BuildProtocol.cs (1)
620cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false); 184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false); 191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false); 299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false); 309response = await responseTask.ConfigureAwait(false); 350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
dotnet-openapi (1)
Commands\BaseCommand.cs (1)
311var response = await retryBlock().ConfigureAwait(false);
dotnet-svcutil-lib (243)
AppInsightsTelemetryClient.cs (1)
119var sdkVersion = await ProjectPropertyResolver.GetSdkVersionAsync(System.IO.Directory.GetCurrentDirectory(), null /* logger */, cancellationToken).ConfigureAwait(false);
Bootstrapper\SvcutilBootstrapper.cs (9)
62using (await SafeLogger.WriteStartOperationAsync(logger, "Bootstrapping svcutil ...").ConfigureAwait(false)) 83var paramsFilePath = await GenerateParamsFileAsync(logger, cancellationToken).ConfigureAwait(false); 88result = await ProcessRunner.RunAsync("dotnet", $"run \"{paramsFilePath}\"", this.MSBuildProj.DirectoryPath, redirectOutput, logger, cancellationToken).ConfigureAwait(false); 115using (await SafeLogger.WriteStartOperationAsync(logger, $"Creating project file: \"{projectFullPath}\"").ConfigureAwait(false)) 123this.MSBuildProj = await MSBuildProj.DotNetNewAsync(projectFullPath, logger, cancellationToken).ConfigureAwait(false); 168using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Generating Program.cs ...").ConfigureAwait(false)) 178using (await SafeLogger.WriteStartOperationAsync(logger, $"Generating {paramsFilePath} params file ...").ConfigureAwait(false)) 193var restoreResult = await this.MSBuildProj.RestoreAsync(logger, cancellationToken).ConfigureAwait(false); 201var buildResult = await this.MSBuildProj.BuildAsync(logger, cancellationToken).ConfigureAwait(false);
CommandProcessorOptions.cs (14)
289using (SafeLogger safeLogger = await SafeLogger.WriteStartOperationAsync(this.Logger, "Validating options ...").ConfigureAwait(false)) 332using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {ProjectFileKey} option ...").ConfigureAwait(false)) 372this.Project = await MSBuildProj.FromPathAsync(projectFile, this.Logger, cancellationToken).ConfigureAwait(false); 380using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {OutputDirKey} option ...").ConfigureAwait(false)) 417using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {OutputFileKey} option ...").ConfigureAwait(false)) 467using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {UpdateServiceReferenceKey} option ...").ConfigureAwait(false)) 570using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {BootstrapPathKey} option ...").ConfigureAwait(false)) 617using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {nameof(this.References)}, count: {this.References.Count}. Reference resolution enabled: {resolveReferences}").ConfigureAwait(false)) 621var references = await this.Project.ResolveProjectReferencesAsync(ProjectDependency.IgnorableDependencies, logger, cancellationToken).ConfigureAwait(false); 646using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {nameof(this.NamespaceMappings)}, count: {this.NamespaceMappings.Count}").ConfigureAwait(false)) 696using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {TargetFrameworkKey} option ...").ConfigureAwait(false)) 709using (var proj = await MSBuildProj.DotNetNewAsync(projectFullPath, this.Logger, cancellationToken).ConfigureAwait(false)) 729using (var safeLogger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing inputs, count: {this.Inputs.Count} ...").ConfigureAwait(false)) 804using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, "Processing reference assemblies ...").ConfigureAwait(false))
FrameworkFork\Microsoft.Xml\Xml\AsyncHelper.cs (3)
98return await func().ConfigureAwait(false); 118if (await task.ConfigureAwait(false)) 121return await func().ConfigureAwait(false);
FrameworkFork\Microsoft.Xml\Xml\Core\ReadContentAsBinaryHelperAsync.cs (24)
44if (!await InitAsync().ConfigureAwait(false)) 54return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 70return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 100if (!await InitAsync().ConfigureAwait(false)) 110return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 126return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 156if (!await InitOnElementAsync().ConfigureAwait(false)) 168return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 182return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 212if (!await InitOnElementAsync().ConfigureAwait(false)) 224return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 238return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 245while (await MoveToNextContentNodeAsync(true).ConfigureAwait(false)) 254await _reader.ReadAsync().ConfigureAwait(false); 264if (!await MoveToNextContentNodeAsync(false).ConfigureAwait(false)) 280await _reader.ReadAsync().ConfigureAwait(false); 287if (!await MoveToNextContentNodeAsync(false).ConfigureAwait(false)) 294await _reader.ReadAsync().ConfigureAwait(false); 330if ((_valueChunkLength = await _reader.ReadValueChunkAsync(_valueChunk, 0, ChunkSize).ConfigureAwait(false)) == 0) 340string value = await _reader.GetValueAsync().ConfigureAwait(false); 353if (!await MoveToNextContentNodeAsync(true).ConfigureAwait(false)) 368int decoded = await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 381await _reader.ReadAsync().ConfigureAwait(false); 419} while (await _reader.ReadAsync().ConfigureAwait(false));
FrameworkFork\Microsoft.Xml\Xml\Core\XmlCharCheckingReaderAsync.cs (24)
44if (!await base.reader.ReadAsync().ConfigureAwait(false)) 64return await ReadAsync().ConfigureAwait(false); 70return await ReadAsync().ConfigureAwait(false); 76return await ReadAsync().ConfigureAwait(false); 86return await ReadAsync().ConfigureAwait(false); 120CheckCharacters(await base.reader.GetValueAsync().ConfigureAwait(false)); 135return await ReadAsync().ConfigureAwait(false); 147return await ReadAsync().ConfigureAwait(false); 162return await ReadAsync().ConfigureAwait(false); 191return await ReadAsync().ConfigureAwait(false); 195CheckWhitespace(await base.reader.GetValueAsync().ConfigureAwait(false)); 202CheckWhitespace(await base.reader.GetValueAsync().ConfigureAwait(false)); 236return await base.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 249return await base.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 257int readCount = await _readBinaryHelper.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 279return await base.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 292return await base.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 300int readCount = await _readBinaryHelper.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 340return await base.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 353return await base.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 361int readCount = await _readBinaryHelper.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 400return await base.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 413return await base.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 421int readCount = await _readBinaryHelper.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderAsync.cs (23)
41return await InternalReadContentAsStringAsync().ConfigureAwait(false); 64string strContentValue = await InternalReadContentAsStringAsync().ConfigureAwait(false); 89if (await SetupReadElementContentAsXxxAsync("ReadElementContentAsObject").ConfigureAwait(false)) 91object value = await ReadContentAsObjectAsync().ConfigureAwait(false); 101if (await SetupReadElementContentAsXxxAsync("ReadElementContentAsString").ConfigureAwait(false)) 103string value = await ReadContentAsStringAsync().ConfigureAwait(false); 113if (await SetupReadElementContentAsXxxAsync("ReadElementContentAs").ConfigureAwait(false)) 115object value = await ReadContentAsAsync(returnType, namespaceResolver).ConfigureAwait(false); 191} while (await ReadAsync().ConfigureAwait(false)); 204await ReadAsync().ConfigureAwait(false); 235while (await this.ReadAsync().ConfigureAwait(false) && (d < this.Depth)) 249xtw.WriteString(await this.GetValueAsync().ConfigureAwait(false)); 253xtw.WriteWhitespace(await this.GetValueAsync().ConfigureAwait(false)); 278await ReadAsync().ConfigureAwait(false); 291await ReadAsync().ConfigureAwait(false); 329while (await ReadAsync().ConfigureAwait(false) && depth < Depth) 336return await ReadAsync().ConfigureAwait(false); 340return await ReadAsync().ConfigureAwait(false); 363value = await this.GetValueAsync().ConfigureAwait(false); 372sb.Append(await this.GetValueAsync().ConfigureAwait(false)); 391} while ((this.AttributeCount != 0) ? this.ReadAttributeValue() : await this.ReadAsync().ConfigureAwait(false)); 407await this.ReadAsync().ConfigureAwait(false); 417await this.ReadAsync().ConfigureAwait(false);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReaderAsync.cs (29)
59if (await reader.ReadAsync().ConfigureAwait(false)) 86if (!await FinishReadElementContentAsBinaryAsync().ConfigureAwait(false)) 90return await ReadAsync().ConfigureAwait(false); 94if (!await FinishReadContentAsBinaryAsync().ConfigureAwait(false)) 98return await ReadAsync().ConfigureAwait(false); 111await ReadAsync().ConfigureAwait(false); 124if (await reader.ReadAsync().ConfigureAwait(false)) 165if (await FinishReadElementContentAsBinaryAsync().ConfigureAwait(false)) 173if (await FinishReadContentAsBinaryAsync().ConfigureAwait(false)) 193object value = await reader.ReadContentAsObjectAsync().ConfigureAwait(false); 209string value = await reader.ReadContentAsStringAsync().ConfigureAwait(false); 225object value = await reader.ReadContentAsAsync(returnType, namespaceResolver).ConfigureAwait(false); 285return await reader.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 296int read = await reader.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 328if (!await InitReadElementContentAsBinaryAsync(State.ReadElementContentAsBase64).ConfigureAwait(false)) 335int read = await reader.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 357await ReadAsync().ConfigureAwait(false); 421return await reader.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 432int read = await reader.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 464if (!await InitReadElementContentAsBinaryAsync(State.ReadElementContentAsBinHex).ConfigureAwait(false)) 470int read = await reader.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 492await ReadAsync().ConfigureAwait(false); 568if (!await ReadAsync().ConfigureAwait(false) || isEmpty) 580await ReadAsync().ConfigureAwait(false); 596while (await reader.ReadContentAsBase64Async(bytes, 0, 256).ConfigureAwait(false) > 0) ; 600while (await reader.ReadContentAsBinHexAsync(bytes, 0, 256).ConfigureAwait(false) > 0) ; 620return await ReadAsync().ConfigureAwait(false); 630while (await reader.ReadContentAsBase64Async(bytes, 0, 256).ConfigureAwait(false) > 0) ; 634while (await reader.ReadContentAsBinHexAsync(bytes, 0, 256).ConfigureAwait(false) > 0) ;
FrameworkFork\Microsoft.Xml\Xml\Core\XsdCachingReaderAsync.cs (6)
47if (await _coreReader.ReadAsync().ConfigureAwait(false)) 69recordedNode.SetItemData(await _coreReader.GetValueAsync().ConfigureAwait(false)); 93return await _coreReader.ReadAsync().ConfigureAwait(false); 120while (await _coreReader.ReadAsync().ConfigureAwait(false) && _coreReader.Depth > startDepth) 123await _coreReader.ReadAsync().ConfigureAwait(false); 134await ReadAsync().ConfigureAwait(false);
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReaderAsync.cs (21)
51object typedValue = await InternalReadContentAsObjectAsync().ConfigureAwait(false); 86var tuple_0 = await InternalReadContentAsObjectTupleAsync(false).ConfigureAwait(false); 130var tuple_1 = await InternalReadElementContentAsObjectAsync(true).ConfigureAwait(false); 143var tuple_9 = await InternalReadElementContentAsObjectAsync().ConfigureAwait(false); 182var tuple_10 = await InternalReadElementContentAsObjectTupleAsync(false).ConfigureAwait(false); 245if (await task.ConfigureAwait(false)) 369await ReadAsync().ConfigureAwait(false); 391int readCount = await _readBinaryHelper.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 417int readCount = await _readBinaryHelper.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 443int readCount = await _readBinaryHelper.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 469int readCount = await _readBinaryHelper.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 628if (await _coreReader.ReadAsync().ConfigureAwait(false)) 656var tuple_11 = await InternalReadContentAsObjectTupleAsync(unwrapTypedValue).ConfigureAwait(false); 708object value = ReturnBoxedValue(await ReadTillEndElementAsync().ConfigureAwait(false), _xmlSchemaInfo.XmlType, unwrapTypedValue); 723originalStringValue = await InternalReadContentAsStringAsync().ConfigureAwait(false); 739var tuple_13 = await InternalReadElementContentAsObjectTupleAsync(unwrapTypedValue).ConfigureAwait(false); 766await this.ReadAsync().ConfigureAwait(false); 772await this.ReadAsync().ConfigureAwait(false); 800var tuple_14 = await InternalReadContentAsObjectTupleAsync(unwrapTypedValue).ConfigureAwait(false); 814await this.ReadAsync().ConfigureAwait(false); 824while (await _coreReader.ReadAsync().ConfigureAwait(false))
FrameworkFork\Microsoft.Xml\Xml\schema\ParserAsync.cs (2)
21while (ParseReaderNode() && await reader.ReadAsync().ConfigureAwait(false)) { } 39while (reader.NodeType != XmlNodeType.Element && await reader.ReadAsync().ConfigureAwait(false)) { }
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (1)
530prefix = await StartElementAsync(prefix, localName, namespaceUri, null).ConfigureAwait(false);
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlUTF8TextWriter.cs (2)
783BytesWithOffset bufferResult = await GetBufferAsync(charCount).ConfigureAwait(false); 793BytesWithOffset bufferResult = await GetBufferAsync(4).ConfigureAwait(false);
Metadata\MetadaExchangeResolver.cs (10)
104metadataResolved = await ResolveMetadataAsync(this.EndpointAddress.Uri, MetadataExchangeClientMode.HttpGet, true, cancellationToken).ConfigureAwait(false); 109metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + mexUri), MetadataExchangeClientMode.MetadataExchange, false, cancellationToken).ConfigureAwait(false); 114metadataResolved = await ResolveMetadataAsync(this.EndpointAddress.Uri, MetadataExchangeClientMode.MetadataExchange, true, cancellationToken).ConfigureAwait(false); 118metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + wsdlQuery), MetadataExchangeClientMode.HttpGet, false, cancellationToken).ConfigureAwait(false); 127using (var stream = await DownloadMetadataFileAsync(cancellationToken).ConfigureAwait(false)) 129metadataResolved = await ResolveMetadataAsync(stream, baseUri, cancellationToken).ConfigureAwait(false); 134metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + wsdlQuery), MetadataExchangeClientMode.HttpGet, false, cancellationToken).ConfigureAwait(false); 138metadataResolved = await ResolveMetadataAsync(new Uri(baseUri), MetadataExchangeClientMode.HttpGet, true, cancellationToken).ConfigureAwait(false); 146metadataResolved = await ResolveMetadataAsync(new Uri(baseUri), MetadataExchangeClientMode.MetadataExchange, false, cancellationToken).ConfigureAwait(false); 149metadataResolved = await ResolveMetadataAsync(new Uri(baseUri + mexUri), MetadataExchangeClientMode.MetadataExchange, false, cancellationToken).ConfigureAwait(false);
Metadata\MetadataDocumentLoader.cs (9)
239var metadataSections = await metadataExchangeResolver.ResolveMetadataAsync(cancellationToken).ConfigureAwait(false); 319var schema = await AsyncHelper.RunAsync(() => XmlNS.Schema.XmlSchema.Read(reader, null), cancellationToken).ConfigureAwait(false); 338var resolvedLocation = await LoadAsSchemaImportLocationAsync(externalSchema.SchemaLocation, uri, basePath, schemaNamespace, ".xsd", cancellationToken).ConfigureAwait(false); 346WsdlNS.ServiceDescription wsdl = await AsyncHelper.RunAsync(() => WsdlNS.ServiceDescription.Read(reader), cancellationToken).ConfigureAwait(false); 356var resolvedLocation = await LoadAsSchemaImportLocationAsync(import.Location, uri, basePath, import.Namespace, ".wsdl", cancellationToken).ConfigureAwait(false); 387using (var stream = await DownloadSchemaImportAsync(schemaUri, cancellationToken).ConfigureAwait(false)) 431EndpointAddress epr = await AsyncHelper.RunAsync(() => EndpointAddress.ReadFrom(dictionaryReader), cancellationToken).ConfigureAwait(false); 434IEnumerable<MetadataSection> resolvedMetadata = await resolver.ResolveMetadataAsync(cancellationToken).ConfigureAwait(false); 571return await metadataExchangeResolver.DownloadMetadataFileAsync(cancellationToken).ConfigureAwait(false);
Metadata\MetadataDocumentSaver.cs (2)
51return await SaveMetadataAsync(directoryPath, documents, DefaultNamingConvention, DefaultOverwrite, cancellationToken).ConfigureAwait(false); 57var mainWsdl = await AsyncHelper.RunAsync(() => metadataDocumentSaver.SaveMetadata(overwrite), cancellationToken).ConfigureAwait(false);
Metadata\ServiceDescriptor.cs (4)
162wsdlImporter = await CreateWsdlImporterAsync(useMessageFormat, cancellationToken).ConfigureAwait(false); 230return await SaveMetadataAsync(directoryPath, MetadataDocumentSaver.DefaultNamingConvention, MetadataDocumentSaver.DefaultOverwrite, cancellationToken).ConfigureAwait(false); 236return await MetadataDocumentSaver.SaveMetadataAsync(directoryPath, this.metadataDocumentLoader.MetadataSections, fileNamingConvention, overwrite, cancellationToken).ConfigureAwait(false); 293var metadataSet = new MetadataSet(await AsyncHelper.RunAsync(() => GetImportableMetadataSections(), cancellationToken).ConfigureAwait(false));
Shared\MSBuildProj.cs (26)
147var project = await ParseAsync(File.ReadAllText(filePath), filePath, logger, cancellationToken).ConfigureAwait(false); 154var project = await ParseAsync(File.ReadAllText(filePath), filePath, logger, cancellationToken, tfMoniker).ConfigureAwait(false); 161using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Parsing project {Path.GetFileName(projectFullPath)}").ConfigureAwait(false)) 361var sdkVersion = await ProjectPropertyResolver.GetSdkVersionAsync(msbuildProj.DirectoryPath, logger, cancellationToken).ConfigureAwait(false); 408var sdkVersion = await ProjectPropertyResolver.GetSdkVersionAsync(projectDir, logger, cancellationToken).ConfigureAwait(false); 410await ProcessRunner.RunAsync("dotnet", dotnetNewParams, projectDir, logger, cancellationToken).ConfigureAwait(false); 412project = await ParseAsync(File.ReadAllText(fullPath), fullPath, logger, cancellationToken).ConfigureAwait(false); 693using (await SafeLogger.WriteStartOperationAsync(logger, $"Saving project file: \"{this.FullPath}\"").ConfigureAwait(false)) 722await ProcessRunner.TryRunAsync("dotnet", restoreParams + " --no-dependencies", this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false); 723var result = await ProcessRunner.TryRunAsync("dotnet", restoreParams, this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false); 735await this.RestoreAsync(logger, cancellationToken).ConfigureAwait(false); 737return await BuildAsync(logger, cancellationToken).ConfigureAwait(false); 745return await ProcessRunner.RunAsync("dotnet", buildParams, this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false); 761using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving project references ...").ConfigureAwait(false)) 765await this.RestoreAsync(logger, cancellationToken).ConfigureAwait(false); 767var packageReferences = await ResolvePackageReferencesAsync(logger, cancellationToken).ConfigureAwait(false); 768var assemblyReferences = await ResolveAssemblyReferencesAsync(logger, cancellationToken).ConfigureAwait(false); 791using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving package references ...").ConfigureAwait(false)) 853}, cancellationToken).ConfigureAwait(false); 869using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving assembly references for {this.TargetFramework} target framework ...").ConfigureAwait(false)) 871await ResolveProperyValuesAsync(new string[] { "OutputPath", "TargetPath" }, logger, cancellationToken).ConfigureAwait(false); 881await ResolveDepsFilePathFromBuildConfigAsync(outputPath, logger, cancellationToken).ConfigureAwait(false); 934}, cancellationToken).ConfigureAwait(false); 976propertyTable = await _propertyResolver.EvaluateProjectPropertiesAsync(this.FullPath, this.TargetFramework, propertyNames, this.GlobalProperties, logger, cancellationToken).ConfigureAwait(false); 994using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving deps.json file ...").ConfigureAwait(false)) 1000var binFolder = await PathHelper.TryFindFolderAsync("bin", outputPath, logger, cancellationToken).ConfigureAwait(false);
Shared\ProjectPropertyResolver.cs (9)
27using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving {propertyNames.Count()} project properties ...").ConfigureAwait(false)) 33var sdkVersion = await GetSdkVersionAsync(workingDirectory, logger, cancellationToken).ConfigureAwait(false); 34var sdkPath = await GetSdkPathAsync(workingDirectory, logger, cancellationToken).ConfigureAwait(false); 49Assembly msbuildAssembly = await LoadMSBuildAssembliesAsync(sdkPath, logger, cancellationToken).ConfigureAwait(false); 121using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving dotnet sdk version ...").ConfigureAwait(false)) 123var procResult = await ProcessRunner.TryRunAsync("dotnet", "--version", workingDirectory, logger, cancellationToken).ConfigureAwait(false); 141using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving .NETCore SDK path ...").ConfigureAwait(false)) 156var sdkVersion = await GetSdkVersionAsync(workingDirectory, logger, cancellationToken).ConfigureAwait(false); 176using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Loading MSBuild assemblies ...").ConfigureAwait(false))
Shared\Utilities\AsyncHelper.cs (1)
40return await RunAsync(func, null, cancellationToken).ConfigureAwait(false);
Shared\Utilities\PathHelper.cs (5)
207var filePath = await TryFindFileAsync(fileName, workingDirectory, logger, cancellationToken).ConfigureAwait(false); 211using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Copying {fileName} to {destinationDir} ...").ConfigureAwait(false)) 230return await TryFindItemAsync(Directory.EnumerateFiles, fileName, workingDir, logger, cancellationToken).ConfigureAwait(false); 235return await TryFindItemAsync(Directory.EnumerateDirectories, folderName, workingDir, logger, cancellationToken).ConfigureAwait(false); 243using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Looking for '{itemName}' up from '{workingDir}' dir ...").ConfigureAwait(false))
Shared\Utilities\ProcessRunner.cs (5)
35return await RunAsync(processName, processArgs, currentDir, redirectOutput: true, throwOnError: true, logger: logger, cancellationToken: cancellationToken).ConfigureAwait(false); 40return await RunAsync(processName, processArgs, currentDir, redirectOutput: redirectOutput, throwOnError: true, logger: logger, cancellationToken: cancellationToken).ConfigureAwait(false); 45return await RunAsync(processName, processArgs, currentDir, redirectOutput: true, throwOnError: false, logger: logger, cancellationToken: cancellationToken).ConfigureAwait(false); 50return await RunAsync(processName, processArgs, currentDir, redirectOutput, throwOnError, emptyVars, logger, cancellationToken).ConfigureAwait(false); 66using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Executing command [\"{currentDir}\"]{Environment.NewLine}>{processName} {processArgs}").ConfigureAwait(false))
Shared\Utilities\RuntimeEnvironmentHelper.cs (3)
50await PathHelper.TryCopyFileIfFoundAsync("global.json", workingDirectory, destinationDirectory, logger, cancellationToken).ConfigureAwait(false); 56await PathHelper.TryCopyFileIfFoundAsync("nuget.config", workingDirectory, destinationDirectory, logger, cancellationToken).ConfigureAwait(false); 75using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Adding svcutil NuGet feed to existing nuget.config file ...").ConfigureAwait(false))
Shared\Utilities\SafeLogger.cs (1)
37safeLogger._startTime = await safeLogger.WriteStartOperationAsync(message, logToUI).ConfigureAwait(false);
Tool.cs (9)
114using (var safeLogger = await SafeLogger.WriteStartOperationAsync(options.Logger, operationMessage).ConfigureAwait(false)) 133var bootstrapResult = await bootstrapper.BoostrapSvcutilAsync(options.KeepBootstrapDir, options.Logger, cancellationToken).ConfigureAwait(false); 140result = (int)await RunAsync(options, cancellationToken).ConfigureAwait(false); 154if (CanAddProjectReferences(options) && !await AddProjectReferencesAsync(options.Project, options, cancellationToken).ConfigureAwait(false)) 186var telemetryClient = await AppInsightsTelemetryClient.GetInstanceAsync(cancellationToken).ConfigureAwait(false); 222using (await SafeLogger.WriteStartOperationAsync(options.Logger, "Importing metadata ...").ConfigureAwait(false)) 244using (await SafeLogger.WriteStartOperationAsync(options.Logger, "Processing Code DOM ...").ConfigureAwait(false)) 304using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Generating svcutil params file ...").ConfigureAwait(false)) 403var telemetryClient = await AppInsightsTelemetryClient.GetInstanceAsync(CancellationToken.None).ConfigureAwait(false);
dotnet-svcutil-lib.Tests (1)
TestInit.cs (1)
135ProcessRunner.ProcessResult procResult = ProcessRunner.TryRunAsync("dotnet", "--version", Directory.GetCurrentDirectory(), null, new CancellationToken()).ConfigureAwait(false).GetAwaiter().GetResult();
GenerateDocumentationAndConfigFiles (79)
Program.cs (3)
389if (!await createGlobalConfigFilesAsync().ConfigureAwait(false)) 797await checkHelpLinkAsync(helpLinkUri).ConfigureAwait(false)) 854using var response = await httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
GenerateRulesMissingDocumentation (2)
Program.cs (2)
65await checkHelpLinkAsync(helpLinkUri).ConfigureAwait(false)) 114using var response = await httpClient.SendAsync(request).ConfigureAwait(false);
IdeBenchmarks (4)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
129var items = await BenchmarksHelpers.GenerateInheritanceMarginItemsAsync(workspace.CurrentSolution, cancellationToken).ConfigureAwait(false);
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
62CancellationToken.None).ConfigureAwait(false);
Lsp\LspCompletionBenchmarks.cs (1)
88}).ConfigureAwait(false);
Lsp\LspCompletionSerializationBenchmarks.cs (1)
100}).ConfigureAwait(false);
IdeCoreBenchmarks (1)
NavigateToBenchmarks.cs (1)
217var result = await Task.WhenAll(searchTasks).ConfigureAwait(false);
IdentitySample.PasskeyConformance (1)
Program.cs (1)
128var updateResult = await userManager.UpdateAsync(user).ConfigureAwait(false);
IIS.Common.TestLib (2)
TestConnections.cs (2)
137var count = await task.ConfigureAwait(false); 171var count = await task.ConfigureAwait(false);
ILLink.CodeFixProvider (6)
BaseAttributeCodeFixProvider.cs (3)
39if (await document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false) is not { } root) 60if (await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not { } model) 72var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
DynamicallyAccessedMembersCodeFixProvider.cs (3)
99if (await document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false) is not { } root) 128if (await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false) is not { } model) 133var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
InMemory.FunctionalTests (9)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
109var count = await task.ConfigureAwait(false); 133var count = await _reader.ReadAsync(ch, 0, 128).TimeoutAfter(Timeout).ConfigureAwait(false);
TestTransport\InMemoryHttpClientSlim.cs (7)
30=> await GetStringAsync(new Uri(requestUri), validateCertificate).ConfigureAwait(false); 35using (var stream = await GetStream(connection.Stream, requestUri, validateCertificate).ConfigureAwait(false)) 44return await ReadResponse(stream).ConfigureAwait(false); 69=> await PostAsync(new Uri(requestUri), content, validateCertificate).ConfigureAwait(false); 74using (var stream = await GetStream(connection.Stream, requestUri, validateCertificate).ConfigureAwait(false)) 87return await ReadResponse(stream).ConfigureAwait(false); 96var response = await reader.ReadToEndAsync().DefaultTimeout().ConfigureAwait(false);
InteropClient (2)
AsyncStreamExtensions.cs (2)
34while (await streamReader.MoveNext().ConfigureAwait(false)) 47while (await streamReader.MoveNext().ConfigureAwait(false))
InteropWebsite (1)
AsyncStreamExtensions.cs (1)
32while (await streamReader.MoveNext().ConfigureAwait(false))
Metrics (33)
Program.cs (8)
62(ImmutableArray<(string, CodeAnalysisMetricData)> metricDatas, ErrorCode exitCode) = await GetMetricDatasAsync(projectsOrSolutions, quiet, cancellationToken).ConfigureAwait(false); 69errorCode = await writeOutputAsync().ConfigureAwait(false); 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\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Metrics.Legacy (33)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Tools\Metrics\Program.cs (8)
62(ImmutableArray<(string, CodeAnalysisMetricData)> metricDatas, ErrorCode exitCode) = await GetMetricDatasAsync(projectsOrSolutions, quiet, cancellationToken).ConfigureAwait(false); 69errorCode = await writeOutputAsync().ConfigureAwait(false); 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\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Microsoft.Analyzers.Extra (18)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (16)
58var (invocationExpression, details) = await CheckIfCanFixAsync(context.Document, context.Span, context.CancellationToken).ConfigureAwait(false); 73var root = await GetSyntaxRootAsync(invocationDoc, cancellationToken).ConfigureAwait(false); 80var sm = await GetSemanticModelAsync(invocationDoc, cancellationToken).ConfigureAwait(false); 140var invocationSM = (await invocationDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false))!; 143var docEditor = await DocumentEditor.CreateAsync(targetDoc, cancellationToken).ConfigureAwait(false); 268var comp = (await proj.GetCompilationAsync(cancellationToken).ConfigureAwait(false))!; 324var root = await doc.GetSyntaxRootAsync().ConfigureAwait(false); 471var docEditor = await solEditor.GetDocumentEditorAsync(doc.Id, cancellationToken).ConfigureAwait(false); 545(sol, targetClass, targetDoc) = await GetOrMakeTargetClassAsync(invocationDoc.Project, details, cancellationToken).ConfigureAwait(false); 548(invocationDoc, invocationExpression) = await RemapAsync(sol, invocationDocId, invocationExpression).ConfigureAwait(false); 551var (methodName, existing) = await GetFinalTargetMethodNameAsync(targetDoc, targetClass, invocationDoc, invocationExpression, details, cancellationToken).ConfigureAwait(false); 557sol = await InsertLoggingMethodSignatureAsync(targetDoc, targetClass, invocationDoc, invocationExpression, details, cancellationToken).ConfigureAwait(false); 560(invocationDoc, invocationExpression) = await RemapAsync(sol, invocationDocId, invocationExpression).ConfigureAwait(false); 564sol = await RewriteLoggingCallAsync(invocationDoc, invocationExpression, details, methodName, cancellationToken).ConfigureAwait(false); 577var invocationSM = (await invocationDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false))!; 581var docEditor = await solEditor.GetDocumentEditorAsync(targetDoc.Id, cancellationToken).ConfigureAwait(false);
MakeExeTypesInternalFixer.cs (2)
28var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 39var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Extra.Tests (25)
AsyncCallInsideUsingBlockAnalyzerTests.cs (1)
403new[] { BoilerPlate, source }).ConfigureAwait(false);
AsyncMethodWithoutCancellationTests.cs (1)
164new[] { source }).ConfigureAwait(false);
Resources\RoslynTestUtils.cs (23)
191var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 219var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 259var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 260var diags = await comp!.WithAnalyzers(analyzers, options).GetAllDiagnosticsAsync().ConfigureAwait(false); 333var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 334var diags = await comp!.WithAnalyzers(analyzers, analyzerOptions).GetAllDiagnosticsAsync().ConfigureAwait(false); 361var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 366proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 379var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 387var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 394var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 455var operations = await fixAllCodeAction!.GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 460proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 470var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 478var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 485var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 497document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 506var newText = await document.GetTextAsync().ConfigureAwait(false); 524return await GetProjectDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false); 529var diagnostics = await GetProjectDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false); 537_project = await RecreateProjectDocumentsAsync(project!).ConfigureAwait(false); 540var comp = await _project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 542.GetAllDiagnosticsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Local.Tests (24)
InternalReferencedInPublicDocAnalyzerTests.cs (1)
489new[] { source }).ConfigureAwait(false);
Resources\RoslynTestUtils.cs (23)
191var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 219var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 259var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 261.GetAnalysisResultAsync(CancellationToken.None).ConfigureAwait(false); 334var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 335var diags = await comp!.WithAnalyzers(analyzers, analyzerOptions).GetAllDiagnosticsAsync().ConfigureAwait(false); 362var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 367proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 380var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 388var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 395var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 456var operations = await fixAllCodeAction!.GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 461proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 471var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 479var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 486var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 498document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 507var newText = await document.GetTextAsync().ConfigureAwait(false); 525return await GetProjectDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false); 530var diagnostics = await GetProjectDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false); 538_project = await RecreateProjectDocumentsAsync(project!).ConfigureAwait(false); 541var comp = await _project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 543.GetAllDiagnosticsAsync(cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Analyzers (1)
CompilationFeatureDetector.cs (1)
41var syntax = await syntaxReferences[j].GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.App.Analyzers (4)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
96var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 124var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (2)
95var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 108var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.App.Analyzers.Test (3)
TestDiagnosticAnalyzer.cs (3)
50var originalText = await doc.GetTextAsync().ConfigureAwait(false); 73var semanticModel = await document.GetSemanticModelAsync(CancellationToken.None).ConfigureAwait(false); 79var root = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.AspNetCore.App.CodeFixes (15)
Authorization\AddAuthorizationBuilderFixer.cs (2)
29var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 35var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\AddPackageFixer.cs (2)
31var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 37var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Dependencies\ExtensionMethodsCompletionProvider.cs (2)
34var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 47var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
DetectMismatchedParameterOptionalityFixer.cs (1)
39var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Http\HeaderDictionaryAddFixer.cs (2)
30var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 36var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
Http\HeaderDictionaryIndexerFixer.cs (1)
44var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Kestrel\ListenOnIPv6AnyFixer.cs (1)
33var editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
PublicPartialProgramClassFixer.cs (1)
31var editor = await DocumentEditor.CreateAsync(context.Document, cancellationToken).ConfigureAwait(false);
RouteParameterUnusedParameterFixer.cs (2)
31var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 37var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false);
WebApplicationBuilderFixer.cs (1)
31var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Authorization (11)
AssertionRequirement.cs (1)
49if (await Handler(context).ConfigureAwait(false))
AuthorizationPolicy.cs (3)
143var policy = await policyProvider.GetPolicyAsync(authorizeDatum.Policy).ConfigureAwait(false); 174policyBuilder.Combine(await policyProvider.GetDefaultPolicyAsync().ConfigureAwait(false)); 192var fallbackPolicy = await policyProvider.GetFallbackPolicyAsync().ConfigureAwait(false);
DefaultAuthorizationService.cs (4)
67var handlers = await _handlers.GetHandlersAsync(authContext).ConfigureAwait(false); 101var policy = await GetPolicyAsync(policyName).ConfigureAwait(false); 102return await this.AuthorizeAsync(user, resource, policy).ConfigureAwait(false); 109return await _policyProvider.GetPolicyAsync(policyName).ConfigureAwait(false) ?? throw new InvalidOperationException($"No policy found: {policyName}.");
DefaultAuthorizationServiceImpl.cs (3)
29result = await base.AuthorizeAsync(user, resource, requirements).ConfigureAwait(false); 46var policy = await GetPolicyAsync(policyName).ConfigureAwait(false); 51result = await base.AuthorizeAsync(user, resource, policy.Requirements).ConfigureAwait(false);
Microsoft.AspNetCore.Components (1)
Rendering\RendererSynchronizationContext.cs (1)
148state.completion.SetResult(await state.asyncFunction().ConfigureAwait(false));
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
33var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
33var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Components.WebView.Maui (2)
src\Core\src\TaskExtensions.cs (2)
18 result = await task.ConfigureAwait(false); 68 var result = await task.ConfigureAwait(false);
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (2)
239 .ConfigureAwait(true); 287 .ConfigureAwait(true);
Microsoft.AspNetCore.Components.WebView.Wpf (2)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (2)
239 .ConfigureAwait(true); 287 .ConfigureAwait(true);
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (21)
Latency\ChecpointAcceptanceTests.cs (1)
105var e = await Record.ExceptionAsync(async () => response = await host.GetTestClient().GetAsync("/").ConfigureAwait(false));
Logging\AcceptanceTests.cs (14)
217using var response = await client.PostAsync("/", content).ConfigureAwait(false); 277using var response = await client.PostAsync("/myroute/123", content).ConfigureAwait(false); 330using var response = await client.PostAsync("/myroute/123", content).ConfigureAwait(false); 384using var response = await client.SendAsync(request).ConfigureAwait(false); 445using var response = await client.SendAsync(httpMessage).ConfigureAwait(false); 493using var response = await client.DeleteAsync("/").ConfigureAwait(false); 535using var response = await client.GetAsync(RequestPath).ConfigureAwait(false); 565using var response = await client.DeleteAsync("/").ConfigureAwait(false); 598using var firstResponse = await client.DeleteAsync("/").ConfigureAwait(false); 603using var secondResponse = await client.DeleteAsync("/").ConfigureAwait(false); 756using var response = await client.PostAsync("/", content).ConfigureAwait(false); 786using var response = await client.GetAsync(httpPath).ConfigureAwait(false); 969using var response = await client.GetAsync("").ConfigureAwait(false); 985using var response = await client.GetAsync("").ConfigureAwait(false);
Logging\AcceptanceTests.Mvc.cs (5)
65using var response = await client.GetAsync($"/api/users/{UserId}/someTestData?{QueryParamName}=foo").ConfigureAwait(false); 100using var response = await client.GetAsync($"/api/users/{UserId}/someTestData?{QueryParamName}=foo").ConfigureAwait(false); 146using var response = await client.GetAsync($"/api/users/{UserId}/{NoDataClassParamValue}?{QueryParamName}=foo").ConfigureAwait(false); 190using var response = await client.GetAsync($"/api/users/{UserId}/someTestData?{QueryParamName}=foo").ConfigureAwait(false); 231using var response = await client.GetAsync(RequestPath).ConfigureAwait(false);
Logging\AcceptanceTests.Routing.cs (1)
65using var response = await client.GetAsync(httpPath).ConfigureAwait(false);
Microsoft.AspNetCore.Http.Connections.Client (21)
HttpConnection.cs (5)
331negotiationResponse = await GetNegotiationResponseAsync(uri, cancellationToken).ConfigureAwait(false); 407negotiationResponse = await GetNegotiationResponseAsync(uri, cancellationToken).ConfigureAwait(false); 485using (var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false)) 489var responseBuffer = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); 717var negotiationResponse = await NegotiateAsync(uri, _httpClient!, _logger, cancellationToken).ConfigureAwait(false);
Internal\AccessTokenHttpMessageHandler.cs (4)
35_accessToken = await _httpConnection.GetAccessTokenAsync().ConfigureAwait(false); 40var result = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); 46_accessToken = await _httpConnection.GetAccessTokenAsync().ConfigureAwait(false); 52result = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Internal\LoggingHttpMessageHandler.cs (1)
29var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Internal\LongPollingTransport.cs (4)
57using (var response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false)) 80var trigger = await Task.WhenAny(receiving, sending).ConfigureAwait(false); 160response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false); 235var response = await _httpClient.SendAsync(request).ConfigureAwait(false);
Internal\SendUtils.cs (1)
51using (var response = await httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false))
Internal\ServerSentEventsTransport.cs (3)
62response = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); 97var trigger = await Task.WhenAny(receiving, sending).ConfigureAwait(false); 134using (var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
Internal\WebSocketsTransport.cs (3)
245var accessToken = await _httpConnectionOptions.AccessTokenProvider().ConfigureAwait(false); 354var trigger = await Task.WhenAny(receiving, sending).ConfigureAwait(false); 367var resultTask = await Task.WhenAny(sending, Task.Delay(_closeTimeout, _stopCts.Token)).ConfigureAwait(false);
Microsoft.AspNetCore.Identity (13)
PasskeyHandler.cs (13)
43var excludeCredentials = await GetExcludeCredentialsAsync().ConfigureAwait(false); 91var existingUser = await _userManager.FindByIdAsync(userEntity.Id).ConfigureAwait(false); 97var passkeys = await _userManager.GetPasskeysAsync(existingUser).ConfigureAwait(false); 114var allowCredentials = await GetAllowCredentialsAsync().ConfigureAwait(false); 125var userId = user is not null ? await _userManager.GetUserIdAsync(user).ConfigureAwait(false) : null; 148var passkeys = await _userManager.GetPasskeysAsync(user).ConfigureAwait(false); 167return await PerformAttestationCoreAsync(context).ConfigureAwait(false); 191return await PerformAssertionCoreAsync(context).ConfigureAwait(false); 335var existingUser = await _userManager.FindByPasskeyIdAsync(credentialId).ConfigureAwait(false); 406user = await _userManager.FindByIdAsync(originalUserId).ConfigureAwait(false) 438storedPasskey = await _userManager.GetPasskeyAsync(user, credentialId).ConfigureAwait(false); 459user = await _userManager.FindByIdAsync(userHandle).ConfigureAwait(false); 464storedPasskey = await _userManager.GetPasskeyAsync(user, credentialId).ConfigureAwait(false);
Microsoft.AspNetCore.Identity.EntityFrameworkCore (12)
UserOnlyStore.cs (6)
625var userPasskey = await FindUserPasskeyByIdAsync(passkey.CredentialId, cancellationToken).ConfigureAwait(false); 673.ConfigureAwait(false); 691var passkey = await FindUserPasskeyByIdAsync(credentialId, cancellationToken).ConfigureAwait(false); 694return await FindUserAsync(passkey.UserId, cancellationToken).ConfigureAwait(false); 712var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false); 747var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false);
UserStore.cs (6)
770var userPasskey = await FindUserPasskeyByIdAsync(passkey.CredentialId, cancellationToken).ConfigureAwait(false); 817.ConfigureAwait(false); 835var passkey = await FindUserPasskeyByIdAsync(credentialId, cancellationToken).ConfigureAwait(false); 838return await FindUserAsync(passkey.UserId, cancellationToken).ConfigureAwait(false); 856var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false); 891var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.InternalTesting (24)
ExceptionAssertions.cs (2)
56var ex = await Assert.ThrowsAsync<TException>(testCode).ConfigureAwait(false); 120var ex = await Assert.ThrowsAsync<TException>(testCode).ConfigureAwait(false);
HttpClientSlim.cs (12)
26=> await GetStringAsync(new Uri(requestUri), validateCertificate).ConfigureAwait(false); 33using (var stream = await GetStream(requestUri, validateCertificate).ConfigureAwait(false)) 42return await ReadResponse(stream).ConfigureAwait(false); 44}).ConfigureAwait(false); 69=> await PostAsync(new Uri(requestUri), content, validateCertificate).ConfigureAwait(false); 76using (var stream = await GetStream(requestUri, validateCertificate).ConfigureAwait(false)) 89return await ReadResponse(stream).ConfigureAwait(false); 91}).ConfigureAwait(false); 99var response = await reader.ReadToEndAsync().ConfigureAwait(false); 117return await retryBlock().ConfigureAwait(false); 152var socket = await GetSocket(requestUri).ConfigureAwait(false); 182await tcs.Task.ConfigureAwait(false);
src\Shared\TaskExtensions.cs (2)
83return await task.ConfigureAwait(false); 88return await task.WaitAsync(timeout).ConfigureAwait(false);
xunit\AspNetTestAssemblyRunner.cs (1)
117.ConfigureAwait(false);
xunit\AspNetTestFrameworkExecutor.cs (1)
22await assemblyRunner.RunAsync().ConfigureAwait(false);
xunit\AspNetTestInvoker.cs (1)
48var time = await base.InvokeTestMethodAsync(testClassInstance).ConfigureAwait(false);
xunit\AspNetTestRunner.cs (5)
62? await base.InvokeTestAsync(aggregator).ConfigureAwait(false) 63: await RunTestCaseWithRetryAsync(retryAttribute, aggregator).ConfigureAwait(false); 84var result = await base.InvokeTestAsync(aggregator).ConfigureAwait(false); 110return await InvokeTestMethodCoreAsync(aggregator).ConfigureAwait(false); 119timeTaken = await InvokeTestMethodCoreAsync(aggregator).ConfigureAwait(false);
Microsoft.AspNetCore.Mvc.Api.Analyzers (8)
AddResponseTypeAttributeCodeFixAction.cs (6)
47var nullableContext = await CreateCodeActionContext(cancellationToken).ConfigureAwait(false); 64var documentEditor = await DocumentEditor.CreateAsync(_document, cancellationToken).ConfigureAwait(false); 103.ConfigureAwait(false); 110var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 129var root = await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 130var semanticModel = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ApiActionsDoNotRequireExplicitModelValidationCodeFixProvider.cs (2)
54var rootNode = await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 55var editor = await DocumentEditor.CreateAsync(_document, cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (15)
RedisOutputCacheStore.cs (15)
133if (!await cache.StringSetAsync(gcKey, DateTime.UtcNow.ToString(CultureInfo.InvariantCulture), gcLifetime, when: When.NotExists).ConfigureAwait(false)) 149await cache.SortedSetRemoveRangeByScoreAsync(GetTagKey((string)entry.Element!), start: 0, stop: keepValuesGreaterThan, flags: GarbageCollectionFlags).ConfigureAwait(false); 152await cache.KeyExpireAsync(gcKey, gcLifetime).ConfigureAwait(false); 157return await cache.SortedSetRemoveRangeByScoreAsync(_tagMasterKey, start: 0, stop: keepValuesGreaterThan).ConfigureAwait(false); 161await cache.KeyDeleteAsync(gcKey, CommandFlags.FireAndForget).ConfigureAwait(false); 177await cache.KeyDeleteAsync(GetValueKey((string)entry.Element!), DeleteFlags).ConfigureAwait(false); 178await cache.SortedSetRemoveAsync(tagKey, entry.Element, DeleteFlags).ConfigureAwait(false); 197return (byte[]?)(await cache.StringGetAsync(GetValueKey(key)).ConfigureAwait(false)); 217result = await cache.StringGetLeaseAsync(GetValueKey(key)).ConfigureAwait(false); 262await cache.StringSetAsync(GetValueKey(key), singleChunk, validFor).ConfigureAwait(false); 283await cache.SortedSetAddAsync(_tagMasterKey, tag, expiryTimestamp, SortedSetWhen.GreaterThan, TagCommandFlags).ConfigureAwait(false); 297await cache.ScriptEvaluateAsync(ZADD_GT, _tagMasterKeyArray, new RedisValue[] { expiryTimestamp, tag }, TagCommandFlags).ConfigureAwait(false); 299await cache.SortedSetAddAsync(GetTagKey(tag), key, expiryTimestamp, SortedSetWhen.Always, TagCommandFlags).ConfigureAwait(false); 335connection = await ConnectionMultiplexer.ConnectAsync(_options.GetConfiguredOptions()).ConfigureAwait(false); 339connection = await _options.ConnectionMultiplexerFactory().ConfigureAwait(false);
Microsoft.AspNetCore.Server.IntegrationTesting (1)
Common\RetryHelper.cs (1)
36var response = await retryBlock().ConfigureAwait(false);
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Internal\Infrastructure\TransportConnectionManager.cs (2)
69return await Task.WhenAny(allClosedTask, CancellationTokenAsTask(token)).ConfigureAwait(false) == allClosedTask; 91return await Task.WhenAny(allAbortedTask, Task.Delay(1000)).ConfigureAwait(false) == allAbortedTask;
Internal\Infrastructure\TransportManager.cs (2)
137if (!await transport.TransportConnectionManager.CloseAllConnectionsAsync(cancellationToken).ConfigureAwait(false)) 141if (!await transport.TransportConnectionManager.AbortAllConnectionsAsync().ConfigureAwait(false))
Internal\KestrelServerImpl.cs (2)
203options.EndPoint = await _transportManager.BindAsync(configuredEndpoint, connectionDelegate, options.EndpointConfig, onBindCancellationToken).ConfigureAwait(false); 222options.EndPoint = await _transportManager.BindAsync(configuredEndpoint, multiplexedConnectionDelegate, options, onBindCancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
109var count = await task.ConfigureAwait(false); 133var count = await _reader.ReadAsync(ch, 0, 128).TimeoutAfter(Timeout).ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Client.Core (15)
HubConnection.cs (11)
438return await StreamAsChannelCoreAsyncCore(methodName, returnType, args, cancellationToken).ConfigureAwait(false); 460return await InvokeCoreAsyncCore(methodName, returnType, args, cancellationToken).ConfigureAwait(false); 682var reader = await StreamAsChannelCoreAsync(methodName, typeof(T), args, cts.Token).ConfigureAwait(false); 738var (connectionState, activity) = await WaitForActiveConnectionWithActivityAsync(nameof(StreamAsChannelCoreAsync), methodName, token: cancellationToken).ConfigureAwait(false); 1045connectionState = await connectionStateTask.ConfigureAwait(false); 1085var (connectionState, activity) = await WaitForActiveConnectionWithActivityAsync(nameof(InvokeCoreAsync), methodName, token: cancellationToken).ConfigureAwait(false); 1105return await invocationTask.ConfigureAwait(false); 1235var (connectionState, activity) = await WaitForActiveConnectionWithActivityAsync(nameof(SendCoreAsync), methodName, token: cancellationToken).ConfigureAwait(false); 1272var connectionState = await _state.WaitForActiveConnectionAsync(callerName, token: cancellationToken).ConfigureAwait(false); 1411result = await resultTask.ConfigureAwait(false); 1659closeMessage = await ProcessMessagesAsync(message, connectionState, invocationMessageChannel.Writer).ConfigureAwait(false);
HubConnectionExtensions.InvokeAsyncGeneric.cs (1)
275return (TResult)(await hubConnection.InvokeCoreAsync(methodName, typeof(TResult), args, cancellationToken).ConfigureAwait(false))!;
HubConnectionExtensions.OnResult.cs (1)
42return await currentHandler(parameters).ConfigureAwait(false);
HubConnectionExtensions.StreamAsChannelAsync.cs (1)
276var inputChannel = await hubConnection.StreamAsChannelCoreAsync(methodName, typeof(TResult), args, cancellationToken).ConfigureAwait(false);
src\SignalR\common\Shared\MessageBuffer.cs (1)
153await _resend.Task.ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
HubConnectionTests.Tracing.cs (1)
88var result = await resultTask.ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Core (1)
src\SignalR\common\Shared\MessageBuffer.cs (1)
153await _resend.Task.ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
src\Shared\TaskExtensions.cs (2)
83return await task.ConfigureAwait(false); 88return await task.WaitAsync(timeout).ConfigureAwait(false);
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
ChannelExtensions.cs (1)
60if (!await readTask.ConfigureAwait(false))
Microsoft.AspNetCore.TestHost (1)
TestServer.cs (1)
235return await builder.SendAsync(cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.WebUtilities (1)
HttpRequestStreamReader.cs (1)
521await ReadIntoBufferAsync().ConfigureAwait(false);
Microsoft.Build.Tasks.CodeAnalysis (7)
src\Compilers\Shared\BuildProtocol.cs (1)
620cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false); 184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false); 191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false); 299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false); 309response = await responseTask.ConfigureAwait(false); 350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (7)
src\Compilers\Shared\BuildProtocol.cs (1)
620cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false); 184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false); 191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false); 299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false); 309response = await responseTask.ConfigureAwait(false); 350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis (43)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
409(_lazyAnalyzerActions, _lazyUnsuppressedAnalyzers) = await GetAnalyzerActionsAsync(Analyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false); 410_lazyAnalyzerGateMap = await CreateAnalyzerGateMapAsync(UnsuppressedAnalyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false); 413_lazyGeneratedCodeAnalysisFlagsMap = await CreateGeneratedCodeAnalysisFlagsMapAsync(UnsuppressedAnalyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false); 1523workerTasks[i] = Task.Run(async () => await ProcessCompilationEventsCoreAsync(analysisScope, prePopulatedEventQueue, cancellationToken).ConfigureAwait(false)); 1555completedEvent = await ProcessCompilationEventsCoreAsync(analysisScope, prePopulatedEventQueue, cancellationToken).ConfigureAwait(false); 2235var isConcurrent = await analyzerManager.IsConcurrentAnalyzerAsync(analyzer, analyzerExecutor, cancellationToken).ConfigureAwait(false); 2260var generatedCodeAnalysisFlags = await analyzerManager.GetGeneratedCodeAnalysisFlagsAsync(analyzer, analyzerExecutor, cancellationToken).ConfigureAwait(false);
DiagnosticAnalyzer\AnalyzerManager.cs (6)
79return await analyzerExecutionContext.GetCompilationAnalysisScopeAsync(sessionScope, analyzerExecutor, cancellationToken).ConfigureAwait(false); 103return await GetSymbolAnalysisScopeCoreAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, symbolStartActions, analyzerExecutor, analyzerExecutionContext, cancellationToken).ConfigureAwait(false); 118return await analyzerExecutionContext.GetSymbolAnalysisScopeAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, symbolStartActions, analyzerExecutor, cancellationToken).ConfigureAwait(false); 127return await GetSymbolAnalysisScopeCoreAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, symbolStartActions, analyzerExecutor, analyzerExecutionContext, cancellationToken).ConfigureAwait(false); 150return await task.ConfigureAwait(false); 201var symbolScope = await GetSymbolAnalysisScopeAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, analyzer, filteredSymbolStartActions, analyzerExecutor, cancellationToken).ConfigureAwait(false);
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (25)
245return await GetAnalyzerDiagnosticsCoreAsync(Analyzers, cancellationToken).ConfigureAwait(false); 257return await GetAnalyzerDiagnosticsCoreAsync(analyzers, cancellationToken).ConfigureAwait(false); 265return await GetAnalysisResultCoreAsync(Analyzers, cancellationToken).ConfigureAwait(false); 277return await GetAnalysisResultCoreAsync(analyzers, cancellationToken).ConfigureAwait(false); 294var diagnostics = await getAllDiagnosticsWithoutStateTrackingAsync(Analyzers, cancellationToken: cancellationToken).ConfigureAwait(false); 309using var driver = await CreateAndInitializeDriverAsync(compilation, _analysisOptions, analysisScope, _suppressors, categorizeDiagnostics: false, cancellationToken).ConfigureAwait(false); 314var analyzerDiags = await driver.GetDiagnosticsAsync(compilation, cancellationToken).ConfigureAwait(false); 326return await GetAnalyzerCompilationDiagnosticsCoreAsync(Analyzers, cancellationToken).ConfigureAwait(false); 339return await GetAnalyzerCompilationDiagnosticsCoreAsync(analyzers, cancellationToken).ConfigureAwait(false); 399return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, Analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false); 415return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, Analyzers, filterSpan, cancellationToken).ConfigureAwait(false); 432return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false); 450return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, analyzers, filterSpan, cancellationToken).ConfigureAwait(false); 524return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), Analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false); 540return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false); 556return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), Analyzers, filterSpan, cancellationToken).ConfigureAwait(false); 574return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), analyzers, filterSpan, cancellationToken).ConfigureAwait(false); 602return await GetAnalyzerSemanticDiagnosticsCoreAsync(model, filterSpan, Analyzers, cancellationToken).ConfigureAwait(false); 618return await GetAnalyzerSemanticDiagnosticsCoreAsync(model, filterSpan, analyzers, cancellationToken).ConfigureAwait(false); 729using var driver = await CreateAndInitializeDriverAsync(compilation, _analysisOptions, analysisScope, _suppressors, categorizeDiagnostics: true, cancellationToken).ConfigureAwait(false); 736driver, compilation, analysisScope, cancellationToken).ConfigureAwait(false); 843var actionCounts = await driver.GetAnalyzerActionCountsAsync(analyzer, compilation.Options, analysisScope, cancellationToken).ConfigureAwait(false); 1282var actionCounts = await GetAnalyzerActionCountsAsync(analyzer, cancellationToken).ConfigureAwait(false); 1299using var driver = await CreateAndInitializeDriverAsync(_compilation, _analysisOptions, analysisScope, _suppressors, categorizeDiagnostics: true, cancellationToken).ConfigureAwait(false); 1301return await driver.GetAnalyzerActionCountsAsync(analyzer, _compilation.Options, analysisScope, cancellationToken).ConfigureAwait(false);
FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
Microsoft.CodeAnalysis.Analyzers (111)
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (1)
59var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (3)
177var newText = await AddEntriesToUnshippedFileAsync(unshippedDataDocument, [entryToAdd], cancellationToken).ConfigureAwait(false); 195var newText = await UpdateEntriesInUnshippedFileAsync(unshippedDataDocument, new Dictionary<string, string>() { { ruleId, entryToUpdate } }, cancellationToken).ConfigureAwait(false); 256var unshippedText = await unshippedDataDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (8)
33ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document!).ConfigureAwait(false); 41ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 50ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 107var newText = await AddEntriesToUnshippedFileForDiagnosticsAsync(unshippedDocument, diagnostics, cancellationToken).ConfigureAwait(false); 112var newText = await UpdateEntriesInUnshippedFileForDiagnosticsAsync(unshippedDocument, diagnostics, cancellationToken).ConfigureAwait(false); 141return await AddEntriesToUnshippedFileAsync(unshippedDataDocument, entriesToAdd, cancellationToken).ConfigureAwait(false); 156return await UpdateEntriesInUnshippedFileAsync(unshippedDataDocument, entriesToUpdate, cancellationToken).ConfigureAwait(false); 179newSolution = await AddAnalyzerReleaseTrackingFilesAsync(newSolution.GetProject(projectId)!).ConfigureAwait(false);
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (7)
74IBinaryOperation binaryOperation => await ConvertToEqualsAsync(document, semanticModel, binaryOperation, cancellationToken).ConfigureAwait(false), 75IInvocationOperation invocationOperation => await EnsureEqualsCorrectAsync(document, semanticModel, invocationOperation, cancellationToken).ConfigureAwait(false), 99.ConfigureAwait(false), 105.ConfigureAwait(false), 125var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 194var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 260var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
175var text = await fixInfo.AdditionalDocumentToFix.GetTextAsync(cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (5)
35return await WellKnownFixAllProviders.BatchFixer.GetFixAsync(fixAllContext).ConfigureAwait(false); 46ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document!).ConfigureAwait(false); 54ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 63ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 131var text = await additionalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\PreferIsKindFix.cs (2)
39var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 65var editor = await DocumentEditor.CreateAsync(document, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.AnalyzerUtilities (25)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Microsoft.CodeAnalysis.BannedApiAnalyzers (84)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CodeStyle (24)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (6)
169idToSuppressMessageAttributesMap, suppressMessageAttributesToIsUsedMap, userIdExclusions, userCategoryExclusions, cancellationToken).ConfigureAwait(false); 187getSupportedDiagnostics, compilerDiagnosticIds, cancellationToken).ConfigureAwait(false); 464var analysisResult = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel.SyntaxTree, analyzers, cancellationToken).ConfigureAwait(false); 471analysisResult = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, filterSpan: null, analyzers, cancellationToken).ConfigureAwait(false); 596var attributeNode = await attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 819var attributeNode = await attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Microsoft.CodeAnalysis.CodeStyle.Fixes (220)
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (2)
38var declarator = await GetMemberDeclaratorAsync(document, diagnostic, cancellationToken).ConfigureAwait(false); 103var declarator = await GetMemberDeclaratorAsync(document, diagnostic, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (3)
37var attribute = await GetObsoleteAttributeAsync(document, cancellationToken).ConfigureAwait(false); 59var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 74var obsoleteAttribute = await GetObsoleteAttributeAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
382var (argumentType, refKind) = await GetArgumentTypeAndRefKindAsync(invocationDocument, argument, cancellationToken).ConfigureAwait(false); 387invocationDocument, argument, method.ContainingType, cancellationToken).ConfigureAwait(false); 399cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (8)
92? await FindMethodDeclarationReferencesAsync(invocationDocument, method, cancellationToken).ConfigureAwait(false) 112var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 154solution = await AddConstructorAssignmentsAsync(solution).ConfigureAwait(false); 160var finalSolution = await TryAddConstructorAssignmentsAsync(rewrittenSolution).ConfigureAwait(false); 189var semanticDocument = await SemanticDocument.CreateAsync(rewrittenDocument, cancellationToken).ConfigureAwait(false); 202cancellationToken).ConfigureAwait(false); 210rewrittenDocument, parameter, memberToAssignTo, cancellationToken).ConfigureAwait(false); 218method, invocationDocument.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
452await this.FixAllAsync(document, diagnostics, context.CodeActionEquivalenceKey, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
30node, context.Document, context.Diagnostics[0], context.CancellationToken).ConfigureAwait(false); 56var result = await GetRootInOtherSyntaxTreeAsync(node, semanticModel, diagnostic, cancellationToken).ConfigureAwait(false); 61var title = await GetDescriptionAsync(diagnostic, node, semanticModel, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (4)
46=> document.WithSyntaxRoot(await GetTransformedSyntaxRootAsync(document, cancellationToken).ConfigureAwait(false)); 54return await GetTransformedSyntaxRootAsync(generator.SyntaxFacts, FileHeaderHelper, newLineTrivia, document, fileHeaderTemplate: null, cancellationToken).ConfigureAwait(false); 60var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 234return await this.GetTransformedDocumentAsync(document, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (2)
84var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 86var state = await State.GenerateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (10)
71var parameterNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 74if (!await state.TryInitializeAsync(node, cancellationToken).ConfigureAwait(false)) 115if (!await TryInitializeDelegatedConstructorAsync(cancellationToken).ConfigureAwait(false)) 131_document, this.TypeToGenerateIn, _arguments, ParameterTypes, parameterNames, cancellationToken).ConfigureAwait(false); 175_document, this.TypeToGenerateIn, remainingArguments, remainingParameterTypes, remainingParameterNames, cancellationToken).ConfigureAwait(false); 415return await GenerateThisOrBaseDelegatingConstructorAsync(document, withFields, withProperties, cancellationToken).ConfigureAwait(false) ?? 416await GenerateMemberDelegatingConstructorAsync(document, withFields, withProperties, cancellationToken).ConfigureAwait(false); 427var (members, assignments) = await GenerateMembersAndAssignmentsAsync(document, withFields, withProperties, cancellationToken).ConfigureAwait(false); 452cancellationToken).ConfigureAwait(false); 507cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (4)
143var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 144var propertyNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Property, Accessibility.Public, cancellationToken).ConfigureAwait(false); 145var parameterNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 147var rules = await document.Document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
39document, new TextSpan(typeName.Value.Span.Start, 0), forRefactoring: false, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
33var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
39cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
46cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (2)
29var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 30var state = await State.GenerateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
45var codeActions = await GetCodeActionsAsync(context.Document, name, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
34var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 35var state = await State.GenerateConversionStateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (1)
25if (!await state.TryInitializeConversionAsync(service, document, interfaceNode, cancellationToken).ConfigureAwait(false))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (2)
31var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 34(TService)this, semanticDocument, leftSide, typeToGenerateIn, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (2)
33if (!await state.TryInitializeMethodAsync(service, document, targetVariables, typeToGenerateIn, cancellationToken).ConfigureAwait(false)) 84return await TryFinishInitializingStateAsync(service, document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (2)
35var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 36var state = await State.GenerateMethodStateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
32if (!await state.TryInitializeMethodAsync(service, document, interfaceNode, cancellationToken).ConfigureAwait(false))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
78cancellationToken).ConfigureAwait(false); 94cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (4)
92(INamedTypeSymbol)symbol.ConstraintTypes[0], projects).ConfigureAwait(false); 97(INamedTypeSymbol)symbol.ConstraintTypes[i], projects).ConfigureAwait(false); 130symbol, solution, transitive: true, projects, _cancellationToken).ConfigureAwait(false); 133symbol, solution, transitive: true, projects, _cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
80context, _state.TypeToGenerateIn, propertySymbol, cancellationToken).ConfigureAwait(false); 94context, _state.TypeToGenerateIn, fieldSymbol, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (6)
39var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 100document.Document, state, SymbolKind.Property, state.DetermineMaximalAccessibility(), cancellationToken).ConfigureAwait(false)) 122var namingStyle = await document.GetApplicableNamingRuleAsync(kind, accessibility, cancellationToken).ConfigureAwait(false); 182document, state, SymbolKind.Local, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false)) 198document, state, SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false)) 208var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
38var newRoot = await GetNewRootAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
153TypeToGenerateIn, _document.Project.Solution, cancellationToken).ConfigureAwait(false) as INamedTypeSymbol;
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
39document, classNode, GetClassIdentifier(classNode), cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (3)
75var data = await TryGetDataAsync(document, classNode, classIdentifier, cancellationToken).ConfigureAwait(false); 79return await data.ImplementAbstractClassAsync(throughMember: null, canDelegateAllMembers: null, cancellationToken).ConfigureAwait(false); 85var compilation = await _document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
33var codeActions = await service.GetCodeActionsAsync(document, type, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (4)
74return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false); 116return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false); 154document, interfaceType, cancellationToken).ConfigureAwait(false); 176var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
75var compilation = await this.Document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 97cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (6)
44var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 47document, State.ClassOrStructType, cancellationToken).ConfigureAwait(false); 56cancellationToken).ConfigureAwait(false); 85return await AddFinalizerCommentAsync(docWithAllMembers, finalizer, cancellationToken).ConfigureAwait(false); 233SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 236var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
28var codeAction = await GetCodeFixAsync(root, node, context.Document, diagnostic, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (6)
126? await RenameThenAddAsyncTokenAsync(keepVoid, document, node, methodSymbol, knownTypes, cancellationToken).ConfigureAwait(false) 127: await FixRelatedSignaturesAsync(keepVoid, document, methodSymbol, knownTypes, node, cancellationToken).ConfigureAwait(false); 174var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 182return await FixRelatedSignaturesAsync(keepVoid, newDocument, newMethod, knownTypes, newNode, cancellationToken).ConfigureAwait(false); 200var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 211var partialDefinitionDocumentEditor = await solutionEditor.GetDocumentEditorAsync(partialDefinitionDocument.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (10)
65return await RenameThenRemoveAsyncTokenAsync(document, node, methodSymbol, cancellationToken).ConfigureAwait(false); 69return await RemoveAsyncTokenAsync(document, methodSymbol, node, cancellationToken).ConfigureAwait(false); 83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 85var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 90return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, cancellationToken).ConfigureAwait(false); 99var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 116newDocument, annotation, cancellationToken).ConfigureAwait(false); 133methodSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 146document.Project.Solution, [.. referencedSymbol.Locations], cancellationToken).ConfigureAwait(false); 164currentSolution, group, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
47var node = await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
61cancellationToken: cancellationToken).ConfigureAwait(false); 63var newSolution = await renameActionSet.UpdateSolutionAsync(documentWithInvalidFolders.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (5)
32FixAllScope.Document when fixAllContext.Document is not null => await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document).ConfigureAwait(false), 33FixAllScope.Project => await fixAllContext.GetAllDiagnosticsAsync(fixAllContext.Project).ConfigureAwait(false), 34FixAllScope.Solution => await GetSolutionDiagnosticsAsync(fixAllContext).ConfigureAwait(false), 57var projectDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 92newSolution = await FixAllInDocumentAsync(document, diagnosticsInTree, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (1)
19var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (3)
108cancellationToken).ConfigureAwait(false); 151=> [new ApplyChangesOperation(await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false))]; 155var newSolution = await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\NewLines\ConsecutiveStatementPlacement\ConsecutiveStatementPlacementCodeFixProvider.cs (1)
61=> FixAllProvider.Create(async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (1)
146=> FixAllProvider.Create(async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
33var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
56var newDocument = await RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
62var node = await declReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (13)
287var preprocessedDocument = await PreprocessDocumentAsync(document, diagnostics, cancellationToken).ConfigureAwait(false); 288var newRoot = await GetNewRootAsync(preprocessedDocument, formattingOptions, diagnostics, cancellationToken).ConfigureAwait(false); 336diagnosticId, preference, cancellationToken).ConfigureAwait(false); 638!(await IsLocalDeclarationWithNoReferencesAsync(localDeclarationStatement, document, cancellationToken).ConfigureAwait(false))) 759ReplaceDiscardDeclarationsWithAssignmentsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false); 767AdjustLocalDeclarationsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false); 789var newMemberDecl = await processMemberDeclarationAsync(memberDecl, newDocument, options, cancellationToken).ConfigureAwait(false); 811return await service.ReplaceAsync(document, memberDeclaration, cancellationToken).ConfigureAwait(false); 860if (await TryRemoveUnusedLocalAsync(declStatement, originalDeclStatement).ConfigureAwait(false)) 871var (canUse, mayChangeSemantics) = await moveDeclarationService.CanMoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false); 874document = await moveDeclarationService.MoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false); 900if (await IsLocalDeclarationWithNoReferencesAsync(newDecl, document, cancellationToken).ConfigureAwait(false)) 923var referencedSymbols = await SymbolFinder.FindReferencesAsync(local, document.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
71var declaration = await syntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (1)
118=> await _createChangedSolution(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (15)
109return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false); 121diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false); 134var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 137field, currentSolution, cancellationToken).ConfigureAwait(false)).ToImmutableArray(); 159cancellationToken).ConfigureAwait(false); 184currentSolution, linkedFiles, fieldLocations, property, cancellationToken).ConfigureAwait(false); 191compilation = await fieldDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 253var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 270newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 271newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 300var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 388var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 433document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false); 438document, codeCleanupOptions, cancellationToken).ConfigureAwait(false); 525var semanticModel = await lazySemanticModel.GetValueAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (3)
40provider, fixAllContext, fixAllContext.Solution, cancellationToken).ConfigureAwait(false); 100var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false); 106originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
86document, objectCreation, useCollectionExpression, preMatches, postMatches, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
116trueValue.Syntax, falseValue.Syntax, formattingOptions, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
85cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
74cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Collections.Package (4)
Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxTree.cs (1)
881return await this.GetRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (71)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
138document, diagnostics, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
76documentWithOpenParenthesis, parenthesizedExpression, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceCodeFixProvider.cs (1)
59var converted = await ConvertNamespaceTransform.ConvertAsync(document, namespaceDecl, options, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (4)
38var methodNode = await GetMethodDeclarationAsync(node, semanticModel, cancellationToken).ConfigureAwait(false); 51var methodDeclaration = await GetMethodDeclarationAsync(node, semanticModel, cancellationToken).ConfigureAwait(false); 55var oldRoot = await methodDeclaration.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 82if ((await methodReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false)) is not MethodDeclarationSyntax methodDeclaration)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (3)
98.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 481.FindReferencesAsync(type, solutionEditor.OriginalSolution, cancellationToken).ConfigureAwait(false); 491.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\CSharpConvertToRecordCodeFixProvider.cs (1)
44document, typeDeclaration, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
81var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (2)
42var analyzedTypes = await TryGetOldAndNewReturnTypeAsync(document, diagnostics, cancellationToken).ConfigureAwait(false); 129await TryGetOldAndNewReturnTypeAsync(document, diagnostics, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
99var codeActions = await service.GenerateDeconstructMethodAsync(document, target, (INamedTypeSymbol)type, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
58return await service.GenerateVariableAsync(document, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
26var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
61var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (2)
52localFunctionSymbol, document.Project.Solution, documentImmutableSet, cancellationToken).ConfigureAwait(false); 124capture, document.Project.Solution, documentImmutableSet, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (5)
103document, compilationUnit, placement, simplifierOptions, cancellationToken).ConfigureAwait(false); 147document, compilationUnit, allUsingDirectives, cancellationToken).ConfigureAwait(false); 163return await Simplifier.ReduceAsync(newDocument, Simplifier.Annotation, optionSet: null, cancellationToken).ConfigureAwait(false); 179await Task.WhenAll(expandUsingDirectiveTasks.Values).ConfigureAwait(false); 189var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
97=> FixAllProvider.Create(async (context, document, diagnostics) => await UpdateDocumentAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
99=> FixAllProvider.Create(async (context, document, diagnostics) => await UpdateDocumentAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
95=> FixAllProvider.Create(async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
113=> FixAllProvider.Create(async (context, document, diagnostics) => await UpdateDocumentAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
136async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (2)
49context.Document, model: null, node, cancellationToken).ConfigureAwait(false); 102document, model, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
101context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (2)
55var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 87cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (2)
56document, analysisResult, dummyObjectAnnotation, cancellationToken).ConfigureAwait(false); 72cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (2)
52var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 75cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (5)
56var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 68var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 72var arguments = await GetArgumentsAsync(document, allMatches, cancellationToken).ConfigureAwait(false); 99cancellationToken).ConfigureAwait(false); 148var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForNewCodeFixProvider.cs (2)
53var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 76cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
63cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
46? await CreateCollectionExpressionAsync(document, objectCreation, preMatches, postMatches, cancellationToken).ConfigureAwait(false)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
56var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (7)
139var constructorDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 385var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 478var declarationDocumentEditor = await solutionEditor.GetDocumentEditorAsync(declarationDocument.Id, cancellationToken).ConfigureAwait(false); 537var documentEditor = await solutionEditor.GetDocumentEditorAsync(memberDocument.Id, cancellationToken).ConfigureAwait(false); 574member, solution, namedTypeDocuments, cancellationToken).ConfigureAwait(false); 612var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 628var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (3)
96var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 116var fieldReferences = await SymbolFinder.FindReferencesAsync(field, solution, cancellationToken).ConfigureAwait(false); 128var groupDocumentEditor = await solutionEditor.GetDocumentEditorAsync(groupDocument.Id, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
66context, destination, @event, cancellationToken).ConfigureAwait(false); 73var compilation = await newDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 79return await AddNamedTypeAsync(newContext, newDestinationSymbol.ContainingType, namedType, cancellationToken).ConfigureAwait(false); 83return await AddNamedTypeAsync(newContext, newDestinationSymbol.ContainingNamespace, namedType, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
120var root = await semanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
46document, predicate, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (5)
53var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 63var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 83var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 107var references = await SymbolFinder.FindReferencesAsync(parameter, solution, documents, cancellationToken).ConfigureAwait(false); 112var editor = await solutionEditor.GetDocumentEditorAsync(group.Key.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2630var diagnostics = await GetDiagnosticsAsync(workspace, parameters).ConfigureAwait(false);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1126var diagnostics = await GetDiagnosticsAsync(workspace, testParameters).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (22)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (10)
127if (!await TryExecuteCommandAsync().ConfigureAwait(true)) 156document, eventNameTask, initialCaretPoint.Position, cancellationToken).ConfigureAwait(true); 170var disposable = await waitContext.SuppressAutoCancelAsync().ConfigureAwait(true); 192var eventHandlerMethodName = await eventNameTask.WithCancellation(cancellationToken).ConfigureAwait(false); 198document, eventHandlerMethodName, position, cancellationToken).ConfigureAwait(false); 203documentWithNameAndAnnotationsAdded, cancellationToken).ConfigureAwait(false); 213documentWithNameAndAnnotationsAdded.WithSyntaxRoot(updatedRoot), Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false); 215simplifiedDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 222var newText = await formattedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 263var newText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
EventHookup\EventHookupSessionManager_EventHookupSession.cs (3)
117var eventName = await eventNameTask.ConfigureAwait(false); 139var plusEqualsToken = await GetPlusEqualsTokenInsideAddAssignExpressionAsync(document, position, cancellationToken).ConfigureAwait(false); 157cancellationToken).ConfigureAwait(false);
GoToBase\CSharpGoToBaseService.cs (1)
40var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
InlineRename\CSharpEditorInlineRenameService.cs (8)
49await TryGetSurroundingNodeSpanAsync<MemberDeclarationSyntax>(renameDefinition.Document, renameDefinition.SourceSpan, cancellationToken).ConfigureAwait(false) ?? 50await TryGetSurroundingNodeSpanAsync<StatementSyntax>(renameDefinition.Document, renameDefinition.SourceSpan, cancellationToken).ConfigureAwait(false); 59renameDefinition.Document, semanticModel, textSpan.Start, cancellationToken).ConfigureAwait(true); 71var documentText = await renameDefinition.Document.GetTextAsync(cancellationToken).ConfigureAwait(false); 82await TryGetSurroundingNodeSpanAsync<MemberDeclarationSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false) ?? 83await TryGetSurroundingNodeSpanAsync<BaseMethodDeclarationSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false) ?? 84await TryGetSurroundingNodeSpanAsync<StatementSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false); 86var documentText = await renameLocation.Document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (25)
ChangeSignature\RemoveParametersTests.cs (2)
253var result = await testState.ChangeSignatureAsync().ConfigureAwait(false); 340var result = await testState.ChangeSignatureAsync().ConfigureAwait(false);
CodeActions\InlineMethod\CSharpInlineMethodTests_CrossLanguage.cs (1)
25var (actions, _) = await GetCodeActionsAsync(workspace).ConfigureAwait(false);
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (3)
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); 865var formattedText = await formattedDocument.GetTextAsync().ConfigureAwait(false);
Completion\CompletionProviders\TypeImportCompletionProviderTests.cs (2)
1081var completionList = await GetCompletionListAsync(markup).ConfigureAwait(false); 1454var completionList = await GetCompletionListAsync(markup, workspaceKind: WorkspaceKind.Interactive).ConfigureAwait(false);
Diagnostics\FixAllProvider\BatchFixerTests.cs (1)
73var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
Intents\IntentTestsBase.cs (4)
34var results = await GetIntentsAsync(workspace, intentName, currentDocumentText, options, intentData).ConfigureAwait(false); 61var results = await GetIntentsAsync(workspace, intentName, currentDocumentText, options, intentData).ConfigureAwait(false); 118var changes = await textDiffService.GetTextChangesAsync(currentDocument!, priorDocument, CancellationToken.None).ConfigureAwait(false); 129var results = await intentSource.ComputeIntentsAsync(intentContext, CancellationToken.None).ConfigureAwait(false);
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\PdbSourceDocumentTests.cs (2)
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);
Rename\CSharpInlineRenameServiceTests.cs (3)
66var inlineRenameInfo = await inlineRenameService.GetRenameInfoAsync(document, cursorPosition, cancellationToken).ConfigureAwait(false); 67var inlineRenameLocationSet = await inlineRenameInfo.FindRenameLocationsAsync(options, cancellationToken).ConfigureAwait(false); 68var context = await inlineRenameService.GetRenameContextAsync(inlineRenameInfo, inlineRenameLocationSet, cancellationToken).ConfigureAwait(false);
StringIndentation\StringIndentationTests.cs (1)
34var regions = await service.GetStringIndentationRegionsAsync(document, root.FullSpan, CancellationToken.None).ConfigureAwait(false);
Workspaces\WorkspaceTests_EditorFeatures.cs (4)
1444Assert.Equal(originalText, (await eventArgs[0].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1445Assert.Equal(originalText, (await eventArgs[1].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1447Assert.Equal(updatedText, (await eventArgs[0].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1448Assert.Equal(updatedText, (await eventArgs[1].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString());
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Diagnostics\DiagnosticAnalyzerTests.cs (4)
4237_ = await getDiagnosticsAsync(analyzer.CancellationToken).ConfigureAwait(false); 4249var diagnostics = await getDiagnosticsAsync(cancellationSource.Token).ConfigureAwait(false); 4258await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(tree, cancellationToken).ConfigureAwait(false) : 4259await compilationWithAnalyzers.GetAnalyzerSemanticDiagnosticsAsync(model, filterSpan: null, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features (285)
AddImport\CSharpAddImportFeatureService.cs (3)
349var newRoot = await AddImportWorkerAsync(document, root, contextNode, namespaceOrTypeSymbol, options, cancellationToken).ConfigureAwait(false); 357var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 398var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
ChangeSignature\CSharpChangeSignatureService.cs (1)
891convertedType = await SymbolFinder.FindSourceDefinitionAsync(convertedType, document.Project.Solution, cancellationToken).ConfigureAwait(false)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (2)
39var localFunction = await context.TryGetRelevantNodeAsync<LocalFunctionStatementSyntax>().ConfigureAwait(false); 50var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (5)
76if (await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 79var updatedDocumentRoot = await EnableNullableReferenceTypesAsync(document, cancellationToken).ConfigureAwait(false); 83cancellationToken).ConfigureAwait(false); 114return await DisableNullableReferenceTypesInExistingDocumentIfNecessaryAsync(document, root, firstToken, cancellationToken).ConfigureAwait(false); 278var changedSolution = await _createChangedSolution(CodeActionPurpose.Preview, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (2)
49solution = await EnableNullableReferenceTypesAsync(project, purpose, fixAllContext.CancellationToken).ConfigureAwait(false); 69CodeActionPurpose.Preview, progress, cancellationToken).ConfigureAwait(false);
CodeRefactorings\ExtractClass\CSharpExtractClassCodeRefactoringProvider.cs (1)
41var relaventNodes = await context.GetRelevantNodesAsync<ClassDeclarationSyntax>().ConfigureAwait(false);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (19)
48var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 50var variableDeclarator = await context.TryGetRelevantNodeAsync<VariableDeclaratorSyntax>().ConfigureAwait(false); 82var references = await GetReferenceLocationsAsync(document, variableDeclarator, cancellationToken).ConfigureAwait(false); 139var expressionToInline = await CreateExpressionToInlineAsync(document, declarator, cancellationToken).ConfigureAwait(false); 143document = await document.ReplaceNodeAsync(declarator, declarator.WithAdditionalAnnotations(DefinitionAnnotation), cancellationToken).ConfigureAwait(false); 145declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false); 148var allReferences = await GetReferenceLocationsAsync(document, declarator, cancellationToken).ConfigureAwait(false); 154cancellationToken).ConfigureAwait(false); 156declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false); 158allReferences = await FindReferenceAnnotatedNodesAsync(document, cancellationToken).ConfigureAwait(false); 171document = await document.ReplaceNodeAsync(scope, newScope, cancellationToken).ConfigureAwait(false); 173declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false); 181newScope, RemoveDeclaratorFromScope(declarator, newScope), cancellationToken).ConfigureAwait(false); 185var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 190var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 212}, cancellationToken).ConfigureAwait(false); 317=> await FindNodeWithAnnotationAsync<VariableDeclaratorSyntax>(document, DefinitionAnnotation, cancellationToken).ConfigureAwait(false); 322var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 331var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\CSharpMoveTypeService.cs (1)
30=> await document.TryGetRelevantNodeAsync<BaseTypeDeclarationSyntax>(textSpan, cancellationToken).ConfigureAwait(false);
CodeRefactorings\NodeSelectionHelpers.cs (4)
28var memberDeclaration = await context.TryGetRelevantNodeAsync<MemberDeclarationSyntax>().ConfigureAwait(false); 32var varDeclarator = await context.TryGetRelevantNodeAsync<VariableDeclaratorSyntax>().ConfigureAwait(false); 54var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 55var members = await CSharpSelectedMembers.Instance.GetSelectedMembersAsync(tree, span, allowPartialSelection: true, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (3)
76document.Project.Solution, allDocumentIds, containerSpan, cancellationToken).ConfigureAwait(false); 346var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 388await ContainsPartialTypeWithMultipleDeclarationsAsync(document, container, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\CSharpSyncNamespaceCodeRefactoringProvider.cs (1)
30if (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false) is not CompilationUnitSyntax compilationUnit)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (7)
35var declaration = await GetDeclarationAsync(context).ConfigureAwait(false); 43var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 84var declNode = await context.TryGetRelevantNodeAsync<DeclarationExpressionSyntax>().ConfigureAwait(false); 88var variableNode = await context.TryGetRelevantNodeAsync<VariableDeclarationSyntax>().ConfigureAwait(false); 94var type = await context.TryGetRelevantNodeAsync<TypeSyntax>().ConfigureAwait(false); 102var foreachStatement1 = await context.TryGetRelevantNodeAsync<ForEachStatementSyntax>().ConfigureAwait(false); 120var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
67var (token, semanticModel, symbols) = await GetSymbolsAsync(document, position, options, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\DeclarationName\DeclarationNameCompletionProvider.cs (3)
53var context = (CSharpSyntaxContext)await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 70var nameInfo = await NameDeclarationInfo.GetDeclarationInfoAsync(document, position, cancellationToken).ConfigureAwait(false); 77completionContext, document, context, nameInfo, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
43var info = await GetDeclarationInfoWorkerAsync(document, position, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (2)
69var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 157var alias = await type.FindApplicableAliasAsync(position, semanticModel, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (2)
106var state = await ItemGetter.CreateAsync(this, context.Document, context.Position, context.CancellationToken).ConfigureAwait(false); 107var items = await state.GetItemsAsync().ConfigureAwait(false);
Completion\CompletionProviders\ExternAliasCompletionProvider.cs (2)
67var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 72var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (2)
67var result = await base.GetSymbolsAsync(completionContext, context, position, options, cancellationToken).ConfigureAwait(false); 71var alias = await type.FindApplicableAliasAsync(position, context.SemanticModel, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (4)
112var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 167IndexerKindName => await GetIndexerDescriptionAsync(document, item, displayOptions, cancellationToken).ConfigureAwait(false), 168OperatorKindName => await GetOperatorDescriptionAsync(document, item, displayOptions, cancellationToken).ConfigureAwait(false), 169ConversionKindName => await GetConversionDescriptionAsync(document, item, displayOptions, cancellationToken).ConfigureAwait(false),
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (4)
134var conversion = await TryRehydrateAsync(document, item, cancellationToken).ConfigureAwait(false); 139item, document, [conversion], displayOptions, cancellationToken).ConfigureAwait(false); 147var symbols = await SymbolCompletionItem.GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false); 162var symbols = await SymbolCompletionItem.GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (2)
130return await ReplaceTextAfterOperatorAsync(document, item, text: $" {item.DisplayText} ", cancellationToken).ConfigureAwait(false); 133return await ReplaceTextAfterOperatorAsync(document, item, text: $"{item.DisplayText} ", cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
89return await base.GetTextChangeAsync(document, selectedItem, ch, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\SnippetCompletionProvider.cs (2)
93d => GetSnippetsForDocumentAsync(d, context, cancellationToken)).ConfigureAwait(false)); 122var context = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\SpeculativeTCompletionProvider.cs (2)
49cancellationToken).ConfigureAwait(false); 77var context = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\SymbolCompletionProvider.cs (5)
91return !await IsTriggeredInArgumentListAsync(context, position, options, cancellationToken).ConfigureAwait(false); 105if (await IsTriggeredInArgumentListAsync(completionContext, position, options, cancellationToken).ConfigureAwait(false) is false) 126await IsTriggerInArgumentListAsync(completionContext.Document, position - 1, cancellationToken).ConfigureAwait(false) == true) 149var result = await IsTriggerOnDotAsync(document, caretPosition - 1, cancellationToken).ConfigureAwait(false); 155result = await IsTriggerInArgumentListAsync(document, caretPosition - 1, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
47var context = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false) as CSharpSyntaxContext;
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
42cancellationToken).ConfigureAwait(false);
ConvertBetweenRegularAndVerbatimString\AbstractConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (1)
37var literalExpression = await context.TryGetRelevantNodeAsync<TStringExpressionSyntax>().ConfigureAwait(false);
ConvertNamespace\ConvertNamespaceCodeRefactoringProvider.cs (1)
103document = await ConvertAsync(document, namespaceDecl, options, cancellationToken).ConfigureAwait(false);
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (9)
45var typeDeclaration = await context.TryGetRelevantNodeAsync<TypeDeclarationSyntax>().ConfigureAwait(false); 77var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 90cancellationToken).ConfigureAwait(false); 100var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 107var parameterReferences = await GetParameterReferencesAsync().ConfigureAwait(false); 114var initializedFieldsAndProperties = await GetExistingAssignedFieldsOrPropertiesAsync().ConfigureAwait(false); 152parameter, solution, documentsToSearch, cancellationToken).ConfigureAwait(false); 274var editor = await solutionEditor.GetDocumentEditorAsync(solution.GetDocumentId(initializer.SyntaxTree), cancellationToken).ConfigureAwait(false); 369var editor = await solutionEditor.GetDocumentEditorAsync(solution.GetDocumentId(syntaxTree), cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (2)
34var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 42document, oldClassDeclaration, mainMethod, accessibilityModifiersRequired, cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (4)
52document, rootWithGlobalStatements, namespaceDeclaration, cleanupOptions, cancellationToken).ConfigureAwait(false); 56document = await ConvertFileScopedNamespaceAsync(document, cleanupOptions, cancellationToken).ConfigureAwait(false); 65? await ConvertNamespaceTransform.ConvertFileScopedNamespaceAsync(document, fileScopedNamespace, (CSharpSyntaxFormattingOptions)cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false) 87documentWithImportsAdded, n => n.HasAnnotation(annotation), cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertToProgramMainCodeFixProvider.cs (1)
49var fixedDocument = await ConvertToProgramMainAsync(document, options.AccessibilityModifiersRequired, cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertToProgramMainCodeRefactoringProvider.cs (1)
52var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertToTopLevelStatementsCodeFixProvider.cs (1)
53var newDocument = await ConvertToTopLevelStatementsAsync(document, methodDeclaration, cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertToTopLevelStatementsCodeRefactoringProvider.cs (1)
42var methodDeclaration = await context.TryGetRelevantNodeAsync<MethodDeclarationSyntax>().ConfigureAwait(false);
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (2)
152var methodDeclaration = await context.TryGetRelevantNodeAsync<MethodDeclarationSyntax>().ConfigureAwait(false); 175var classDeclaration = await context.TryGetRelevantNodeAsync<ClassDeclarationSyntax>().ConfigureAwait(false);
ConvertToRecord\CSharpConvertToRecordRefactoringProvider.cs (2)
23var typeDeclaration = await context.TryGetRelevantNodeAsync<TypeDeclarationSyntax>().ConfigureAwait(false); 28document, typeDeclaration, cancellationToken).ConfigureAwait(false);
Copilot\CSharpCopilotCodeFixProvider.cs (4)
58await copilotOptionsService.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false) is false) 64await copilotService.IsAvailableAsync(cancellationToken).ConfigureAwait(false) is false) 69var promptTitles = await copilotService.GetAvailablePromptTitlesAsync(document, cancellationToken).ConfigureAwait(false); 123var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (4)
46await optionsService.IsImplementNotImplementedExceptionEnabledAsync().ConfigureAwait(false) is false) 53await copilotService.IsImplementNotImplementedExceptionsAvailableAsync(cancellationToken).ConfigureAwait(false) is false) 99var references = await SymbolFinder.FindReferencesAsync(memberSymbol, document.Project.Solution, searchOptions, cancellationToken).ConfigureAwait(false); 105var memberImplementationDetails = await copilotService.ImplementNotImplementedExceptionsAsync(document, memberReferencesBuilder.ToImmutable(), cancellationToken).ConfigureAwait(false);
Debugging\CSharpBreakpointResolutionService.cs (1)
35var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Debugging\CSharpProximityExpressionsService.cs (3)
56var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 63var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 94var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Debugging\LocationInfoGetter.cs (2)
24var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 25var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
DecompiledSource\CSharpDecompiledSourceService.cs (6)
46document = await AddAssemblyInfoRegionAsync(document, symbol, decompilationService, cancellationToken).ConfigureAwait(false); 50document = await ConvertDocCommentsToRegularCommentsAsync(document, docCommentFormattingService, cancellationToken).ConfigureAwait(false); 52return await FormatDocumentAsync(document, formattingOptions, cancellationToken).ConfigureAwait(false); 65cancellationToken).ConfigureAwait(false); 73var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 100var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
EncapsulateField\CSharpEncapsulateFieldService.cs (7)
38var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 86var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 88root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 111cancellationToken).ConfigureAwait(false); 112root = await withField.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 125var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 126var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\PythiaDeclarationNameRecommender.cs (1)
37var result = await _lazyImplementation.Value.ProvideRecommendationsAsync(context, cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\PythiaSignatureHelpProvider.cs (1)
39var (items, selectedItemIndex) = await _lazyImplementation.Value.GetMethodGroupItemsAndSelectionAsync(accessibleMethods, document, invocationExpression, semanticModel, symbolInfo, cancellationToken).ConfigureAwait(false);
ExtractInterface\CSharpExtractInterfaceService.cs (2)
35var typeDeclarationNode = await document.TryGetRelevantNodeAsync<TypeDeclarationSyntax>(span, cancellationToken).ConfigureAwait(false); 42var relevantNode = await document.TryGetRelevantNodeAsync<SyntaxNode>(span, cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.cs (2)
200var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 203var newRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (6)
123insertionPointNode, cancellationToken).ConfigureAwait(false); 145var statement = await GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(cancellationToken).ConfigureAwait(false); 157statements = await AddInvocationAtCallSiteAsync(statements, cancellationToken).ConfigureAwait(false); 1070var newDocument = await GenerateNewDocumentAsync(methodSymbol, returnType, originalDocument, cancellationToken).ConfigureAwait(false); 1072return await SemanticDocument.CreateAsync(newDocument, cancellationToken).ConfigureAwait(false); 1125var oldRoot = await originalDocument.Document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (2)
156updatedDocument = await updatedDocument.ReplaceNodeAsync(enclosingStatement, newEnclosingStatement, cancellationToken).ConfigureAwait(false); 158var updatedRoot = await updatedDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpSelectionResult.cs (2)
37var root = await document.Document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 43])), cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpSelectionValidator.cs (1)
94SemanticDocument, selectionInfo, cancellationToken).ConfigureAwait(false);
Formatting\CSharpNamespaceDeclarationNewDocumentFormattingProvider.cs (1)
41return await ConvertNamespaceTransform.ConvertAsync(document, namespaces[0], formattingOptions, cancellationToken).ConfigureAwait(false);
Formatting\CSharpOrganizeUsingsNewDocumentFormattingProvider.cs (2)
30var organizedDocument = await organizeImportsService.OrganizeImportsAsync(document, options.GetOrganizeImportsOptions(), cancellationToken).ConfigureAwait(false); 33organizedDocument, options.SimplifierOptions, options.AddImportOptions.UsingDirectivePlacement, cancellationToken).ConfigureAwait(false);
Formatting\CSharpUseProgramMainNewDocumentFormattingProvider.cs (1)
33return await ConvertProgramTransform.ConvertToProgramMainAsync(document, options.FormattingOptions.AccessibilityModifiersRequired, cancellationToken).ConfigureAwait(false);
FullyQualify\CSharpFullyQualifyService.cs (1)
52var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
GenerateType\CSharpGenerateTypeService.cs (3)
546var semanticModel = await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 725root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 745if (await IsWithinTheImportingNamespaceAsync(document, simpleName.SpanStart, includeUsingsOrImports, cancellationToken).ConfigureAwait(false))
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (3)
50var (container, explicitName, name) = await GetContainerAsync(context).ConfigureAwait(false); 252document.Id, cancellationToken).ConfigureAwait(false); 253var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
53implMember, solution, findRefsOptions, cancellationToken).ConfigureAwait(false); 69document.Id, cancellationToken).ConfigureAwait(false);
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (2)
43var selectedParameter = await context.TryGetRelevantNodeAsync<ParameterSyntax>().ConfigureAwait(false); 67var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (4)
45var currentCompilation = await currentDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 63cancellationToken).ConfigureAwait(false); 83var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 107var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false);
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (9)
174var variableDeclarator = await GetFirstDeclarationAsync<VariableDeclaratorSyntax>(symbol).ConfigureAwait(false); 182var enumMemberDeclaration = await GetFirstDeclarationAsync<EnumMemberDeclarationSyntax>(symbol).ConfigureAwait(false); 191return await GetInitializerSourcePartsAsync(initializer).ConfigureAwait(false); 200var syntax = await GetFirstDeclarationAsync<VariableDeclaratorSyntax>(symbol).ConfigureAwait(false); 203return await GetInitializerSourcePartsAsync(syntax.Initializer).ConfigureAwait(false); 212var syntax = await GetFirstDeclarationAsync<ParameterSyntax>(symbol).ConfigureAwait(false); 215return await GetInitializerSourcePartsAsync(syntax.Default).ConfigureAwait(false); 225var syntax = await syntaxRef.GetSyntaxAsync(CancellationToken).ConfigureAwait(false); 245Options.ClassificationOptions, cancellationToken: CancellationToken).ConfigureAwait(false);
LineSeparators\CSharpLineSeparatorService.cs (1)
39var node = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeRefactoringProvider.cs (2)
29var syntaxTree = (await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false))!; 33var localFunction = await context.TryGetRelevantNodeAsync<LocalFunctionStatementSyntax>().ConfigureAwait(false);
MetadataAsSource\CSharpMetadataAsSourceService.cs (4)
45var oldRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 63var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 103var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 110var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
Organizing\CSharpOrganizingService.cs (2)
27var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 28var rewriter = new Rewriter(this, organizers, await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false), cancellationToken);
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (1)
38(await GetQuickInfoForSuppressMessageAttributeAsync(document, token, context.CancellationToken).ConfigureAwait(false));
QuickInfo\CSharpSemanticQuickInfoProvider.cs (5)
205return await GetOnTheFlyDocsInfoWorkerAsync(context, cancellationToken).ConfigureAwait(false); 220!await copilotService.IsAvailableAsync(cancellationToken).ConfigureAwait(false)) 226!await service.IsOnTheFlyDocsOptionEnabledAsync().ConfigureAwait(false)) 237document, semanticModel, position, cancellationToken).ConfigureAwait(false); 260if (await copilotService.IsFileExcludedAsync(symbolFilePath, cancellationToken).ConfigureAwait(false))
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
36var forStatement = await context.TryGetRelevantNodeAsync<ForStatementSyntax>().ConfigureAwait(false);
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (3)
71document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false); 113document, position, textSpan, cancellationToken).ConfigureAwait(false); 121document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
SignatureHelp\InitializerExpressionSignatureHelpProvider.cs (1)
62document, initializerExpression, options, cancellationToken).ConfigureAwait(false);
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (6)
71document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false); 83return await GetItemsWorkerForDelegateOrFunctionPointerAsync(document, position, invocationExpression, within, cancellationToken).ConfigureAwait(false); 110methods, document, invocationExpression, semanticModel, symbolInfo, currentSymbol, cancellationToken).ConfigureAwait(false); 114document, position, textSpan, cancellationToken).ConfigureAwait(false); 160document, position, textSpan, cancellationToken).ConfigureAwait(false); 171document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (5)
65document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false); 78return await GetItemsWorkerForDelegateAsync(document, position, objectCreationExpression, type, cancellationToken).ConfigureAwait(false); 106document, position, textSpan, cancellationToken).ConfigureAwait(false); 130document, position, textSpan, cancellationToken).ConfigureAwait(false); 138document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
44var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
47if (!await AreAccessibilityModifiersRequiredAsync(document, cancellationToken).ConfigureAwait(false))
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
138document, diagnostics, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
76documentWithOpenParenthesis, parenthesizedExpression, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceCodeFixProvider.cs (1)
59var converted = await ConvertNamespaceTransform.ConvertAsync(document, namespaceDecl, options, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (4)
38var methodNode = await GetMethodDeclarationAsync(node, semanticModel, cancellationToken).ConfigureAwait(false); 51var methodDeclaration = await GetMethodDeclarationAsync(node, semanticModel, cancellationToken).ConfigureAwait(false); 55var oldRoot = await methodDeclaration.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 82if ((await methodReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false)) is not MethodDeclarationSyntax methodDeclaration)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (3)
98.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 481.FindReferencesAsync(type, solutionEditor.OriginalSolution, cancellationToken).ConfigureAwait(false); 491.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\CSharpConvertToRecordCodeFixProvider.cs (1)
44document, typeDeclaration, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
81var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (2)
42var analyzedTypes = await TryGetOldAndNewReturnTypeAsync(document, diagnostics, cancellationToken).ConfigureAwait(false); 129await TryGetOldAndNewReturnTypeAsync(document, diagnostics, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
99var codeActions = await service.GenerateDeconstructMethodAsync(document, target, (INamedTypeSymbol)type, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
58return await service.GenerateVariableAsync(document, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
26var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
61var modifierOrder = await GetModifierOrderAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (2)
52localFunctionSymbol, document.Project.Solution, documentImmutableSet, cancellationToken).ConfigureAwait(false); 124capture, document.Project.Solution, documentImmutableSet, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (5)
103document, compilationUnit, placement, simplifierOptions, cancellationToken).ConfigureAwait(false); 147document, compilationUnit, allUsingDirectives, cancellationToken).ConfigureAwait(false); 166return await Simplifier.ReduceAsync(newDocument, Simplifier.Annotation, simplifierOptions, cancellationToken).ConfigureAwait(false); 179await Task.WhenAll(expandUsingDirectiveTasks.Values).ConfigureAwait(false); 189var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
97=> FixAllProvider.Create(async (context, document, diagnostics) => await UpdateDocumentAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
99=> FixAllProvider.Create(async (context, document, diagnostics) => await UpdateDocumentAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (1)
95=> FixAllProvider.Create(async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
113=> FixAllProvider.Create(async (context, document, diagnostics) => await UpdateDocumentAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
136async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (2)
49context.Document, model: null, node, cancellationToken).ConfigureAwait(false); 102document, model, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
101context.CancellationToken).ConfigureAwait(false));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (2)
55var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 87cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (2)
56document, analysisResult, dummyObjectAnnotation, cancellationToken).ConfigureAwait(false); 72cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForCreateCodeFixProvider.cs (2)
52var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 75cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (5)
56var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 68var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 72var arguments = await GetArgumentsAsync(document, allMatches, cancellationToken).ConfigureAwait(false); 99cancellationToken).ConfigureAwait(false); 148var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForNewCodeFixProvider.cs (2)
53var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 76cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
63cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
46? await CreateCollectionExpressionAsync(document, objectCreation, preMatches, postMatches, cancellationToken).ConfigureAwait(false)
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (1)
56var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (7)
139var constructorDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 385var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 478var declarationDocumentEditor = await solutionEditor.GetDocumentEditorAsync(declarationDocument.Id, cancellationToken).ConfigureAwait(false); 537var documentEditor = await solutionEditor.GetDocumentEditorAsync(memberDocument.Id, cancellationToken).ConfigureAwait(false); 574member, solution, namedTypeDocuments, cancellationToken).ConfigureAwait(false); 612var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 628var documentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorFixAllProvider.cs (1)
47var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (3)
96var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 116var fieldReferences = await SymbolFinder.FindReferencesAsync(field, solution, cancellationToken).ConfigureAwait(false); 128var groupDocumentEditor = await solutionEditor.GetDocumentEditorAsync(groupDocument.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockFixAllProvider.cs (2)
38var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false); 41var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (9)
86var codeActions = await computationTask.ConfigureAwait(false); 99document, span, ExpressionBodyPreference.WhenPossible, cancellationToken).ConfigureAwait(false); 107document, span, ExpressionBodyPreference.Never, cancellationToken).ConfigureAwait(false); 122document, span, ExpressionBodyPreference.Never, cancellationToken).ConfigureAwait(false); 125document, span, ExpressionBodyPreference.WhenOnSingleLine, cancellationToken).ConfigureAwait(false); 137document, span, ExpressionBodyPreference.WhenPossible, cancellationToken).ConfigureAwait(false); 154document, span, ExpressionBodyPreference.WhenPossible, cancellationToken).ConfigureAwait(false); 157document, span, ExpressionBodyPreference.Never, cancellationToken).ConfigureAwait(false); 165var lambdaNode = await document.TryGetRelevantNodeAsync<LambdaExpressionSyntax>(span, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
743var newSyntaxTree = await newDocument.GetSyntaxTreeAsync().ConfigureAwait(false);
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2630var diagnostics = await GetDiagnosticsAsync(workspace, parameters).ConfigureAwait(false);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1126var diagnostics = await GetDiagnosticsAsync(workspace, testParameters).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces (17)
Rename\CSharpRenameRewriterLanguageService.cs (5)
853referencedSymbol, baseSolution, cancellationToken).ConfigureAwait(false); 868var token = await tree.GetTouchingTokenAsync(location.SourceSpan.Start, cancellationToken, findInsideTrivia: true).ConfigureAwait(false); 879var compilationUnit = (CompilationUnitSyntax)await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 896var token = await location.SourceTree!.GetTouchingTokenAsync(location.SourceSpan.Start, cancellationToken, findInsideTrivia: true).ConfigureAwait(false); 973implicitReferenceLocation.Location.SourceSpan.Start, cancellationToken, findInsideTrivia: false).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
66context, destination, @event, cancellationToken).ConfigureAwait(false); 73var compilation = await newDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 79return await AddNamedTypeAsync(newContext, newDestinationSymbol.ContainingType, namedType, cancellationToken).ConfigureAwait(false); 83return await AddNamedTypeAsync(newContext, newDestinationSymbol.ContainingNamespace, namedType, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
120var root = await semanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
46document, predicate, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (5)
53var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 63var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 83var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 107var references = await SymbolFinder.FindReferencesAsync(parameter, solution, documents, cancellationToken).ConfigureAwait(false); 112var editor = await solutionEditor.GetDocumentEditorAsync(group.Key.Id, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\AddImportsTests.cs (4)
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);
Microsoft.CodeAnalysis.EditorFeatures (307)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
156document, textSpan, backgroundWorkContext.GetCodeAnalysisProgress(), cancellationToken).ConfigureAwait(false);
BraceMatching\BraceHighlightingViewTaggerProvider.cs (3)
69_braceMatcherService, document, position, options, cancellationToken).ConfigureAwait(false); 100var rightOfPosition = await service.GetMatchingBracesAsync(document, position, options, cancellationToken).ConfigureAwait(false); 136var leftOfPosition = await service.GetMatchingBracesAsync(document, position - 1, options, cancellationToken).ConfigureAwait(false);
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (3)
66var document = await subjectBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(context.OperationContext).ConfigureAwait(true); 82cancellationToken).ConfigureAwait(true); 89changeSignatureContext, changeSignatureOptions, cancellationToken).ConfigureAwait(true);
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (2)
124var currentSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 126context, document, spanToTag.SnapshotSpan, classificationService, options, currentSemanticVersion, cancellationToken).ConfigureAwait(false);
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
211var currentRoot = await currentDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeActions\CodeActionEditHandlerService.cs (9)
58oldSolution, cancellationToken: cancellationToken).ConfigureAwait(false); 144workspace, originalSolution, progressTracker, cancellationToken).ConfigureAwait(true); 170workspace, originalSolution, operations, progressTracker, cancellationToken).ConfigureAwait(true); 283applied &= await operation.TryApplyAsync(workspace, originalSolution, progressTracker, cancellationToken).ConfigureAwait(true); 301this._threadingContext, workspace, navigationOperation.DocumentId, navigationOperation.Position, cancellationToken).ConfigureAwait(false); 310this._threadingContext, workspace, renameOperation.DocumentId, renameOperation.Position, cancellationToken).ConfigureAwait(true)) 332this._threadingContext, workspace, documentId, navigationToken.Value.SpanStart, cancellationToken).ConfigureAwait(false); 357this._threadingContext, editorWorkspace, documentId, resolvedRenameToken.Span, cancellationToken).ConfigureAwait(false)) 360var openRoot = await openDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeDefinitionWindow\DefinitionContextTracker.cs (8)
125if (!await _codeDefinitionWindowService.IsWindowOpenAsync(cancellationToken).ConfigureAwait(false)) 133var locations = await GetContextFromPointAsync(document, lastPoint, cancellationToken).ConfigureAwait(true); 146var navigableItems = await GetNavigableItemsAsync(document, position, cancellationToken).ConfigureAwait(false); 153if (await navigationService.CanNavigateToSpanAsync(workspace, item.Document.Id, item.SourceSpan, cancellationToken).ConfigureAwait(false)) 169document, position, cancellationToken: cancellationToken).ConfigureAwait(false); 175var result = await symbolNavigationService.GetExternalNavigationSymbolLocationAsync(definitionItem, cancellationToken).ConfigureAwait(false); 185var declarationFile = await _metadataAsSourceFileService.GetGeneratedFileAsync(workspace, document.Project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false); 201? await findDefinitionService.GetNavigableItemsAsync(document, position, cancellationToken).ConfigureAwait(false)
Copilot\CopilotTaggerProvider.cs (2)
69|| await optionsService.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false) is false) 81var prompts = await analysisService.GetAvailablePromptTitlesAsync(document, cancellationToken).ConfigureAwait(false);
Copilot\CopilotWpfTextCreationListener.cs (1)
114using var _1 = await RemoteKeepAliveSession.CreateAsync(solution, cancellationToken).ConfigureAwait(false);
Copilot\RoslynProposalAdjusterProvider.cs (3)
72solution, proposal, providerName, before, stopwatch, cancellationToken).ConfigureAwait(false); 86solution, proposal, cancellationToken).ConfigureAwait(false); 162using var _1 = await RemoteKeepAliveSession.CreateAsync(solution, cancellationToken).ConfigureAwait(false);
DocumentationComments\CopilotGenerateDocumentationCommentManager.cs (5)
51var generateDocumentationCommentProvider = await CreateProviderAsync(document, textView, snippet.MemberNode, cancellationToken).ConfigureAwait(false); 60var copilotService = await IsGenerateDocumentationAvailableAsync(document, memberNode, cancellationToken).ConfigureAwait(false); 79!await copilotOptionService.IsGenerateDocumentationCommentOptionEnabledAsync().ConfigureAwait(false)) 85await copilotService.IsAvailableAsync(cancellationToken).ConfigureAwait(false) is false) 96if (await copilotService.IsFileExcludedAsync(memberNode.SyntaxTree.FilePath, cancellationToken).ConfigureAwait(false))
DocumentationComments\CopilotGenerateDocumentationCommentProvider.cs (4)
45_suggestionManager ??= await suggestionServiceBase.TryRegisterProviderAsync(this, textView, "AmbientAIDocumentationComments", cancellationToken).ConfigureAwait(false); 70var intelliCodeLineCompletionsDisposable = await _suggestionManager.DisableProviderAsync(SuggestionServiceNames.IntelliCodeLineCompletions, cancellationToken).ConfigureAwait(false); 76snippetProposal, _copilotService, oldSnapshot, snippet.IndentText, cancellationToken).ConfigureAwait(false); 188var (documentationCommentDictionary, isQuotaExceeded) = await copilotService.GetDocumentationCommentAsync(proposal, cancellationToken).ConfigureAwait(false);
DocumentationComments\DocumentationCommentSuggestion.cs (7)
71var sessionStarted = await StartSuggestionSessionAsync(cancellationToken).ConfigureAwait(false); 77var proposal = await generateProposal(cancellationToken).ConfigureAwait(false); 98async () => await SuggestionManager.TryDisplaySuggestionAsync(this, cancellationToken).ConfigureAwait(false), 99cancellationToken).ConfigureAwait(false); 125cancellationToken).ConfigureAwait(false); 149cancellationToken).ConfigureAwait(false); 182return await taskCompletionSource.Task.WithCancellation(cancellationToken).ConfigureAwait(false);
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (3)
55someReferencingProject, analyzerReference, options.EditorConfigOptions, cancellationToken).ConfigureAwait(false); 66var csharpDescriptors = await service.GetDiagnosticDescriptorsAsync(solution, someReferencingProject.Id, analyzerReference, LanguageNames.CSharp, cancellationToken).ConfigureAwait(false); 67var vbDescriptors = await service.GetDiagnosticDescriptorsAsync(solution, someReferencingProject.Id, analyzerReference, LanguageNames.VisualBasic, cancellationToken).ConfigureAwait(false);
EditorConfigSettings\DataProvider\CombinedProvider.cs (1)
21sourceText = await provider.GetChangedEditorConfigAsync(sourceText).ConfigureAwait(false);
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (2)
82if (!await SettingsUpdater.HasAnyChangesAsync().ConfigureAwait(false)) 87var text = await SettingsUpdater.GetChangedEditorConfigAsync(sourceText, default).ConfigureAwait(false);
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
78var newText = await GetChangedEditorConfigAsync(analyzerConfigDocument, token).ConfigureAwait(false);
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (3)
73var document = await subjectBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(context).ConfigureAwait(false); 79document, span.Span.ToTextSpan(), useDefaultBehavior: true, cancellationToken).ConfigureAwait(false); 103var finalSolution = await result.GetSolutionAsync(cancellationToken).ConfigureAwait(false);
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (3)
37var items = await service.GetItemsAsync(document, workspaceSupportsDocumentChanges, frozenPartialSemantics, cancellationToken).ConfigureAwait(false); 50document, item, symbolItem, textVersion, cancellationToken).ConfigureAwait(false); 61allowInvalidPosition: false, NavigationOptions.Default, cancellationToken).ConfigureAwait(false))
ExternalAccess\IntelliCode\IntentProcessor.cs (5)
68cancellationToken).ConfigureAwait(false); 78var convertedIntent = await ConvertToIntelliCodeResultAsync(result, originalDocument, currentDocument, cancellationToken).ConfigureAwait(false); 93newSolution = await newSolution.WithMergedLinkedFileChangesAsync(originalDocument.Project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false); 99var docChanges = await GetTextChangesForDocumentAsync(newSolution, currentDocument.Project.Solution, changedDocumentId, cancellationToken).ConfigureAwait(false); 120var textDiffs = await textDiffService.GetTextChangesAsync(currentDocument, changedDocument, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTestGenerator\Api\UnitTestGeneratorAddMissingImportsFeatureServiceAccessor.cs (3)
28return await service.AddMissingImportsAsync(document, textSpan, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 34var result = await service.AnalyzeAsync(document, textSpan, cleanupDocument: true, cancellationToken).ConfigureAwait(false); 44return await service.AddMissingImportsAsync(document, unwrappedResult, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTestGenerator\Api\UnitTestGeneratorOrganizeImportsAccessor.cs (1)
27return await organizeImportsService.OrganizeImportsAsync(document, options, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\UnitTestingReferencesService.cs (1)
32cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptFindUsagesContext.cs (4)
70if (!await _navigator.CanNavigateToAsync(workspace, cancellationToken).ConfigureAwait(false)) 112=> await UnderlyingObject.GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false) != null; 116var location = await UnderlyingObject.GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false); 118await location.NavigateToAsync(new NavigationOptions(showInPreviewTab, activateTab), cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptInlineRenameLocationSet.cs (1)
37=> await GetReplacementsAsync(replacementText, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\Api\VSTypeScriptInlineRenameInfo.cs (1)
41=> await FindRenameLocationsAsync(options.RenameInStrings, options.RenameInComments, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptBlockStructureService.cs (1)
26var blockStructure = await _impl.GetBlockStructureAsync(document, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptBreakpointResolutionService.cs (2)
27=> (await _implementation.ResolveBreakpointAsync(document, textSpan, cancellationToken).ConfigureAwait(false)).UnderlyingObject; 30=> (await _implementation.ResolveBreakpointsAsync(solution, name, cancellationToken).ConfigureAwait(false)).Select(r => r.UnderlyingObject);
ExternalAccess\VSTypeScript\VSTypeScriptEditorInlineRenameService.cs (1)
48return await _service.Value.GetRenameInfoAsync(document, position, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptLanguageDebugInfoService.cs (2)
24=> (await _implementation.GetDataTipInfoAsync(document, position, cancellationToken).ConfigureAwait(false)).UnderlyingObject; 27=> (await _implementation.GetLocationInfoAsync(document, position, cancellationToken).ConfigureAwait(false)).UnderlyingObject;
ExternalAccess\VSTypeScript\VSTypeScriptNavigationBarItemService.cs (2)
45var items = await _service.GetItemsAsync(document, cancellationToken).ConfigureAwait(false); 61_threadingContext, workspace, document.Id, navigationSpan.Start, cancellationToken).ConfigureAwait(false);
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
72CancellationToken.None).ConfigureAwait(true); 87_threadingContext, workspace, result.NavigationDocumentId, position: 0, CancellationToken.None).ConfigureAwait(false);
ExtractMethod\ExtractMethodCommandHandler.cs (7)
138var document = await textBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(waitContext).ConfigureAwait(false); 144var result = await ExtractMethodService.ExtractMethodAsync(document, span, localFunction: false, options, cancellationToken).ConfigureAwait(false); 151var localFunctionResult = await ExtractMethodService.ExtractMethodAsync(document, span, localFunction: true, options, cancellationToken).ConfigureAwait(false); 171result = await NotifyUserIfNecessaryAsync(document, result, cancellationToken).ConfigureAwait(false); 175var (formattedDocument, methodNameAtInvocation) = await result.GetDocumentAsync(cancellationToken).ConfigureAwait(false); 176var changes = await formattedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false); 204var disposable = await waitContext.SuppressAutoCancelAsync().ConfigureAwait(true);
Formatting\FormatCommandHandler.cs (3)
77document, textBuffer, selectionOpt, cancellationToken).ConfigureAwait(true); 152document, caretPosition.Value, cancellationToken).ConfigureAwait(true); 163document, typeCharArgs.SubjectBuffer, typeCharArgs.TypedChar, caretPosition.Value, cancellationToken).ConfigureAwait(true);
Formatting\FormatCommandHandler.Paste.cs (1)
79var changes = await formattingService.GetFormattingChangesOnPasteAsync(document, subjectBuffer, span, cancellationToken).ConfigureAwait(true);
GoOrFind\AbstractGoOrFindNavigationService.cs (6)
170var firstFinishedTask = await Task.WhenAny(delayBeforeShowingResultsWindowTask, findTask).ConfigureAwait(false); 180var definitions = await findContext.GetDefinitionsAsync(cancellationToken).ConfigureAwait(false); 183var title = await findContext.GetSearchTitleAsync(cancellationToken).ConfigureAwait(false); 189cancellationToken).ConfigureAwait(false); 271var isFullyLoaded = await statusService.IsFullyLoadedAsync(cancellationToken).ConfigureAwait(false); 282var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
GoToDefinition\GoToDefinitionCommandHandler.cs (3)
124document, position, cancellationToken).ConfigureAwait(false); 132var disposable = await backgroundIndicator.SuppressAutoCancelAsync().ConfigureAwait(false); 137cancellationToken).ConfigureAwait(false);
GoToDefinition\GoToDefinitionHelpers.cs (4)
25symbol, solution, threadingContext, streamingPresenter, cancellationToken, thirdPartyNavigationAllowed).ConfigureAwait(false); 27threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), cancellationToken).ConfigureAwait(false); 42symbol, solution, thirdPartyNavigationAllowed, cancellationToken).ConfigureAwait(false); 45threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
Host\IStreamingFindReferencesPresenter.cs (3)
75threadingContext, workspace, title, items, cancellationToken).ConfigureAwait(false); 77threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), cancellationToken).ConfigureAwait(false); 99var navigableItem = await item.GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false);
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (2)
131cancellationToken: cancellationToken).ConfigureAwait(false); 141var copilotDiagnostics = await document.GetCachedCopilotDiagnosticsAsync(requestedSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineHints\InlineHintsDataTaggerProvider.cs (1)
92cancellationToken).ConfigureAwait(false);
InlineHints\InlineHintsTag.cs (2)
102var taggedText = await _hint.GetDescriptionAsync(document, cancellationToken).ConfigureAwait(false); 263var uiList = await CreateDescriptionAsync(threadingContext.DisposalToken).ConfigureAwait(false);
InlineRename\AbstractEditorInlineRenameService.cs (2)
27var symbolicInfo = await SymbolicRenameInfo.GetRenameInfoAsync(document, position, cancellationToken).ConfigureAwait(false); 51var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
InlineRename\AbstractEditorInlineRenameService.InlineRenameLocationSet.cs (1)
62_renameInfo.RenameSymbol, _renameInfo.GetFinalSymbolName(replacementText), cancellationToken).ConfigureAwait(false);
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (2)
135solution, this.RenameSymbol, options, cancellationToken).ConfigureAwait(false); 137return await InlineRenameLocationSet.CreateAsync(this, locations, cancellationToken).ConfigureAwait(false);
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (2)
101.ConfigureAwait(false); 119var sessionInfo = await renameService.StartInlineSessionAsync(document, selectedSpans.Single().Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameService.cs (3)
69var renameInfo = await editorRenameService.GetRenameInfoAsync(document, textSpan.Start, cancellationToken).ConfigureAwait(false); 72_threadingContext, renameInfo, document, cancellationToken).ConfigureAwait(false); 137workspace, document.Id, documentSpan.SourceSpan, cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameSession.cs (11)
307await AllRenameLocationsTask.JoinAsync(cancellationToken).ConfigureAwait(false); 310var inlineRenameLocations = await RenameInfo.FindRenameLocationsAsync(currentOptions, cancellationToken).ConfigureAwait(false); 538var result = await AllRenameLocationsTask.JoinAsync(cancellationToken).ConfigureAwait(false); 541return await result.GetReplacementsAsync(replacementText, options, cancellationToken).ConfigureAwait(false); 561var replacementInfo = await _conflictResolutionTask.JoinAsync(CancellationToken.None).ConfigureAwait(false); 569var computedMergeResult = await ComputeMergeResultAsync(replacementInfo, cancellationToken).ConfigureAwait(false); 579var mergeResult = await diffMergingSession.MergeDiffsAsync(cancellationToken).ConfigureAwait(false); 803var info = await _conflictResolutionTask.JoinAsync(cancellationToken).ConfigureAwait(true); 834var documentChanges = await CalculateFinalDocumentChangesAsync(newSolution, cancellationToken).ConfigureAwait(false); 877: (documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false))); 883result.Add((documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false)));
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (4)
334originalDocument, newDocument, cancellationToken).ConfigureAwait(true); 450cancellationToken).ConfigureAwait(true) 572return await textDiffService.GetTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(false); 618preMergeDocument, postMergeDocument, cancellationToken).ConfigureAwait(true);
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (4)
224.ConfigureAwait(false); 226.ConfigureAwait(false); 238.ConfigureAwait(false); 243.ConfigureAwait(false);
IntelliSense\AsyncCompletion\CompletionSource.cs (6)
268options with { ExpandedCompletionBehavior = ExpandedCompletionMode.NonExpandedItemsOnly }, cancellationToken).ConfigureAwait(false); 290options with { ExpandedCompletionBehavior = ExpandedCompletionMode.NonExpandedItemsOnly }, cancellationToken).ConfigureAwait(false); 339var (expandedContext, expandedCompletionList) = await task.ConfigureAwait(false); 359var (context, completionList) = await GetCompletionContextWorkerAsync(session, document, initialTrigger, initialTriggerLocation, options, cancellationToken).ConfigureAwait(false); 395document, triggerLocation, options, document.Project.Solution.Options, roslynTrigger, _roles, cancellationToken).ConfigureAwait(false); 478var description = await service.GetDescriptionAsync(document, itemData.RoslynItem, completionOptions, displayOptions, cancellationToken).ConfigureAwait(false);
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
173var (highlightedList, updatedFilters) = await highlightAndFilterTask.ConfigureAwait(false);
IntelliSense\AsyncCompletion\ItemManager.cs (3)
125await task.ConfigureAwait(false); 133var (expandedContext, _) = await task.ConfigureAwait(false); 152return await updater.UpdateCompletionListAsync(session, cancellationToken).ConfigureAwait(false);
IntelliSense\ModelComputation.cs (2)
154var model = await lastTask.ConfigureAwait(false); 155return await transformModelAsync(model, _stopCancellationToken).ConfigureAwait(false);
IntelliSense\NavigationActionFactory.cs (3)
65var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 78.ConfigureAwait(false); 82.ConfigureAwait(false);
IntelliSense\QuickInfo\IntellisenseQuickInfoBuilder.cs (1)
28var content = await QuickInfoContentBuilder.BuildInteractiveContentAsync(quickInfoItem, context, cancellationToken).ConfigureAwait(false);
IntelliSense\QuickInfo\QuickInfoSourceProvider.QuickInfoSource.cs (2)
76var item = await service.GetQuickInfoAsync(document, triggerPoint.Value, options, cancellationToken).ConfigureAwait(false); 87.ConfigureAwait(false);
Interactive\InteractiveEvaluator.cs (4)
197var isSuccessful = await _session.ResetAsync(_session.GetHostOptions(initialize: true, resetOptions.Platform)).ConfigureAwait(false); 218var isSuccessful = await _session.ResetAsync(options).ConfigureAwait(false); 246return await commandTask.ConfigureAwait(false); 252var isSuccessful = await _session.ExecuteCodeAsync(text).ConfigureAwait(false);
Interactive\InteractiveSession.cs (3)
340var result = await Host.ExecuteAsync(text).ConfigureAwait(false); 364var result = await Host.ResetAsync(options).ConfigureAwait(false); 402var result = await Host.SetPathsAsync(referenceSearchPaths, sourceSearchPaths, workingDirectory).ConfigureAwait(false);
Interactive\ResetInteractive.cs (3)
95var builtSuccessfully = await BuildProjectAsync().ConfigureAwait(true); 105await interactiveWindow.Operations.ResetAsync(initialize: true).ConfigureAwait(true); 118var namespacesToImport = await GetNamespacesToImportAsync(projectNamespaces, interactiveWindow).ConfigureAwait(true);
LanguageServer\AbstractInProcLanguageClient.cs (2)
172cancellationToken).ConfigureAwait(false); 227var logger = await lspLoggerFactory.CreateLoggerAsync(serverTypeName, jsonRpc, cancellationToken).ConfigureAwait(false);
LineSeparators\LineSeparatorTaggerProvider.cs (1)
90var lineSeparatorSpans = await lineSeparatorService.GetLineSeparatorsAsync(document, snapshotSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
NavigableSymbols\NavigableSymbolService.NavigableSymbol.cs (1)
64_service._threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), backgroundIndicator.UserCancellationToken).ConfigureAwait(false);
NavigableSymbols\NavigableSymbolService.NavigableSymbolSource.cs (1)
45document, position, cancellationToken).ConfigureAwait(false);
NavigateTo\NavigateToHelpers.cs (1)
57context.UserCancellationToken).ConfigureAwait(false);
Navigation\AbstractDefinitionLocationService.cs (14)
64document, semanticModel, position, cancellationToken).ConfigureAwait(false); 69document, controlFlowTarget.Value, cancellationToken).ConfigureAwait(false); 78document, semanticModel, position, cancellationToken).ConfigureAwait(false); 85project, position, symbol, originalDocument: document, cancellationToken).ConfigureAwait(false); 90symbol, position, document, cancellationToken).ConfigureAwait(false); 94symbol, solution, isThirdPartyNavigationAllowed, cancellationToken).ConfigureAwait(false); 105_threadingContext, solution.Workspace, title, allDefinitions, cancellationToken).ConfigureAwait(false); 118var interceptorSymbol = await semanticFacts.GetInterceptorSymbolAsync(document, span.Start, cancellationToken).ConfigureAwait(false); 120interceptorSymbol, solution, thirdPartyNavigationAllowed: false, cancellationToken).ConfigureAwait(false); 163impl, solution, thirdPartyNavigationAllowed: false, cancellationToken).ConfigureAwait(false)); 169_threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false); 211return await documentSpans[0].GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false); 225documentSpan, classifiedSpans: null, classificationOptions, cancellationToken).ConfigureAwait(false); 273return await documentSpan.GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false);
Navigation\IDocumentNavigationServiceExtensions.cs (14)
24return await location.NavigateToAsync(options, cancellationToken).ConfigureAwait(false); 33var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, allowInvalidSpan, cancellationToken).ConfigureAwait(false); 34return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 40var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, cancellationToken).ConfigureAwait(false); 41return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 47var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, cancellationToken).ConfigureAwait(false); 48return await location.TryNavigateToAsync(threadingContext, NavigationOptions.Default, cancellationToken).ConfigureAwait(false); 54var location = await service.GetLocationForPositionAsync(workspace, documentId, position, virtualSpace, allowInvalidPosition, cancellationToken).ConfigureAwait(false); 55return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 68workspace, documentId, position, cancellationToken).ConfigureAwait(false); 69return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 85var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 94workspace, documentId, clampedSpan, allowInvalidSpan: true, cancellationToken).ConfigureAwait(false); 96return location != null && await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
NavigationBar\NavigationBarController.cs (1)
320document, item, view, textSnapshot.Version, cancellationToken).ConfigureAwait(true))
NavigationBar\NavigationBarController_ModelComputation.cs (2)
93var model = await ComputeModelAsync().ConfigureAwait(false); 138cancellationToken).ConfigureAwait(false);
Organizing\OrganizeDocumentCommandHandler.cs (7)
141var currentDocument = await getCurrentDocumentAsync(caretPoint.Value.Snapshot, backgroundWorkContext).ConfigureAwait(false); 145var newDocument = await getChangedDocumentAsync(currentDocument, cancellationToken).ConfigureAwait(false); 149var changes = await newDocument.GetTextChangesAsync(currentDocument, cancellationToken).ConfigureAwait(false); 155var disposable = await backgroundWorkContext.SuppressAutoCancelAsync().ConfigureAwait(true); 177return await organizeImportsService.OrganizeImportsAsync(document, options, cancellationToken).ConfigureAwait(false); 194var newDocument = await removeImportsService.RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false); 196return await organizeImportsService.OrganizeImportsAsync(newDocument, options, cancellationToken).ConfigureAwait(false);
Peek\DefinitionPeekableItem.cs (3)
62resultCollection, callback, cancellationToken).ConfigureAwait(false)); 75var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 89var declarationFile = await _peekableItem._metadataAsSourceFileService.GetGeneratedFileAsync(workspace, project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Peek\PeekableItemFactory.cs (2)
61symbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false) ?? symbol; 73var result = await symbolNavigationService.GetExternalNavigationSymbolLocationAsync(definitionItem, cancellationToken).ConfigureAwait(false);
Peek\PeekableItemSource.cs (5)
84var navigableItems = await service.GetNavigableItemsAsync(document, triggerPoint.Position, cancellationToken).ConfigureAwait(false); 98cancellationToken).ConfigureAwait(false); 110var mappingResult = await symbolMappingService.MapSymbolAsync(document, symbol, cancellationToken).ConfigureAwait(false); 115mappingResult.Symbol, mappingResult.Project, _peekResultFactory, cancellationToken).ConfigureAwait(false)); 133workspace, document.Id, item.SourceSpan.Start, cancellationToken).ConfigureAwait(false))
Preview\AbstractPreviewFactoryService.cs (1)
652var diffViewer = await CreateDifferenceViewAsync(diffBuffer, _previewRoleSet, mode, zoomLevel, cancellationToken).ConfigureAwait(true);
Preview\SolutionPreviewResult.cs (1)
69var preview = await previewItem.LazyPreview(cancellationToken).ConfigureAwait(true);
QuickInfo\OnTheFlyDocsView.xaml.cs (2)
191var prompt = await copilotService.GetOnTheFlyDocsPromptAsync(_onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false); 192var (responseString, isQuotaExceeded) = await copilotService.GetOnTheFlyDocsResponseAsync(prompt, cancellationToken).ConfigureAwait(false);
ReferenceHighlighting\ReferenceHighlightingViewTaggerProvider.cs (1)
162document, position, documentsToSearch, options, cancellationToken).ConfigureAwait(false);
Remote\SolutionChecksumUpdater.cs (6)
147var client = await RemoteHostClient.TryGetClientAsync(_workspace, cancellationToken).ConfigureAwait(false); 168var client = await RemoteHostClient.TryGetClientAsync(_workspace, cancellationToken).ConfigureAwait(false); 190var wasSynchronized = await DispatchSynchronizeTextChangesHelperAsync().ConfigureAwait(false); 209var client = await RemoteHostClient.TryGetClientAsync(_workspace, _shutdownToken).ConfigureAwait(false); 244var state = await oldDocument.State.GetStateChecksumsAsync(_shutdownToken).ConfigureAwait(false); 245var newState = await newDocument.State.GetStateChecksumsAsync(_shutdownToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (3)
74return await SpecializedTasks.EmptyEnumerable<CodeActionOperation>().ConfigureAwait(false); 77var solutionSet = await _renameTrackingCommitter.RenameSymbolAsync(cancellationToken).ConfigureAwait(false); 118var error = await _committer.TryCommitAsync(cancellationToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (10)
63return await TryApplyChangesToWorkspaceAsync(cancellationToken).ConfigureAwait(false); 87document, cancellationToken).ConfigureAwait(false); 89var symbol = await TryGetSymbolAsync(solutionWithOriginalName, document.Id, cancellationToken).ConfigureAwait(false); 93var renamedSolution = await Renamer.RenameSymbolAsync(solutionWithOriginalName, symbol, options, newName, cancellationToken).ConfigureAwait(false); 124var renameTrackingSolutionSet = await RenameSymbolAsync(cancellationToken).ConfigureAwait(false); 159var root = await renameTrackingSolutionSet.RenamedSolution.GetDocument(docId).GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 185var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 208var syntaxTreeWithOriginalName = await documentWithOriginalName.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 212var semanticModel = await documentWithOriginalName.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 214var token = await syntaxTreeWithOriginalName.GetTouchingWordAsync(_snapshotSpan.Start, syntaxFacts, cancellationToken).ConfigureAwait(false);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (7)
123if (await _isRenamableIdentifierTask.ConfigureAwait(true) != TriggerIdentifierKind.NotRenamable) 141var isRenamableIdentifier = await isRenamableIdentifierTask.ConfigureAwait(false); 145initialCheck: false).ConfigureAwait(false); 170var syntaxTree = await document.GetSyntaxTreeAsync(_cancellationToken).ConfigureAwait(false); 171var token = await syntaxTree.GetTouchingWordAsync(snapshotSpan.Start.Position, syntaxFactsService, _cancellationToken).ConfigureAwait(false); 225var sourceSymbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, document.Project.Solution, _cancellationToken).ConfigureAwait(false) ?? symbol; 239var sourceSymbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, document.Project.Solution, _cancellationToken).ConfigureAwait(false) ?? symbol;
SemanticSearch\SemanticSearchEditorWorkspace.cs (1)
34var queryDocument = await UpdateQueryDocumentAsync(query: null, targetLanguage, cancellationToken).ConfigureAwait(false);
Shared\Extensions\WorkspaceExtensions.cs (1)
28var changes = await newDocument.GetTextChangesAsync(oldDocument, cancellationToken).ConfigureAwait(true);
SignatureHelp\Controller.Session_ComputeModel.cs (1)
90cancellationToken).ConfigureAwait(false);
SolutionEvents\HostLegacySolutionEventsWorkspaceEventListener.cs (1)
96var client = await RemoteHostClient.TryGetClientAsync(workspace, cancellationToken).ConfigureAwait(false);
SpellCheck\RoslynSpellCheckFixerProvider.cs (4)
48var result = await TryRenameAsync(span, replacement, cancellationToken).ConfigureAwait(false); 90var info = await renameService.GetRenameInfoAsync(document, span.Span.Start, cancellationToken).ConfigureAwait(false); 102var renameLocations = await info.FindRenameLocationsAsync(options, cancellationToken).ConfigureAwait(false); 103var replacements = await renameLocations.GetReplacementsAsync(replacement, options, cancellationToken).ConfigureAwait(false);
StringIndentation\StringIndentationTaggerProvider.cs (1)
86var regions = await service.GetStringIndentationRegionsAsync(document, snapshotSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
Structure\AbstractStructureTaggerProvider.cs (1)
189documentSnapshotSpan.Document, options, cancellationToken).ConfigureAwait(false);
Suggestions\FixAll\FixMultipleOccurrencesService.cs (1)
78fixAllState.Solution, progress, cancellationToken).ConfigureAwait(false);
Suggestions\PreviewChanges\PreviewChangesCodeAction.cs (2)
43var previewResult = await _getPreviewResultAsync(cancellationToken).ConfigureAwait(true); 66return await _originalCodeAction.GetOperationsAsync(originalSolution, progressTracker, cancellationToken).ConfigureAwait(false);
Suggestions\RefineUsingCopilot\RefineUsingCopilotCodeAction.cs (2)
62var newSolution = await originalCodeAction.GetChangedSolutionInternalAsync(originalSolution, progress, cancellationToken).ConfigureAwait(false); 79? await primaryDiagnostic.ToDiagnosticAsync(oldDocument.Project, cancellationToken).ConfigureAwait(false)
Suggestions\RefineUsingCopilot\RefineUsingCopilotSuggestedAction.cs (2)
48await optionsService.IsRefineOptionEnabledAsync().ConfigureAwait(false) is false) 54await copilotService.IsAvailableAsync(cancellationToken).ConfigureAwait(false) is false)
Suggestions\SuggestedActions\SuggestedAction.cs (8)
82return await CodeAction.GetOperationsAsync(this.OriginalSolution, progressTracker, cancellationToken).ConfigureAwait(false); 90return await actionWithOptions.GetOperationsAsync(this.OriginalSolution, options, progressTracker, cancellationToken).ConfigureAwait(false); 97return await CodeAction.GetPreviewOperationsAsync(this.OriginalSolution, cancellationToken).ConfigureAwait(false); 156operations = await GetOperationsAsync(actionWithOptions, options, progressTracker, cancellationToken).ConfigureAwait(true); 160operations = await GetOperationsAsync(progressTracker, cancellationToken).ConfigureAwait(true); 185cancellationToken).ConfigureAwait(false); 229var operations = await GetPreviewOperationsAsync(cancellationToken).ConfigureAwait(true); 232return await EditHandler.GetPreviewsAsync(Workspace, operations, cancellationToken).ConfigureAwait(true);
Suggestions\SuggestedActionsSource.cs (5)
180var result = await errorTask.ConfigureAwait(false) ?? await refactoringTask.ConfigureAwait(false); 210var result = await GetFixCategoryAsync(priorityProvider).ConfigureAwait(false); 223document, range.Span.ToTextSpan(), priorityProvider, cancellationToken).ConfigureAwait(false); 268document, selection.Value, cancellationToken).ConfigureAwait(false))
Suggestions\SuggestedActionsSource_Async.cs (5)
93using var _1 = await RemoteKeepAliveSession.CreateAsync(document.Project.Solution, cancellationToken).ConfigureAwait(false); 214await Task.WhenAll(fixesTask, refactoringsTask).ConfigureAwait(false); 216var fixes = await fixesTask.ConfigureAwait(false); 217var refactorings = await refactoringsTask.ConfigureAwait(false); 272filterOutsideSelection, cancellationToken).ConfigureAwait(false);
Suggestions\SuggestedActionWithNestedFlavors.cs (6)
83defaultValue: [], cancellationToken).ConfigureAwait(false); 94var primarySuggestedActionSet = await GetPrimarySuggestedActionSetAsync(cancellationToken).ConfigureAwait(false); 121var refineUsingCopilotAction = await RefineUsingCopilotSuggestedAction.TryCreateAsync(this, cancellationToken).ConfigureAwait(false); 165var previewResult = await GetPreviewResultAsync(cancellationToken).ConfigureAwait(true); 174return await previewResult.GetPreviewsAsync(preferredDocumentId, preferredProjectId, cancellationToken).ConfigureAwait(true); 178}, defaultValue: null, cancellationToken).ConfigureAwait(true);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (3)
218await RecomputeTagsAsync(highPriority, frozenPartialSemantics, calledFromJtfRun: false, linkedTokenSource.Token).ConfigureAwait(false); 230await RecomputeTagsAsync(highPriority, frozenPartialSemantics, calledFromJtfRun: false, cancellationToken).ConfigureAwait(false); 365cancellationToken).ConfigureAwait(true);
Tagging\TaggerMainThreadManager.cs (1)
95return await taskSource.Task.ConfigureAwait(true);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Completion\AbstractCompletionProviderTests.cs (1)
375return await GetCompletionListAsync(GetCompletionService(currentDocument.Project), currentDocument, position, RoslynCompletion.CompletionTrigger.Invoke, options).ConfigureAwait(false);
RefactoringHelpers\RefactoringHelpersTestBase.cs (5)
35var resultNode = await GetNodeForSelectionAsync(text, selection, predicate, allowEmptyNodes).ConfigureAwait(false); 44var resultNode = await GetNodeForSelectionAsync(text, selection, Functions<TNode>.True).ConfigureAwait(false); 53var resultNode = await GetNodeForSelectionAsync(text, selection, Functions<TNode>.True).ConfigureAwait(false); 67var resultNode = await GetNodeForSelectionAsync(text, selection, predicate, allowEmptyNodes).ConfigureAwait(false); 107var relevantNodes = await document.GetRelevantNodesAsync<TNode>(selection, allowEmptyNodes, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
CodeFixes\CodeFixServiceTests.cs (1)
918var text = await document.GetTextAsync(ct).ConfigureAwait(false);
CodeFixes\ErrorCases\CodeFixExceptionInRegisterMethodAsync.cs (1)
23var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
CodeRefactorings\CodeRefactoringServiceTest.cs (1)
304var text = await document.GetTextAsync(ct).ConfigureAwait(false);
Completion\CompletionServiceTests.cs (4)
65var actualDescriptionText = (await completionService.GetDescriptionAsync(document, item, CompletionOptions.Default, SymbolDescriptionOptions.Default).ConfigureAwait(false))!.Text; 69var actualChange = (await completionService.GetChangeAsync(document, item).ConfigureAwait(false)).TextChange; 116context.CompletionListSpan = await GetTextChangeSpanAsync(context.Document, context.CompletionListSpan, context.CancellationToken).ConfigureAwait(false); 133var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Snippets\RoslynLSPSnippetConvertTests.cs (1)
401var lspSnippetString = await RoslynLSPSnippetConverter.GenerateLSPSnippetAsync(document, cursorPosition!.Value, placeholders, textChange, stringSpan.Start, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.Extensions.Package (4)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (4)
AddPackage\AspNetCoreAddPackageCodeAction.cs (4)
45document, position, installPackageData.PackageNamespaceName, cancellationToken).ConfigureAwait(false); 63var updatedDocument = await AddImportAsync(document, position, generator, importDirective, cancellationToken).ConfigureAwait(false); 71var textChanges = await cleanedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false); 79var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.Copilot (22)
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (20)
60if (!await service.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false)) 63return await GetAvailablePromptTitlesCoreAsync(document, cancellationToken).ConfigureAwait(false); 71if (!await service.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false)) 74if (await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 82if (await ShouldSkipAnalysisAsync(document, cancellationToken).ConfigureAwait(false)) 88if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false)) 92var diagnostics = await AnalyzeDocumentCoreAsync(document, span, promptTitle, cancellationToken).ConfigureAwait(false); 137if (await ShouldSkipAnalysisAsync(document, cancellationToken).ConfigureAwait(false)) 157var cachedDiagnostics = await GetCachedDiagnosticsCoreAsync(document, promptTitle, cancellationToken).ConfigureAwait(false); 164return await GetDiagnosticsIntersectWithSpanAsync(document, diagnostics, span.Value, cancellationToken).ConfigureAwait(false); 179if (await service.IsRefineOptionEnabledAsync().ConfigureAwait(false)) 185return await GetOnTheFlyDocsPromptCoreAsync(onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false); 189if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false)) 192return await GetOnTheFlyDocsResponseCoreAsync(prompt, cancellationToken).ConfigureAwait(false); 197if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false)) 200return await IsFileExcludedCoreAsync(filePath, cancellationToken).ConfigureAwait(false); 205if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false)) 208return await GetDocumentationCommentCoreAsync(proposal, cancellationToken).ConfigureAwait(false); 213return await IsAvailableAsync(cancellationToken).ConfigureAwait(false) 222return await ImplementNotImplementedExceptionsCoreAsync(document, methodOrProperties, cancellationToken).ConfigureAwait(false);
Internal\Analyzer\CSharp\CSharpCopilotCodeAnalysisService.cs (1)
165var nodeToWrappers = await GenerateImplementationService.ImplementNotImplementedExceptionsAsync(document, methodOrProperties, cancellationToken).ConfigureAwait(false);
Internal\SemanticSearch\CopilotSemanticSearchQueryService.cs (1)
92cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (32)
Editor\InlineRename\FSharpInlineRenameInfo.cs (1)
47cancellationToken).ConfigureAwait(false);
Editor\InlineRename\FSharpInlineRenameLocationSet.cs (1)
37=> await GetReplacementsAsync(replacementText, cancellationToken).ConfigureAwait(false);
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (2)
75: await analyzer.AnalyzeSemanticsAsync(document, cancellationToken).ConfigureAwait(false); 83: await analyzer.AnalyzeSyntaxAsync(document, cancellationToken).ConfigureAwait(false);
Internal\Diagnostics\FSharpSimplifyNameDiagnosticAnalyzer.cs (1)
59: await analyzer.AnalyzeSemanticsAsync(_descriptor, document, cancellationToken).ConfigureAwait(false);
Internal\Diagnostics\FSharpUnusedDeclarationsAnalyzer.cs (1)
61: await analyzer.AnalyzeSemanticsAsync(_descriptor, document, cancellationToken).ConfigureAwait(false);
Internal\Diagnostics\FSharpUnusedOpensDiagnosticAnalyzer.cs (1)
57: await analyzer.AnalyzeSemanticsAsync(_descriptor, document, cancellationToken).ConfigureAwait(false);
Internal\DocumentHighlighting\FSharpDocumentHighlightsService.cs (1)
72var highlights = await _service.GetDocumentHighlightsAsync(document, position, documentsToSearch, cancellationToken).ConfigureAwait(false);
Internal\Editor\FSharpBraceMatcher.cs (1)
31var result = await _braceMatcher.FindBracesAsync(document, position, cancellationToken).ConfigureAwait(false);
Internal\Editor\FSharpDefinitionLocationService.cs (1)
27var items = await service.FindDefinitionsAsync(document, position, cancellationToken).ConfigureAwait(false);
Internal\Editor\FSharpEditorFormattingService.cs (4)
81var changes = await GetFormattingChangesAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 87var changes = await GetFormattingChangesAsync(document, typedChar, position, cancellationToken).ConfigureAwait(false); 93var changes = await GetFormattingChangesOnPasteAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 99var changes = await GetFormattingChangesOnReturnAsync(document, position, cancellationToken).ConfigureAwait(false);
Internal\Editor\FSharpEditorInlineRenameService.cs (4)
100var info = await _set.GetReplacementsAsync(replacementText, optionSet: null, cancellationToken).ConfigureAwait(false); 143var set = await _info.FindRenameLocationsAsync(optionSet: null, cancellationToken).ConfigureAwait(false); 215var info = await _legacyService.GetRenameInfoAsync(document, position, cancellationToken).ConfigureAwait(false); 222return await _service.GetRenameInfoAsync(document, position, cancellationToken).ConfigureAwait(false) ?? AbstractEditorInlineRenameService.DefaultFailureInfo;
Internal\Editor\FSharpNavigationBarItemService.cs (1)
55var items = await _service.GetItemsAsync(document, cancellationToken).ConfigureAwait(false);
Internal\Editor\Implementation\Debugging\FSharpBreakpointResolutionService.cs (2)
32=> (await _service.ResolveBreakpointAsync(document, textSpan, cancellationToken).ConfigureAwait(false))?.UnderlyingObject; 35=> (await _service.ResolveBreakpointsAsync(solution, name, cancellationToken).ConfigureAwait(false)).Select(r => r.UnderlyingObject);
Internal\Editor\Implementation\Debugging\FSharpLanguageDebugInfoService.cs (2)
25=> (await _service.GetDataTipInfoAsync(document, position, cancellationToken).ConfigureAwait(false)).UnderlyingObject; 28=> (await _service.GetLocationInfoAsync(document, position, cancellationToken).ConfigureAwait(false)).UnderlyingObject;
Internal\InlineHints\FSharpInlineHintsService.cs (1)
36var hints = await _service.GetInlineHintsAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
Internal\NavigateTo\FSharpNavigateToSearchService.cs (2)
42var results = await _service.SearchDocumentAsync(document, searchPattern, kinds, cancellationToken).ConfigureAwait(false); 63var results = await _service.SearchProjectAsync(project, priorityDocuments, searchPattern, kinds, cancellationToken).ConfigureAwait(false);
Internal\Navigation\FSharpCrossLanguageSymbolNavigationService.cs (1)
41assemblyName, documentationCommentId, cancellationToken).ConfigureAwait(false);
Internal\Navigation\FSharpFindDefinitionService.cs (1)
23var items = await service.FindDefinitionsAsync(document, position, cancellationToken).ConfigureAwait(false);
Internal\SignatureHelp\FSharpSignatureHelpProvider.cs (2)
53mappedSignatureHelpItems = await _newProvider.GetItemsAsync(document, position, mappedTriggerInfo, cancellationToken).ConfigureAwait(false); 58mappedSignatureHelpItems = await _legacyProvider.GetItemsAsync(document, position, mappedTriggerInfo, cancellationToken).ConfigureAwait(false);
Internal\Structure\FSharpBlockStructureService.cs (1)
34var blockStructure = await _service.GetBlockStructureAsync(document, cancellationToken).ConfigureAwait(false);
TaskList\FSharpTaskListService.cs (1)
36cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (5)
Formatting\OmniSharpFormatter.cs (1)
28return await organizeImportsService.OrganizeImportsAsync(document, options.UnderlyingObject, cancellationToken).ConfigureAwait(false);
GoToDefinition\OmniSharpFindDefinitionService.cs (1)
22var result = await service.GetNavigableItemsAsync(document, position, cancellationToken).ConfigureAwait(false);
InlineHints\OmniSharpInlineHintsService.cs (1)
22var hints = await service.GetInlineHintsAsync(document, textSpan, roslynOptions, displayAllOverride: false, cancellationToken).ConfigureAwait(false);
Rename\OmniSharpRenamer.cs (1)
26var resolution = await Renamer.RenameSymbolAsync(solution, symbol, newName, options.ToRenameOptions(), cancellationToken).ConfigureAwait(false);
Structure\OmniSharpBlockStructureService.cs (1)
17var blockStructure = await service.GetBlockStructureAsync(document, options.ToBlockStructureOptions(), cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (16)
Cohost\Handlers\CodeActions.cs (3)
56cancellationToken).ConfigureAwait(false); 61var operations = await codeActionToResolve.GetOperationsAsync(solution, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 69cancellationToken).ConfigureAwait(false);
Cohost\Handlers\Completion.cs (2)
80.ConfigureAwait(false); 92cancellationToken).ConfigureAwait(false);
Cohost\Handlers\Diagnostics.cs (1)
25document, range: null, DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
Cohost\Handlers\DocumentSpellCheck.cs (1)
28var spans = await service.GetSpansAsync(document, cancellationToken).ConfigureAwait(false);
Cohost\Handlers\ValidateBreakableRange.cs (1)
18var result = await ValidateBreakableRangeHandler.GetBreakableRangeAsync(document, range, cancellationToken).ConfigureAwait(false);
RazorDocumentExcerptServiceWrapper.cs (1)
29var result = await _impl.TryExcerptAsync(document, span, razorMode, new RazorClassificationOptionsWrapper(classificationOptions), cancellationToken).ConfigureAwait(false);
RazorMappingServiceWrapper.cs (2)
27var mappedEdits = await _razorMappingService.MapTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(false); 55var razorSpans = await _razorMappingService.MapSpansAsync(document, spans, cancellationToken).ConfigureAwait(false);
RazorSourceGeneratedDocumentSpanMappingServiceWrapper.cs (2)
40var mappedChanges = await _implementation.GetMappedTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(false); 71var mappedSpans = await _implementation.MapSpansAsync(document, spans, cancellationToken).ConfigureAwait(false);
Remote\RazorRemoteHostClient.cs (1)
28var client = await RemoteHostClient.TryGetClientAsync(services.SolutionServices, cancellationToken).ConfigureAwait(false);
Testing\TestSolutionStore.cs (1)
19var checksum = await solution.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false);
TextDocumentExtensions.cs (1)
22=> new ChecksumWrapper(await document.State.GetChecksumAsync(cancellationToken).ConfigureAwait(false));
Microsoft.CodeAnalysis.ExternalAccess.Xaml (5)
Internal\DescriptionService.cs (2)
60var semanticModel = await codeDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 68var quickInfo = await QuickInfoUtilities.CreateQuickInfoItemAsync(services, semanticModel, span: default, ImmutableArray.Create(symbol), options, cancellationToken).ConfigureAwait(false);
Internal\LocationService.cs (2)
55var location = await GetLocationAsync(document, item.SourceSpan, cancellationToken).ConfigureAwait(false); 64var declarationFile = await _metadataAsSourceFileService.GetGeneratedFileAsync(project.Solution.Workspace, project, symbol, signaturesOnly: true, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Internal\XamlDiagnosticSource.cs (1)
27var diagnostics = await xamlDiagnosticSource.GetDiagnosticsAsync(xamlRequestContext, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (1473)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (5)
43var result = await AddConstructorParametersFromMembersAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 62cancellationToken).ConfigureAwait(false); 66var state = await State.GenerateAsync(info.SelectedMembers, document, cancellationToken).ConfigureAwait(false); 168var addConstructorParametersResult = await AddConstructorParametersFromMembersAsync(priorDocument, priorSelection, cancellationToken).ConfigureAwait(false); 185priorDocument.Project.Solution, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (5)
36selectedMembers, document, cancellationToken).ConfigureAwait(false)) 51var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false); 63ContainingType, selectedMembers, document, parametersForSelectedMembers, cancellationToken).ConfigureAwait(false); 89constructor, document, parametersForSelectedMembers.SelectAsArray(p => p.Name), cancellationToken).ConfigureAwait(false)) 104var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (4)
36await GetRelevantTypeFromHeaderAsync(context).ConfigureAwait(false) ?? 37await GetRelevantTypeFromMethodAsync(context).ConfigureAwait(false); 68var type = await context.TryGetRelevantNodeAsync<TTypeDeclarationSyntax>().ConfigureAwait(false); 78var method = await context.TryGetRelevantNodeAsync<TMethodDeclarationSyntax>().ConfigureAwait(false);
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (2)
49var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 76var siblingBanner = await TryGetBannerAsync(siblingDocument, siblingRoot, cancellationToken).ConfigureAwait(false);
AddFileBanner\AbstractAddFileBannerNewDocumentFormattingProvider.cs (1)
37cancellationToken).ConfigureAwait(false);
AddImport\AbstractAddImportCodeFixProvider.cs (1)
79document, span, diagnostics, MaxResults, symbolSearchService, addImportOptions, packageSources, cancellationToken).ConfigureAwait(false);
AddImport\AbstractAddImportFeatureService.cs (13)
69var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 85packageSources, cancellationToken).ConfigureAwait(false); 109options, packageSources, cancellationToken).ConfigureAwait(false); 116document, node, options.CleanupDocument, options.CleanupOptions, cancellationToken).ConfigureAwait(false); 153var exactReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: true, cancellationToken).ConfigureAwait(false); 163var fuzzyReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: false, cancellationToken).ConfigureAwait(false); 212await finder.FindInAllSymbolsInStartingProjectAsync(exact, cancellationToken).ConfigureAwait(false)); 244projectToAssembly, project, exact, cancellationToken).ConfigureAwait(false); 301assembly, referenceProject, reference, exact, cancellationToken).ConfigureAwait(false); 530packageSources, cancellationToken).ConfigureAwait(false); 543var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 559packageSources, cancellationToken).ConfigureAwait(false); 586var fixesForDiagnostics = await getFixesForDiagnosticsTask.ConfigureAwait(false);
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (2)
34=> await ComputeOperationsAsync(isPreview: true, cancellationToken).ConfigureAwait(false); 41var newDocument = await GetUpdatedDocumentAsync(cancellationToken).ConfigureAwait(false);
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (5)
57this.OriginalDocument.Project.Solution, cancellationToken).ConfigureAwait(false)); 64var newDocument = await GetUpdatedDocumentAsync(cancellationToken).ConfigureAwait(false); 65var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 84var updatedDocument = await GetUpdatedDocumentAsync(cancellationToken).ConfigureAwait(false); 116if (await _installPackageOperation.TryApplyAsync(workspace, originalSolution, progressTracker, cancellationToken).ConfigureAwait(true))
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (4)
34var operation = await GetChangeSolutionOperationAsync(isPreview: true, cancellationToken).ConfigureAwait(false); 41var operation = await GetChangeSolutionOperationAsync(isPreview: false, cancellationToken).ConfigureAwait(false); 52var updatedDocument = await GetUpdatedDocumentAsync(cancellationToken).ConfigureAwait(false); 57var updatedProject = await UpdateProjectAsync(updatedDocument.Project, isPreview, cancellationToken).ConfigureAwait(false);
AddImport\References\AssemblyReference.cs (1)
29var textChanges = await GetTextChangesAsync(document, node, cleanDocument, options, cancellationToken).ConfigureAwait(false);
AddImport\References\PackageReference.cs (1)
32document, node, cleanupDocument, options, cancellationToken).ConfigureAwait(false);
AddImport\References\Reference.cs (6)
94var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 114node, document, cancellationToken).ConfigureAwait(false); 117node, SearchResult.NameParts, document, options.AddImportOptions, cancellationToken).ConfigureAwait(false); 119var cleanedDocument = await CleanDocumentAsync(newDocument, cleanupDocument, options, cancellationToken).ConfigureAwait(false); 122originalDocument, cancellationToken).ConfigureAwait(false); 133: await CodeAction.CleanupSyntaxAsync(newDocument, options, cancellationToken).ConfigureAwait(false);
AddImport\References\SymbolReference.cs (6)
60contextNode, document, cancellationToken).ConfigureAwait(false); 64options.AddImportOptions, cancellationToken).ConfigureAwait(false); 67updatedDocument, cleanupDocument, options, cancellationToken).ConfigureAwait(false); 70document, cancellationToken).ConfigureAwait(false); 78var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 110document, node, cleanupDocument, options, hasExistingImport, cancellationToken).ConfigureAwait(false);
AddImport\SearchScopes\AllSymbolsProjectSearchScope.cs (1)
28_project, searchQuery, filter, cancellationToken).ConfigureAwait(false);
AddImport\SearchScopes\MetadataSymbolsSearchScope.cs (1)
44searchQuery, _assembly, filter, cancellationToken).ConfigureAwait(false);
AddImport\SearchScopes\SearchScope.cs (3)
52var symbols = await FindDeclarationsAsync(filter, query, cancellationToken).ConfigureAwait(false); 63var symbols = await FindDeclarationsAsync(filter, query, cancellationToken).ConfigureAwait(false); 73var symbols = await FindDeclarationsAsync(filter, query, cancellationToken).ConfigureAwait(false);
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (2)
46searchQuery, lazyAssembly, filter, cancellationToken).ConfigureAwait(false); 53var compilation = await project.GetRequiredCompilationAsync(c).ConfigureAwait(false);
AddImport\SymbolReferenceFinder.cs (14)
138await Task.WhenAll(tasks).ConfigureAwait(false); 144var taskResult = await task.ConfigureAwait(false); 195var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Type, cancellationToken).ConfigureAwait(false); 201name + AttributeSuffix, nameNode, SymbolFilter.Type, cancellationToken).ConfigureAwait(false); 273var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Namespace, cancellationToken).ConfigureAwait(false); 319symbol.Name, simpleName, SymbolFilter.Type, cancellationToken).ConfigureAwait(false); 368var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Member, cancellationToken).ConfigureAwait(false); 421nameof(IList.Add), nameNode: null, filter: SymbolFilter.Member, cancellationToken).ConfigureAwait(false); 455searchScope, nameof(Enumerable.Select), type, predicate: null, cancellationToken).ConfigureAwait(false); 480cancellationToken).ConfigureAwait(false); 505cancellationToken).ConfigureAwait(false); 530cancellationToken).ConfigureAwait(false); 557searchScope, "Deconstruct", type, static m => m.ReturnsVoid, cancellationToken).ConfigureAwait(false); 568name, nameNode: null, filter: SymbolFilter.Member, cancellationToken).ConfigureAwait(false);
AddImport\SymbolReferenceFinder_PackageAssemblySearch.cs (1)
193var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (5)
34var uniqueIdentities = await GetUniqueIdentitiesAsync(context).ConfigureAwait(false); 37var addPackageCodeActions = await GetAddPackagesCodeActionsAsync(context, assemblyNames).ConfigureAwait(false); 38var addReferenceCodeActions = await GetAddReferencesCodeActionsAsync(context, uniqueIdentities).ConfigureAwait(false); 50context.Document.Project, identity, context.CancellationToken).ConfigureAwait(false); 60var compilation = await context.Document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
AddMissingReference\AddMissingReferenceCodeAction.cs (1)
57var compilation = await candidateProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
AddPackage\AbstractAddPackageCodeFixProvider.cs (1)
59assemblyNames, cancellationToken).ConfigureAwait(false);
AddPackage\AbstractAddSpecificPackageCodeFixProvider.cs (1)
38var addPackageCodeActions = await GetAddPackagesCodeActionsAsync(context, assemblyNames).ConfigureAwait(false);
BraceMatching\AbstractBraceMatcher.cs (1)
64var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
BraceMatching\BraceMatchingService.cs (1)
36var braces = await matcher.Value.FindBracesAsync(document, position, options, cancellationToken).ConfigureAwait(false);
BraceMatching\IBraceMatchingServiceExtensions.cs (2)
21var braces1 = await service.GetMatchingBracesAsync(document, position, options, cancellationToken).ConfigureAwait(false); 29braces2 = await service.GetMatchingBracesAsync(document, position - 1, options, cancellationToken).ConfigureAwait(false);
BracePairs\IBracePairsService.cs (1)
49var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ChangeSignature\AbstractChangeSignatureCodeRefactoringProvider.cs (1)
31var actions = await service.GetChangeSignatureCodeActionAsync(document, span, cancellationToken).ConfigureAwait(false);
ChangeSignature\AbstractChangeSignatureService.cs (14)
96var context = await GetChangeSignatureContextAsync(document, span.Start, restrictToDeclarations: true, cancellationToken).ConfigureAwait(false); 107document, position, restrictToDeclarations, cancellationToken).ConfigureAwait(false); 110symbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, document.Project.Solution, cancellationToken).ConfigureAwait(false) ?? symbol; 170var syntax = await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 185var semanticDocument = await SemanticDocument.CreateAsync(declarationDocument, cancellationToken).ConfigureAwait(false); 194ChangeSignatureAnalysisSucceededContext changeSignatureAnalyzedSucceedContext => await GetChangeSignatureResultAsync(changeSignatureAnalyzedSucceedContext, options, cancellationToken).ConfigureAwait(false), 206var (updatedSolution, confirmationMessage) = await CreateUpdatedSolutionAsync(context, options, cancellationToken).ConfigureAwait(false); 260declaredSymbol, context.Solution, cancellationToken).ConfigureAwait(false); 381var root = await doc.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 388var semanticDocument = await SemanticDocument.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 426var docWithImports = await ImportAdder.AddImportsFromSymbolAnnotationAsync(updatedDoc, cleanupOptions.AddImportOptions, cancellationToken).ConfigureAwait(false); 427var reducedDoc = await Simplifier.ReduceAsync(docWithImports, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 428var formattedDoc = await Formatter.FormatAsync(reducedDoc, SyntaxAnnotation.ElasticAnnotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 433cancellationToken).ConfigureAwait(false);
ChangeSignature\ChangeSignatureCodeAction.cs (1)
35var changeSignatureResult = await _changeSignatureService.ChangeSignatureWithContextAsync(_context, changeSignatureOptions, cancellationToken).ConfigureAwait(false);
ChangeSignature\DelegateInvokeMethodReferenceFinder.cs (1)
59symbol, document, cancellationToken).ConfigureAwait(false);
ClassifiedSpansAndHighlightSpanFactory.cs (4)
28documentSpan.Document, documentSpan.SourceSpan, options, cancellationToken).ConfigureAwait(false); 40document, narrowSpan, lineSpan, options, cancellationToken).ConfigureAwait(false); 64document, narrowSpan, widenedSpan, options, cancellationToken).ConfigureAwait(false); 74document, widenedSpan, options, includeAdditiveSpans: false, cancellationToken).ConfigureAwait(false);
CodeFixes\Configuration\ConfigurationUpdater.cs (2)
242var solution = await updater.ConfigureAsync(cancellationToken).ConfigureAwait(false); 254var solution = await updater.ConfigureAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Service\CodeFixService.cs (15)
111priorityProvider, DiagnosticKind.All, cancellationToken).ConfigureAwait(false); 119var copilotDiagnostics = await GetCopilotDiagnosticsAsync(document, range, priorityProvider.Priority, cancellationToken).ConfigureAwait(false); 148var collection = await errorFixTask.ConfigureAwait(false) ?? 149await otherFixTask.ConfigureAwait(false); 203priorityProvider, DiagnosticKind.All, cancellationToken).ConfigureAwait(false); 208var copilotDiagnostics = await GetCopilotDiagnosticsAsync(document, range, priorityProvider.Priority, cancellationToken).ConfigureAwait(false); 258return await document.GetCachedCopilotDiagnosticsAsync(range, cancellationToken).ConfigureAwait(false); 301DiagnosticKind.All, cancellationToken).ConfigureAwait(false); 348document, textSpan, diagnosticId, severity, cancellationToken).ConfigureAwait(false); 357new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false); 566cancellationToken).ConfigureAwait(false); 730var fixes = await provider.GetFixesAsync(document, diagnosticsSpan, dxs, cancellationToken).ConfigureAwait(false); 733cancellationToken).ConfigureAwait(false); 755.ToDiagnosticsAsync(textDocument.Project, cancellationToken).ConfigureAwait(false); 766defaultValue: [], cancellationToken).ConfigureAwait(false);
CodeFixes\Service\CodeFixService.FixAllDiagnosticProvider.cs (8)
47document.Project, [document.Id], _diagnosticIds, shouldIncludeAnalyzer: null, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false)); 49return await diagnostics.ToDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false); 60DiagnosticKind.All, cancellationToken).ConfigureAwait(false)); 62return await diagnostics.ToDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false); 70project, documentIds: default, _diagnosticIds, shouldIncludeAnalyzer: null, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false)); 71return await diagnostics.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false); 79project, _diagnosticIds, shouldIncludeAnalyzer: null, cancellationToken).ConfigureAwait(false)); 81return await diagnostics.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (13)
34var documentsAndDiagnosticsToFixMap = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false); 35return await GetFixAsync(documentsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false); 39var projectsAndDiagnosticsToFixMap = await fixAllContext.GetProjectDiagnosticsToFixAsync().ConfigureAwait(false); 40return await GetFixAsync(projectsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false); 57var diagnosticsAndCodeActions = await GetDiagnosticsAndCodeActionsAsync(documentsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false); 66diagnosticsAndCodeActions, fixAllState, progressTracker, cancellationToken).ConfigureAwait(false); 107cancellationToken).ConfigureAwait(false); 167result, fixAllState, progressTracker, cancellationToken).ConfigureAwait(false); 215solution, batchOfFixes, progressTracker, cancellationToken).ConfigureAwait(false); 232oldSolution, diagnosticsAndCodeActions, progressTracker, cancellationToken).ConfigureAwait(false); 240diagnosticsAndCodeActions, cancellationToken).ConfigureAwait(false); 336var newText = await merger.GetFinalMergedTextAsync(cancellationToken).ConfigureAwait(false); 353oldSolution, progressTracker, cancellationToken: cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (3)
36var changedSuppressionDocument = await GetChangedSuppressionDocumentAsync(cancellationToken).ConfigureAwait(false); 86var t = await document.GetSyntaxTreeAsync(c).ConfigureAwait(false); 87var r = await t.GetRootAsync(c).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (8)
152var codeFixes = await GetSuppressionsAsync(document, span, diagnostics, skipSuppressMessage: true, skipUnsuppress: true, cancellationToken: cancellationToken).ConfigureAwait(false); 159var suppressionTargetInfo = await GetSuppressionTargetInfoAsync(document, span, cancellationToken).ConfigureAwait(false); 166document, document.Project, diagnostics, suppressionTargetInfo, skipSuppressMessage, skipUnsuppress, cancellationToken).ConfigureAwait(false); 177var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 182cancellationToken).ConfigureAwait(false); 198var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 243var codeAction = await RemoveSuppressionCodeAction.CreateAsync(suppressionTargetInfo, documentOpt, project, diagnostic, this, cancellationToken).ConfigureAwait(false); 270var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.FixAllProvider.cs (4)
43await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false)) 46await fixAllContext.GetProjectDiagnosticsToFixAsync().ConfigureAwait(false)); 52return await batchFixer.GetFixAsync(fixAllContext).ConfigureAwait(false); 58return await batchFixer.GetFixAsync(fixAllContext).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs (1)
26var suppressionsDoc = await GetOrCreateSuppressionsDocumentAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (10)
78var compilation = await currentProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 83var diagnosticsBySymbol = await CreateDiagnosticsBySymbolAsync(fixer, grouping, cancellationToken).ConfigureAwait(false); 87var newDocument = await projectCodeAction.GetChangedSuppressionDocumentAsync(cancellationToken).ConfigureAwait(false); 106var compilation = await currentProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 111var diagnosticsBySymbol = await CreateDiagnosticsBySymbolAsync(oldProject, diagnostics, cancellationToken).ConfigureAwait(false); 116var newDocument = await projectCodeAction.GetChangedSuppressionDocumentAsync(cancellationToken).ConfigureAwait(false); 130var suppressionsDoc = await GetOrCreateSuppressionsDocumentAsync(cancellationToken).ConfigureAwait(false); 132var suppressionsRoot = await suppressionsDoc.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 160var suppressionTargetInfo = await fixer.GetSuppressionTargetInfoAsync(document, diagnostic.Location.SourceSpan, cancellationToken).ConfigureAwait(false); 176var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.LocalSuppressMessageCodeAction.cs (1)
32var root = await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (6)
69var currentTree = await currentDocument.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 88var newSuppressionFixes = await suppressionFixProvider.GetFixesAsync(currentDocument, currentDiagnosticSpan, [diagnostic], cancellationToken).ConfigureAwait(false); 100includeStartTokenChange: true, includeEndTokenChange: false, cancellationToken: cancellationToken).ConfigureAwait(false); 103includeStartTokenChange: false, includeEndTokenChange: true, cancellationToken: cancellationToken).ConfigureAwait(false); 126var newDocument = await pragmaAction.GetChangedDocumentAsync(includeStartTokenChange, includeEndTokenChange, cancellationToken).ConfigureAwait(false); 127return await newDocument.GetTextChangesAsync(currentDocument, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
35var root = await nodeWithTokens.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningBatchFixAllProvider.cs (1)
38document, span, [diagnostic], cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningCodeAction.cs (2)
58=> await GetChangedDocumentAsync(includeStartTokenChange: true, includeEndTokenChange: true, cancellationToken: cancellationToken).ConfigureAwait(false); 78cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (6)
47document, span, [diagnostic], cancellationToken).ConfigureAwait(false); 92project, [diagnostic], cancellationToken).ConfigureAwait(false); 140var attributesToRemove = await GetAttributeNodesToFixAsync(attributeRemoveFixesForTree, cancellationToken).ConfigureAwait(false); 142var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 156[.. newBatchOfFixes], fixAllState, progressTracker, cancellationToken).ConfigureAwait(false); 164var attributeToRemove = await attributeRemoveFix.GetAttributeToRemoveAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.cs (1)
31var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (3)
54var attributeNode = await _attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 63var attributeNode = await GetAttributeToRemoveAsync(cancellationToken).ConfigureAwait(false); 70var editor = await DocumentEditor.CreateAsync(documentWithAttribute, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (4)
65=> await GetChangedDocumentAsync(includeStartTokenChange: true, includeEndTokenChange: true, cancellationToken: cancellationToken).ConfigureAwait(false); 79toggle = await IsDiagnosticSuppressedBeforeLeadingPragmaAsync(indexOfLeadingPragmaDisableToRemove, cancellationToken).ConfigureAwait(false); 101cancellationToken).ConfigureAwait(false); 203var model = await _document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\WrapperCodeFixProvider.cs (2)
29var suppressionFixes = await SuppressionFixProvider.GetFixesAsync(context.Document, context.Span, documentDiagnostics, context.CancellationToken).ConfigureAwait(false); 36var suppressionFixes = await SuppressionFixProvider.GetFixesAsync(context.Document.Project, projectDiagnostics, context.CancellationToken).ConfigureAwait(false);
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (7)
27var codeAction = await GetFixAllCodeActionAsync(fixAllContext).ConfigureAwait(false); 34return await codeAction.GetChangedSolutionInternalAsync(fixAllContext.State.Solution, fixAllContext.Progress, fixAllContext.CancellationToken).ConfigureAwait(false); 40var codeAction = await GetFixAllCodeActionAsync(fixAllContext).ConfigureAwait(false); 47codeAction, showPreviewChangesDialog, fixAllContext.Progress, fixAllContext.State, fixAllContext.CancellationToken).ConfigureAwait(false); 64fixAllState.Solution, progressTracker, cancellationToken).ConfigureAwait(false); 72fixAllState.Solution, progressTracker, cancellationToken).ConfigureAwait(false); 178action = await fixAllContext.State.FixAllProvider.GetFixAsync(fixAllContext).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (16)
54var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 68symbol, solution, progress, documents: null, s_nonParallelSearch, progress.CancellationToken).ConfigureAwait(false); 70return await onResults(progress).ConfigureAwait(false); 77return await onCapped(progress).ConfigureAwait(false); 88return await solution.GetRequiredProject(projectId).GetDependentVersionAsync(cancellationToken).ConfigureAwait(false); 100maxSearchResults, cancellationToken).ConfigureAwait(false); 112var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 121var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true); 208var result = await Task.WhenAll(referenceTasks).ConfigureAwait(false); 211}, onCapped: null, searchCap: 0, cancellationToken: cancellationToken).ConfigureAwait(false); 227var results = await SpanMappingHelper.TryGetMappedSpanResultAsync(document, [span], cancellationToken).ConfigureAwait(false); 277var referenceExcerpt = await excerpter.TryExcerptAsync(document, span, ExcerptMode.SingleLine, classificationOptions, cancellationToken).ConfigureAwait(false); 278var tooltipExcerpt = await excerpter.TryExcerptAsync(document, span, ExcerptMode.Tooltip, classificationOptions, cancellationToken).ConfigureAwait(false); 381var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 397var result = await Task.WhenAll(descriptorTasks).ConfigureAwait(false); 408var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
45var expressions = await context.GetRelevantNodesAsync<TExpressionSyntax>().ConfigureAwait(false);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (7)
60addImportOptions, packageSources, cancellationToken).ConfigureAwait(false); 124newDocument, insertSpans, formattingOptions, cancellationToken).ConfigureAwait(false); 132cleanedDocument, organizeImportsOptions, cancellationToken).ConfigureAwait(false); 145newDocument = await CleanUpNewLinesAsync(newDocument, insertSpan, formattingOptions, cancellationToken).ConfigureAwait(false); 202document.Project.Solution, progressTracker, cancellationToken).ConfigureAwait(false); 214newSolution = await codeAction.GetRequiredChangedSolutionAsync(progressTracker, cancellationToken).ConfigureAwait(false); 222document, newDocument, TextDifferenceTypes.Line, cancellationToken).ConfigureAwait(false);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsRefactoringProvider.cs (1)
40document, textSpan, cleanupDocument: true, cancellationToken).ConfigureAwait(false);
CodeRefactorings\AddMissingImports\IAddMissingImportsFeatureService.cs (2)
48var analysisResult = await service.AnalyzeAsync(document, textSpan, cleanupDocument, cancellationToken).ConfigureAwait(false); 50document, analysisResult, progressTracker, cancellationToken).ConfigureAwait(false);
CodeRefactorings\CodeRefactoringService.cs (4)
148document, state, provider, linkedTokenSource.Token).ConfigureAwait(false); 177cancellationToken).ConfigureAwait(false); 219document, state, provider, cancellationToken).ConfigureAwait(false); 225cancellationToken).ConfigureAwait(false);
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (11)
49var actions = await GetCodeActionsAsync(document, textSpan, extractOptions, cancellationToken).ConfigureAwait(false); 60var methodAction = await ExtractMethodAsync(document, textSpan, extractOptions, cancellationToken).ConfigureAwait(false); 63var localFunctionAction = await ExtractLocalFunctionAsync(document, textSpan, extractOptions, cancellationToken).ConfigureAwait(false); 77cancellationToken).ConfigureAwait(false); 88var (document, invocationNameToken) = await result.GetDocumentAsync(cancellationToken).ConfigureAwait(false); 89return await AddRenameAnnotationAsync(document, invocationNameToken, cancellationToken).ConfigureAwait(false); 97var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 109cancellationToken).ConfigureAwait(false); 119var (document, invocationNameToken) = await localFunctionResult.GetDocumentAsync(cancellationToken).ConfigureAwait(false); 120return await AddRenameAnnotationAsync(document, invocationNameToken, cancellationToken).ConfigureAwait(false); 131var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (6)
51var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 52var typeDeclaration = await GetTypeDeclarationAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 58var typeDeclaration = await GetTypeDeclarationAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 62var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 66var modifiedSolution = await editor.GetModifiedSolutionAsync().ConfigureAwait(false); 72var nodeToAnalyze = await GetRelevantNodeAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.Editor.cs (1)
36var solution = await GetModifiedSolutionAsync().ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeCodeAction.cs (1)
54return await editor.GetOperationsAsync().ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (10)
64var documentWithMovedType = await AddNewDocumentWithSingleTypeDeclarationAsync(newDocumentId).ConfigureAwait(false); 73var solutionWithBothDocumentsUpdated = await RemoveTypeFromSourceDocumentAsync(sourceDocument).ConfigureAwait(false); 75return await RemoveUnnecessaryImportsAsync(solutionWithBothDocumentsUpdated, sourceDocument.Id, documentWithMovedType.Id).ConfigureAwait(false); 87documentWithMovedType = await removeUnnecessaryImports.RemoveUnnecessaryImportsAsync(documentWithMovedType, CancellationToken).ConfigureAwait(false); 102CancellationToken).ConfigureAwait(false); 120var documentEditor = await DocumentEditor.CreateAsync(document, CancellationToken).ConfigureAwait(false); 156modifiedRoot = await AddFinalNewLineIfDesiredAsync(document, modifiedRoot).ConfigureAwait(false); 166newDocument, FileName, document, this.CancellationToken).ConfigureAwait(false); 232var documentEditor = await DocumentEditor.CreateAsync(sourceDocument, CancellationToken).ConfigureAwait(false); 244updatedDocument = await AddFileBannerHelpers.CopyBannerAsync(updatedDocument, sourceDocument.FilePath, sourceDocument, this.CancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (2)
33? await GetNamespaceScopeChangedSolutionAsync(namespaceDeclaration).ConfigureAwait(false) 46var editor = await DocumentEditor.CreateAsync(SemanticDocument.Document, this.CancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameFileEditor.cs (1)
26var newSolution = await GetModifiedSolutionAsync().ConfigureAwait(false);
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameTypeEditor.cs (1)
31return await Renamer.RenameSymbolAsync(solution, symbol, new SymbolRenameOptions(), FileName, CancellationToken).ConfigureAwait(false);
CodeRefactorings\MoveType\MoveTypeCodeRefactoringProvider.cs (1)
28var actions = await service.GetRefactoringAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (36)
122var applicableContainers = await GetValidContainersFromAllLinkedDocumentsAsync(document, container, cancellationToken).ConfigureAwait(false); 137var originalNamespaceDeclarations = await GetTopLevelNamespacesAsync(document, cancellationToken).ConfigureAwait(false); 162var namespaces = await GetTopLevelNamespacesAsync(document, cancellationToken).ConfigureAwait(false); 166solution = await ChangeNamespaceAsync(document, namespaceToRename, targetNamespace, cancellationToken).ConfigureAwait(false); 203var containersFromAllDocuments = await GetValidContainersFromAllLinkedDocumentsAsync(document, container, cancellationToken).ConfigureAwait(false); 213var annotatedSolution = await AnnotateContainersAsync(solution, containersFromAllDocuments, cancellationToken).ConfigureAwait(false); 230solutionAfterNamespaceChange, documentId, declaredNamespace, targetNamespace, cancellationToken).ConfigureAwait(false); 235var solutionAfterFirstMerge = await MergeDiffAsync(solution, solutionAfterNamespaceChange, cancellationToken).ConfigureAwait(false); 258cancellationToken).ConfigureAwait(false); 264cancellationToken).ConfigureAwait(false); 266return await MergeDiffAsync(solutionAfterFirstMerge, solutionAfterImportsRemoved, cancellationToken).ConfigureAwait(false); 286var container = await TryGetApplicableContainerFromSpanAsync(document, span, cancellationToken).ConfigureAwait(false); 317var documentEditor = await solutionEditor.GetDocumentEditorAsync(id, cancellationToken).ConfigureAwait(false); 441var declaredSymbols = await GetDeclaredSymbolsInContainerAsync(document, container, cancellationToken).ConfigureAwait(false); 443var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 452=> FindReferenceLocationsForSymbolAsync(document, declaredSymbol, cancellationToken))).ConfigureAwait(false); 470document, refLocationsInCurrentDocument, oldNamespace, newNamespace, cancellationToken).ConfigureAwait(false); 496cancellationToken).ConfigureAwait(false); 500cancellationToken).ConfigureAwait(false); 511var referencedSymbols = await FindReferencesAsync(symbol, document, cancellationToken).ConfigureAwait(false); 529var referencedMethodSymbols = await FindReferencesAsync(methodSymbol, document, cancellationToken).ConfigureAwait(false); 587document, this, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false); 612cancellationToken).ConfigureAwait(false); 635return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false); 688document, changeNamespaceService, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false); 698cancellationToken).ConfigureAwait(false); 702documentWithAdditionalImports, Formatter.Annotation, documentOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 704return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false); 711var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 718cancellationToken).ConfigureAwait(false); 737var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 826cancellationToken).ConfigureAwait(false); 830cancellationToken).ConfigureAwait(false); 846token).ConfigureAwait(false); 881var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 893var mergeResult = await diffMergingSession.MergeDiffsAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.cs (1)
41var state = await State.CreateAsync(this, document, textSpan, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (2)
88var applicableNode = await provider.TryGetApplicableInvocationNodeAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 95var canChange = await changeNamespaceService.CanChangeNamespaceAsync(document, applicableNode, cancellationToken).ConfigureAwait(false);
Completion\CommonCompletionProvider.cs (4)
69var description = await GetDescriptionWorkerAsync(document, item, options, displayOptions, cancellationToken).ConfigureAwait(false); 70var parts = await TryAddSnippetInvocationPartAsync(document, item, description.TaggedParts, cancellationToken).ConfigureAwait(false); 82var change = await GetTextChangeAsync(document, item, ch: '\t', cancellationToken: cancellationToken).ConfigureAwait(false) ?? 112var change = (await GetTextChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false))
Completion\CommonCompletionUtilities.cs (1)
92var sections = await symbolDisplayService.ToDescriptionGroupsAsync(semanticModel, position, [symbol], options, cancellationToken).ConfigureAwait(false);
Completion\CompletionService.cs (5)
217var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 222cancellationToken).ConfigureAwait(false); 248var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 254cancellationToken).ConfigureAwait(false); 425cancellationToken).ConfigureAwait(false);
Completion\CompletionService_GetCompletions.cs (7)
71var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 86var additionalAugmentingProviders = await GetAugmentingProvidersAsync(document, triggeredProviders, caretPosition, trigger, options, cancellationToken).ConfigureAwait(false); 96document, caretPosition, trigger, options, completionListSpan, triggeredProviders, sharedContext, cancellationToken).ConfigureAwait(false); 115document, caretPosition, trigger, options, completionListSpan, augmentingProviders, sharedContext, cancellationToken).ConfigureAwait(false); 163cancellationToken).ConfigureAwait(false); 242provider, document, caretPosition, trigger, options, completionListSpan, sharedContext, cancellationToken).ConfigureAwait(false); 247cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractAwaitCompletionProvider.cs (5)
88var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 168return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false); 178var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 187return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false); 199document, leftTokenPosition, "System.Threading.Tasks", cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractContextVariableArgumentProvider.cs (1)
86var targetToken = await tree.GetTouchingTokenAsync(context.Position, context.CancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractCrefCompletionProvider.cs (2)
31var (token, semanticModel, symbols) = await GetSymbolsAsync(document, position, options, cancellationToken).ConfigureAwait(false); 42return await SymbolCompletionItem.GetDescriptionAsync(item, bestSymbols, document, semanticModel, displayOptions, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractDocCommentCompletionProvider.cs (1)
83context.Document, context.Position, context.Trigger, context.CancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (8)
60var syntaxTree = await context.Document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 71if (await CheckTypeInfoOfAttributeAsync(context.Document, attributeSyntaxNode, context.CancellationToken).ConfigureAwait(false)) 136var allInternalsVisibleToAttributesOfProject = await GetAllInternalsVisibleToAssemblyNamesOfProjectAsync(context, cancellationToken).ConfigureAwait(false); 167context.Document, context.CompletionListSpan, cancellationToken).ConfigureAwait(false); 202if (await CheckTypeInfoOfAttributeAsync(document, attribute, completionContext.CancellationToken).ConfigureAwait(false)) 212var assemblyName = await GetAssemblyNameFromInternalsVisibleToAttributeAsync(document, attribute, completionContext.CancellationToken).ConfigureAwait(false); 274var publicKey = await GetPublicKeyOfProjectAsync(project, cancellationToken).ConfigureAwait(false); 286var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractKeywordCompletionProvider.cs (3)
41d => RecommendCompletionItemsAsync(d, context, cancellationToken)).ConfigureAwait(false)); 48var syntaxContext = (TContext)await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 49var keywords = await RecommendKeywordsAsync(document, position, syntaxContext, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (11)
50var (newDocument, newSpan) = await DetermineNewDocumentAsync(document, item, cancellationToken).ConfigureAwait(false); 53var changes = await newDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false); 103var memberContainingDocument = await GenerateMemberAndUsingsAsync(document, completionItem, line, cancellationToken).ConfigureAwait(false); 114var result = await RemoveDestinationNodeAsync(memberContainingDocument, memberContainingDocumentCleanupOptions, cancellationToken).ConfigureAwait(false); 132var symbols = await SymbolCompletionItem.GetSymbolsAsync(completionItem, document, cancellationToken).ConfigureAwait(false); 147document, completionItem, semanticModel.Compilation, member, containingType, cancellationToken).ConfigureAwait(false); 152IMethodSymbol method => await codeGenService.AddMethodAsync(context, containingType, method, cancellationToken).ConfigureAwait(false), 153IPropertySymbol property => await codeGenService.AddPropertyAsync(context, containingType, property, cancellationToken).ConfigureAwait(false), 154IEventSymbol @event => await codeGenService.AddEventAsync(context, containingType, @event, cancellationToken).ConfigureAwait(false), 223document = await Simplifier.ReduceAsync(document, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false); 224document = await Formatter.FormatAsync(document, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (1)
39if (await IsExclusiveAsync(document, position, cancellationToken).ConfigureAwait(false))
Completion\Providers\AbstractOverrideCompletionProvider.cs (2)
23var state = await ItemGetter.CreateAsync(this, context.Document, context.Position, context.CancellationToken).ConfigureAwait(false); 24var items = await state.GetItemsAsync().ConfigureAwait(false);
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (1)
49document, position, context.CompletionListSpan, modifiers, token, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractPreprocessorCompletionProvider.cs (1)
23var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(originatingDocument, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (8)
35var shouldProvideSymbols = await ShouldProvideAvailableSymbolsInCurrentContextAsync(completionContext, context, position, options, cancellationToken).ConfigureAwait(false); 58var shouldPreselectInferredTypes = await ShouldPreselectInferredTypesAsync(completionContext, position, options, cancellationToken).ConfigureAwait(false); 209var description = await TryGetDescriptionAsync(document.Id).ConfigureAwait(false); 220description = await TryGetDescriptionAsync(relatedId).ConfigureAwait(false); 230var context = await Utilities.CreateSyntaxContextWithExistingSpeculativeModelAsync(relatedDocument, position, cancellationToken).ConfigureAwait(false) as TSyntaxContext; 232var symbols = await TryGetSymbolsForContextAsync(completionContext: null, context, options, cancellationToken).ConfigureAwait(false); 250return await SymbolCompletionItem.GetDescriptionAsync(item, bestSymbols.SelectAsArray(t => t.Symbol), document, context.SemanticModel, displayOptions, cancellationToken).ConfigureAwait(false); 265var result = await IsTriggerOnDotAsync(document, characterPosition, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractSuggestionModeCompletionProvider.cs (1)
19context.Document, context.Position, context.CompletionListSpan, context.Trigger, context.CancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractSymbolCompletionProvider.cs (9)
315var isSemanticTriggerCharacter = await IsSemanticTriggerCharacterAsync(document, position - 1, cancellationToken).ConfigureAwait(false); 326var syntaxContext = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false) as TSyntaxContext; 329var regularItems = await GetItemsAsync(completionContext, syntaxContext, document, position, options, cancellationToken).ConfigureAwait(false); 351var itemsForCurrentDocument = await GetSymbolsAsync(completionContext, syntaxContext, position, options, cancellationToken).ConfigureAwait(false); 360var contextAndSymbolLists = await GetPerContextSymbolsAsync(completionContext, document, options, documentIdToIndex.Keys, cancellationToken).ConfigureAwait(false); 422relatedDocument, cancellationToken).ConfigureAwait(false) as TSyntaxContext; 426completionContext, syntaxContext, options, cancellationToken).ConfigureAwait(false); 432cancellationToken).ConfigureAwait(false); 444: await GetSymbolsAsync(completionContext, syntaxContext, syntaxContext.Position, options, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
61cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (5)
44var syntaxContext = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 123cancellationToken).ConfigureAwait(false); 132if (await ShouldCompleteWithFullyQualifyTypeNameAsync().ConfigureAwait(false)) 141document, completionItemPosition, containingNamespace, cancellationToken).ConfigureAwait(false); 199return await IsInImportsDirectiveAsync(document, completionItem.Span.Start, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionProvider.cs (1)
44cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (6)
55var (getCacheResults, isPartialResult) = await GetCacheEntriesAsync(currentProject, syntaxContext.SemanticModel.Compilation, forceCacheCreation, cancellationToken).ConfigureAwait(false); 108var upToDateCacheEntry = await GetUpToDateCacheForProjectAsync(project, cancellationToken).ConfigureAwait(false); 164var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 165_ = await service.GetCacheEntriesAsync(project, compilation, forceCacheCreation: true, cancellationToken).ConfigureAwait(false); 180var checksum = await SymbolTreeInfo.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false); 181var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (6)
37var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 68var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 89.ConfigureAwait(false); 109var extensionMethodSymbols = await symbolComputer.GetExtensionMethodSymbolsAsync(forceCacheCreation, hideAdvancedMembers, cancellationToken).ConfigureAwait(false); 111var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 240var checksum = await SymbolTreeInfo.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (5)
75await GetUpToDateCacheEntryAsync(relevantProject, cancellationToken).ConfigureAwait(false); 100var results = await Task.WhenAll(peReferenceMethodSymbolsTask, projectMethodSymbolsTask).ConfigureAwait(false); 144cacheEntry = await GetUpToDateCacheEntryAsync(project, cancellationToken).ConfigureAwait(false); 163: await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 198symbolInfo = await cachedInfoTask.ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (2)
139var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 154cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ImportCompletionProviderHelpers.cs (4)
26var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 39var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 47var formattedDocumentWithImport = await Formatter.FormatAsync(documentWithImport, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false); 48var importChanges = await formattedDocumentWithImport.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
Completion\Providers\Scripting\AbstractLoadDirectiveCompletionProvider.cs (1)
41context.AddItems(await helper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false));
Completion\Providers\Scripting\AbstractReferenceDirectiveCompletionProvider.cs (2)
63context.AddItems(await gacHelper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false)); 70context.AddItems(await helper.GetItemsAsync(pathThroughLastSlash, context.CancellationToken).ConfigureAwait(false));
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (6)
26var (strippedDocument, position) = await GetDocumentWithoutInvokingTextAsync(document, SnippetCompletionItem.GetInvocationPosition(item), cancellationToken).ConfigureAwait(false); 35var snippetChange = await snippetProvider.GetSnippetChangeAsync(strippedDocument, position, cancellationToken).ConfigureAwait(false); 44var allTextChanges = await allChangesDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false); 49var lspSnippet = await RoslynLSPSnippetConverter.GenerateLSPSnippetAsync(allChangesDocument, snippetChange.FinalCaretPosition, snippetChange.Placeholders, change, item.Span.Start, cancellationToken).ConfigureAwait(false); 83var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 104return await Task.FromResult(CommonCompletionItem.GetDescription(item)).ConfigureAwait(false);
Completion\Providers\SymbolCompletionItem.cs (6)
138var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 150var linkedCompilation = await linkedDoc.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 186var symbols = await GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false); 187return await GetDescriptionForSymbolsAsync(item, document, symbols, options, cancellationToken).ConfigureAwait(false); 205return await CommonCompletionUtilities.CreateDescriptionAsync(services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false); 396return await CommonCompletionUtilities.CreateDescriptionAsync(document.Project.Solution.Services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeCodeRefactoringProvider.cs (1)
25span, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (6)
46var (anonymousObject, anonymousType) = await TryGetAnonymousObjectAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 81var (anonymousObject, anonymousType) = await TryGetAnonymousObjectAsync(document, span, cancellationToken).ConfigureAwait(false); 105document, className, isRecord, properties, cancellationToken).ConfigureAwait(false); 146updatedDocument, formattingOptions, cancellationToken).ConfigureAwait(false); 297localNameOpt: SyntaxGeneratorExtensions.OtherName, cancellationToken).ConfigureAwait(false); 300readonlyProperties, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
35var (anonymousNode, anonymousType) = await TryGetAnonymousObjectAsync(document, span, cancellationToken).ConfigureAwait(false);
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (4)
39var property = await GetPropertyAsync(context).ConfigureAwait(false); 78var containingProperty = await context.TryGetRelevantNodeAsync<TPropertyDeclarationNode>().ConfigureAwait(false); 99var fieldName = await GetFieldNameAsync(document, propertySymbol, cancellationToken).ConfigureAwait(false); 116var typeBlock = GetTypeBlock(await td.GetSyntaxAsync(cancellationToken).ConfigureAwait(false));
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
37var fromNodes = await context.GetRelevantNodesAsync<TFromExpression>().ConfigureAwait(false);
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
62var foreachStatement = await context.TryGetRelevantNodeAsync<TForEachStatement>().ConfigureAwait(false);
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
56var forStatement = await context.TryGetRelevantNodeAsync<TForStatementSyntax>().ConfigureAwait(false);
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (2)
42var ifStatement = await context.TryGetRelevantNodeAsync<TIfStatementSyntax>().ConfigureAwait(false); 258analyzer.Features, convertToSwitchExpression, cancellationToken).ConfigureAwait(false);
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
36var queryExpression = await FindNodeToRefactorAsync(context).ConfigureAwait(false);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (1)
69var forEachStatement = await context.TryGetRelevantNodeAsync<TForEachStatement>().ConfigureAwait(false);
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
37var numericLiteralNode = await context.TryGetRelevantNodeAsync<TNumericLiteralExpression>().ConfigureAwait(false);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (2)
35var possibleExpressions = await context.GetRelevantNodesAsync<TExpressionSyntax>().ConfigureAwait(false); 122document, isVerbatimStringLiteral, pieces, cancellationToken).ConfigureAwait(false);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (4)
125var (invocation, placeholderArgument) = await TryFindInvocationAsync().ConfigureAwait(false); 145var invocations = await document.GetRelevantNodesAsync<TInvocationExpressionSyntax>(span, cancellationToken).ConfigureAwait(false); 155var selectedArgument = await document.TryGetRelevantNodeAsync<TArgumentSyntax>(span, cancellationToken).ConfigureAwait(false); 164var argumentList = await document.TryGetRelevantNodeAsync<TArgumentListExpressionSyntax>(span, cancellationToken).ConfigureAwait(false);
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
34var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (20)
65document, textSpan, cancellationToken).ConfigureAwait(false); 224var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 238solution, result.Value.DocumentTextChanges, cancellationToken).ConfigureAwait(false); 241resultSolution, result.Value.RenamedToken, cancellationToken).ConfigureAwait(false); 246document, span, scope, isRecord, cancellationToken).ConfigureAwait(false); 266document, span, cancellationToken).ConfigureAwait(false); 295var parameterNamingRule = await document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 300document, scope, isRecord, structName, capturedTypeParameters, tupleType, parameterNamingRule, cancellationToken).ConfigureAwait(false); 304document, tupleExprOrTypeNode, tupleType, scope, cancellationToken).ConfigureAwait(false); 319document, documentToEditorMap, cancellationToken).ConfigureAwait(false); 341var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 388container, cancellationToken).ConfigureAwait(false); 426document, tupleExprOrTypeNode, cancellationToken).ConfigureAwait(false), 428document.Project, tupleType, cancellationToken).ConfigureAwait(false), 430document.Project, tupleType, cancellationToken).ConfigureAwait(false), 604updatedDocument, formattingOptions, cancellationToken).ConfigureAwait(false); 623containerToUpdate, cancellationToken).ConfigureAwait(false); 628containerToUpdate, cancellationToken).ConfigureAwait(false); 825localNameOpt: SyntaxGeneratorExtensions.OtherName, cancellationToken).ConfigureAwait(false); 828ImmutableArray<ISymbol>.CastUp(fields), cancellationToken).ConfigureAwait(false);
Copilot\CopilotChangeAnalysisUtilities.cs (1)
62document, normalizedEdits, cancellationToken).ConfigureAwait(false);
Copilot\Extensions.cs (3)
22await optionsService.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false) is false) 31var promptTitles = await copilotCodeAnalysisService.GetAvailablePromptTitlesAsync(sourceDocument, cancellationToken).ConfigureAwait(false); 32var copilotDiagnostics = await copilotCodeAnalysisService.GetCachedDocumentDiagnosticsAsync(sourceDocument, span, promptTitles, cancellationToken).ConfigureAwait(false);
Copilot\ICopilotChangeAnalysisService.cs (9)
60var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 75document, normalizedChanges, cancellationToken).ConfigureAwait(false); 91var oldText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 106newDocument, newSpans, cancellationToken).ConfigureAwait(false); 112newDocument, newSpans, cancellationToken).ConfigureAwait(false); 178newDocument, newSpans, diagnosticKind, cancellationToken).ConfigureAwait(false); 216newDocument, span, diagnosticKind, cancellationToken).ConfigureAwait(false); 240var codeFixCollections = await ComputeCodeFixCollectionsAsync().ConfigureAwait(false); 265.ConfigureAwait(false);
Copilot\IProposalAdjusterService.cs (6)
46var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 58document, normalizedChanges, cancellationToken).ConfigureAwait(false); 69var oldText = await originalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 79originalDocument, forkedDocument, normalizedChanges.First(), totalNewSpan, cancellationToken).ConfigureAwait(false); 101forkedDocument, totalNewSpan, cleanupDocument: false, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 103var allChanges = await withImportsDocument.GetTextChangesAsync(forkedDocument, cancellationToken).ConfigureAwait(false);
Debugging\AbstractBreakpointResolver.cs (5)
102var members = await FindMembersAsync(nameParts, cancellationToken).ConfigureAwait(false); 137return FindMembers(await GetAllTypesAsync(cancellationToken).ConfigureAwait(false), nameParts[0]); 142var types = await GetAllTypesAsync(cancellationToken).ConfigureAwait(false); 148var containers = await _solution.GetGlobalNamespacesAsync(cancellationToken).ConfigureAwait(false); 226var namespaces = await _solution.GetGlobalNamespacesAsync(cancellationToken).ConfigureAwait(false);
DesignerAttribute\DesignerAttributeDiscoveryService.cs (8)
71solutionServices, solutionKey, peReference, cancellationToken).ConfigureAwait(false)) 100return await asyncLazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 157var frozenSolution = await solution.WithFrozenPartialCompilationsAsync(cancellationToken).ConfigureAwait(false); 207project, specificDocument, lazyProjectVersion, cancellationToken).ConfigureAwait(false); 251var projectVersion = await lazyProjectVersion.GetValueAsync(cancellationToken).ConfigureAwait(false); 259var data = await ComputeDesignerAttributeDataAsync(project, documentId, filePath, hasDesignerCategoryType.Value, existingInfo.category).ConfigureAwait(false); 273hasDesignerCategoryType, project, documentId, existingCategory, cancellationToken).ConfigureAwait(false); 408await listener.Delay(DelayTimeSpan.NonFocus, cancellationToken).ConfigureAwait(false);
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (3)
93diagnosticIds: null, filter, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false); 97project, diagnosticIds: null, filter, cancellationToken).ConfigureAwait(false); 182_diagnosticAnalyzerService, project, _infoCache, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService.IncrementalMemberEditAnalyzer.cs (8)
70var changedMemberAndIdAndSpansAndDocument = await TryGetChangedMemberAsync(document, root, cancellationToken).ConfigureAwait(false); 75return await ComputeDocumentDiagnosticsCoreInProcessAsync(executor, cancellationToken).ConfigureAwait(false); 82var oldDocumentVersion = await GetDiagnosticVersionAsync(oldDocument.Project, cancellationToken).ConfigureAwait(false); 111return await ComputeDocumentDiagnosticsCoreInProcessAsync(executor, cancellationToken).ConfigureAwait(false); 115var oldMemberSpans = await GetOrCreateMemberSpansAsync(oldDocument, oldDocumentVersion, cancellationToken).ConfigureAwait(false); 184var diagnostics = await executor.ComputeDiagnosticsInProcessAsync(analyzer, cancellationToken).ConfigureAwait(false); 202var changedMember = await documentDifferenceService.GetChangedMemberAsync(lastDocument, document, cancellationToken).ConfigureAwait(false); 235var memberSpans = await CreateMemberSpansAsync(document, version, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (3)
53var checksum = await project.GetDiagnosticChecksumAsync(cancellationToken).ConfigureAwait(false); 73return await lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 87var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (8)
35var result = await ComputeDiagnosticsForAnalyzersAsync(analyzers).ConfigureAwait(false); 40result = await RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync(result).ConfigureAwait(false); 57var projectLoadedSuccessfully = await project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false); 101documentAnalysisScope: null, project, compilationWithAnalyzers, logPerformanceInfo: false, getTelemetryInfo: true, cancellationToken).ConfigureAwait(false); 110return await MergeProjectDiagnosticAnalyzerDiagnosticsAsync(ideAnalyzers, result).ConfigureAwait(false); 133? await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false) 135var syntaxDiagnostics = await DocumentAnalysisExecutor.ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(documentAnalyzer, textDocument, AnalysisKind.Syntax, compilation, tree, cancellationToken).ConfigureAwait(false); 136var semanticDiagnostics = await DocumentAnalysisExecutor.ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(documentAnalyzer, textDocument, AnalysisKind.Semantic, compilation, tree, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (3)
30var result = await AnalyzeAsync().ConfigureAwait(false); 37documentAnalysisScope, project, _analyzerInfoCache, cancellationToken).ConfigureAwait(false); 58projectAnalyzers, hostAnalyzers, skippedAnalyzersInfo, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_DeprioritizationCandidates.cs (3)
42project, analyzers, hostAnalyzerInfo, this.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false); 45boxedBool = new(await IsCandidateForDeprioritizationBasedOnRegisteredActionsAsync(analyzer).ConfigureAwait(false)); 75var telemetryInfo = await compilationWithAnalyzers.GetAnalyzerTelemetryInfoAsync(analyzer, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (6)
33var diagnostics = await executor.ComputeDiagnosticsInProcessAsync(analyzer, cancellationToken).ConfigureAwait(false); 78project, analyzers, cancellationToken).ConfigureAwait(false)); 88cancellationToken).ConfigureAwait(false); 285document.Project, allAnalyzers, hostAnalyzerInfo, this.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false); 311var version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false); 316var diagnosticsMap = await computeTask.ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_ProduceProjectDiagnostics.cs (3)
32var result = await GetOrComputeDiagnosticAnalysisResultsAsync(analyzers).ConfigureAwait(false); 75project, analyzers, hostAnalyzerInfo, this.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false); 78compilation, project, [.. analyzers.OfType<DocumentDiagnosticAnalyzer>()], cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (9)
26var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 48var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 68var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 89var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 104return await GetDeprioritizationCandidatesInProcessAsync(project, analyzers, cancellationToken).ConfigureAwait(false); 117var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 140cancellationToken).ConfigureAwait(false); 157var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 178incrementalAnalysis, logPerformanceInfo, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DocumentAnalysisExecutor.cs (15)
89: await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 91documentAnalyzer, textDocument, kind, _compilationWithAnalyzers?.HostCompilation, tree, cancellationToken).ConfigureAwait(false); 112var isEnabled = await textDocument.Project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false); 126AnalysisKind.Syntax => await GetSyntaxDiagnosticsInProcessAsync().ConfigureAwait(false), 127AnalysisKind.Semantic => await GetSemanticDiagnosticsInProcessAsync().ConfigureAwait(false), 132diagnostics = await RemapDiagnosticLocationsIfRequiredAsync(diagnostics).ConfigureAwait(false); 145var diags = await diagnostics.ToDiagnosticsAsync(textDocument.Project, cancellationToken).ConfigureAwait(false); 162analysisScope, analysisScope.TextDocument.Project, _compilationWithAnalyzers, _logPerformanceInfo, getTelemetryInfo: false, cancellationToken).ConfigureAwait(false); 182var analysisResult = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false); 207return await GetCompilerAnalyzerDiagnosticsInProcessAsync(AnalysisScope.Span).ConfigureAwait(false); 215var syntaxDiagnostics = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false); 242var adjustedSpan = await GetAdjustedSpanForCompilerAnalyzerAsync(document).ConfigureAwait(false); 243return await GetCompilerAnalyzerDiagnosticsInProcessAsync(adjustedSpan).ConfigureAwait(false); 251var semanticDiagnostics = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false); 363var diagnostic = await diagnosticData.ToDiagnosticAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (2)
93AnalysisKind.Syntax => await analyzer.AnalyzeSyntaxAsync(document, tree, cancellationToken).ConfigureAwait(false), 94AnalysisKind.Semantic => await analyzer.AnalyzeSemanticsAsync(document, tree, cancellationToken).ConfigureAwait(false),
DocumentHighlighting\AbstractDocumentHighlightsService.cs (9)
41var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 60document, position, documentsToSearch, options, cancellationToken).ConfigureAwait(false); 76semanticModel, position, solution.Services, cancellationToken).ConfigureAwait(false); 82symbol, document, documentsToSearch, cancellationToken).ConfigureAwait(false); 131symbol, options, cancellationToken).ConfigureAwait(false); 186additionalReferences.AddRange(await GetAdditionalReferencesAsync(currentDocument, symbol, cancellationToken).ConfigureAwait(false)); 192documentsToSearch, cancellationToken).ConfigureAwait(false); 291var span = await GetLocationSpanAsync(solution, location, cancellationToken).ConfigureAwait(false); 314var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (6)
589var capabilities = new EditAndContinueCapabilitiesGrantor(await lazyCapabilities.GetValueAsync(cancellationToken).ConfigureAwait(false)); 590var oldActiveStatementMap = await lazyOldActiveStatementMap.GetValueAsync(cancellationToken).ConfigureAwait(false); 660cancellationToken).ConfigureAwait(false); 757oldRoot = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 763newRoot = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 783var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
EditAndContinue\ActiveStatementsMap.cs (2)
175var oldRoot = await oldTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 176var oldText = await oldTree.GetTextAsync(cancellationToken).ConfigureAwait(false);
EditAndContinue\CommittedSolution.cs (4)
246var sourceTextVersion = (committedDocument == null) ? await document.GetTextVersionAsync(cancellationToken).ConfigureAwait(false) : default; 373return await Task.Run(() => TryGetPdbMatchingSourceTextFromDisk(log, filePath, sourceText.Encoding, requiredChecksum, checksumAlgorithm), cancellationToken).ConfigureAwait(false); 429return await Task.WhenAll(documentTasks).ConfigureAwait(false); 432var documentIdArrays = await Task.WhenAll(projectTasks).ConfigureAwait(false);
EditAndContinue\DebuggingSession.cs (7)
480var (mvid, _) = await GetProjectModuleIdAsync(project, cancellationToken).ConfigureAwait(false); 486var (oldDocument, oldDocumentState) = await LastCommittedSolution.GetDocumentAndStateAsync(document, cancellationToken).ConfigureAwait(false); 699var baseActiveStatements = await EditSession.BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 758var (oldDocument, _) = await LastCommittedSolution.GetDocumentAndStateAsync(newDocument, cancellationToken).ConfigureAwait(false); 777cancellationToken).ConfigureAwait(false); 867var baseActiveStatements = await EditSession.BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 892var (oldUnmappedDocument, _) = await LastCommittedSolution.GetDocumentAndStateAsync(newUnmappedDocument, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (5)
47var allResults = await Task.WhenAll(tasks).ConfigureAwait(false); 75var unmappedActiveStatementSpans = await GetLatestUnmappedActiveStatementSpansAsync(oldDocument, newDocument, activeStatementSpanProvider, cancellationToken).ConfigureAwait(false); 94return await lazyResults.GetValueAsync(cancellationToken).ConfigureAwait(false); 142var baseActiveStatements = await _baseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 215cancellationToken).ConfigureAwait(false);
EditAndContinue\EditAndContinueService.cs (1)
155initialDocumentStates = await CommittedSolution.GetMatchingDocumentsAsync(Log, documentsByProject, _compilationOutputsProvider, sourceTextProvider, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditSession.cs (11)
134var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false); 621var (oldDocument, oldDocumentState) = await DebuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(newDocument, cancellationToken, reloadOutOfSyncDocument: true).ConfigureAwait(false); 1031var (mvid, mvidReadError) = await DebuggingSession.GetProjectModuleIdAsync(newProject, cancellationToken).ConfigureAwait(false); 1097await AnalyzeProjectDifferencesAsync(solution, projectDifferences, solutionActiveStatementSpanProvider, projectDiagnostics, cancellationToken).ConfigureAwait(false); 1154var moduleBlockingDiagnosticId = await ReportModuleDiagnosticsAsync(mvid, oldProject, newProject, changedDocumentAnalyses, projectDiagnostics, cancellationToken).ConfigureAwait(false); 1185var oldCompilation = await oldProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 1196var newCompilation = await newProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 1223var oldActiveStatementsMap = await BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 1234var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false); 1294var unsupportedChangesDiagnostic = await GetUnsupportedChangesDiagnosticAsync(emitResult, cancellationToken).ConfigureAwait(false); 1391Telemetry.LogRuntimeCapabilities(await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false));
EditAndContinue\Remote\RemoteDebuggingSessionProxy.cs (7)
25var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 40var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 63var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 87var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 102var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 116var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 138var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false);
EditAndContinue\Remote\RemoteEditAndContinueServiceProxy.cs (3)
129var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 162var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 180var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false);
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (1)
77document, position, cancellationToken).ConfigureAwait(false);
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (1)
75context.Document, position, context.CancellationToken).ConfigureAwait(false);
EncapsulateField\AbstractEncapsulateFieldService.cs (19)
47var fields = await GetFieldsAsync(document, span, cancellationToken).ConfigureAwait(false); 60var fields = await GetFieldsAsync(document, span, cancellationToken).ConfigureAwait(false); 119var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 133solution, result.Value, cancellationToken).ConfigureAwait(false); 138document, fields, updateReferences, cancellationToken).ConfigureAwait(false); 157var nextSolution = await EncapsulateFieldAsync(document, currentField, updateReferences, cancellationToken).ConfigureAwait(false); 194updateReferences, solution, document, field, finalFieldName, generatedPropertyName, cancellationToken).ConfigureAwait(false); 198var rewrittenFieldDeclaration = await RewriteFieldNameAndAccessibilityAsync(finalFieldName, markFieldPrivate, document, declarationAnnotation, cancellationToken).ConfigureAwait(false); 202document = await Formatter.FormatAsync(document.WithSyntaxRoot(rewrittenFieldDeclaration), Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false); 222document, document.Project.Solution, field, generatedProperty, cancellationToken).ConfigureAwait(false); 224documentWithProperty = await Formatter.FormatAsync(documentWithProperty, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false); 225documentWithProperty = await Simplifier.ReduceAsync(documentWithProperty, simplifierOptions, cancellationToken).ConfigureAwait(false); 250cancellationToken).ConfigureAwait(false); 253var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false); 271cancellationToken).ConfigureAwait(false); 284solution, field, s_symbolRenameOptions, cancellationToken).ConfigureAwait(false); 290.ResolveConflictsAsync(field, finalName, cancellationToken).ConfigureAwait(false); 334context, destination, property, cancellationToken).ConfigureAwait(false);
EncapsulateField\EncapsulateFieldRefactoringProvider.cs (1)
23var actions = await service.GetEncapsulateFieldCodeActionsAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
Extensions\ExtensionFolder.cs (2)
66var (analyzerAssemblyLoader, extensionException) = await _lazyAssemblyLoader.GetValueAsync(cancellationToken).ConfigureAwait(false); 164var handlers = await lazyHandlers.GetValueAsync(cancellationToken).ConfigureAwait(false);
Extensions\ExtensionMessageHandlerService.cs (2)
207var handlers = await lazyHandlers.GetValueAsync(cancellationToken).ConfigureAwait(false); 239var result = await handler.ExecuteAsync(message, executeArgument, cancellationToken).ConfigureAwait(false);
Extensions\ExtensionMessageHandlerService_RemoteOrLocal.cs (1)
51var client = await RemoteHostClient.TryGetClientAsync(_solutionServices, cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\Api\PythiaCompletionProviderBase.cs (1)
62var description = await GetDescriptionAsync(item, document, displayOptions, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\API\UnitTestingDocumentSpan.cs (2)
33var location = await this.DocumentSpan.GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false); 35await location.NavigateToAsync(new NavigationOptions(options.PreferProvisionalTab, options.ActivateTab), cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\API\UnitTestingSearchHelpers.cs (6)
31var client = await RemoteHostClient.TryGetClientAsync(project.Solution.Services, cancellationToken).ConfigureAwait(false); 42return await location.Value.Value.TryRehydrateAsync(project.Solution, cancellationToken).ConfigureAwait(false); 45return await GetSourceLocationInProcessAsync(project, query, cancellationToken).ConfigureAwait(false); 54var client = await RemoteHostClient.TryGetClientAsync(project.Solution.Services, cancellationToken).ConfigureAwait(false); 67result.AddIfNotNull(await location.TryRehydrateAsync(project.Solution, cancellationToken).ConfigureAwait(false)); 72return await GetSourceLocationsInProcessAsync(project, query, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\IRemoteUnitTestingSearchService.cs (1)
31var documentSpan = await DocumentIdSpan.TryRehydrateAsync(solution, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingIdleProcessor.cs (2)
107if (!await expeditableDelaySource.Delay(delayTimeSpan, CancellationToken).ConfigureAwait(false)) 136await WaitForIdleAsync(Listener).ConfigureAwait(false);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.AbstractUnitTestingPriorityProcessor.cs (3)
85await WaitForIdleAsync(Listener).ConfigureAwait(false); 94await WaitForIdleAsync(Listener).ConfigureAwait(false); 109if (await WaitForIdleAsync(Listener).ConfigureAwait(false))
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (2)
337var isLowPriority = priorityService != null && sourceDocument != null && await priorityService.IsLowPriorityAsync(sourceDocument, _shutdownToken).ConfigureAwait(false); 401GetRequiredDocument(project, documentId, document), _shutdownToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (3)
177}, cancellationToken).ConfigureAwait(false); 185var root = await GetOrDefaultAsync(document, (d, c) => d.GetSyntaxRootAsync(c), cancellationToken).ConfigureAwait(false); 217return await funcAsync(value, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (6)
84if (await TryEnqueueFromHintAsync(data).ConfigureAwait(continueOnCapturedContext: false)) 106!changedMember.TryResolve(await document.GetSyntaxRootAsync(CancellationToken).ConfigureAwait(false), out SyntaxNode? declarationNode)) 117return await TryEnqueueFromMemberAsync(document, symbol).ConfigureAwait(false) || 118await TryEnqueueFromTypeAsync(document, symbol).ConfigureAwait(false); 168return await TryEnqueueFromTypeAsync(document, typeSymbol).ConfigureAwait(false); 389var isLowPriority = priorityService != null && await priorityService.IsLowPriorityAsync(GetRequiredDocument(project, documentId, document), CancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\UnitTestingFeaturesReferencesService.cs (1)
42cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\UnitTestingStackTraceServiceAccessor.cs (4)
38var definition = await _stackTraceExplorerService.TryFindDefinitionAsync(workspace.CurrentSolution, parsedFrame.UnderlyingObject, StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false); 46var result = await StackTraceAnalyzer.AnalyzeAsync(input, cancellationToken).ConfigureAwait(false); 52var location = await definitionItem.UnderlyingObject.GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false); 54await location.NavigateToAsync(new NavigationOptions(showInPreviewTab, activateTab), cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentNavigationServiceWrapper.cs (4)
35workspace, documentId, position, virtualSpace, allowInvalidPosition: false, cancellationToken).ConfigureAwait(false); 37await location.NavigateToAsync(NavigationOptions.Default, cancellationToken).ConfigureAwait(false); 47workspace, documentId, position, virtualSpace, allowInvalidPosition: false, cancellationToken).ConfigureAwait(false); 49await location.NavigateToAsync(NavigationOptions.Default, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptNavigateToSearchService.cs (2)
43var results = await _searchService.SearchDocumentAsync(document, searchPattern, kinds, cancellationToken).ConfigureAwait(false); 80project, priorityDocuments.WhereAsArray(d => d.Project == project), searchPattern, kinds, cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\VSTypeScriptTaskListService.cs (1)
32cancellationToken).ConfigureAwait(false);
ExtractClass\AbstractExtractClassRefactoringProvider.cs (4)
37var (action, hasBaseType) = await TryGetMemberActionAsync(context, optionsService).ConfigureAwait(false); 43action = await TryGetClassActionAsync(context, optionsService).ConfigureAwait(false); 54var selectedMemberNodes = await GetSelectedNodesAsync(context).ConfigureAwait(false); 113var selectedClassNode = await GetSelectedClassDeclarationAsync(context).ConfigureAwait(false);
ExtractClass\ExtractClassWithDialogCodeAction.cs (7)
76cancellationToken).ConfigureAwait(false); 103cancellationToken).ConfigureAwait(false) 112cancellationToken).ConfigureAwait(false); 120cancellationToken).ConfigureAwait(false); 125var newTypeAfterEdits = await GetNewTypeSymbolAsync(documentWithTypeDeclaration, typeAnnotation, cancellationToken).ConfigureAwait(false); 133cancellationToken).ConfigureAwait(false); 210return await MembersPuller.PullMembersUpAsync(updatedOriginalDocument, pullMemberUpOptions, cancellationToken).ConfigureAwait(false);
ExtractInterface\AbstractExtractInterfaceService.cs (18)
50var typeAnalysisResult = await AnalyzeTypeAtPositionAsync(document, span.Start, TypeDiscoveryRule.TypeNameOnly, cancellationToken).ConfigureAwait(false); 67cancellationToken).ConfigureAwait(false); 75return await ExtractInterfaceFromAnalyzedTypeAsync(typeAnalysisResult, cancellationToken).ConfigureAwait(false); 84var typeNode = await GetTypeDeclarationAsync(document, position, typeDiscoveryRule, cancellationToken).ConfigureAwait(false); 130return await ExtractInterfaceFromAnalyzedTypeAsync(refactoringResult, extractInterfaceOptions, cancellationToken).ConfigureAwait(false); 159cancellationToken).ConfigureAwait(false); 167cancellationToken).ConfigureAwait(false); 182cancellationToken).ConfigureAwait(false); 192cancellationToken).ConfigureAwait(false); 202cancellationToken).ConfigureAwait(false); 207cancellationToken).ConfigureAwait(false); 224cancellationToken).ConfigureAwait(false); 232cancellationToken).ConfigureAwait(false); 241extractInterfaceOptions.IncludedMembers, symbolMapping.SymbolToDeclarationAnnotationMap, cancellationToken).ConfigureAwait(false); 246cancellationToken).ConfigureAwait(false); 293cancellationToken).ConfigureAwait(false); 299cancellationToken).ConfigureAwait(false); 359cancellationToken).ConfigureAwait(false);
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
42_typeAnalysisResult, extractInterfaceOptions, cancellationToken).ConfigureAwait(false);
ExtractInterface\ExtractInterfaceCodeRefactoringProvider.cs (1)
32var actions = await service.GetExtractInterfaceCodeActionAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
ExtractMethod\AbstractExtractMethodService.cs (2)
36var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 40var (selectionResult, status) = await validator.GetValidSelectionAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\MethodExtractor.CodeGenerator.cs (5)
148var callSiteDocument = await InsertMethodAndUpdateCallSiteAsync(semanticDocument, newMethodDefinition, cancellationToken).ConfigureAwait(false); 159var finalDocument = await UpdateMethodAfterGenerationAsync(callSiteDocument, newMethodDefinition, cancellationToken).ConfigureAwait(false); 161return await PerformFinalTriviaFixupAsync(finalDocument, cancellationToken).ConfigureAwait(false); 175GetInsertionPoint(document), outermostCallSiteContainer, cancellationToken).ConfigureAwait(false)); 301(TStatementSyntax)(SyntaxNode)await GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(cancellationToken).ConfigureAwait(false));
ExtractMethod\MethodExtractor.cs (7)
73OriginalSelectionResult, analyzeResult, insertionPointNode, cancellationToken).ConfigureAwait(false); 75var triviaResult = await PreserveTriviaAsync(analyzedDocument.Root, cancellationToken).ConfigureAwait(false); 81var generatedCode = await generator.GenerateAsync(cancellationToken).ConfigureAwait(false); 83var afterTriviaRestored = await triviaResult.ApplyAsync(generatedCode, cancellationToken).ConfigureAwait(false); 99documentWithoutFinalFormatting, invocationNameToken, methodDefinition, cancellationToken).ConfigureAwait(false); 103documentWithoutFinalFormatting, invocationNameToken, cancellationToken).ConfigureAwait(false); 151var simplifiedDocument = await Simplifier.ReduceAsync(annotatedDocument, Simplifier.Annotation, this.Options.CodeCleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false);
ExtractMethod\SelectionValidator.cs (1)
56var selectionResult = await CreateSelectionResultAsync(selectionInfo, cancellationToken).ConfigureAwait(false);
FindUsages\AbstractFindUsagesService.ProgressAdapter.cs (2)
41documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false); 130cancellationToken).ConfigureAwait(false);
FindUsages\AbstractFindUsagesService_FindImplementations.cs (10)
29document, position, cancellationToken).ConfigureAwait(false); 45var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 77var implementations = await FindSourceImplementationsAsync(solution, symbol, cancellationToken).ConfigureAwait(false); 102symbol, solution, cancellationToken).ConfigureAwait(false); 115solution, linkedSymbol, cancellationToken).ConfigureAwait(false); 144var implementations = await FindSourceAndMetadataImplementationsAsync(solution, symbol, cancellationToken).ConfigureAwait(false); 175symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false); 191implementation, solution, cancellationToken: cancellationToken).ConfigureAwait(false); 201namedType, solution, transitive: true, cancellationToken: cancellationToken).ConfigureAwait(false)); 206symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
FindUsages\AbstractFindUsagesService_FindReferences.cs (6)
31document.Project.Solution, definitionTrackingContext.GetDefinitions(), cancellationToken).ConfigureAwait(false); 54context, document, position, classificationOptions, cancellationToken).ConfigureAwait(false); 76var thirdParty = await provider.GetThirdPartyDefinitionItemAsync(solution, definition, cancellationToken).ConfigureAwait(false); 90document, position, cancellationToken).ConfigureAwait(false); 133var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 187cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.cs (2)
152var location = await GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false); 154await location.NavigateToAsync(options, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (3)
51symbol, project, cancellationToken).ConfigureAwait(false); 57return await SourceSpans[0].GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false); 72var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (1)
84var documentSpan = await ss.TryRehydrateAsync(solution, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItemFactory.cs (2)
252return (ClassifiedSpansAndHighlightSpan?)await ClassifiedSpansAndHighlightSpanFactory.ClassifyAsync(documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false); 311documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
FindUsages\FindUsagesHelpers.cs (2)
40var symbol = await SymbolFinder.FindSymbolAtPositionAsync(document, position, cancellationToken).ConfigureAwait(false); 61var mapping = await mappingService.MapSymbolAsync(document, symbol, cancellationToken).ConfigureAwait(false);
FindUsages\IRemoteFindUsagesService.cs (1)
147yield return await reference.RehydrateAsync(_solution, GetDefinition(reference.DefinitionId), cancellationToken).ConfigureAwait(false);
Formatting\AbstractNewDocumentFormattingService.cs (2)
50document = await provider.FormatNewDocumentAsync(document, hintDocument, options, cancellationToken).ConfigureAwait(false); 56document = await CodeAction.CleanupSyntaxAsync(document, options, cancellationToken).ConfigureAwait(false);
FullyQualify\AbstractFullyQualifyCodeFixProvider.cs (1)
27var optFixData = await service.GetFixDataAsync(document, context.Span, cancellationToken).ConfigureAwait(false);
FullyQualify\AbstractFullyQualifyService.cs (9)
42var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 56return await GetFixDataInCurrentProcessAsync(document, span, cancellationToken).ConfigureAwait(false); 78var matchingTypes = await FindAsync(name, ignoreCase, SymbolFilter.Type).ConfigureAwait(false); 79var matchingAttributeTypes = inAttributeContext ? await FindAsync(name + nameof(Attribute), ignoreCase, SymbolFilter.Type).ConfigureAwait(false) : []; 80var matchingNamespaces = inAttributeContext ? [] : await FindAsync(name, ignoreCase, SymbolFilter.Namespace).ConfigureAwait(false); 116project, query, filter, cancellationToken).ConfigureAwait(false); 212var textChanges = await ProcessNodeAsync(document, simpleName, containerName, symbolResult.OriginalSymbol, cancellationToken).ConfigureAwait(false); 219var newRoot = await ReplaceNodeAsync(simpleName, containerName, originalSymbol.IsType, cancellationToken).ConfigureAwait(false); 224return await cleanedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
153return await codeGenService.AddMembersAsync(solutionContext, containingType, operators, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (2)
98cancellationToken: cancellationToken).ConfigureAwait(false); 100return await AddNavigationAnnotationAsync(result, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (9)
103priorDocument, action, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 113priorDocument.Project.Solution, codeAction, progressTracker, cancellationToken).ConfigureAwait(false); 141var operations = await dialogAction.GetOperationsAsync(originalSolution, options, progressTracker, cancellationToken).ConfigureAwait(false); 146return await action.GetOperationsAsync(originalSolution, progressTracker, cancellationToken).ConfigureAwait(false); 168document, textSpan, addNullChecks: false, desiredAccessibility, cancellationToken).ConfigureAwait(false); 177var nonSelectionAction = await HandleNonSelectionAsync(document, textSpan, desiredAccessibility, cancellationToken).ConfigureAwait(false); 185document, textSpan, forRefactoring: true, cancellationToken).ConfigureAwait(false); 270var info = await GetSelectedMemberInfoAsync(document, textSpan, allowPartialSelection: true, cancellationToken).ConfigureAwait(false); 273var state = await State.TryGenerateAsync(this, document, textSpan, info.ContainingType, desiredAccessibility, info.SelectedMembers, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.FieldDelegatingCodeAction.cs (2)
80cancellationToken).ConfigureAwait(false); 82return await AddNavigationAnnotationAsync(result, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (4)
73result.Members, cancellationToken).ConfigureAwait(false); 87return await codeAction.GetOperationsAsync(solution, progressTracker, cancellationToken).ConfigureAwait(false); 91var constructorSyntax = await constructorReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 103return await codeAction.GetOperationsAsync(solution, progressTracker, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (2)
46if (!await state.TryInitializeAsync(service, document, textSpan, containingType, desiredAccessibility, selectedMembers, cancellationToken).ConfigureAwait(false)) 75var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (5)
34cancellationToken).ConfigureAwait(false); 42var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 54var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 64var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 121var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (9)
53methods.Add(await CreateEqualsMethodAsync(cancellationToken).ConfigureAwait(false)); 56var constructedTypeToImplement = await GetConstructedTypeToImplementAsync(cancellationToken).ConfigureAwait(false); 60methods.Add(await CreateIEquatableEqualsMethodAsync(constructedTypeToImplement, cancellationToken).ConfigureAwait(false)); 65methods.Add(await CreateGetHashCodeMethodAsync(cancellationToken).ConfigureAwait(false)); 87_typeDeclaration, newTypeDeclaration, cancellationToken).ConfigureAwait(false); 91newDocument, formattingOptions, cancellationToken).ConfigureAwait(false); 121newDocument = await ImportAdder.AddImportsFromSymbolAnnotationAsync(newDocument, addImportOptions, cancellationToken).ConfigureAwait(false); 127var compilation = await _document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 205_document, _containingType, _selectedMembers, constructedEquatableType, cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (5)
61var actions = await GenerateEqualsAndGetHashCodeFromMembersAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 117hasEquals, hasGetHashCode, withDialog: true, globalOptions, cancellationToken).ConfigureAwait(false); 175var info = await GetSelectedMemberInfoAsync(document, textSpan, allowPartialSelection: false, cancellationToken).ConfigureAwait(false); 191hasEquals, hasGetHashCode, withDialog: false, globalOptions: null, cancellationToken).ConfigureAwait(false); 234var codeActions = await Task.WhenAll(tasks).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
83return await action.GetOperationsAsync(solution, progressTracker, cancellationToken).ConfigureAwait(false);
GenerateFromMembers\GenerateFromMembersHelpers.cs (1)
29tree, textSpan, allowPartialSelection, cancellationToken).ConfigureAwait(false);
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (3)
57var syntaxTree = await _document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 70var members = await Task.WhenAll(memberTasks).ConfigureAwait(false); 80cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.CodeAction.cs (4)
67var semanticDocument = await SemanticDocument.CreateAsync(_document, cancellationToken).ConfigureAwait(false); 71return await editor.GetOperationsAsync().ConfigureAwait(false); 178var semanticDocument = await SemanticDocument.CreateAsync(_document, cancellationToken).ConfigureAwait(false); 180operations = await editor.GetOperationsAsync().ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.cs (2)
73var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 274var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (22)
92var namedType = await GenerateNamedTypeAsync().ConfigureAwait(false); 109isDialog: false).ConfigureAwait(false); 113return await GetGenerateIntoContainingNamespaceOperationsAsync(namedType).ConfigureAwait(false); 118return await GetGenerateIntoTypeOperationsAsync(namedType).ConfigureAwait(false); 123var namedType = await GenerateNamedTypeAsync(_generateTypeOptionsResult).ConfigureAwait(false); 149isDialog: true).ConfigureAwait(false); 157isDialog: true).ConfigureAwait(false); 279var newSemanticModel = await newDocument.GetSemanticModelAsync(_cancellationToken).ConfigureAwait(false); 299_cancellationToken).ConfigureAwait(false); 317codeGenResult = await formattingService.FormatNewDocumentAsync(codeGenResult, _semanticDocument.Document, cleanupOptions, _cancellationToken).ConfigureAwait(false); 323var newRoot = await codeGenResult.GetSyntaxRootAsync(_cancellationToken).ConfigureAwait(false); 333_cancellationToken).ConfigureAwait(false); 363includeUsingsOrImports, cancellationToken).ConfigureAwait(false); 397_cancellationToken).ConfigureAwait(false); 408var root = await generateTypeOptionsResult.ExistingDocument.GetSyntaxRootAsync(_cancellationToken).ConfigureAwait(false); 424_cancellationToken).ConfigureAwait(false); 433_cancellationToken).ConfigureAwait(false); 443_cancellationToken).ConfigureAwait(false); 444var newRoot = await codeGenResult.GetSyntaxRootAsync(_cancellationToken).ConfigureAwait(false); 456_cancellationToken).ConfigureAwait(false); 557.ConfigureAwait(false); 608var fieldNamingRule = await _semanticDocument.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, _cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (3)
38members: await DetermineMembersAsync().ConfigureAwait(false)); 65members: await DetermineMembersAsync(options).ConfigureAwait(false)); 208await FindExistingOrCreateNewMemberAsync(parameterName, parameterType, parameterToExistingFieldMap, parameterToNewFieldMap).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.State.cs (1)
295var symbol = await SymbolFinder.FindSourceDefinitionAsync(TypeToGenerateInOpt, document.Project.Solution, cancellationToken).ConfigureAwait(false);
GoToBase\AbstractGoToBaseService.cs (3)
34document, position, cancellationToken).ConfigureAwait(false); 47var nextConstructor = await FindNextConstructorInChainAsync(solution, constructor, cancellationToken).ConfigureAwait(false); 65baseSymbol, solution, cancellationToken).ConfigureAwait(false);
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (4)
28var semanticInfo = await SymbolFinder.GetSemanticInfoAtPositionAsync(semanticModel, position, services, cancellationToken).ConfigureAwait(false); 51var mapping = await mappingService.MapSymbolAsync(document, symbol, cancellationToken).ConfigureAwait(false); 60var explicitlyDeclaredSymbol = await FindRelatedExplicitlyDeclaredSymbolAsync(project, symbol, cancellationToken).ConfigureAwait(false); 70semanticModel, position, syntaxFacts.IsBindableToken, cancellationToken, findInsideTrivia: true).ConfigureAwait(false);
GoToDefinition\GoToDefinitionFeatureHelpers.cs (2)
46var definition = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false); 90var thirdPartyItem = await provider.GetThirdPartyDefinitionItemAsync(solution, definitionItem, cancellationToken).ConfigureAwait(false);
ImplementInterface\ImplementInterfaceCodeRefactoringProvider.cs (1)
40document, typeNode, cancellationToken).ConfigureAwait(false);
InheritanceMargin\AbstractInheritanceMarginService.cs (2)
38var remoteClient = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 65cancellationToken).ConfigureAwait(false);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (11)
107var mappingResult = await mappingService.MapSymbolAsync(document, member, cancellationToken).ConfigureAwait(false); 142result.AddRange(await GetGlobalImportsItemsAsync(document, spanToSearch, frozenPartialSemantics, cancellationToken).ConfigureAwait(false)); 306cancellationToken).ConfigureAwait(false); 351var allImplementingSymbols = await GetImplementingSymbolsForTypeMemberAsync(solution, memberSymbol, cancellationToken).ConfigureAwait(false); 372var allOverridingSymbols = await SymbolFinder.FindOverridesArrayAsync(memberSymbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false); 562var symbolInSource = await SymbolFinder.FindSourceDefinitionAsync(targetSymbol, solution, cancellationToken).ConfigureAwait(false); 637cancellationToken: cancellationToken).ConfigureAwait(false); 647builder.AddRange(await SymbolFinder.FindOverridesArrayAsync(implementationSymbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false)); 689cancellationToken: cancellationToken).ConfigureAwait(false); 694cancellationToken: cancellationToken).ConfigureAwait(false); 703cancellationToken: cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (7)
211document = await AddStringCheckAsync(document, parameter, functionDeclaration, (IMethodSymbol)parameter.ContainingSymbol, blockStatement, NullOrEmptySuffix, lazySimplifierOptions, cancellationToken).ConfigureAwait(false); 217(IMethodSymbol)parameter.ContainingSymbol, blockStatement, lazySimplifierOptions, cancellationToken).ConfigureAwait(false); 552document, parameter, blockStatement, options, cancellationToken).ConfigureAwait(false); 561cancellationToken).ConfigureAwait(false); 577cancellationToken).ConfigureAwait(false); 593cancellationToken).ConfigureAwait(false); 918var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (11)
83var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false); 89document, parameter, blockStatement, rules, parameterNameParts.BaseNameParts, cancellationToken).ConfigureAwait(false); 99method, blockStatement, rules, cancellationToken).ConfigureAwait(false); 414cancellationToken).ConfigureAwait(false); 431document, constructorDeclaration, blockStatement, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false); 440documentWithMemberAdded, currentParameter, currentFieldOrProperty, cancellationToken).ConfigureAwait(false); 448var compilation = await finalSolution.GetRequiredProject(documentWithMemberAdded.Project.Id).GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 453var propertySyntax = await declarationService.GetDeclarations(finalFieldOrProperty)[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 459var otherRoot = await propertySyntax.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 526var compilation = await documentWithMemberAdded.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 621var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (3)
62var selectedParameter = await context.TryGetRelevantNodeAsync<TParameterSyntax>().ConfigureAwait(false); 101document, selectedParameter, parameter, functionDeclaration, methodSymbol, blockStatementOpt, cancellationToken).ConfigureAwait(false); 122listOfPotentiallyValidParametersNodes.ToImmutable(), selectedParameter.Span, cancellationToken).ConfigureAwait(false);
InlineHints\AbstractInlineHintsService.cs (2)
25: await inlineParameterService.GetInlineHintsAsync(document, textSpan, options.ParameterOptions, options.DisplayOptions, displayAllOverride, cancellationToken).ConfigureAwait(false); 29: await inlineTypeService.GetInlineHintsAsync(document, textSpan, options.TypeOptions, options.DisplayOptions, displayAllOverride, cancellationToken).ConfigureAwait(false);
InlineHints\InlineHintHelpers.cs (1)
34semanticModel, position, [symbol], options, cancellationToken).ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (8)
87var calleeInvocationNode = await context.TryGetRelevantNodeAsync<TInvocationSyntax>().ConfigureAwait(false); 127if (await calleeMethodDeclarationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false) is not TMethodDeclarationSyntax calleeMethodNode) 222var callerDeclarationNode = await callerReferences[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 325invocationOperation, cancellationToken).ConfigureAwait(false); 334cancellationToken).ConfigureAwait(false); 343var calleeDocumentEditor = await solutionEditor.GetDocumentEditorAsync(calleeDocumentId, cancellationToken).ConfigureAwait(false); 356methodParametersInfo, inlineContext, cancellationToken).ConfigureAwait(false); 358var callerDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (2)
239cancellationToken).ConfigureAwait(false); 297.ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (3)
319cancellationToken).ConfigureAwait(false); 364cancellationToken).ConfigureAwait(false); 441.FindReferencesAsync(parameterSymbol, document.Project.Solution, ImmutableHashSet<Document>.Empty.Add(document), cancellationToken).ConfigureAwait(false);
InlineTemporary\AbstractInlineTemporaryCodeRefactoringProvider.cs (1)
40local, document.Project.Solution, options, cancellationToken).ConfigureAwait(false);
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (7)
54var expression = await document.TryGetRelevantNodeAsync<TExpressionSyntax>(textSpan, cancellationToken).ConfigureAwait(false); 95var actions = await GetActionsAsync(document, expression, methodSymbol, containingMethod, cancellationToken).ConfigureAwait(false); 149document, expression, cancellationToken).ConfigureAwait(false); 156var methodCallSites = await FindCallSitesAsync(document, methodSymbol, cancellationToken).ConfigureAwait(false); 254var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 261var newRoot = await rewriter.RewriteDocumentAsync(compilation, document, invocations, cancellationToken).ConfigureAwait(false); 266cancellationToken).ConfigureAwait(false);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (15)
50compilation, document, invocations, insertionIndex, cancellationToken).ConfigureAwait(false); 55compilation, document, insertionIndex, invocations, cancellationToken).ConfigureAwait(false); 225var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false); 226var expressionParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false); 261? await ExtractMethodAsync(validParameters, newMethodIdentifier, _generator, cancellationToken).ConfigureAwait(false) 262: await GenerateNewMethodOverloadAsync(insertionIndex, _generator, cancellationToken).ConfigureAwait(false); 266var parameterType = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false); 392var typeSymbol = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false); 394validParameters, newMethodIdentifier, typeSymbol, isTrampoline: true, cancellationToken).ConfigureAwait(false); 437validParameters: null, newMethodIdentifier: null, typeSymbol: null, isTrampoline: false, cancellationToken).ConfigureAwait(false); 488var expressionToParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false); 489var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false); 527var parameterType = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false); 632var matches = await FindMatchesAsync(cancellationToken).ConfigureAwait(false); 633var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (4)
58(TStatementSyntax?)await document.TryGetRelevantNodeAsync<TLocalDeclarationSyntax>(span, cancellationToken).ConfigureAwait(false) ?? 59await document.TryGetRelevantNodeAsync<TExpressionStatementSyntax>(span, cancellationToken).ConfigureAwait(false); 200document, declarationStatement, statementsToSurround, usingStatement, surroundingStatements, declarationStatementIndex, cancellationToken).ConfigureAwait(false); 235document, expressionStatement, statementsToSurround, usingStatement, surroundingStatements, statementIndex, cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (5)
34var expressionStatement = await GetExpressionStatementAsync(context).ConfigureAwait(false); 72var expressionStatement = await context.TryGetRelevantNodeAsync<TExpressionStatementSyntax>().ConfigureAwait(false); 90var localStatement = await CreateLocalDeclarationAsync().ConfigureAwait(false); 113document, (INamedTypeSymbol)type, expression, cancellationToken).ConfigureAwait(false); 117var nameToken = await GenerateUniqueNameAsync(document, expression, cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceVariableService.cs (6)
70var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 72var state = await State.GenerateAsync((TService)this, semanticDocument, options, textSpan, cancellationToken).ConfigureAwait(false); 427var newSemanticDocument = await SemanticDocument.CreateAsync(newDocument, cancellationToken).ConfigureAwait(false); 451.ConfigureAwait(false); 454.ConfigureAwait(false); 457newSemanticDocument = await SemanticDocument.CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceVariableService.IntroduceVariableCodeAction.cs (3)
54var changedDocument = await GetChangedDocumentCoreAsync(cancellationToken).ConfigureAwait(false); 56return await Simplifier.ReduceAsync(changedDocument, simplifierOptions, cancellationToken).ConfigureAwait(false); 71return await _service.IntroduceFieldAsync(_semanticDocument, _expression, _allOccurrences, _isConstant, cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceVariableService.State.cs (2)
52if (!await state.TryInitializeAsync(document, textSpan, cancellationToken).ConfigureAwait(false)) 67Expression = await document.Document.TryGetRelevantNodeAsync<TExpressionSyntax>(textSpan, cancellationToken).ConfigureAwait(false);
IntroduceVariable\IntroduceVariableCodeRefactoringProvider.cs (1)
31var action = await service.IntroduceVariableAsync(document, textSpan, cleanupOptions, cancellationToken).ConfigureAwait(false);
InvertConditional\AbstractInvertConditionalCodeRefactoringProvider.cs (2)
24var conditional = await FindConditionalAsync(document, span, cancellationToken).ConfigureAwait(false); 41=> await document.TryGetRelevantNodeAsync<TConditionalExpressionSyntax>(span, cancellationToken).ConfigureAwait(false);
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (1)
87var ifNode = await context.TryGetRelevantNodeAsync<TIfStatementSyntax>().ConfigureAwait(false);
InvertLogical\AbstractInvertLogicalCodeRefactoringProvider.cs (3)
39var expression = (SyntaxNode?)await context.TryGetRelevantNodeAsync<TBinaryExpressionSyntax>().ConfigureAwait(false); 94var document2 = await InvertInnerExpressionAsync(document1, binaryExpression, cancellationToken).ConfigureAwait(false); 95var document3 = await InvertOuterExpressionAsync(document2, cancellationToken).ConfigureAwait(false);
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (5)
618var parts = await GetFieldPartsAsync(symbol).ConfigureAwait(false); 640var initializerParts = await GetInitializerSourcePartsAsync(symbol).ConfigureAwait(false); 659var parts = await GetLocalPartsAsync(symbol).ConfigureAwait(false); 672var initializerParts = await GetInitializerSourcePartsAsync(symbol).ConfigureAwait(false); 729var initializerParts = await GetInitializerSourcePartsAsync(symbol).ConfigureAwait(false);
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (1)
37return await builder.BuildDescriptionSectionsAsync(symbols).ConfigureAwait(false);
LanguageServices\SymbolDisplayService\ISymbolDisplayService.cs (1)
28var parts = await service.ToDescriptionPartsAsync(semanticModel, position, symbols, options, groups, cancellationToken).ConfigureAwait(false);
MetadataAsSource\AbstractMetadataAsSourceService.cs (6)
46cancellationToken).ConfigureAwait(false); 48document = await AddNullableRegionsAsync(document, cancellationToken).ConfigureAwait(false); 51var docWithDocComments = await ConvertDocCommentsToRegularCommentsAsync(document, docCommentFormattingService, cancellationToken).ConfigureAwait(false); 53var docWithAssemblyInfo = await AddAssemblyInfoRegionAsync(docWithDocComments, symbolCompilation, symbol.GetOriginalUnreducedDefinition(), cancellationToken).ConfigureAwait(false); 61cancellationToken).ConfigureAwait(false); 64return await Simplifier.ReduceAsync(formattedDoc, reducers, cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (7)
70var compilation = await sourceProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 94var infoKey = await GetUniqueDocumentKeyAsync(sourceProject, topLevelNamedType, signaturesOnly: !useDecompiler, cancellationToken).ConfigureAwait(false); 123var decompilationDocument = await decompiledSourceService.AddSourceToAsync(temporaryDocument, compilation, symbol, refInfo.metadataReference, refInfo.assemblyLocation, formattingOptions: null, cancellationToken).ConfigureAwait(false); 148temporaryDocument = await sourceFromMetadataService.AddSourceToAsync(temporaryDocument, compilation, symbol, formattingOptions: null, cancellationToken).ConfigureAwait(false); 199navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, temporaryDocument, cancellationToken).ConfigureAwait(false); 212navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, document, cancellationToken).ConfigureAwait(false); 377var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
MetadataAsSource\MetadataAsSourceFileService.cs (2)
110var result = await provider.GetGeneratedFileAsync(_workspace, sourceWorkspace, sourceProject, symbol, signaturesOnly, options, providerTempPath, telemetryMessage, cancellationToken).ConfigureAwait(false); 280var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
MetadataAsSource\MetadataAsSourceHelpers.cs (1)
73await generatedDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false),
MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceCodeRefactoringProvider.cs (3)
19var declaration = await context.TryGetRelevantNodeAsync<TLocalDeclaration>().ConfigureAwait(false); 29var (canMove, mayChangeSemantics) = await service.CanMoveDeclarationNearReferenceAsync(document, declaration, cancellationToken).ConfigureAwait(false); 50return await service.MoveDeclarationNearReferenceAsync(document, statement, cancellationToken).ConfigureAwait(false);
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
30var selectedMemberNodes = await GetSelectedNodesAsync(context).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (15)
77cancellationToken).ConfigureAwait(false); 110cancellationToken).ConfigureAwait(false); 118var memberReferenceLocations = await FindMemberReferencesAsync(newDoc.Project.Solution, newDoc.Project.Id, moveOptions.SelectedMembers, cancellationToken).ConfigureAwait(false); 120var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, newDoc.Project.Solution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false); 133var movedSolution = await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, cancellationToken).ConfigureAwait(false); 193oldSolution, sourceDocId.ProjectId, selectedMembers, cancellationToken).ConfigureAwait(false); 195var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, oldSolution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false); 213return await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, cancellationToken).ConfigureAwait(false); 229var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 239cancellationToken).ConfigureAwait(false); 266var docEditor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 290cancellationToken: cancellationToken).ConfigureAwait(false); 351var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 362: await SymbolFinder.FindReferencesAsync(resolvedMember, solution, cancellationToken).ConfigureAwait(false); 366var symbolRefs = await Task.WhenAll(tasks).ConfigureAwait(false);
MoveToNamespace\AbstractMoveToNamespaceService.cs (14)
54var typeAnalysisResult = await AnalyzeTypeAtPositionAsync(document, span.Start, cancellationToken).ConfigureAwait(false); 77var moveToNamespaceAnalysisResult = await TryAnalyzeNamespaceAsync(document, node, position, cancellationToken).ConfigureAwait(false); 84moveToNamespaceAnalysisResult = await TryAnalyzeNamedTypeAsync(document, node, cancellationToken).ConfigureAwait(false); 100if (await changeNamespaceService.CanChangeNamespaceAsync(document, declarationSyntax, cancellationToken).ConfigureAwait(false)) 103var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false); 152if (await changeNamespaceService.CanChangeNamespaceAsync(document, container, cancellationToken).ConfigureAwait(false)) 154var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false); 220var memberSymbols = await GetMemberSymbolsAsync(document, container, cancellationToken).ConfigureAwait(false); 232cancellationToken).ConfigureAwait(false); 253cancellationToken).ConfigureAwait(false); 259var mergedSolution = await PropagateChangeToLinkedDocumentsAsync(modifiedDocument, formattingOptions, cancellationToken).ConfigureAwait(false); 272cancellationToken).ConfigureAwait(false); 278var formattedDocument = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, formattingOptions, cancellationToken).ConfigureAwait(false); 307var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
MoveToNamespace\MoveToNamespaceCodeAction.cs (1)
51cancellationToken).ConfigureAwait(false);
MoveToNamespace\MoveToNamespaceCodeActionProvider.cs (1)
24var actions = await moveToNamespaceService.GetCodeActionsAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
NameTupleElement\AbstractNameTupleElementCodeRefactoringProvider.cs (3)
25var (_, argument, elementName) = await TryGetArgumentInfoAsync(document, span, cancellationToken).ConfigureAwait(false); 49var potentialArguments = await document.GetRelevantNodesAsync<TArgumentSyntax>(span, cancellationToken).ConfigureAwait(false); 84var (root, argument, elementName) = await TryGetArgumentInfoAsync(document, span, cancellationToken).ConfigureAwait(false);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (2)
82var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 146var index = await GetIndexAsync(storageService, documentKey, cancellationToken).ConfigureAwait(false);
NavigateTo\AbstractNavigateToSearchService.cs (1)
45var result = await item.TryCreateSearchResultAsync(solution, activeDocument, cancellationToken).ConfigureAwait(false);
NavigateTo\AbstractNavigateToSearchService.GeneratedDocumentSearch.cs (1)
38var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (3)
36var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 96var relatedDocuments = await GetRelatedDocumentsAsync().ConfigureAwait(false); 164var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
NavigateTo\INavigateToSearcherHost.cs (2)
66var isProjectSystemFullyLoaded = await service.IsFullyLoadedAsync(cancellationToken).ConfigureAwait(false); 107var client = await RemoteHostClient.TryGetClientAsync(_solution.Services, _disposalToken).ConfigureAwait(false);
NavigateTo\NavigateToSearcher.cs (1)
247using var _2 = await RemoteKeepAliveSession.CreateAsync(_solution, cancellationToken).ConfigureAwait(false);
Navigation\AbstractNavigableItemsService.cs (5)
32await GetSymbolAsync(document.WithFrozenPartialSemantics(cancellationToken)).ConfigureAwait(false) ?? 33await GetSymbolAsync(document).ConfigureAwait(false); 47var (symbol, project, _) = await symbolService.GetSymbolProjectAndBoundSpanAsync(document, semanticModel, position, cancellationToken).ConfigureAwait(false); 51symbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false) ?? symbol; 64typeSymbol = await SymbolFinder.FindSourceDefinitionAsync(typeSymbol, solution, cancellationToken).ConfigureAwait(false) ?? typeSymbol;
Navigation\IDefinitionLocationService.cs (3)
49var items = await getNavigableItems(cancellationToken).ConfigureAwait(false); 57var navigableItem = await new DocumentSpan(firstItem.Value.document, firstItem.Value.sourceSpan).GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false); 61var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
NavigationBar\AbstractNavigationBarItemService.cs (2)
23var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 39var items = await GetItemsInCurrentProcessAsync(document, supportsCodeGeneration, cancellationToken).ConfigureAwait(false);
OrganizeImports\OrganizeImportsCodeRefactoringProvider.cs (3)
48var newDocument = await organizeImportsService.OrganizeImportsAsync(document, options, cancellationToken).ConfigureAwait(false); 57var (oldRoot, newRoot) = await RemoveImportsAsync(document, cancellationToken).ConfigureAwait(false); 78var (_, newRoot) = await RemoveImportsAsync(document, cancellationToken).ConfigureAwait(false);
PdbSourceDocument\PdbFileLocatorService.cs (2)
72var winner = await Task.WhenAny(pdbResultTask, delay).ConfigureAwait(false); 76var pdbResult = await pdbResultTask.ConfigureAwait(false);
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (3)
43await TryGetSourceLinkFileAsync(sourceDocument, encoding, telemetry, useExtendedTimeout, cancellationToken).ConfigureAwait(false); 137var winner = await Task.WhenAny(sourceFileTask, delay).ConfigureAwait(false); 141var sourceFile = await sourceFileTask.ConfigureAwait(false);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (4)
96var compilation = await sourceProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 175using var documentDebugInfoReader = await _pdbFileLocatorService.GetDocumentDebugInfoReaderAsync(dllPath, options.AlwaysUseDefaultSymbolServers, telemetryMessage, cancellationToken).ConfigureAwait(false); 249var sourceFileInfos = await Task.WhenAll(sourceFileInfoTasks).ConfigureAwait(false); 277var navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, firstDocument, cancellationToken).ConfigureAwait(false);
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
34var selectedMemberNodes = await GetSelectedNodesAsync(context).ConfigureAwait(false);
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
42var changedSolution = await MembersPuller.PullMembersUpAsync(_document, pullMemberUpOptions, cancellationToken).ConfigureAwait(false);
PullMemberUp\MembersPuller.cs (10)
101var symbolToDeclarationsMap = await InitializeSymbolToDeclarationsMapAsync(pullMemberUpOptions, cancellationToken).ConfigureAwait(false); 106cancellationToken).ConfigureAwait(false); 125cancellationToken).ConfigureAwait(false); 280cancellationToken).ConfigureAwait(false); 282var symbolToDeclarations = await InitializeSymbolToDeclarationsMapAsync(result, cancellationToken).ConfigureAwait(false); 332cancellationToken).ConfigureAwait(false); 384cancellationToken).ConfigureAwait(false); 387destinationDocument = await Formatter.FormatAsync(destinationDocument, s_removableImportAnnotation, options.CleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 390await destinationDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false), 479var allSyntaxes = await Task.WhenAll(tasks).ConfigureAwait(false);
QuickInfo\CommonQuickInfoProvider.cs (7)
22var tokens = await GetTokensAsync(tree, context.Position, context.CancellationToken).ConfigureAwait(false); 26var info = await GetQuickInfoAsync(context, token).ConfigureAwait(false); 36var tokens = await GetTokensAsync(context.SemanticModel.SyntaxTree, context.Position, context.CancellationToken).ConfigureAwait(false); 40var info = await GetQuickInfoAsync(context, token).ConfigureAwait(false); 51var token = await tree.GetTouchingTokenAsync(position, cancellationToken, findInsideTrivia: true).ConfigureAwait(false); 77return await BuildQuickInfoAsync(context, token).ConfigureAwait(false); 90return await BuildQuickInfoAsync(context, token).ConfigureAwait(false);
QuickInfo\CommonSemanticQuickInfoProvider.cs (5)
28var (tokenInformation, supportedPlatforms) = await ComputeQuickInfoDataAsync(context, token).ConfigureAwait(false); 35var onTheFlyDocsInfo = await GetOnTheFlyDocsInfoAsync(context, cancellationToken).ConfigureAwait(false); 37services, semanticModel, token, tokenInformation, supportedPlatforms, context.Options, onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false); 49context.Services, context.SemanticModel, token, tokenInformation, supportedPlatforms: null, context.Options, onTheFlyDocsInfo: null, context.CancellationToken).ConfigureAwait(false); 61return await ComputeFromLinkedDocumentsAsync(context, token, linkedDocumentIds).ConfigureAwait(false);
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
143document, relatedSpan, context.ClassificationOptions, includeAdditiveSpans: false, cancellationToken).ConfigureAwait(false);
QuickInfo\QuickInfoServiceWithProviders.cs (1)
54cancellationToken).ConfigureAwait(false);
QuickInfo\QuickInfoUtilities.cs (1)
37var groups = await descriptionService.ToDescriptionGroupsAsync(semanticModel, span.Start, symbols, options, cancellationToken).ConfigureAwait(false);
RelatedDocuments\AbstractRelatedDocumentsService.cs (1)
43var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (4)
44var root = await document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 67var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 68var documentEditor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 89var referencedSymbols = await SymbolFinder.FindReferencesAsync(symbol, document.Project.Solution, documentsToBeSearched, cancellationToken).ConfigureAwait(false);
Rename\SymbolicRenameInfo.cs (5)
117var triggerToken = await GetTriggerTokenAsync(document, position, cancellationToken).ConfigureAwait(false); 121return await GetRenameInfoAsync(document, triggerToken, cancellationToken).ConfigureAwait(false); 128var token = await syntaxTree.GetTouchingWordAsync(position, syntaxFacts, cancellationToken, findInsideTrivia: true).ConfigureAwait(false); 163var symbol = await RenameUtilities.TryGetRenamableSymbolAsync(document, triggerToken.SpanStart, cancellationToken: cancellationToken).ConfigureAwait(false); 176semanticModel, triggerToken.SpanStart, document.Project.Solution.Services, cancellationToken: cancellationToken).ConfigureAwait(false);
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (2)
56var conditionalExpression = await context.TryGetRelevantNodeAsync<TConditionalExpressionSyntax>().ConfigureAwait(false); 66var statement = await context.TryGetRelevantNodeAsync<TStatementSyntax>().ConfigureAwait(false);
ReplaceMethodWithProperty\AbstractReplaceMethodWithPropertyService.cs (1)
18=> await context.TryGetRelevantNodeAsync<TMethodDeclarationSyntax>().ConfigureAwait(false);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (17)
42var methodDeclaration = await service.GetMethodDeclarationAsync(context).ConfigureAwait(false); 159var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 164getMethod, originalSolution, cancellationToken).ConfigureAwait(false); 168setMethod, originalSolution, cancellationToken).ConfigureAwait(false); 182updatedSolution = await UpdateReferencesAsync(updatedSolution, propertyName, nameChanged, getReferencesByDocument, setReferencesByDocument, cancellationToken).ConfigureAwait(false); 183updatedSolution = await ReplaceGetMethodsAndRemoveSetMethodsAsync(originalSolution, updatedSolution, propertyName, nameChanged, getMethodReferences, setMethodReferences, updateSetMethod: setMethod != null, cancellationToken).ConfigureAwait(false); 199cancellationToken).ConfigureAwait(false); 321var getDefinitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, getMethodReferences, cancellationToken).ConfigureAwait(false); 322var setDefinitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, setMethodReferences, cancellationToken).ConfigureAwait(false); 333propertyName, nameChanged, updatedSolution, documentId, getDefinitions, setDefinitions, updateSetMethod, cancellationToken).ConfigureAwait(false); 351var compilation = await updatedDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 356updatedSolution, compilation, documentId, originalGetDefinitions, updateSetMethod, cancellationToken).ConfigureAwait(false); 385var setMethodDeclaration = await GetMethodDeclarationAsync(setMethod, cancellationToken).ConfigureAwait(false); 414var getMethodDeclaration = await GetMethodDeclarationAsync(getMethod, cancellationToken).ConfigureAwait(false); 415var setMethodDeclaration = await GetMethodDeclarationAsync(setMethod, cancellationToken).ConfigureAwait(false); 442return await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 458var syntax = await definition.DeclaringSyntaxReferences[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (1)
37=> await context.TryGetRelevantNodeAsync<TPropertySyntax>().ConfigureAwait(false);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (13)
45var propertyDeclaration = await service.GetPropertyDeclarationAsync(context).ConfigureAwait(false); 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 85var propertyReferences = await SymbolFinder.FindReferencesAsync(propertySymbol, originalSolution, cancellationToken).ConfigureAwait(false); 106desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false); 110desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false); 204desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false); 301var definitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, references, cancellationToken).ConfigureAwait(false); 309desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false); 328var syntax = await definition.DeclaringSyntaxReferences[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 357updatedSolution, semanticModel.Compilation, documentId, originalDefinitions, cancellationToken).ConfigureAwait(false); 375cancellationToken).ConfigureAwait(false); 406var declaration = await GetPropertyDeclarationAsync(property, cancellationToken).ConfigureAwait(false); 423return await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
SemanticSearch\IRemoteSemanticSearchService.cs (3)
166var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 181var client = await RemoteHostClient.TryGetClientAsync(services, cancellationToken).ConfigureAwait(false); 191var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
SemanticSearch\SemanticSearchDefinitionItemFactory.cs (1)
65var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
SemanticSearch\SemanticSearchWorkspace.cs (1)
43var newText = await queryDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\DocumentExtensions.cs (6)
59var values = await getItemsWorker(document).ConfigureAwait(false); 64values = await getItemsWorker(document.Project.Solution.GetRequiredDocument(linkedDocumentId)).ConfigureAwait(false); 76if (await contextChecker(document, cancellationToken).ConfigureAwait(false)) 85if (await contextChecker(linkedDocument, cancellationToken).ConfigureAwait(false)) 96var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false); 109var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
Shared\Utilities\AnnotatedSymbolMapping.cs (2)
57var typeNodeRoot = await typeNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 76root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
Shared\Utilities\ExtractTypeHelpers.cs (4)
89cancellationToken).ConfigureAwait(false); 96newTypeDocument = await formattingService.FormatNewDocumentAsync(newTypeDocument, hintDocument, newCleanupOptions, cancellationToken).ConfigureAwait(false); 109var simplified = await Simplifier.ReduceAsync(newTypeDocument, newCleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false); 110var formattedDocument = await Formatter.FormatAsync(simplified, newCleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
SignatureHelp\AbstractSignatureHelpProvider.cs (2)
246var itemsForCurrentDocument = await GetItemsWorkerAsync(document, position, triggerInfo, options, cancellationToken).ConfigureAwait(false); 252var relatedDocuments = await FindActiveRelatedDocumentsAsync(position, document, cancellationToken).ConfigureAwait(false);
SignatureHelp\SignatureHelpService.cs (1)
81cancellationToken).ConfigureAwait(false);
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (4)
81var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 82var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 105var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 106var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Snippets\RoslynLSPSnippetConverter.cs (1)
24var extendedTextChange = await ExtendSnippetTextChangeAsync(document, textChange, placeholders, caretPosition, triggerLocation, cancellationToken).ConfigureAwait(false);
Snippets\SnippetFunctionService.cs (6)
49var simplifiedTypeName = await GetSimplifiedTypeNameAtSpanAsync(documentWithFullyQualifiedTypeName, updatedTextSpan, simplifierOptions, cancellationToken).ConfigureAwait(false); 59var typeSymbol = await GetEnumSymbolAsync(document, switchExpressionLocation, cancellationToken).ConfigureAwait(false); 73var simplifiedTypeName = await GetSimplifiedEnumNameAsync(document, fullyQualifiedEnumName, enumFields.First().Name, caseGenerationLocation, simplifierOptions, cancellationToken).ConfigureAwait(false); 134var (documentWithFullyQualified, fullyQualifiedTypeLocation) = await GetDocumentWithEnumCaseAsync(document, fullyQualifiedTypeName, firstEnumMemberName, caseGenerationLocation, cancellationToken).ConfigureAwait(false); 137var simplifiedEnum = await GetSimplifiedTypeNameAtSpanAsync(documentWithFullyQualified, fullyQualifiedTypeLocation, simplifierOptions, cancellationToken).ConfigureAwait(false); 156var simplifiedDocument = await Simplifier.ReduceAsync(documentWithAnnotations, simplifierOptions, cancellationToken).ConfigureAwait(false);
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (1)
80var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Snippets\SnippetProviders\AbstractPropertySnippetProvider.cs (1)
23var propertyDeclaration = await GenerateSnippetSyntaxAsync(document, position, cancellationToken).ConfigureAwait(false);
Snippets\SnippetProviders\AbstractSingleChangeSnippetProvider.cs (1)
19var change = await GenerateSnippetTextChangeAsync(document, position, cancellationToken).ConfigureAwait(false);
Snippets\SnippetProviders\AbstractSnippetProvider.cs (13)
75var textChanges = await GenerateSnippetTextChangesAsync(document, position, cancellationToken).ConfigureAwait(false); 78var snippetDocument = await GetDocumentWithSnippetAsync(document, textChanges, cancellationToken).ConfigureAwait(false); 82var snippetWithTriviaDocument = await GetDocumentWithSnippetAndTriviaAsync(snippetDocument, position, syntaxFacts, cancellationToken).ConfigureAwait(false); 85var formatAnnotatedSnippetDocument = await AddFormatAnnotationAsync(snippetWithTriviaDocument, position, cancellationToken).ConfigureAwait(false); 88var reformattedDocument = await CleanupDocumentAsync(formatAnnotatedSnippetDocument, cancellationToken).ConfigureAwait(false); 91var documentWithIndentation = await AddIndentationToDocumentAsync(reformattedDocument, cancellationToken).ConfigureAwait(false); 100var changes = await annotatedReformattedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false); 149document, FindSnippetAnnotation, addImportPlacementOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 151document = await Simplifier.ReduceAsync(document, FindSnippetAnnotation, simplifierOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 154document = await Formatter.FormatAsync(document, FindSnippetAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 157document = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 200var annotatedSnippetRoot = await AnnotateNodesToReformatAsync(document, position, cancellationToken).ConfigureAwait(false); 235return await AddIndentationToDocumentAsync(document, snippet, cancellationToken).ConfigureAwait(false);
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (2)
23var typeDeclaration = await GenerateTypeDeclarationAsync(document, position, cancellationToken).ConfigureAwait(false); 26var accessibilityModifiersChange = await GetAccessibilityModifiersChangeAsync(document, position, cancellationToken).ConfigureAwait(false);
SolutionCrawler\AbstractDocumentDifferenceService.cs (2)
66oldRoot = await oldDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 67newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (6)
46var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 79semanticModel ??= await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 131document, nameToken.SpanStart, options, passThroughOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 168var insertionText = await GetInsertionTextAsync(document, item, cancellationToken: cancellationToken).ConfigureAwait(false); 203var change = await service.GetChangeAsync(document, item, commitCharacter: null, cancellationToken).ConfigureAwait(false); 222var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\AbstractMergeIfStatementsCodeRefactoringProvider.cs (4)
38var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 46if (await CanBeMergedUpAsync(document, ifOrElseIf, cancellationToken, out var upperIfOrElseIf).ConfigureAwait(false)) 49if (await CanBeMergedDownAsync(document, ifOrElseIf, cancellationToken, out var lowerIfOrElseIf).ConfigureAwait(false)) 68var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (3)
36var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 65var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 74var newRoot = await GetChangedRootAsync(document, root, ifOrElseIf, left, right, cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (1)
219var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (2)
73if (await CanBeSeparateStatementsAsync(document, blockFacts, ifGenerator, ifOrElseIf, cancellationToken).ConfigureAwait(false)) 150var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (1)
221var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (6)
169idToSuppressMessageAttributesMap, suppressMessageAttributesToIsUsedMap, userIdExclusions, userCategoryExclusions, cancellationToken).ConfigureAwait(false); 187getSupportedDiagnostics, compilerDiagnosticIds, cancellationToken).ConfigureAwait(false); 464var analysisResult = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel.SyntaxTree, analyzers, cancellationToken).ConfigureAwait(false); 471analysisResult = await compilationWithAnalyzers.GetAnalysisResultAsync(semanticModel, filterSpan: null, analyzers, cancellationToken).ConfigureAwait(false); 596var attributeNode = await attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 819var attributeNode = await attribute.ApplicationSyntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (2)
38var declarator = await GetMemberDeclaratorAsync(document, diagnostic, cancellationToken).ConfigureAwait(false); 103var declarator = await GetMemberDeclaratorAsync(document, diagnostic, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (3)
37var attribute = await GetObsoleteAttributeAsync(document, cancellationToken).ConfigureAwait(false); 59var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 74var obsoleteAttribute = await GetObsoleteAttributeAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (3)
382var (argumentType, refKind) = await GetArgumentTypeAndRefKindAsync(invocationDocument, argument, cancellationToken).ConfigureAwait(false); 387invocationDocument, argument, method.ContainingType, cancellationToken).ConfigureAwait(false); 399cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (8)
92? await FindMethodDeclarationReferencesAsync(invocationDocument, method, cancellationToken).ConfigureAwait(false) 112var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 154solution = await AddConstructorAssignmentsAsync(solution).ConfigureAwait(false); 160var finalSolution = await TryAddConstructorAssignmentsAsync(rewrittenSolution).ConfigureAwait(false); 189var semanticDocument = await SemanticDocument.CreateAsync(rewrittenDocument, cancellationToken).ConfigureAwait(false); 202cancellationToken).ConfigureAwait(false); 210rewrittenDocument, parameter, memberToAssignTo, cancellationToken).ConfigureAwait(false); 218method, invocationDocument.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (1)
452await this.FixAllAsync(document, diagnostics, context.CodeActionEquivalenceKey, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
30node, context.Document, context.Diagnostics[0], context.CancellationToken).ConfigureAwait(false); 56var result = await GetRootInOtherSyntaxTreeAsync(node, semanticModel, diagnostic, cancellationToken).ConfigureAwait(false); 61var title = await GetDescriptionAsync(diagnostic, node, semanticModel, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (4)
46=> document.WithSyntaxRoot(await GetTransformedSyntaxRootAsync(document, cancellationToken).ConfigureAwait(false)); 54return await GetTransformedSyntaxRootAsync(generator.SyntaxFacts, FileHeaderHelper, newLineTrivia, document, fileHeaderTemplate: null, cancellationToken).ConfigureAwait(false); 60var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 234return await this.GetTransformedDocumentAsync(document, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (2)
84var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 86var state = await State.GenerateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (10)
71var parameterNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 74if (!await state.TryInitializeAsync(node, cancellationToken).ConfigureAwait(false)) 115if (!await TryInitializeDelegatedConstructorAsync(cancellationToken).ConfigureAwait(false)) 131_document, this.TypeToGenerateIn, _arguments, ParameterTypes, parameterNames, cancellationToken).ConfigureAwait(false); 175_document, this.TypeToGenerateIn, remainingArguments, remainingParameterTypes, remainingParameterNames, cancellationToken).ConfigureAwait(false); 415return await GenerateThisOrBaseDelegatingConstructorAsync(document, withFields, withProperties, cancellationToken).ConfigureAwait(false) ?? 416await GenerateMemberDelegatingConstructorAsync(document, withFields, withProperties, cancellationToken).ConfigureAwait(false); 427var (members, assignments) = await GenerateMembersAndAssignmentsAsync(document, withFields, withProperties, cancellationToken).ConfigureAwait(false); 452cancellationToken).ConfigureAwait(false); 507cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (4)
143var fieldNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 144var propertyNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Property, Accessibility.Public, cancellationToken).ConfigureAwait(false); 145var parameterNamingRule = await document.Document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false); 147var rules = await document.Document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
39document, new TextSpan(typeName.Value.Span.Start, 0), forRefactoring: false, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
33var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
39cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
46cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (2)
29var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 30var state = await State.GenerateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
45var codeActions = await GetCodeActionsAsync(context.Document, name, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
34var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 35var state = await State.GenerateConversionStateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (1)
25if (!await state.TryInitializeConversionAsync(service, document, interfaceNode, cancellationToken).ConfigureAwait(false))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (2)
31var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 34(TService)this, semanticDocument, leftSide, typeToGenerateIn, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (2)
33if (!await state.TryInitializeMethodAsync(service, document, targetVariables, typeToGenerateIn, cancellationToken).ConfigureAwait(false)) 84return await TryFinishInitializingStateAsync(service, document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (2)
35var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 36var state = await State.GenerateMethodStateAsync((TService)this, semanticDocument, node, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (1)
32if (!await state.TryInitializeMethodAsync(service, document, interfaceNode, cancellationToken).ConfigureAwait(false))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (2)
78cancellationToken).ConfigureAwait(false); 94cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (4)
92(INamedTypeSymbol)symbol.ConstraintTypes[0], projects).ConfigureAwait(false); 97(INamedTypeSymbol)symbol.ConstraintTypes[i], projects).ConfigureAwait(false); 130symbol, solution, transitive: true, projects, _cancellationToken).ConfigureAwait(false); 133symbol, solution, transitive: true, projects, _cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (2)
80context, _state.TypeToGenerateIn, propertySymbol, cancellationToken).ConfigureAwait(false); 94context, _state.TypeToGenerateIn, fieldSymbol, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (6)
39var semanticDocument = await SemanticDocument.CreateAsync(document, cancellationToken).ConfigureAwait(false); 100document.Document, state, SymbolKind.Property, state.DetermineMaximalAccessibility(), cancellationToken).ConfigureAwait(false)) 122var namingStyle = await document.GetApplicableNamingRuleAsync(kind, accessibility, cancellationToken).ConfigureAwait(false); 182document, state, SymbolKind.Local, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false)) 198document, state, SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false)) 208var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (1)
38var newRoot = await GetNewRootAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (1)
153TypeToGenerateIn, _document.Project.Solution, cancellationToken).ConfigureAwait(false) as INamedTypeSymbol;
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
39document, classNode, GetClassIdentifier(classNode), cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (3)
75var data = await TryGetDataAsync(document, classNode, classIdentifier, cancellationToken).ConfigureAwait(false); 79return await data.ImplementAbstractClassAsync(throughMember: null, canDelegateAllMembers: null, cancellationToken).ConfigureAwait(false); 85var compilation = await _document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
33var codeActions = await service.GetCodeActionsAsync(document, type, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (4)
74return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false); 116return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false); 154document, interfaceType, cancellationToken).ConfigureAwait(false); 176var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
75var compilation = await this.Document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 97cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (6)
44var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 47document, State.ClassOrStructType, cancellationToken).ConfigureAwait(false); 56cancellationToken).ConfigureAwait(false); 85return await AddFinalizerCommentAsync(docWithAllMembers, finalizer, cancellationToken).ConfigureAwait(false); 233SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 236var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
28var codeAction = await GetCodeFixAsync(root, node, context.Document, diagnostic, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (6)
126? await RenameThenAddAsyncTokenAsync(keepVoid, document, node, methodSymbol, knownTypes, cancellationToken).ConfigureAwait(false) 127: await FixRelatedSignaturesAsync(keepVoid, document, methodSymbol, knownTypes, node, cancellationToken).ConfigureAwait(false); 174var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 182return await FixRelatedSignaturesAsync(keepVoid, newDocument, newMethod, knownTypes, newNode, cancellationToken).ConfigureAwait(false); 200var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 211var partialDefinitionDocumentEditor = await solutionEditor.GetDocumentEditorAsync(partialDefinitionDocument.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (10)
65return await RenameThenRemoveAsyncTokenAsync(document, node, methodSymbol, cancellationToken).ConfigureAwait(false); 69return await RemoveAsyncTokenAsync(document, methodSymbol, node, cancellationToken).ConfigureAwait(false); 83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 85var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 90return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, cancellationToken).ConfigureAwait(false); 99var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 116newDocument, annotation, cancellationToken).ConfigureAwait(false); 138[methodSymbol], document.Project.Solution, cancellationToken).ConfigureAwait(false); 146document.Project.Solution, [.. referencedSymbol.Locations], cancellationToken).ConfigureAwait(false); 164currentSolution, group, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeTypePartial\AbstractMakeTypePartialCodeFixProvider.cs (1)
47var node = await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (2)
61cancellationToken: cancellationToken).ConfigureAwait(false); 63var newSolution = await renameActionSet.UpdateSolutionAsync(documentWithInvalidFolders.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (5)
32FixAllScope.Document when fixAllContext.Document is not null => await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document).ConfigureAwait(false), 33FixAllScope.Project => await fixAllContext.GetAllDiagnosticsAsync(fixAllContext.Project).ConfigureAwait(false), 34FixAllScope.Solution => await GetSolutionDiagnosticsAsync(fixAllContext).ConfigureAwait(false), 57var projectDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 92newSolution = await FixAllInDocumentAsync(document, diagnosticsInTree, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (1)
19var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (3)
108cancellationToken).ConfigureAwait(false); 151=> [new ApplyChangesOperation(await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false))]; 155var newSolution = await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\NewLines\ConsecutiveStatementPlacement\ConsecutiveStatementPlacementCodeFixProvider.cs (1)
61=> FixAllProvider.Create(async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (1)
146=> FixAllProvider.Create(async (context, document, diagnostics) => await FixAllAsync(document, diagnostics, context.CancellationToken).ConfigureAwait(false));
src\Analyzers\Core\CodeFixes\RemoveAsyncModifier\AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
33var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
56var newDocument = await RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedMembers\AbstractRemoveUnusedMembersCodeFixProvider.cs (1)
62var node = await declReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (13)
287var preprocessedDocument = await PreprocessDocumentAsync(document, diagnostics, cancellationToken).ConfigureAwait(false); 288var newRoot = await GetNewRootAsync(preprocessedDocument, formattingOptions, diagnostics, cancellationToken).ConfigureAwait(false); 336diagnosticId, preference, cancellationToken).ConfigureAwait(false); 638!(await IsLocalDeclarationWithNoReferencesAsync(localDeclarationStatement, document, cancellationToken).ConfigureAwait(false))) 759ReplaceDiscardDeclarationsWithAssignmentsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false); 767AdjustLocalDeclarationsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false); 789var newMemberDecl = await processMemberDeclarationAsync(memberDecl, newDocument, options, cancellationToken).ConfigureAwait(false); 811return await service.ReplaceAsync(document, memberDeclaration, cancellationToken).ConfigureAwait(false); 860if (await TryRemoveUnusedLocalAsync(declStatement, originalDeclStatement).ConfigureAwait(false)) 871var (canUse, mayChangeSemantics) = await moveDeclarationService.CanMoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false); 874document = await moveDeclarationService.MoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false); 900if (await IsLocalDeclarationWithNoReferencesAsync(newDecl, document, cancellationToken).ConfigureAwait(false)) 923var referencedSymbols = await SymbolFinder.FindReferencesAsync(local, document.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
71var declaration = await syntaxReference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (14)
109return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false); 121diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false); 134var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 137field, currentSolution, cancellationToken).ConfigureAwait(false)).ToImmutableArray(); 159cancellationToken).ConfigureAwait(false); 184currentSolution, linkedFiles, fieldLocations, property, cancellationToken).ConfigureAwait(false); 191compilation = await fieldDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 253var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 270newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 271newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 300var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false); 388var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 433document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false); 438document, codeCleanupOptions, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (4)
76provider, currentContext, originalSolution, cancellationToken).ConfigureAwait(false); 88originalContext.CancellationToken).ConfigureAwait(false); 100var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false); 106originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
86document, objectCreation, useCollectionExpression, preMatches, postMatches, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (1)
116trueValue.Syntax, falseValue.Syntax, formattingOptions, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForAssignment\AbstractUseConditionalExpressionForAssignmentCodeFixProvider.cs (1)
85cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseConditionalExpression\ForReturn\AbstractUseConditionalExpressionForReturnCodeFixProvider.cs (1)
74cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackFrameLocalMethodResolver.cs (1)
30var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerService.cs (2)
50var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 72return await StackTraceExplorerUtilities.GetDefinitionAsync(solution, parsedFrame.Root, symbolPart, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerUtilities.cs (5)
60cancellationToken).ConfigureAwait(false); 64var method = await TryGetBestMatchAsync(project, fullyQualifiedTypeName, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false); 82var method = await TryGetBestMatchAsync(project, fullyQualifiedTypeName, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false); 112var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 123var matchingMethod = await resolver.TryGetBestMatchAsync(project, type, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false);
Structure\BlockStructureServiceWithProviders.cs (1)
51var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
SymbolMapping\SymbolMappingServiceFactory.cs (1)
26var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (15)
121var delayUntilNextUpdate = await UpdateDatabaseInBackgroundWorkerAsync(cancellationToken).ConfigureAwait(false); 188return await PatchLocalDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false); 193return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false); 229var (_, delay) = await DownloadFullDatabaseWorkerAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false); 242var element = await DownloadFileAsync(serverPath, cancellationToken).ConfigureAwait(false); 243var result = await ProcessFullDatabaseXElementAsync(databaseFileInfo, element, cancellationToken).ConfigureAwait(false); 255var (succeeded, contentBytes) = await TryParseDatabaseElementAsync(element, cancellationToken).ConfigureAwait(false); 410return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false); 422var element = await DownloadFileAsync(serverPath, cancellationToken).ConfigureAwait(false); 428cancellationToken).ConfigureAwait(false); 472var delayUntilUpdate = await TryProcessPatchXElementAsync(databaseFileInfo, patchElement, getDatabaseBytes, cancellationToken).ConfigureAwait(false); 487return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false); 596var (element, delay) = await TryDownloadFileAsync(client, cancellationToken).ConfigureAwait(false); 615using var stream = await fileDownloader.ReadFileAsync().ConfigureAwait(false); 697var contentBytes = await Updater.ConvertContentAttributeAsync(contentsAttribute, cancellationToken).ConfigureAwait(false);
SymbolSearch\Windows\SymbolSearchUpdateEngineFactory.cs (1)
27var client = await RemoteHostClient.TryGetClientAsync(workspace, cancellationToken).ConfigureAwait(false);
SyncNamespaces\AbstractSyncNamespacesService.cs (9)
42var diagnosticsByProject = await GetDiagnosticsByProjectAsync(projects, diagnosticAnalyzers, IsHostAnalyzer, cancellationToken).ConfigureAwait(false); 51solution, CodeFixProvider, diagnosticsByProject, progressTracker, cancellationToken).ConfigureAwait(false); 55return await ApplyCodeFixAsync(fixAllProvider, fixAllContext, cancellationToken).ConfigureAwait(false); 68var diagnostics = await GetDiagnosticsAsync(project, diagnosticAnalyzers, isHostAnalyzer, cancellationToken).ConfigureAwait(false); 81var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 92return await analyzerCompilation.GetAnalyzerDiagnosticsAsync(cancellationToken).ConfigureAwait(false); 141var fixAllAction = await fixAllProvider.GetFixAsync(fixAllContext).ConfigureAwait(false); 145fixAllContext.Solution, fixAllContext.Progress, cancellationToken).ConfigureAwait(false); 170var projectDiagnostics = await GetProjectDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false);
TaskList\AbstractTaskListService.cs (2)
31var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 45return await GetTaskListItemsInProcessAsync(document, descriptors, cancellationToken).ConfigureAwait(false);
Testing\AbstractTestMethodFinder.cs (1)
37var testNodes = await GetPotentialTestNodesAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
UnusedReferences\UnusedReferencesRemover.cs (2)
39var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 303cancellationToken).ConfigureAwait(true);
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
33var potentialArguments = await document.GetRelevantNodesAsync<TBaseArgumentSyntax>(textSpan, allowEmptyNodes: true, cancellationToken).ConfigureAwait(false);
ValueTracking\SerializableValueTrackedItem.cs (1)
54var sourceText = await syntaxTree.GetTextAsync(cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTrackedItem.cs (1)
50var sourceText = await syntaxTree.GetTextAsync(cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.cs (5)
25var (symbol, node) = await GetSelectedSymbolAsync(selection, document, cancellationToken).ConfigureAwait(false); 49await progressCollector.TryReportAsync(solution, location, symbol, cancellationToken).ConfigureAwait(false); 68await progressCollector.TryReportAsync(document.Project.Solution, node.GetLocation(), symbol, cancellationToken).ConfigureAwait(false); 81var symbol = await GetSymbolAsync(previousTrackedItem, solution, cancellationToken).ConfigureAwait(false); 98var previousSymbol = await GetSymbolAsync(previousTrackedItem.Parent, solution, cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.OperationCollector.cs (2)
63var childrenVisited = await TryVisitChildrenAsync(operation, cancellationToken).ConfigureAwait(false); 179cancellationToken: cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTrackingService.cs (2)
33var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false); 64var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
Wrapping\AbstractCodeActionComputer.cs (5)
124var (root, rewrittenRoot, spanToFormat) = await RewriteTreeAsync(edits, cancellationToken).ConfigureAwait(false); 133var formattedDocument = await FormatDocumentAsync(rewrittenRoot, spanToFormat, cancellationToken).ConfigureAwait(false); 168newDocument, spanToFormat, Options.FormattingOptions, cancellationToken).ConfigureAwait(false); 204leftTokenToTrailingTrivia, rightTokenToLeadingTrivia, cancellationToken).ConfigureAwait(false); 276var wrappingGroups = await ComputeWrappingGroupsAsync(cancellationToken).ConfigureAwait(false);
Wrapping\AbstractWrappingCodeRefactoringProvider.cs (2)
59document, position, node, options, containsSyntaxError, cancellationToken).ConfigureAwait(false); 64var actions = await computer.GetTopLevelCodeActionsAsync(cancellationToken).ConfigureAwait(false);
Wrapping\BinaryExpression\AbstractBinaryExpressionWrapper.cs (1)
85document, exprsAndOperators, cancellationToken).ConfigureAwait(false);
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (7)
66await GetSmartIndentationAfterAsync(_exprsAndOperators[1], cancellationToken).ConfigureAwait(false)))); 73await GetWrapCodeActionAsync(align: false, cancellationToken).ConfigureAwait(false), 74await GetWrapCodeActionAsync(align: true, cancellationToken).ConfigureAwait(false), 75await GetUnwrapCodeActionAsync(cancellationToken).ConfigureAwait(false), 79=> await TryCreateCodeActionAsync(await GetWrapEditsAsync(align, cancellationToken).ConfigureAwait(false), FeaturesResources.Wrapping, 81cancellationToken).ConfigureAwait(false); 91: await _smartIndentTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false);
Wrapping\ChainedExpression\AbstractChainedExpressionWrapper.cs (1)
104document, chunk, cancellationToken).ConfigureAwait(false);
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (11)
88await GetSmartIndentationAfterAsync(firstPeriod, cancellationToken).ConfigureAwait(false)))); 109await GetWrapEditsAsync(wrappingColumn: 0, align: false, cancellationToken).ConfigureAwait(false), 110FeaturesResources.Wrapping, FeaturesResources.Wrap_call_chain, cancellationToken).ConfigureAwait(false)); 112await GetWrapEditsAsync(wrappingColumn: 0, align: true, cancellationToken).ConfigureAwait(false), 113FeaturesResources.Wrapping, FeaturesResources.Wrap_and_align_call_chain, cancellationToken).ConfigureAwait(false)); 117=> actions.Add(await TryCreateCodeActionAsync(GetUnwrapEdits(), FeaturesResources.Wrapping, FeaturesResources.Unwrap_call_chain, cancellationToken).ConfigureAwait(false)); 122await GetWrapEditsAsync(Options.WrappingColumn, align: false, cancellationToken).ConfigureAwait(false), 123FeaturesResources.Wrapping, FeaturesResources.Wrap_long_call_chain, cancellationToken).ConfigureAwait(false)); 125await GetWrapEditsAsync(Options.WrappingColumn, align: true, cancellationToken).ConfigureAwait(false), 126FeaturesResources.Wrapping, FeaturesResources.Wrap_and_align_long_call_chain, cancellationToken).ConfigureAwait(false)); 137var indentationTrivia = align ? _firstPeriodIndentationTrivia : await _smartIndentTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false);
Wrapping\SeparatedSyntaxList\AbstractSeparatedSyntaxListWrapper.cs (1)
79document, listItems.GetWithSeparators(), cancellationToken).ConfigureAwait(false);
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (28)
91_singleIndentationTrivia = AsyncLazy.Create(async cancellationToken => generator.Whitespace(await GetSingleIndentationAsync(cancellationToken).ConfigureAwait(false))); 92_braceIndentationTrivia = AsyncLazy.Create(async cancellationToken => generator.Whitespace(await GetBraceTokenIndentationAsync(cancellationToken).ConfigureAwait(false))); 99? Edit.UpdateBetween(_listSyntax.GetFirstToken(), NewLineTrivia, await _singleIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false), _listItems[0]) 126: await _singleIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false); 147result.Add(await GetWrapEveryGroupAsync(cancellationToken).ConfigureAwait(false)); 148result.Add(await GetUnwrapGroupAsync(cancellationToken).ConfigureAwait(false)); 149result.Add(await GetWrapLongGroupAsync(cancellationToken).ConfigureAwait(false)); 163parentTitle, WrappingStyle.UnwrapFirst_IndentRest, cancellationToken).ConfigureAwait(false)); 172parentTitle, WrappingStyle.WrapFirst_IndentRest, cancellationToken).ConfigureAwait(false)); 181parentTitle, WrappingStyle.WrapFirst_IndentRest, wrappingColumn: int.MaxValue, cancellationToken).ConfigureAwait(false); 194var edits = await GetUnwrapAllEditsAsync(wrappingStyle, cancellationToken).ConfigureAwait(false); 199return await TryCreateCodeActionAsync(edits, parentTitle, title, cancellationToken).ConfigureAwait(false); 243parentTitle, WrappingStyle.UnwrapFirst_AlignRest, wrappingColumn, cancellationToken).ConfigureAwait(false)); 250parentTitle, WrappingStyle.WrapFirst_IndentRest, wrappingColumn, cancellationToken).ConfigureAwait(false)); 258parentTitle, WrappingStyle.UnwrapFirst_IndentRest, wrappingColumn, cancellationToken).ConfigureAwait(false)); 279var indentationTrivia = await GetIndentationTriviaAsync(wrappingStyle, cancellationToken).ConfigureAwait(false); 282wrappingStyle, indentationTrivia, wrappingColumn, cancellationToken).ConfigureAwait(false); 285return await TryCreateCodeActionAsync(edits, parentTitle, title, cancellationToken).ConfigureAwait(false); 297await _braceIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false), 349await _braceIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false), 377parentTitle, WrappingStyle.UnwrapFirst_AlignRest, cancellationToken).ConfigureAwait(false)); 386parentTitle, WrappingStyle.WrapFirst_IndentRest, cancellationToken).ConfigureAwait(false)); 395parentTitle, WrappingStyle.UnwrapFirst_IndentRest, cancellationToken).ConfigureAwait(false)); 406var indentationTrivia = await GetIndentationTriviaAsync(wrappingStyle, cancellationToken).ConfigureAwait(false); 408var edits = await GetWrapEachEditsAsync(wrappingStyle, indentationTrivia, cancellationToken).ConfigureAwait(false); 411return await TryCreateCodeActionAsync(edits, parentTitle, title, cancellationToken).ConfigureAwait(false); 432await _braceIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false), 459await _braceIndentationTrivia.GetValueAsync(cancellationToken).ConfigureAwait(false),
Wrapping\WrapItemsAction.cs (2)
41return await base.ComputeOperationsAsync(CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 46var operations = await base.ComputeOperationsAsync(progress, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features.UnitTests (6)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
4742var baseActiveStatementsMap = await debuggingSession.EditSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 4846var baseActiveStatementMap = await debuggingSession.EditSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false);
EditAndContinue\EditSessionActiveStatementsTests.cs (4)
189var baseActiveStatementsMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 353var baseActiveStatementMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 533var baseActiveStatementMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false); 674var baseActiveStatementMap = await editSession.BaseActiveStatements.GetValueAsync(CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.InteractiveHost (34)
Interactive\Core\InteractiveHost.cs (8)
96=> (await TryGetOrCreateRemoteServiceAsync().ConfigureAwait(false)).Service; 230var initializedService = await currentRemoteService.GetInitializedServiceAsync().ConfigureAwait(false); 270=> (await InvokeRemoteAsync<RemoteExecutionResult.Data>(targetName, arguments).ConfigureAwait(false))?.Deserialize() ?? default; 274var initializedRemoteService = await TryGetOrCreateRemoteServiceAsync().ConfigureAwait(false); 280return await InvokeRemoteAsync<TResult>(initializedRemoteService.Service, targetName, arguments).ConfigureAwait(false); 284=> (await InvokeRemoteAsync<RemoteExecutionResult.Data>(remoteService, targetName, arguments).ConfigureAwait(false))?.Deserialize() ?? default; 290return await remoteService.JsonRpc.InvokeAsync<TResult>(targetName, arguments).ConfigureAwait(false); 340var initializedService = await TryGetOrCreateRemoteServiceAsync().ConfigureAwait(false);
Interactive\Core\InteractiveHost.LazyRemoteService.cs (3)
64var remoteService = await TryStartProcessAsync(Options.HostPath, Options.Culture, Options.UICulture, cancellationToken).ConfigureAwait(false); 100result = await ExecuteRemoteAsync(remoteService, nameof(Service.InitializeContextAsync), Options.InitializationFilePath, isRestarting).ConfigureAwait(false); 211cancellationToken).ConfigureAwait(false)).Deserialize();
Interactive\Core\InteractiveHost.Service.cs (17)
254return (await completionSource.Task.ConfigureAwait(false)).Serialize(); 265var state = await ReportUnhandledExceptionIfAnyAsync(lastTask).ConfigureAwait(false); 299return (await completionSource.Task.ConfigureAwait(false)).Serialize(); 313return await completionSource.Task.ConfigureAwait(false); 318var state = await ReportUnhandledExceptionIfAnyAsync(lastTask).ConfigureAwait(false); 356return (await completionSource.Task.ConfigureAwait(false)).Serialize(); 361var state = await ReportUnhandledExceptionIfAnyAsync(lastTask).ConfigureAwait(false); 375var newScriptState = await ExecuteOnUIThreadAsync(script, state.ScriptState, displayResult: true).ConfigureAwait(false); 415return (await completionSource.Task.ConfigureAwait(false)).Serialize(); 471return await lastTask.ConfigureAwait(false); 504var state = await ReportUnhandledExceptionIfAnyAsync(lastTask).ConfigureAwait(false); 589var newScriptState = await TryExecuteFileAsync(rspState, initializationScriptPath).ConfigureAwait(false); 683var state = await ReportUnhandledExceptionIfAnyAsync(lastTask).ConfigureAwait(false); 687var newScriptState = await TryExecuteFileAsync(state, fullPath).ConfigureAwait(false); 712content = await reader.ReadToEndAsync().ConfigureAwait(false); 728return await ExecuteOnUIThreadAsync(script, state.ScriptState, displayResult: false).ConfigureAwait(false); 760var newState = await task.ConfigureAwait(false);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer (6)
HostWorkspace\LanguageServerProjectLoader.cs (1)
178cancellationToken).ConfigureAwait(false);
HostWorkspace\Razor\RazorDynamicFileInfoProvider.cs (1)
40var dynamicInfo = await _dynamicFileInfoProvider.GetDynamicFileInfoAsync(workspaceFactory.Value.HostWorkspace, projectId, projectFilePath, filePath, cancellationToken).ConfigureAwait(false);
LanguageServer\Handler\CopilotCompletion\CopilotCompletionResolveContextHandler.cs (1)
37var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
LanguageServer\RazorDynamicDocumentSyncRegistration.cs (2)
37await IsCohostingEnabledAsync(languageServerManager, cancellationToken).ConfigureAwait(false)) 99cancellationToken).ConfigureAwait(false);
Services\StarredCompletions\StarredCompletionProvider.cs (1)
33return await provider.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol (211)
Extensions\ProtocolConversions.cs (7)
148var insertionChar = await GetInsertionCharacterAsync(document, position, cancellationToken).ConfigureAwait(false); 378documentSpan.Document, documentSpan.SourceSpan, isStale: false, cancellationToken).ConfigureAwait(false); 411textChanges = await textDiffService.GetTextChangesAsync(oldDoc, newDoc, cancellationToken).ConfigureAwait(false); 420var mappedResults = await SpanMappingHelper.TryGetMappedSpanResultAsync(oldDocument, [.. textChanges.Select(tc => tc.Span)], cancellationToken).ConfigureAwait(false); 476? await SpanMappingHelper.TryGetMappedSpanResultAsync(d, [textSpan], cancellationToken).ConfigureAwait(false) 479return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false); 483return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false);
ExternalAccess\Razor\FormatNewFileHandler.cs (4)
64return await GetFormattedNewFileContentAsync(document, cancellationToken).ConfigureAwait(false); 76document = await formattingService.FormatNewDocumentAsync(document, hintDocument, cleanupOptions, cancellationToken).ConfigureAwait(false); 84document = await removeImportsService.RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false); 89var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
ExternalAccess\Razor\SemanticTokensRangesHandler.cs (1)
43_globalOptions, _semanticTokenRefreshQueue, request.Ranges, context, cancellationToken).ConfigureAwait(false);
ExternalAccess\Razor\SimplifyMethodHandler.cs (4)
48return await GetSimplifiedEditsAsync(originalDocument, textEdit, cancellationToken).ConfigureAwait(false); 54var originalSourceText = await originalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 70var newDocument = await Simplifier.ReduceAsync(annotatedDocument, options, cancellationToken).ConfigureAwait(false); 71var changes = await newDocument.GetTextChangesAsync(originalDocument, cancellationToken).ConfigureAwait(false);
Features\CodeCleanup\AbstractCodeCleanupService.cs (14)
40thirdPartyDiagnosticIdsAndTitles = await GetThirdPartyDiagnosticIdsAndTitlesAsync(document, cancellationToken).ConfigureAwait(false); 64document, enabledDiagnostics.Diagnostics, progressTracker, cancellationToken).ConfigureAwait(false); 69document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false); 77document, enabledDiagnostics.OrganizeUsings, cancellationToken).ConfigureAwait(false); 88document = await Formatter.FormatAsync(document, formattingOptions, cancellationToken).ConfigureAwait(false); 96document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false); 126document = await removeUsingsService.RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false); 138document = await organizeImportsService.OrganizeImportsAsync(document, organizeOptions, cancellationToken).ConfigureAwait(false); 156document, diagnosticSet.DiagnosticIds, diagnosticSet.IsAnyDiagnosticIdExplicitlyEnabled, progressTracker, cancellationToken).ConfigureAwait(false); 177document, diagnosticId, minimumSeverity, progressTracker, cancellationToken).ConfigureAwait(false); 191document, textSpan, diagnosticId, minimumSeverity, cancellationToken).ConfigureAwait(false); 200new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false); 218cancellationToken).ConfigureAwait(false); 245document, diagnosticId, DiagnosticSeverity.Warning, progressTracker, cancellationToken).ConfigureAwait(false);
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
39var compileTimeDocument = await CompileTimeSolutionProvider.TryGetCompileTimeDocumentAsync(designTimeDocument, compileTimeSolution, cancellationToken).ConfigureAwait(false);
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (12)
52cancellationToken).ConfigureAwait(false); 56var organizedFixes = await OrganizeFixesAsync(workspace, originalSolution, text, filteredFixes, cancellationToken).ConfigureAwait(false); 138var unifiedSuggestedAction = await GetUnifiedSuggestedActionAsync(originalSolution, fix.Action, fix).ConfigureAwait(false); 152var unifiedNestedAction = await GetUnifiedSuggestedActionAsync(originalSolution, nestedAction, fix).ConfigureAwait(false); 171await getFixAllSuggestedActionSetAsync(action).ConfigureAwait(false)); 246document, firstDiagnostic.Location.SourceSpan, scope, cancellationToken).ConfigureAwait(false); 447cancellationToken).ConfigureAwait(false); 454var orderedRefactoring = await OrganizeRefactoringsAsync(workspace, document, selection, refactoring, cancellationToken).ConfigureAwait(false); 517var unifiedActionSet = await GetUnifiedSuggestedActionSetAsync(action, applicableToSpan, selection, cancellationToken).ConfigureAwait(false); 546var unifiedAction = await GetUnifiedSuggestedActionSetAsync(nestedAction, applicableToSpan, selection, cancellationToken).ConfigureAwait(false); 566workspace, cancellationToken).ConfigureAwait(false); 614var documentsAndSpans = await fixAllState.GetFixAllSpansAsync(cancellationToken).ConfigureAwait(false);
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (3)
61var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 71var result = await breakpointService.ResolveBreakpointAsync(document, span, cancellationToken).ConfigureAwait(false); 99var secondResult = await breakpointService.ResolveBreakpointAsync(document, new TextSpan(span.End, length: 0), cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionFixAllResolveHandler.cs (3)
51cancellationToken).ConfigureAwait(false); 59var operations = await fixAllCodeAction.GetOperationsAsync(document.Project.Solution, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 60var edit = await CodeActionResolveHelper.GetCodeActionResolveEditsAsync(context, data, operations, cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionHelpers.cs (1)
405filterOutsideSelection: false, cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionResolveHandler.cs (3)
83cancellationToken).ConfigureAwait(false); 90solution, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 92var edit = await CodeActionResolveHelper.GetCodeActionResolveEditsAsync(context, data, operations, cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionResolveHelper.cs (2)
65var newSolution = await applyChangesOperation.ChangedSolution.WithMergedLinkedFileChangesAsync(solution, changes, cancellationToken: cancellationToken).ConfigureAwait(false); 293textChanges = await textDiffService.GetTextChangesAsync(oldDoc, newDoc, cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionsHandler.cs (1)
58request, document, _codeFixService, _codeRefactoringService, hasVsLspCapability: clientCapability.HasVisualStudioLspCapability(), cancellationToken).ConfigureAwait(false);
Handler\CodeLens\CodeLensHandler.cs (2)
60var members = await codeLensMemberFinder.GetCodeLensMembersAsync(document, cancellationToken).ConfigureAwait(false); 92var syntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false);
Handler\CodeLens\CodeLensResolveHandler.cs (3)
44var currentDocumentSyntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false); 68var members = await codeLensMemberFinder.GetCodeLensMembersAsync(document, cancellationToken).ConfigureAwait(false); 72var referenceCount = await codeLensReferencesService.GetReferenceCountAsync(document.Project.Solution, document.Id, memberToResolve.Node, maxSearchResults: 99, cancellationToken).ConfigureAwait(false);
Handler\Completion\CompletionHandler.cs (9)
54.ConfigureAwait(false); 66cancellationToken).ConfigureAwait(false); 84.ConfigureAwait(false); 97completionContext, document, documentText, position, completionOptions, capabilityHelper, completionService, completionListCache, completionListMaxSize, cancellationToken).ConfigureAwait(false); 106.ConfigureAwait(false); 123var completionTrigger = await ProtocolConversions.LSPToRoslynCompletionTriggerAsync(context, document, position, cancellationToken).ConfigureAwait(false); 132result = await CalculateListAsync(document, position, originalTrigger, completionOptions, completionService, completionListCache, cancellationToken).ConfigureAwait(false); 137result = await CalculateListAsync(document, position, completionTrigger, completionOptions, completionService, completionListCache, cancellationToken).ConfigureAwait(false); 174var completionList = await completionService.GetCompletionsAsync(document, position, completionOptions, document.Project.Solution.Options, completionTrigger, cancellationToken: cancellationToken).ConfigureAwait(false);
Handler\Completion\CompletionResolveHandler.cs (1)
113cancellationToken).ConfigureAwait(false);
Handler\Completion\CompletionResultFactory.cs (15)
80lspCompletionItems.Add(await CreateLSPCompletionItemAsync(item, typedText, i).ConfigureAwait(false)); 131cancellationToken).ConfigureAwait(false); 349cancellationToken).ConfigureAwait(false); 529var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, item, cancellationToken).ConfigureAwait(false); 545var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false); 547var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 568return await completionService.GetChangeAsync(document, completionItem, cancellationToken: cancellationToken).ConfigureAwait(false); 605document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false); 618roslynItem, document, completionService, cancellationToken).ConfigureAwait(false); 624document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: false, cancellationToken).ConfigureAwait(false); 654document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false); 673var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 675document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: true, cancellationToken).ConfigureAwait(false); 693var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false); 698var documentText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (2)
85var configurationsFromClient = await GetConfigurationsAsync(cancellationToken).ConfigureAwait(false); 125Methods.WorkspaceConfigurationName, configurationParams, cancellationToken).ConfigureAwait(false);
Handler\Configuration\DidChangeConfigurationNotificationHandler_OnInitialized.cs (1)
27cancellationToken).ConfigureAwait(false);
Handler\DataTips\DataTipRangeHandler.cs (1)
38var info = await service.GetDataTipInfoAsync(document, position, includeKind: true, cancellationToken).ConfigureAwait(false);
Handler\Definitions\AbstractGoToDefinitionHandler.cs (5)
53var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 59var definitions = await service.GetNavigableItemsAsync(document, position, forSymbolType, cancellationToken).ConfigureAwait(false); 71cancellationToken).ConfigureAwait(false); 79var symbol = await SymbolFinder.FindSymbolAtPositionAsync(semanticModel, position, document.Project.Solution.Services, includeType: true, cancellationToken).ConfigureAwait(false); 86var declarationFile = await metadataAsSourceFileService.GetGeneratedFileAsync(workspace, document.Project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (2)
164cancellationToken).ConfigureAwait(false); 231var id = await GetIdForPreviousResultAsync(diagnosticParams.TextDocument, solution, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (1)
156var namedDiagnostics = await source.GetDiagnosticsAsync(context, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (1)
52Project, diagnosticIds: null, filter, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (3)
44sourceGeneratedDocument, range: null, DiagnosticKind.All, cancellationToken).ConfigureAwait(false); 63var result = await lazyDiagnostics.GetValueAsync(cancellationToken).ConfigureAwait(false); 77project, documentIds: default, diagnosticIds: null, filter, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (2)
26Document, range: null, diagnosticKind: this.DiagnosticKind, cancellationToken).ConfigureAwait(false); 34var copilotDiagnostics = await Document.GetCachedCopilotDiagnosticsAsync(span: null, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (1)
28Document.Project, [Document.Id], diagnosticIds: null, filter, includeLocalDocumentDiagnostics: false, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (1)
42var items = await service.GetTaskListItemsAsync(this.Document, descriptors, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticsPullCache.cs (2)
38return (state.GlobalStateVersion, await state.Project.GetDiagnosticChecksumAsync(cancellationToken).ConfigureAwait(false)); 44var diagnostics = await state.DiagnosticSource.GetDiagnosticsAsync(state.Context, cancellationToken).ConfigureAwait(false);
Handler\FoldingRanges\FoldingRangesHandler.cs (1)
74var blockStructure = await blockStructureService.GetBlockStructureAsync(document, options, cancellationToken).ConfigureAwait(false);
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (3)
41var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(options, document, cancellationToken).ConfigureAwait(false); 56var organizedDocument = await organizeImports.OrganizeImportsAsync(formattedDocument, organizeImportsOptions, cancellationToken).ConfigureAwait(false); 58var textChanges = await organizedDocument.GetTextChangesAsync(context.Document).ConfigureAwait(false);
Handler\Formatting\FormatDocumentOnTypeHandler.cs (2)
51var position = await document.GetPositionFromLinePositionAsync(ProtocolConversions.PositionToLinePosition(request.Position), cancellationToken).ConfigureAwait(false); 62var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(request.Options, document, cancellationToken).ConfigureAwait(false);
Handler\Highlights\DocumentHighlightHandler.cs (4)
56var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 59var keywordHighlights = await GetKeywordHighlightsAsync(highlightingService, document, text, position, cancellationToken).ConfigureAwait(false); 66var referenceHighlights = await GetReferenceHighlightsAsync(globalOptions, document, text, position, cancellationToken).ConfigureAwait(false); 99cancellationToken).ConfigureAwait(false);
Handler\Hover\HoverHandler.cs (6)
78.ConfigureAwait(false); 83document, position, options, supportsVSExtensions, supportsMarkdown, cancellationToken).ConfigureAwait(false); 97var info = await quickInfoService.GetQuickInfoAsync(document, position, options, cancellationToken).ConfigureAwait(false); 102? await CreateVsHoverAsync(document, info, options, cancellationToken).ConfigureAwait(false) 103: await CreateDefaultHoverAsync(document, info, supportsMarkdown, cancellationToken).ConfigureAwait(false); 119var content = await QuickInfoContentBuilder.BuildInteractiveContentAsync(info, context, cancellationToken).ConfigureAwait(false);
Handler\InlayHint\InlayHintHandler.cs (3)
53var hints = await CalculateInlayHintsAsync(document, range, options, displayAllOverride, cancellationToken).ConfigureAwait(false); 54var syntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false); 103var hints = await inlineHintService.GetInlineHintsAsync(document, textSpan, options, displayAllOverride, cancellationToken).ConfigureAwait(false);
Handler\InlayHint\InlayHintResolveHandler.cs (3)
49var currentSyntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false); 65var hints = await InlayHintHandler.CalculateInlayHintsAsync(document, resolveData.Range, options, resolveData.DisplayAllOverride, cancellationToken).ConfigureAwait(false); 69var taggedText = await inlineHintToResolve.Value.GetDescriptionAsync(document, cancellationToken).ConfigureAwait(false);
Handler\InlineCompletions\InlineCompletionsHandler.cs (5)
108var item = await GetInlineCompletionItemsAsync(context.Logger, document, linePosition, request.Options, _xmlSnippetParser, cancellationToken).ConfigureAwait(false); 153var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(options, document, cancellationToken).ConfigureAwait(false); 156var formattedLspSnippet = await GetFormattedLspSnippetAsync(parsedSnippet, wordOnLeft.Value, document, sourceText, formattingOptions, simplifierOptions, cancellationToken).ConfigureAwait(false); 183originalDocument, originalSourceText, snippetShortcut, parsedSnippet, simplifierOptions, cancellationToken).ConfigureAwait(false); 286part = await functionPart.WithSnippetFunctionResultAsync(documentWithDefaultSnippet, new TextSpan(locationInDefaultSnippet, part.DefaultText.Length), simplifierOptions, cancellationToken).ConfigureAwait(false);
Handler\InlineCompletions\XmlSnippetParser.ParsedXmlSnippet.cs (2)
55var simplifiedTypeName = await SnippetFunctionService.GetSimplifiedTypeNameAsync(documentWithSnippet, fieldSpan, FunctionParam, simplifierOptions, cancellationToken).ConfigureAwait(false); 63var className = await snippetFunctionService.GetContainingClassNameAsync(documentWithSnippet, fieldSpan.Start, cancellationToken).ConfigureAwait(false);
Handler\MapCode\MapCodeHandler.cs (5)
48var mappingResult = await MapCodeAsync(codeMapping).ConfigureAwait(false); 95cancellationToken).ConfigureAwait(false); 101cancellationToken).ConfigureAwait(false); 109var oldText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 121var focusText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\OnAutoInsert\OnAutoInsertHandler.cs (5)
76var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(lspFormattingOptions, document, cancellationToken).ConfigureAwait(false); 84document, linePosition, character, service, docCommentOptions, cancellationToken).ConfigureAwait(false); 103document, servicesForDocument, linePosition, indentationOptions, cancellationToken).ConfigureAwait(false); 154var serviceAndContext = await GetBraceCompletionContextAsync(servicesForDocument, position, document, cancellationToken).ConfigureAwait(false); 195var textChange = await GetCollapsedChangeAsync(textChanges, document, cancellationToken).ConfigureAwait(false);
Handler\PullHandlers\VersionedPullCache.CacheItem.cs (3)
76version = await cache.ComputeVersionAsync(state, cancellationToken).ConfigureAwait(false); 86version = await cache.ComputeVersionAsync(state, cancellationToken).ConfigureAwait(false); 90var data = await cache.ComputeDataAsync(state, cancellationToken).ConfigureAwait(false);
Handler\PullHandlers\VersionedPullCache.cs (3)
72var isFullyLoaded = await IsFullyLoadedAsync(project.Solution, cancellationToken).ConfigureAwait(false); 80this, previousResult, isFullyLoaded, state, project.Language, cancellationToken).ConfigureAwait(false); 91var isFullyLoaded = await workspaceStatusService.IsFullyLoadedAsync(cancellationToken).ConfigureAwait(false);
Handler\References\FindAllReferencesHandler.cs (1)
80var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false);
Handler\References\FindImplementationsHandler.cs (3)
52var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 64locations.AddIfNotNull(await ProtocolConversions.DocumentSpanToLocationWithTextAsync(sourceSpan, text, cancellationToken).ConfigureAwait(false)); 68locations.AddIfNotNull(await ProtocolConversions.DocumentSpanToLocationAsync(sourceSpan, cancellationToken).ConfigureAwait(false));
Handler\References\FindUsagesLSPContext.cs (8)
119definition.Tags.GetFirstGlyph(), symbolUsageInfo: null, isWrittenTo: false, cancellationToken).ConfigureAwait(false); 170definitionGlyph: Glyph.None, reference.SymbolUsageInfo, reference.IsWrittenTo, cancellationToken).ConfigureAwait(false); 191var text = await ComputeTextAsync(definitionId, documentSpan, definitionText, isWrittenTo, cancellationToken).ConfigureAwait(false); 195var location = await ComputeLocationAsync(documentSpan, cancellationToken).ConfigureAwait(false); 251return await ProtocolConversions.DocumentSpanToLocationAsync(documentSpan.Value, cancellationToken).ConfigureAwait(false); 255var symbol = await SymbolFinder.FindSymbolAtPositionAsync(_document, _position, cancellationToken).ConfigureAwait(false); 272_workspace, _document.Project, symbol, signaturesOnly: true, options: options, cancellationToken: cancellationToken).ConfigureAwait(false); 310documentSpan.Value, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
Handler\RelatedDocuments\RelatedDocumentsHandler.cs (1)
65var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Rename\PrepareRenameHandler.cs (3)
33var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 36document, position, cancellationToken).ConfigureAwait(false); 40var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Rename\RenameHandler.cs (6)
36var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 39document, position, cancellationToken).ConfigureAwait(false); 53cancellationToken).ConfigureAwait(false); 56symbolicRenameInfo.Symbol, symbolicRenameInfo.GetFinalSymbolName(newName), cancellationToken).ConfigureAwait(false); 69renamedSolution = await renamedSolution.WithMergedLinkedFileChangesAsync(oldSolution, solutionChanges, cancellationToken: cancellationToken).ConfigureAwait(false); 81textDiffService, cancellationToken).ConfigureAwait(false);
Handler\RequestContext.cs (2)
265(workspace, solution, document) = await lspWorkspaceManager.GetLspDocumentInfoAsync(textDocument, cancellationToken).ConfigureAwait(false); 270(workspace, solution) = await lspWorkspaceManager.GetLspSolutionInfoAsync(cancellationToken).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensFullHandler.cs (1)
40_globalOptions, _semanticTokenRefreshQueue, ranges: null, context, cancellationToken).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensHelpers.cs (3)
35var text = await contextDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var tokensData = await HandleRequestHelperAsync(contextDocument, spans.MoveToImmutable(), supportsVisualStudioExtensions, options, cancellationToken).ConfigureAwait(false); 73cancellationToken).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensRangeHandler.cs (1)
38_globalOptions, _semanticTokenRefreshQueue, [request.Range], context, cancellationToken).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensRefreshQueue.cs (1)
43var projectChecksum = await project.Solution.CompilationState.GetChecksumAsync(project.Id, cancellationToken).ConfigureAwait(false);
Handler\SignatureHelp\SignatureHelpHandler.cs (2)
45var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 48var (_, sigItems) = await signatureHelpService.GetSignatureHelpAsync(document, position, triggerInfo, cancellationToken).ConfigureAwait(false);
Handler\SourceGenerators\SourceGeneratedDocumentCache.cs (2)
24var dependentVersion = await state.Document.Project.GetDependentVersionAsync(cancellationToken).ConfigureAwait(false); 43: await unfrozenDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\SourceGenerators\SourceGeneratedDocumentGetTextHandler.cs (1)
60var newResult = await cache.GetOrComputeNewDataAsync(previousPullResults, projectOrDocument, document.Project, new SourceGeneratedDocumentGetTextState(document), cancellationToken).ConfigureAwait(false);
Handler\SourceGenerators\SourceGeneratorRefreshQueue.cs (2)
115if (await oldProject.GetDependentVersionAsync(_disposalTokenSource.Token).ConfigureAwait(false) != 116await newProject.GetDependentVersionAsync(_disposalTokenSource.Token).ConfigureAwait(false))
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (2)
82var documentToPreviousParams = await GetDocumentToPreviousParamsAsync(context, previousResults, cancellationToken).ConfigureAwait(false); 106cancellationToken).ConfigureAwait(false);
Handler\SpellCheck\SpellCheckPullCache.cs (2)
26var documentChecksumState = await state.Document.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 40var spans = await state.Service.GetSpansAsync(state.Document, cancellationToken).ConfigureAwait(false);
Handler\Symbols\DocumentSymbolsHandler.cs (1)
55var navBarItems = await navBarService.GetItemsAsync(document, supportsCodeGeneration: false, frozenPartialSemantics: false, cancellationToken).ConfigureAwait(false);
Handler\Symbols\WorkspaceSymbolsHandler.cs (1)
91document, result.NavigableItem.SourceSpan, result.NavigableItem.IsStale, context, cancellationToken).ConfigureAwait(false);
Handler\WorkspaceCommand\ExecuteWorkspaceCommandHandler.cs (1)
39var result = await handler.HandleRequestAsync(request, context, cancellationToken).ConfigureAwait(false);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (1)
213var result = await queue.ExecuteAsync(requestObject, _method, lspServices, cancellationToken).ConfigureAwait(false);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\NewtonsoftLanguageServer.cs (1)
79var result = await InvokeAsync(queue, request, lspServices, cancellationToken).ConfigureAwait(false);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\QueueItem.cs (4)
102var context = await requestContextFactory.CreateRequestContextAsync(this, handler, deserializedRequest, cancellationToken).ConfigureAwait(false); 191var result = await requestHandler.HandleRequestAsync(request, context, cancellationToken).ConfigureAwait(false); 197var result = await parameterlessRequestHandler.HandleRequestAsync(context, cancellationToken).ConfigureAwait(false); 246await _completionSource.Task.ConfigureAwait(false);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (3)
204queueItem = await _queue.DequeueAsync(_cancelSource.Token).ConfigureAwait(false); 339var contextInfo = await work.CreateRequestContextAsync<TRequest>(handler, metadata, _languageServer, cancellationToken).ConfigureAwait(false); 485var (_, _, cancellationToken) = await _queue._queue.DequeueAsync().ConfigureAwait(false);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\SystemTextJsonLanguageServer.cs (1)
87var result = await InvokeAsync(queue, request, lspServices, cancellationToken).ConfigureAwait(false);
Workspaces\LspWorkspaceManager.cs (4)
229var updatedSolutions = await GetLspSolutionsAsync(cancellationToken).ConfigureAwait(false); 248var lspSolutions = await GetLspSolutionsAsync(cancellationToken).ConfigureAwait(false); 340var (lspSolution, isForked) = await GetLspSolutionForWorkspaceAsync(workspace, cancellationToken).ConfigureAwait(false); 401var doesAllTextMatch = await DoesAllTextMatchWorkspaceSolutionAsync(documentsInWorkspace, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (189)
Completion\CompletionFeaturesTests.cs (20)
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); 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); 609var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 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); 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); 910var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 979var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false); 1052var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false);
Completion\CompletionResolveTests.cs (17)
65label: "A").ConfigureAwait(false); 71testLspServer, clientCompletionItem).ConfigureAwait(false); 89var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "A").ConfigureAwait(false); 95testLspServer, clientCompletionItem).ConfigureAwait(false); 115var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "M()").ConfigureAwait(false); 117testLspServer, clientCompletionItem).ConfigureAwait(false); 163label: "M()").ConfigureAwait(false); 166testLspServer, clientCompletionItem).ConfigureAwait(false); 199document, new TestCaretOutOfScopeCompletionService(testLspServer.TestWorkspace.Services.SolutionServices), selectedItem, snippetsSupported: true, insertNewPositionPlaceholder: true, CancellationToken.None).ConfigureAwait(false); 263label: "AMethod").ConfigureAwait(false); 266clientCompletionItem).ConfigureAwait(false); 325label: "AMethod").ConfigureAwait(false); 328clientCompletionItem).ConfigureAwait(false); 358var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "(byte)").ConfigureAwait(false); 361testLspServer, clientCompletionItem).ConfigureAwait(false); 381var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "svm").ConfigureAwait(false); 386testLspServer, clientCompletionItem).ConfigureAwait(false);
Completion\CompletionTests.cs (57)
96request: completionParams, document: document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false); 102var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 149request: completionParams, document: document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false); 155var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 184request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false); 186var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 219request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false); 221var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 259request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false); 261var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 289request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false); 291var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 373completionParams, document, preselect: true, commitCharacters: ImmutableArray.Create(' ', '(', '[', '{', ';', '.')).ConfigureAwait(false); 375var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 405var results = (LSP.VSInternalCompletionList)await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 437labelDetails: new() { Description = "shortdate" }).ConfigureAwait(false); 439var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 468var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 504sortText: "0000", labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false); 506var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 543sortText: "0000", vsResolveTextEditOnCommit: true, labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false); 545var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 582sortText: "0000", vsResolveTextEditOnCommit: true, labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false); 584var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 638sortText: "0000", labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false); 640var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 674await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 680await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 688await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 698await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 733completionParams, document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false); 735var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 765var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 795var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 823var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 875var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 931var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 987var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1000results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1055var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1068results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1123var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1135results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1147results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1160results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1220var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1231results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1285var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1347var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1364results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1379results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1413var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1467var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1480results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1508var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1567var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1597var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
102await server.ExecuteRequestAsync<DidChangeConfigurationParams, object>(Methods.WorkspaceDidChangeConfigurationName, new DidChangeConfigurationParams(), CancellationToken.None).ConfigureAwait(false);
Diagnostics\AbstractPullDiagnosticTestsBase.cs (4)
93CancellationToken.None).ConfigureAwait(false); 127CancellationToken.None).ConfigureAwait(false); 260CancellationToken.None).ConfigureAwait(false); 277CancellationToken.None).ConfigureAwait(false);
Diagnostics\PullDiagnosticTests.cs (14)
244var results = await RunGetDocumentPullDiagnosticsAsync(testLspServer, document.GetURI(), useVSDiagnostics).ConfigureAwait(false); 252results = await RunGetDocumentPullDiagnosticsAsync(testLspServer, document.GetURI(), useVSDiagnostics, results.Single().ResultId).ConfigureAwait(false); 524await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 576await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1455await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1661await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1743await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1762var csproj3DocumentText = await csproj3Document.GetTextAsync().ConfigureAwait(false); 1768results = await RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, previousResults: previousResultIds).ConfigureAwait(false); 1817await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1885await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1948await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 2004await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 2048await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (3)
39var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.DocumentUri).ConfigureAwait(false); 84var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.DocumentUri).ConfigureAwait(false); 106var (_, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new TextDocumentIdentifier { DocumentUri = uri }, CancellationToken.None).ConfigureAwait(false);
HandlerTests.cs (1)
293await Assert.ThrowsAnyAsync<Exception>(async () => await testLspServer.ExecuteRequestAsync<TestRequestTypeOne, string>(TestDocumentHandler.MethodName, request, CancellationToken.None)).ConfigureAwait(false);
Hover\HoverTests.cs (13)
39var results = await RunGetHoverAsync(testLspServer, expectedLocation).ConfigureAwait(false); 63var results = await RunGetHoverAsync(testLspServer, expectedLocation).ConfigureAwait(false); 86var results = await RunGetHoverAsync(testLspServer, expectedLocation).ConfigureAwait(false); 114var results = await RunGetHoverAsync(testLspServer, expectedLocation).ConfigureAwait(false); 136var results = await RunGetHoverAsync(testLspServer, testLspServer.GetLocations("caret").Single()).ConfigureAwait(false); 241expectedLocation).ConfigureAwait(false); 308expectedLocation).ConfigureAwait(false); 365expectedLocation).ConfigureAwait(false); 406expectedLocation).ConfigureAwait(false); 440expectedLocation).ConfigureAwait(false); 475expectedLocation).ConfigureAwait(false); 504expectedLocation).ConfigureAwait(false); 590expectedLocation).ConfigureAwait(false);
Ordering\RequestOrderingTests.cs (1)
274var (_, solution) = await testLspServer.GetManager().GetLspSolutionInfoAsync(CancellationToken.None).ConfigureAwait(false);
RelatedDocuments\RelatedDocumentsTests.cs (1)
35CancellationToken.None).ConfigureAwait(false);
SemanticTokens\AbstractSemanticTokensTests.cs (1)
78var text = await document.GetTextAsync().ConfigureAwait(false);
SpellCheck\SpellCheckTests.cs (6)
128var results = await RunGetDocumentSpellCheckSpansAsync(testLspServer, document.GetURI()).ConfigureAwait(false); 142results = await RunGetDocumentSpellCheckSpansAsync(testLspServer, document.GetURI(), results.Single().ResultId).ConfigureAwait(false); 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 (3)
116var results = await RunGetDocumentSymbolsAsync<LSP.SymbolInformation[]>(testLspServer).ConfigureAwait(false); 132var results = await RunGetDocumentSymbolsAsync<LSP.SymbolInformation[]>(testLspServer).ConfigureAwait(false); 161var results = await RunGetDocumentSymbolsAsync<LSP.SymbolInformation[]>(testLspServer).ConfigureAwait(false);
Symbols\WorkspaceSymbolsTests.cs (8)
53var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "A").ConfigureAwait(false); 77var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "A", progress).ConfigureAwait(false); 103var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "M").ConfigureAwait(false); 128var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "i").ConfigureAwait(false); 158var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "F").ConfigureAwait(false); 192var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "M").ConfigureAwait(false); 210var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "NonExistingSymbol").ConfigureAwait(false); 230var results = await RunGetWorkspaceSymbolsAsync(testLspServer, "A").ConfigureAwait(false);
UriTests.cs (5)
185var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = unencodedUri }, CancellationToken.None).ConfigureAwait(false); 200var (encodedWorkspace, _, encodedDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = encodedUri }, CancellationToken.None).ConfigureAwait(false); 233var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false); 246var (lowerCaseWorkspace, _, lowerCaseDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = lowerCaseUri }, CancellationToken.None).ConfigureAwait(false); 279var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false);
Workspaces\LspWorkspaceManagerTests.cs (34)
35var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 41(_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 48var (_, closedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 87var (_, firstDocumentWithChange) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false); 88var (_, secondDocumentUnchanged) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false); 122var (_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false); 127(_, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false); 160(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 193(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 227var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false); 274var (_, hostSolution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false); 300var (_, solution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false); 338var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 343var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 352var (_, changedFirstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 359var (_, unchangedSecondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 393var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 398var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 408var (_, secondDocumentChangedProject) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 414var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 443var (_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false); 463(_, documentServerOne) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerOne).ConfigureAwait(false); 466(_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false); 484var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 507var (workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 526(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 544(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 564var (workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 580(workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 603var (workspace, originalDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 616var (_, newDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 704var (_, removedSourceGeneratorDocument) = await GetLspWorkspaceAndDocumentAsync(sourceGeneratorDocumentUri, testLspServer).ConfigureAwait(false); 715var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 728var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(CreateTextDocumentIdentifier(uri), CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (84)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.PublicApiAnalyzers (25)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (17)
AnnotatePublicApiFix.cs (7)
73SourceText sourceText = await publicSurfaceAreaDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 139SyntaxNode? root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 140SemanticModel? semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 181var text = await doc.GetTextAsync(cancellationToken).ConfigureAwait(false); 210ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 219ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 229ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false);
DeclarePublicApiFix.cs (7)
106var sourceText = await surfaceAreaDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 251await publicSurfaceAreaAdditionalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false) : 271SyntaxNode? root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 272SemanticModel? semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 361ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 370ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 380ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false);
NullableEnablePublicApiFix.cs (3)
58SourceText sourceText = await surfaceAreaDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 103var shippedSourceText = await shippedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 139ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false);
Microsoft.CodeAnalysis.Remote.ServiceHub (111)
Host\RemoteExportProviderBuilder.cs (1)
61s_instance = await builder.CreateExportProviderAsync(cancellationToken).ConfigureAwait(false);
Host\RemoteWorkspace.cs (6)
51var currentSolutionChecksum = await this.CurrentSolution.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 149var solution = await solutionTask.WithCancellation(cancellationToken).ConfigureAwait(false); 212if (await IsIncrementalUpdateAsync().ConfigureAwait(false)) 217solutionChecksum, this.Services.SolutionServices, cancellationToken).ConfigureAwait(false); 259assetProvider, newSolutionChecksum, cancellationToken).ConfigureAwait(false); 263return await updater.CreateSolutionAsync(newSolutionChecksum, cancellationToken).ConfigureAwait(false);
Host\RemoteWorkspace.InFlightSolution.cs (2)
136var solution = await _disconnectedSolutionTask.ConfigureAwait(false); 139return await updatePrimaryBranchAsync(solution, cancellationToken).ConfigureAwait(false);
Host\RemoteWorkspace.SolutionCreator.cs (21)
50var oldSolutionCompilationChecksums = await solution.CompilationState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 51var oldSolutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 65solution, oldSolutionChecksums, newSolutionChecksums, cancellationToken).ConfigureAwait(false); 73AssetPathKind.SolutionAnalyzerReferences, newSolutionChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false); 204.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 227solution, isConeSync, oldProjectIdToStateChecksums, newProjectIdToStateChecksums, cancellationToken).ConfigureAwait(false); 279newProjectChecksums, solution.Services, cancellationToken).ConfigureAwait(false); 333solution.GetRequiredProject(projectId), oldProjectChecksums, newProjectChecksums, cancellationToken).ConfigureAwait(false); 362assetPath: project.Id, newProjectChecksums.ProjectReferences, cancellationToken).ConfigureAwait(false)); 369assetPath: project.Id, newProjectChecksums.MetadataReferences, cancellationToken).ConfigureAwait(false)); 378assetPath: project.Id, newProjectChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false); 395cancellationToken).ConfigureAwait(false); 407cancellationToken).ConfigureAwait(false); 419cancellationToken).ConfigureAwait(false); 469return await UpdateDocumentsAsync(project, addDocuments, removeDocuments, oldDocumentIdToChecksums, newDocumentIdToChecksums, cancellationToken).ConfigureAwait(false); 490documentId, newDocumentChecksums.attributeChecksum, newDocumentChecksums.textChecksum, cancellationToken).ConfigureAwait(false); 530project = await UpdateDocumentAsync(document, oldDocumentChecksums, newDocumentChecksums, cancellationToken).ConfigureAwait(false); 545document = await UpdateDocumentInfoAsync(document, newDocumentChecksums.attributeChecksum, cancellationToken).ConfigureAwait(false); 615? await incrementalSolutionBuilt.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false) 616: await incrementalSolutionBuilt.CompilationState.GetChecksumAsync(projectConeId, cancellationToken).ConfigureAwait(false); 622checksumFromRequest, _workspace.Services.SolutionServices, cancellationToken).ConfigureAwait(false);
Host\RemoteWorkspace_SolutionCaching.cs (1)
93async cancellationToken => cachedSolution ?? await ComputeDisconnectedSolutionAsync(assetProvider, solutionChecksum, cancellationToken).ConfigureAwait(false));
Host\SolutionAssetCache.cs (1)
175var compilationStateChecksums = await compilationState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
Host\TestUtils.cs (13)
48var allChecksumsFromRequest = await GetAllChildrenChecksumsAsync(checksumFromRequest).ConfigureAwait(false); 50var assetMapFromNewSolution = await solutionFromScratch.GetAssetMapAsync(projectConeId, CancellationToken.None).ConfigureAwait(false); 51var assetMapFromIncrementalSolution = await incrementalSolutionBuilt.GetAssetMapAsync(projectConeId, CancellationToken.None).ConfigureAwait(false); 70var mismatch5 = await GetAssetFromAssetServiceAsync(allChecksumsFromRequest.Except(assetMapFromNewSolution.Keys)).ConfigureAwait(false); 73var mismatch6 = await GetAssetFromAssetServiceAsync(allChecksumsFromRequest.Except(assetMapFromIncrementalSolution.Keys)).ConfigureAwait(false); 176var projectStateChecksums = await project.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 192var compilationChecksums = await solution.CompilationState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 197var documentChecksums = await frozenSourceGeneratedDocumentState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 201var solutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 210var (compilationChecksums, projectCone) = await solution.CompilationState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 213var solutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 233var projectChecksums = await project.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 238var documentChecksums = await document.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (2)
65var wasSynchronized = await SynchronizeTextChangesHelperAsync().ConfigureAwait(false); 86var text = await TryGetSourceTextAsync(WorkspaceManager, workspace, documentId, baseTextChecksum, cancellationToken).ConfigureAwait(false);
Services\ClientOptionsProvider.cs (1)
22return await lazyOptions.GetValueAsync(cancellationToken).ConfigureAwait(false);
Services\CodeLensReferences\RemoteCodeLensReferencesService.cs (4)
60cancellationToken).ConfigureAwait(false); 79solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false); 97solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false); 117solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false);
Services\ConvertTupleToStructCodeRefactoringProvider\RemoteConvertTupleToStructCodeRefactoringService.cs (4)
41var updatedSolution = await service.ConvertToStructAsync(document, span, scope, isRecord, cancellationToken).ConfigureAwait(false); 43var cleanedSolution = await CleanupAsync(solution, updatedSolution, cancellationToken).ConfigureAwait(false); 48solution, cleanedSolution, cancellationToken).ConfigureAwait(false); 91cancellationToken).ConfigureAwait(false);
Services\Copilot\RemoteCopilotChangeAnalysisService.cs (1)
36return await service.AnalyzeChangeAsync(document, edits, cancellationToken).ConfigureAwait(false);
Services\DependentTypeFinder\RemoteDependentTypeFinderService.cs (1)
44var types = await DependentTypeFinder.FindTypesInCurrentProcessAsync(namedType, solution, projects, transitive, kind, cancellationToken).ConfigureAwait(false);
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (9)
130var (compilationWithAnalyzers, projectAnalyzerToIdMap, hostAnalyzerToIdMap) = await GetOrCreateCompilationWithAnalyzersAsync(cancellationToken).ConfigureAwait(false); 165logPerformanceInfo, getTelemetryInfo, cancellationToken).ConfigureAwait(false); 184documentAnalysisScope, _project, _analyzerInfoCache, cancellationToken).ConfigureAwait(false); 208_project, projectAnalyzers, hostAnalyzers, skippedAnalyzersInfo, cancellationToken).ConfigureAwait(false)); 326var cacheEntry = await GetOrCreateCacheEntryAsync().ConfigureAwait(false); 334return await CreateCompilationWithAnalyzersCacheEntryAsync(cancellationToken).ConfigureAwait(false); 346var entry = await CreateCompilationWithAnalyzersCacheEntryAsync(cancellationToken).ConfigureAwait(false); 417? await CreateCompilationWithAnalyzerAsync(projectAnalyzerBuilder.ToImmutable(), hostAnalyzerBuilder.ToImmutable(), cancellationToken).ConfigureAwait(false) 440var compilation = await _project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (7)
49cancellationToken).ConfigureAwait(false); 107var descriptors = await project.GetDiagnosticDescriptorsAsync(analyzerReference, cancellationToken).ConfigureAwait(false); 132solution, projectId, analyzerReference, language, cancellationToken).ConfigureAwait(false); 147var map = await service.GetDiagnosticDescriptorsPerReferenceAsync(solution, cancellationToken).ConfigureAwait(false); 167var map = await service.GetDiagnosticDescriptorsPerReferenceAsync(project, cancellationToken).ConfigureAwait(false); 189project, allProjectAnalyzers.FilterAnalyzers(analyzerIds), cancellationToken).ConfigureAwait(false); 222incrementalAnalysis, logPerformanceInfo, cancellationToken).ConfigureAwait(false);
Services\DocumentHighlights\RemoteDocumentHighlightsService.cs (1)
45document, position, documentsToSearchSet, options, cancellationToken).ConfigureAwait(false);
Services\EncapsulateField\RemoteEncapsulateFieldService.cs (2)
37var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 50document, fields.ToImmutable(), updateReferences, cancellationToken).ConfigureAwait(false);
Services\ExtensionMethodImportCompletion\RemoteExtensionMethodImportCompletionService.cs (2)
42var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 54document, semanticModel: null, position, receiverTypeSymbol, namespaceInScopeSet, targetTypes, forceCacheCreation, hideAdvancedMembers, cancellationToken).ConfigureAwait(false);
Services\FullyQualify\RemoteFullyQualifyService.cs (1)
35return await service.GetFixDataAsync(document, span, cancellationToken).ConfigureAwait(false);
Services\Initialization\RemoteInitializationService.cs (1)
27var errorMessage = await RemoteExportProviderBuilder.InitializeAsync(localSettingsDirectory, cancellationToken).ConfigureAwait(false);
Services\MissingImportDiscovery\RemoteMissingImportDiscoveryService.cs (2)
53packageSources, cancellationToken).ConfigureAwait(false); 82packageSources, cancellationToken).ConfigureAwait(false);
Services\NavigationBar\RemoteNavigationBarItemService.cs (1)
35var result = await navigationBarService.GetItemsAsync(document, supportsCodeGeneration, frozenPartialSemantics, cancellationToken).ConfigureAwait(false);
Services\Renamer\RemoteRenamerService.cs (6)
38solution, symbol, newName, options, cancellationToken).ConfigureAwait(false); 40return await result.DehydrateAsync(cancellationToken).ConfigureAwait(false); 59symbol, solution, options, cancellationToken).ConfigureAwait(false); 83symbol, solution, serializableLocations, cancellationToken).ConfigureAwait(false); 88locations, replacementText, cancellationToken).ConfigureAwait(false); 89return await result.DehydrateAsync(cancellationToken).ConfigureAwait(false);
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (6)
88documentKey, type, checksum, cancellationToken).ConfigureAwait(false); 141document, cancellationToken).ConfigureAwait(false); 144var matches = await storage.ChecksumMatchesAsync(documentKey, persistenceName, checksum, cancellationToken).ConfigureAwait(false); 174await storage.WriteStreamAsync(documentKey, persistenceName, stream, checksum, cancellationToken).ConfigureAwait(false); 233documentKey, type, checksum, cancellationToken).ConfigureAwait(false); 296using var stream = await storage.ReadStreamAsync(documentKey, persistenceName, checksum, cancellationToken).ConfigureAwait(false);
Services\SemanticSearch\RemoteSemanticSearchService.cs (1)
135return await service.ExecuteQueryAsync(solution, queryId, observer: clientCallbacks, options, TraceLogger, cancellationToken).ConfigureAwait(false);
Services\StackTraceExplorer\RemoteStackTraceExplorerService.cs (2)
29var result = await StackTraceAnalyzer.AnalyzeAsync(frameString, cancellationToken).ConfigureAwait(false); 35var definition = await StackTraceExplorerUtilities.GetDefinitionAsync(solution, parsedFrame.Root, symbolPart, cancellationToken).ConfigureAwait(false);
Services\SymbolFinder\RemoteSymbolFinderService.cs (5)
106project, query, criteria, cancellationToken).ConfigureAwait(false); 122solution, name, ignoreCase, criteria, cancellationToken).ConfigureAwait(false); 141project, name, ignoreCase, criteria, cancellationToken).ConfigureAwait(false); 153solution, pattern, criteria, cancellationToken).ConfigureAwait(false); 167project, pattern, criteria, cancellationToken).ConfigureAwait(false);
Services\TaskList\RemoteTaskListService.cs (1)
33return await service.GetTaskListItemsAsync(document, descriptors, cancellationToken).ConfigureAwait(false);
Services\UnitTesting\RemoteUnitTestingSearchService.cs (2)
37var resultOpt = await UnitTestingSearchHelpers.GetSourceLocationAsync(project, query, cancellationToken).ConfigureAwait(false); 59var results = await UnitTestingSearchHelpers.GetSourceLocationsAsync(project, query, cancellationToken).ConfigureAwait(false);
Services\UnusedReferences\RemoteUnusedReferenceAnalysisService.cs (2)
31var references = await ProjectAssetsFileReader.ReadReferencesAsync(projectReferences, projectAssetsFilePath).ConfigureAwait(false); 34var unusedReferences = await UnusedReferencesRemover.GetUnusedReferencesAsync(solution, projectFilePath, references, cancellationToken).ConfigureAwait(false);
src\VisualStudio\Core\Def\UnusedReferences\ProjectAssets\ProjectAssetsFileReader.cs (2)
32return await reader.ReadToEndAsync().ConfigureAwait(false); 33}).ConfigureAwait(false);
Microsoft.CodeAnalysis.Remote.Workspaces (16)
AbstractAssetProvider.cs (9)
56AssetPathKind.SolutionAnalyzerReferences, solutionChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false); 63var projects = await Task.WhenAll(projectsTasks).ConfigureAwait(false); 104await analyzerReferencesTask.ConfigureAwait(false), 112await documentInfosTask.ConfigureAwait(false), 113await projectReferencesTask.ConfigureAwait(false), 114await metadataReferencesTask.ConfigureAwait(false), 116await additionalDocumentInfosTask.ConfigureAwait(false), 117await analyzerConfigDocumentInfosTask.ConfigureAwait(false), 127documentInfos.Add(await CreateDocumentInfoAsync(documentId, attributeChecksum, textChecksum, cancellationToken).ConfigureAwait(false));
ExportProviderBuilder.cs (3)
41var exportProviderFactory = await GetCompositionConfigurationAsync(cancellationToken).ConfigureAwait(false); 64var exportProviderFactory = await cachedComposition.LoadExportProviderFactoryAsync(cacheStream, Resolver, cancellationToken).ConfigureAwait(false); 82var parts = await discovery.CreatePartsAsync(AssemblyPaths, progress: null, cancellationToken).ConfigureAwait(false);
ExternalAccess\Pythia\Api\PythiaRemoteHostClient.cs (1)
28var client = await RemoteHostClient.TryGetClientAsync(services.SolutionServices, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\Api\UnitTestingRemoteHostClient.cs (1)
28var client = await RemoteHostClient.TryGetClientAsync(services.SolutionServices, cancellationToken).ConfigureAwait(false);
SolutionAssetStorage.cs (2)
70checksum = await compilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 75(var stateChecksums, projectCone) = await compilationState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ResxSourceGenerator (25)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Microsoft.CodeAnalysis.Scripting (4)
Script.cs (1)
582T result = await executionState.RunSubmissionsAsync<T>(precedingExecutors, currentExecutor, exceptionOpt, catchExceptionOpt, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
ScriptExecutionState.cs (1)
112result = await ((Task<TResult>)currentExecutor(_submissionStates)).ConfigureAwait(continueOnCapturedContext: false);
Utilities\TaskExtensions.cs (2)
15return await task.ConfigureAwait(true); 20return (await task.ConfigureAwait(true)).ReturnValue;
Microsoft.CodeAnalysis.Scripting.TestUtilities (10)
ScriptTaskExtensions.cs (10)
17return await (await task.ConfigureAwait(false)).ContinueWithAsync(code, options, cancellationToken).ConfigureAwait(false); 22return await (await task.ConfigureAwait(false)).ContinueWithAsync(code, options, cancellationToken).ConfigureAwait(false); 27return await (await task.ConfigureAwait(false)).ContinueWithAsync<T>(code, options, cancellationToken).ConfigureAwait(false); 32return await (await task.ConfigureAwait(false)).ContinueWithAsync<T>(code, options, cancellationToken).ConfigureAwait(false); 37return await (await task.ConfigureAwait(false)).ContinueWithAsync(code, options, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.TestAnalyzerReference (1)
NonSourceFileRefactoring.cs (1)
27var text = await document.GetTextAsync(ct).ConfigureAwait(false);
Microsoft.CodeAnalysis.Threading.Package (8)
AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
Microsoft.CodeAnalysis.Workspaces (557)
CaseCorrection\AbstractCaseCorrectionService.cs (1)
29var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CaseCorrection\CaseCorrector.cs (5)
28var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 34return await CaseCorrectAsync(document, root.FullSpan, cancellationToken).ConfigureAwait(false); 43var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 49return await CaseCorrectAsync(document, [.. root.GetAnnotatedNodesAndTokens(annotation).Select(n => n.Span)], cancellationToken).ConfigureAwait(false); 57return await CaseCorrectAsync(document, [span], cancellationToken).ConfigureAwait(false);
Classification\AbstractClassificationService.cs (7)
75var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 83var isFullyLoaded = await workspaceStatusService.IsFullyLoadedAsync(cancellationToken).ConfigureAwait(false); 84if (await TryGetCachedClassificationsAsync(document, textSpans, type, client, isFullyLoaded, result, cancellationToken).ConfigureAwait(false)) 120document, cancellationToken).ConfigureAwait(false); 156var reassignedVariableSpans = await reassignedVariableService.GetLocationsAsync(document, textSpans, cancellationToken).ConfigureAwait(false); 164var obsoleteSymbolSpans = await obsoleteSymbolService.GetLocationsAsync(document, textSpans, cancellationToken).ConfigureAwait(false); 203var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Classification\Classifier.cs (1)
118var sourceText = await semanticModel.SyntaxTree.GetTextAsync(cancellationToken).ConfigureAwait(false);
Classification\SemanticClassificationCacheUtilities.cs (1)
29var checksums = await document.State.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
CodeActions\CodeAction.cs (17)
247var operations = await this.ComputeOperationsAsync(progress, cancellationToken).ConfigureAwait(false); 251return await PostProcessAsync(originalSolution, operations, cancellationToken).ConfigureAwait(false); 268var operations = await this.ComputePreviewOperationsAsync(cancellationToken).ConfigureAwait(false); 272return await PostProcessAsync(originalSolution, operations, cancellationToken).ConfigureAwait(false); 284var changedSolution = await GetChangedSolutionAsync(CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 305var operations = await ComputeOperationsAsync(cancellationToken).ConfigureAwait(false); 310var changedSolution = await GetChangedSolutionAsync(progress, cancellationToken).ConfigureAwait(false); 324=> await ComputeOperationsAsync(CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 334var changedDocument = await GetChangedDocumentAsync(cancellationToken).ConfigureAwait(false); 350return await GetChangedSolutionAsync(cancellationToken).ConfigureAwait(false); 356var changedDocument = await GetChangedDocumentAsync(progress, cancellationToken).ConfigureAwait(false); 363var solution = await this.GetChangedSolutionAsync(progressTracker, cancellationToken).ConfigureAwait(false); 405var solution = await GetChangedSolutionAsync(progress, cancellationToken).ConfigureAwait(false); 409return await PostProcessChangesAsync(originalSolution, solution, progress, this.Cleanup, cancellationToken).ConfigureAwait(false); 436originalSolution, ac.ChangedSolution, CodeAnalysisProgress.None, this.Cleanup, cancellationToken).ConfigureAwait(false))); 687return await base.ComputePreviewOperationsAsync(cancellationToken).ConfigureAwait(false); 689var newDocument = await _createChangedDocumentPreview(CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
CodeActions\CodeAction_Cleanup.cs (8)
107cancellationToken).ConfigureAwait(false); 118var documentIdsAndOptionsToClean = await GetDocumentIdsAndOptionsToCleanAsync().ConfigureAwait(false); 122changedSolution, documentIdsAndOptionsToClean, progress, passes, cancellationToken).ConfigureAwait(false); 158cancellationToken).ConfigureAwait(false); 175currentSolution = await RunParallelCleanupPassAsync(currentSolution, cleanupPass).ConfigureAwait(false); 185using var _ = await RemoteKeepAliveSession.CreateAsync(solution, cancellationToken).ConfigureAwait(false); 203var cleanedDocument = await cleanupDocumentAsync(document, options, cancellationToken).ConfigureAwait(false); 212cancellationToken).ConfigureAwait(false);
CodeActions\CodeActionWithOptions.cs (3)
43var operations = await this.ComputeOperationsAsync(options, progress, cancellationToken).ConfigureAwait(false); 47operations = await PostProcessAsync(originalSolution, operations, cancellationToken).ConfigureAwait(false); 57var operations = await this.GetOperationsAsync(originalSolution, options, progress, cancellationToken).ConfigureAwait(false);
CodeCleanup\AbstractCodeCleanerService.cs (9)
48return await IterateAllCodeCleanupProvidersAsync(document, document, options, r => [r.FullSpan], codeCleaners, cancellationToken).ConfigureAwait(false); 58return await IterateAllCodeCleanupProvidersAsync(document, document, options, n => [n.FullSpan], codeCleaners, cancellationToken).ConfigureAwait(false); 69codeCleaners, cancellationToken).ConfigureAwait(false); 90return await IterateAllCodeCleanupProvidersAsync(root, root, options, r => [r.FullSpan], services, codeCleaners, cancellationToken).ConfigureAwait(false); 100return await IterateAllCodeCleanupProvidersAsync(root, root, options, n => [n.FullSpan], services, codeCleaners, cancellationToken).ConfigureAwait(false); 110services, codeCleaners, cancellationToken).ConfigureAwait(false); 469var originalDocHasErrors = await annotatedDocument.HasAnyErrorsAsync(cancellationToken).ConfigureAwait(false); 496currentDocument = await codeCleaner.CleanupAsync(currentDocument, spans, options, cancellationToken).ConfigureAwait(false); 573currentRoot = await codeCleaner.CleanupAsync(currentRoot, spans, options, services, cancellationToken).ConfigureAwait(false);
CodeCleanup\CodeCleaner.cs (3)
53return await CleanupAsync(document, new TextSpan(0, text.Length), options, providers, cancellationToken: cancellationToken).ConfigureAwait(false); 63return await CleanupAsync(document, [.. root.GetAnnotatedNodesAndTokens(annotation).Select(n => n.Span)], options, providers, cancellationToken: cancellationToken).ConfigureAwait(false); 80return await cleanupService.CleanupAsync(document, spans, options, providers, cancellationToken).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (8)
70currentSolution = await ApplyChangesAsync(currentSolution, group.SelectAsArray(kvp => (kvp.Key, kvp.Value)), cancellationToken).ConfigureAwait(false); 80var documentToDiagnostics = await DetermineDiagnosticsAsync(fixAllContext, progressTracker).ConfigureAwait(false); 90var documentToDiagnostics = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false); 124await GetAllChangedDocumentsInDiagnosticsOrderAsync(fixAllContext, orderedDiagnostics).ConfigureAwait(false); 167solution, fixAllContext.Progress, cancellationToken).ConfigureAwait(false); 180await Task.WhenAll(tasks).ConfigureAwait(false); 186result.AddRange(await task.ConfigureAwait(false)); 256var docIdsAndTexts = await docIdsAndMerger.SelectAsArrayAsync(async t => (t.documentId, await t.merger.GetFinalMergedTextAsync(cancellationToken).ConfigureAwait(false))).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (2)
81var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false); 94var newDocument = await this.FixAllAsync(fixAllContext, document, documentDiagnostics).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\FixAllContext.cs (4)
235return await GetFilteredDiagnosticsAsync(getDiagnosticsTask, this.DiagnosticIds, filterSpan: null).ConfigureAwait(false); 245var diagnostics = await getDiagnosticsTask.ConfigureAwait(false); 274return await GetFilteredDiagnosticsAsync(getDiagnosticsTask, this.DiagnosticIds, filterSpan).ConfigureAwait(false); 321return await GetFilteredDiagnosticsAsync(getDiagnosticsTask, this.DiagnosticIds, filterSpan: null).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (5)
45var result = await GetDocumentDiagnosticsToFixWorkerAsync(fixAllContext).ConfigureAwait(false); 62return await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(fixAllContext).ConfigureAwait(false); 81var diagnostics = await fixAllContext.GetProjectDiagnosticsAsync(project).ConfigureAwait(false); 89var diagnostics = await fixAllContext.GetProjectDiagnosticsAsync(project).ConfigureAwait(false); 105fixAllContext.CancellationToken).ConfigureAwait(false);
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
50_oldDocument, newDocument, cancellationToken).ConfigureAwait(false);
CodeFixesAndRefactorings\DefaultFixAllProviderHelpers.cs (4)
32using var _ = await RemoteKeepAliveSession.CreateAsync(fixAllContext.State.Solution, fixAllContext.CancellationToken).ConfigureAwait(false); 37=> await GetDocumentFixesAsync(fixAllContext, fixAllContextsAsync).ConfigureAwait(false), 38FixAllScope.Project => await GetProjectFixesAsync(fixAllContext, fixAllContextsAsync).ConfigureAwait(false), 39FixAllScope.Solution => await GetSolutionFixesAsync(fixAllContext, fixAllContextsAsync).ConfigureAwait(false),
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (5)
41var dirtySolution = await GetInitialUncleanedSolutionAsync(originalSolution).ConfigureAwait(false); 48originalSolution, dirtySolution, progressTracker, originalFixAllContext.State.FixAllProvider.Cleanup, cancellationToken).ConfigureAwait(false); 54.SelectAsArrayAsync(async documentId => (documentId, await cleanedSolution.GetRequiredDocument(documentId).GetTextAsync(cancellationToken).ConfigureAwait(false))) 65using var _ = await RemoteKeepAliveSession.CreateAsync(originalSolution, cancellationToken).ConfigureAwait(false); 93cancellationToken).ConfigureAwait(false);
CodeRefactorings\FixAllOccurences\DocumentBasedFixAllProvider.cs (2)
90var documentsAndSpansToFix = await fixAllContext.GetFixAllSpansAsync(cancellationToken).ConfigureAwait(false); 98var newDocument = await this.FixAllAsync(fixAllContext, document, spans).ConfigureAwait(false);
CodeRefactorings\FixAllOccurences\FixAllState.cs (1)
102Document, _selectionSpan, Scope, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (1)
32await this.FixAllAsync(document, fixAllSpans, fixAllContext.CodeActionEquivalenceKey, fixAllContext.CancellationToken).ConfigureAwait(false),
Diagnostics\CompilationWithAnalyzersPair.cs (8)
66? await ProjectCompilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false) 69? await HostCompilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false) 78? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(tree, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false) 81? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(tree, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false) 90? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(file, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false) 93? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(file, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false) 102? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(model, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false) 105? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(model, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false)
Diagnostics\Extensions.cs (13)
34result.Add(await diagnostic.ToDiagnosticAsync(project, cancellationToken).ConfigureAwait(false)); 122treeToAnalyze = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 334var result = await GetAnalysisResultAsync(compilationWithAnalyzers, documentAnalysisScope, cancellationToken).ConfigureAwait(false); 336documentAnalysisScope, project, analyzerInfoCache, cancellationToken).ConfigureAwait(false); 347return await compilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false); 359return await compilationWithAnalyzers.GetAnalysisResultAsync(tree, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false); 363return await compilationWithAnalyzers.GetAnalysisResultAsync(documentAnalysisScope.AdditionalFile, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false); 368return await compilationWithAnalyzers.GetAnalysisResultAsync(model, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false); 414cancellationToken).ConfigureAwait(false); 499var projectChecksum = await project.State.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 510solution.GetProject(projectRef.ProjectId), cancellationToken).ConfigureAwait(false)); 520var remoteHostClient = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 531return await result.Value.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
Diagnostics\FileContentLoadAnalyzer.cs (1)
31var exceptionMessage = await textDocument.State.GetFailedToLoadExceptionMessageAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\GeneratorDiagnosticsPlaceholderAnalyzer.cs (1)
32var diagnostics = await Extensions.GetSourceGeneratorDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
Editing\DocumentEditor.cs (1)
35var model = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Editing\ImportAdder.cs (7)
34=> await AddImportsFromSyntaxesAsync(document, await GetSpansAsync(document, cancellationToken).ConfigureAwait(false), options, cancellationToken).ConfigureAwait(false); 46=> await AddImportsFromSyntaxesAsync(document, await GetSpansAsync(document, annotation, cancellationToken).ConfigureAwait(false), options, cancellationToken).ConfigureAwait(false); 64return await service.AddImportsAsync(document, spans, ImportAdderService.Strategy.AddImportsFromSyntaxes, addImportOptions, cancellationToken).ConfigureAwait(false); 71=> await AddImportsFromSyntaxesAsync(document, await GetSpansAsync(document, cancellationToken).ConfigureAwait(false), options, cancellationToken).ConfigureAwait(false); 77=> await AddImportsFromSyntaxesAsync(document, await GetSpansAsync(document, annotation, cancellationToken).ConfigureAwait(false), options, cancellationToken).ConfigureAwait(false); 89=> await AddImportsFromSymbolAnnotationAsync(document, await GetSpansAsync(document, cancellationToken).ConfigureAwait(false), options, cancellationToken).ConfigureAwait(false); 95=> await AddImportsFromSymbolAnnotationAsync(document, await GetSpansAsync(document, annotation, cancellationToken).ConfigureAwait(false), options, cancellationToken).ConfigureAwait(false);
Editing\SolutionEditor.cs (1)
32editor = await DocumentEditor.CreateAsync(solution.GetDocument(id), cancellationToken).ConfigureAwait(false);
Editing\SymbolEditor.cs (19)
106return await GetSymbolAsync(ChangedSolution, project.Id, symbolId, cancellationToken).ConfigureAwait(false); 113return await GetSymbolAsync(ChangedSolution, project.Id, symbolId, cancellationToken).ConfigureAwait(false); 119var currentSymbol = await GetSymbolAsync(ChangedSolution, projectId, symbolId, cancellationToken).ConfigureAwait(false); 153var comp = await solution.GetProject(projectId).GetCompilationAsync(cancellationToken).ConfigureAwait(false); 185var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false); 237var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false); 242return await this.EditDeclarationAsync(currentSymbol, declaration, editAction, cancellationToken).ConfigureAwait(false); 286var editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 295var model = await newDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 307return await this.GetCurrentSymbolAsync(currentSymbol, cancellationToken).ConfigureAwait(false); 369var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false); 383return await this.EditDeclarationAsync(currentSymbol, decl, editAction, cancellationToken).ConfigureAwait(false); 401var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false); 404var currentMember = await this.GetCurrentSymbolAsync(member, cancellationToken).ConfigureAwait(false); 416return await this.EditDeclarationAsync(currentSymbol, declaration, editAction, cancellationToken).ConfigureAwait(false); 458var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false); 468var editor = await solutionEditor.GetDocumentEditorAsync(docId, cancellationToken).ConfigureAwait(false); 483var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 500return await GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
Editing\SymbolEditorExtensions.cs (6)
32baseOrInterfaceType = (ITypeSymbol)(await editor.GetCurrentSymbolAsync(baseOrInterfaceType, cancellationToken).ConfigureAwait(false)); 36var currentDecls = await editor.GetCurrentDeclarationsAsync(symbol, cancellationToken).ConfigureAwait(false); 41var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 68var typeRef = await editor.GetBaseOrInterfaceDeclarationReferenceAsync(symbol, baseType, cancellationToken).ConfigureAwait(false); 75cancellationToken).ConfigureAwait(false); 87}, cancellationToken).ConfigureAwait(false);
ExtensionManager\IExtensionManagerExtensions.cs (1)
80return await task.ConfigureAwait(false);
ExternalAccess\UnitTesting\Api\UnitTestingSolutionExtensions.cs (1)
16=> new UnitTestingChecksumWrapper(await solution.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false));
FindSymbols\Declarations\DeclarationFinder.cs (4)
49? await project.ContainsSymbolsWithNameAsync(query.Name!, cancellationToken).ConfigureAwait(false) 50: await project.ContainsSymbolsWithNameAsync(query.GetPredicate(), filter, cancellationToken).ConfigureAwait(false); 55var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 87var symbols = await info.FindAsync(query, lazyAssembly, filter, cancellationToken).ConfigureAwait(false);
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (5)
37var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 52return await RehydrateAsync(solution, result.Value, cancellationToken).ConfigureAwait(false); 56project, query, criteria, cancellationToken).ConfigureAwait(false); 121var compilation = await arg.lazyCompilation.GetValueAsync(cancellationToken).ConfigureAwait(false); 141var compilation = await lazyCompilation.GetValueAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (13)
43var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 56return await RehydrateAsync(solution, result.Value, cancellationToken).ConfigureAwait(false); 60solution, name, ignoreCase, criteria, cancellationToken).ConfigureAwait(false); 81var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 94return await RehydrateAsync(project.Solution, result.Value, cancellationToken).ConfigureAwait(false); 98project, name, ignoreCase, criteria, cancellationToken).ConfigureAwait(false); 114var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 127return await RehydrateAsync(solution, result.Value, cancellationToken).ConfigureAwait(false); 131solution, pattern, criteria, cancellationToken).ConfigureAwait(false); 147var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 160return await RehydrateAsync(project.Solution, result.Value, cancellationToken).ConfigureAwait(false); 164project, pattern, criteria, cancellationToken).ConfigureAwait(false); 219var symbolAndProjectIds = await searchAsync(query).ConfigureAwait(false);
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (1)
76var disposable = await _progressTracker.AddSingleItemAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\DependentProjectsFinder.cs (6)
49var dependentProjects = await GetDependentProjectsWorkerAsync(solution, symbols, cancellationToken).ConfigureAwait(false); 86solution, (assembly, sourceProject), maxVisibility, cancellationToken).ConfigureAwait(false); 154solution, symbolOrigination, visibility, cancellationToken).ConfigureAwait(false); 210var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 271!await HasReferenceToAsync(symbolOrigination, project, cancellationToken).ConfigureAwait(false)) 321project, symbolOrigination.assembly.Name, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\DependentTypeFinder.cs (4)
94type, solution, searchInMetadata, cancellationToken).ConfigureAwait(false); 205var projectIndex = await ProjectIndex.GetIndexAsync(project, cancellationToken).ConfigureAwait(false); 299var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 414solution, [type], solution.Projects.ToImmutableHashSet(), cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
48cancellationToken: cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (2)
47var checksum = await project.GetDiagnosticChecksumAsync(cancellationToken).ConfigureAwait(false); 64return await tuple.Value.lazyProjectIndex.GetValueAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (4)
28var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 43return await RehydrateAsync(solution, result.Value, cancellationToken).ConfigureAwait(false); 49return await FindTypesInCurrentProcessAsync(type, solution, projects, transitive, kind, cancellationToken).ConfigureAwait(false); 78return await task.ConfigureAwait(false);
FindSymbols\FindReferences\FindReferenceCache.cs (1)
31return await lazy.GetValueAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (7)
96var disposable = await _progressTracker.AddSingleItemAsync(cancellationToken).ConfigureAwait(false); 102this, unifiedSymbols, includeImplementationsThroughDerivedTypes: true, cancellationToken).ConfigureAwait(false); 108await ReportGroupsSeriallyAsync(allSymbols, symbolToGroup, cancellationToken).ConfigureAwait(false); 112var projectsToSearch = await GetProjectsToSearchAsync(allSymbols, cancellationToken).ConfigureAwait(false); 153symbolSet.GetAllSymbols(), symbolToGroup, cancellationToken).ConfigureAwait(false); 187var linkedSymbols = await SymbolFinder.FindLinkedSymbolsAsync(symbol, _solution, cancellationToken).ConfigureAwait(false); 353symbol, project, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (9)
81var initialSymbols = await DetermineInitialSearchSymbolsAsync(engine, searchSymbols, cancellationToken).ConfigureAwait(false); 85engine, initialSymbols, includeImplementationsThroughDerivedTypes, cancellationToken).ConfigureAwait(false); 135var sourceSymbol = await SymbolFinder.FindSourceDefinitionAsync(searchSymbol, solution, cancellationToken).ConfigureAwait(false); 195var mapped = await TryMapAndAddLinkedSymbolsAsync(symbol).ConfigureAwait(false); 205await TryMapAndAddLinkedSymbolsAsync(cascade).ConfigureAwait(false); 217foreach (var linked in await SymbolFinder.FindLinkedSymbolsAsync(symbol, solution, cancellationToken).ConfigureAwait(false)) 251symbol, solution, projects, cancellationToken).ConfigureAwait(false); 258symbol, solution, projects, cancellationToken).ConfigureAwait(false); 288symbol, solution, projects, includeImplementationsThroughDerivedTypes, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (6)
51var symbolSet = await SymbolSet.DetermineInitialSearchSymbolsAsync(this, unifiedSymbols, cancellationToken).ConfigureAwait(false); 55[.. symbolSet], symbolToGroup, cancellationToken).ConfigureAwait(false); 157var converted = await ConvertLocationsAsync(@this, values, symbol, group, cancellationToken).ConfigureAwait(false); 225relationship = await ComputeInheritanceRelationshipAsync(key.searchSymbol, key.candidate).ConfigureAwait(false); 244this, [searchSymbol], includeImplementationsThroughDerivedTypes: false, cancellationToken).ConfigureAwait(false); 254this, [candidate], includeImplementationsThroughDerivedTypes: false, cancellationToken).ConfigureAwait(false);
FindSymbols\ReferenceLocationExtensions.cs (1)
31var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\Shared\AbstractSyntaxIndex.cs (5)
57index = await GetIndexWorkerAsync(solutionKey, project, document, loadOnly, read, create, cancellationToken).ConfigureAwait(false); 101index = await LoadAsync(solutionKey, project, document, textChecksum, textAndDirectivesChecksum, read, cancellationToken).ConfigureAwait(false); 106index = await CreateIndexAsync(project, document, textChecksum, textAndDirectivesChecksum, create, cancellationToken).ConfigureAwait(false); 109await index.SaveAsync(solutionKey, project, document, cancellationToken).ConfigureAwait(false); 125var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (5)
58return await LoadAsync(storageService, documentKey, textChecksum, stringTable, read, cancellationToken).ConfigureAwait(false) ?? 59await LoadAsync(storageService, documentKey, textAndDirectivesChecksum, stringTable, read, cancellationToken).ConfigureAwait(false); 75using var stream = await storage.ReadStreamAsync(documentKey, s_persistenceName, checksum, cancellationToken).ConfigureAwait(false); 120var documentChecksumState = await document.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 176return await storage.WriteStreamAsync(documentKey, s_persistenceName, stream, this.Checksum, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder.cs (4)
89semanticModel, position, services, cancellationToken).ConfigureAwait(false); 99var token = await GetTokenAtPositionAsync(semanticModel, position, services, cancellationToken).ConfigureAwait(false); 132return await FindSymbolAtPositionAsync(semanticModel, position, document.Project.Solution.Services, cancellationToken).ConfigureAwait(false); 203var originalRoot = await location.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_Callers.cs (3)
41var foundSymbol = await FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false); 44var references = await FindCallReferencesAsync(solution, symbol, documents, cancellationToken).ConfigureAwait(false); 67var result = await reference.Locations.FindReferencingSymbolsAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_Declarations_AllDeclarations.cs (2)
21project, query, SymbolFilter.All, cancellationToken).ConfigureAwait(false); 33project, query, filter, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (5)
38solution, query, filter, cancellationToken).ConfigureAwait(false); 62var symbols = await FindSourceDeclarationsWithCustomQueryAsync(project, query, filter, cancellationToken).ConfigureAwait(false); 83project, query, filter, cancellationToken).ConfigureAwait(false); 103if (await project.ContainsSymbolsWithNameAsync(query.GetPredicate(), filter, cancellationToken).ConfigureAwait(false)) 105var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (4)
32solution, name, ignoreCase, filter, cancellationToken).ConfigureAwait(false); 52project, name, ignoreCase, filter, cancellationToken).ConfigureAwait(false); 83solution, pattern, filter, cancellationToken).ConfigureAwait(false); 111project, pattern, filter, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_FindLiteralReferences.cs (1)
24var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_FindReferences_Current.cs (1)
44var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_FindReferences_Legacy.cs (2)
35return await FindReferencesAsync(symbol, solution, FindReferencesSearchOptions.Default, cancellationToken).ConfigureAwait(false); 93FindReferencesSearchOptions.Default, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_Hierarchy.cs (17)
29return await FindOverridesArrayAsync(symbol, solution, projects, cancellationToken).ConfigureAwait(false); 50containingType, solution, projects, cancellationToken).ConfigureAwait(false); 66var sourceMember = await FindSourceDefinitionAsync(m, solution, cancellationToken).ConfigureAwait(false); 98cancellationToken).ConfigureAwait(false); 145? await FindDerivedClassesAsync(containingType, solution, projects, cancellationToken).ConfigureAwait(false) 169var sourceMethod = await FindSourceDefinitionAsync(interfaceMember, solution, cancellationToken).ConfigureAwait(false); 240return await FindDerivedClassesArrayAsync(type, solution, transitive, projects, cancellationToken).ConfigureAwait(false); 249type, solution, projects, transitive, DependentTypesKind.DerivedClasses, cancellationToken).ConfigureAwait(false); 276return await FindDerivedInterfacesArrayAsync(type, solution, transitive, projects, cancellationToken).ConfigureAwait(false); 285type, solution, projects, transitive, DependentTypesKind.DerivedInterfaces, cancellationToken).ConfigureAwait(false); 312return await FindImplementationsArrayAsync(type, solution, transitive, projects, cancellationToken).ConfigureAwait(false); 321type, solution, projects, transitive, DependentTypesKind.ImplementingTypes, cancellationToken).ConfigureAwait(false); 345namedTypeSymbol, solution, transitive: true, projects, cancellationToken).ConfigureAwait(false); 348return await FindMemberImplementationsArrayAsync(symbol, solution, projects, cancellationToken).ConfigureAwait(false); 366var classAndStructImplementations = await FindImplementationsAsync(containingType, solution, transitive: true, projects, cancellationToken).ConfigureAwait(false); 367var transitiveDerivedInterfaces = await FindDerivedInterfacesAsync(containingType, solution, transitive: true, projects, cancellationToken).ConfigureAwait(false); 376var sourceDef = await FindSourceDefinitionAsync(implementation, solution, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfo.cs (3)
138var symbols = await FindCoreAsync(query, lazyAssembly, cancellationToken).ConfigureAwait(false); 183var symbols = await FindAsync(lazyAssembly, similarName, ignoreCase: true, cancellationToken).ConfigureAwait(false); 234assemblySymbol ??= await lazyAssembly.GetValueAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (5)
135var info = await infoTask.GetValueAsync(cancellationToken).ConfigureAwait(false); 141solutionServices, solutionKey, reference, checksum.Value, cancellationToken).ConfigureAwait(false); 165return await asyncLazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 191var metadataIdSymbolTreeInfo = await asyncLazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 206return await infoTask.GetValueAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (3)
41var read = await LoadAsync(services, solutionKey, checksum, checksumMustMatch: true, keySuffix, cancellationToken).ConfigureAwait(false); 74await storage.WriteStreamAsync(key, stream, checksum, cancellationToken).ConfigureAwait(false); 97using var stream = await storage.ReadStreamAsync(key, checksumMustMatch ? checksum : null, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (6)
59checksum: await GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false), 62cancellationToken).ConfigureAwait(false); 91var projectStateChecksums = await projectState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 97var documentStateChecksum = await state.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 103var textChecksums = await Task.WhenAll(textChecksumsTasks).ConfigureAwait(false); 122var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (5)
85var info = await SymbolTreeInfo.LoadAnyInfoForMetadataReferenceAsync(solution, reference, cancellationToken).ConfigureAwait(false); 109var info = await SymbolTreeInfo.LoadAnyInfoForSourceAssemblyAsync(project, cancellationToken).ConfigureAwait(false); 166var semanticVersion = await project.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 173var checksum = await SymbolTreeInfo.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false); 178project, checksum, cancellationToken).ConfigureAwait(false);
Formatting\Formatter.cs (4)
88return await formattingService.FormatAsync(document, spans, lineFormattingOptions, syntaxFormattingOptions, cancellationToken).ConfigureAwait(false); 326optionSet ??= await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false); 362return await organizeImportsService.OrganizeImportsAsync(document, options, cancellationToken).ConfigureAwait(false); 368var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);
LinkedFileDiffMerging\DefaultDocumentTextDifferencingService.cs (1)
29var changes = await newDocument.GetTextChangesAsync(oldDocument, cancellationToken).ConfigureAwait(false);
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (4)
75var mergeGroupResult = await MergeLinkedDocumentGroupAsync(newDocumentsAndHashes, cancellationToken).ConfigureAwait(false); 106firstOldDocument, firstNewDocument, TextDifferenceTypes.Line, cancellationToken).ConfigureAwait(false); 120cancellationToken).ConfigureAwait(false); 149oldDocument, newDocument, TextDifferenceTypes.Line, cancellationToken).ConfigureAwait(false);
ReassignedVariable\AbstractReassignedVariableService.cs (1)
45var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Remote\IRemoteKeepAliveService.cs (2)
55var client = await RemoteHostClient.TryGetClientAsync(compilationState.Services, cancellationToken).ConfigureAwait(false); 115var client = await RemoteHostClient.TryGetClientAsync(compilationState.Services, cancellationToken).ConfigureAwait(false);
Remote\RemoteArguments.cs (2)
104var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 177var aliasSymbol = await RehydrateAliasAsync(solution, cancellationToken).ConfigureAwait(false);
Remote\RemoteUtilities.cs (2)
38var textChanges = await newDoc.GetTextChangesAsync(oldDoc, cancellationToken).ConfigureAwait(false); 47var textChanges = await newDoc.GetTextChangesAsync(oldDoc, cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.cs (8)
58var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 71return await result.Value.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false); 77var heavyweightLocations = await lightweightRenameLocations.ToSymbolicLocationsAsync(symbol, cancellationToken).ConfigureAwait(false); 82heavyweightLocations, replacementText, cancellationToken).ConfigureAwait(false); 103renameLocations, renameSymbolDeclarationLocation, replacementText, cancellationToken).ConfigureAwait(false); 204cancellationToken).ConfigureAwait(false); 298cancellationToken).ConfigureAwait(false); 405var originalsourcesymbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.Session.cs (12)
93var (documentsIdsToBeCheckedForConflict, possibleNameConflicts) = await FindDocumentsAndPossibleNameConflictsAsync().ConfigureAwait(false); 140possibleNameConflicts).ConfigureAwait(false)); 148conflictLocations).ConfigureAwait(false); 201conflictResolution.CurrentSolution, documentsByProject, _replacementTextValid, _renameAnnotations, _cancellationToken).ConfigureAwait(false)); 203intermediateSolution, documentsByProject, _renameAnnotations, _cancellationToken).ConfigureAwait(false); 209var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false); 273documentIdErrorStateLookup.Add(documentId, await originalDoc.HasAnyErrorsAsync(_cancellationToken).ConfigureAwait(false)); 318var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false); 392conflictResolution, renamedSymbolInNewSolution, conflictAnnotation, newReferencedSymbols).ConfigureAwait(false); 582var overridingSymbol = await SymbolFinder.FindSymbolAtPositionAsync(solution.GetRequiredDocument(newLocation.SourceTree), newLocation.SourceSpan.Start, cancellationToken: _cancellationToken).ConfigureAwait(false); 665var newSymbol = await SymbolFinder.FindSymbolAtPositionAsync(document, start, cancellationToken: _cancellationToken).ConfigureAwait(false); 775var originalSyntaxRoot = await semanticModel.SyntaxTree.GetRootAsync(_cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
166document = await Simplifier.ReduceAsync(document, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false); 167document = await Formatter.FormatAsync(document, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Rename\IRemoteRenamerService.cs (1)
190oldSolution, Resolution.DocumentTextChanges, cancellationToken).ConfigureAwait(false);
Rename\LightweightRenameLocations.cs (2)
84var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 109symbol, solution, options, cancellationToken).ConfigureAwait(false);
Rename\Renamer.cs (7)
53var resolution = await RenameSymbolAsync(solution, symbol, newName, options, cancellationToken).ConfigureAwait(false); 117var renameAction = await RenameSymbolDocumentAction.TryCreateAsync(document, newDocumentName, cancellationToken).ConfigureAwait(false); 159var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 173return await result.Value.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false); 181solution, symbol, newName, options, cancellationToken).ConfigureAwait(false); 200var renameLocations = await SymbolicRenameLocations.FindLocationsInCurrentProcessAsync(symbol, solution, options, cancellationToken).ConfigureAwait(false); 202renameLocations, newName, cancellationToken).ConfigureAwait(false);
Rename\Renamer.RenameDocumentActionSet.cs (1)
103solution = await action.GetModifiedSolutionAsync(document, _options, cancellationToken).ConfigureAwait(false);
Rename\Renamer.RenameSymbolDocumentAction.cs (4)
46cancellationToken).ConfigureAwait(false); 59solution = await RenameSymbolAsync(solution, symbol, symbolRenameOptions, _analysis.NewSymbolName, cancellationToken).ConfigureAwait(false); 80var analysis = await AnalyzeAsync(document, newName, cancellationToken).ConfigureAwait(false); 99var matchingDeclaration = await GetMatchingTypeDeclarationAsync(document, cancellationToken).ConfigureAwait(false);
Rename\Renamer.SyncNamespaceDocumentAction.cs (1)
42var solution = await changeNamespaceService.TryChangeTopLevelNamespacesAsync(document, _analysis.TargetNamespace, cancellationToken).ConfigureAwait(false);
Rename\RenameUtilities.cs (8)
219symbol.GetOverriddenMember(), solution, cancellationToken).ConfigureAwait(false); 222return await TryGetPropertyFromAccessorOrAnOverrideAsync(originalSourceSymbol, solution, cancellationToken).ConfigureAwait(false); 229symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false); 233var propertyAccessorOrAnOverride = await TryGetPropertyFromAccessorOrAnOverrideAsync(methodImplementor, solution, cancellationToken).ConfigureAwait(false); 302var symbol = await SymbolFinder.FindSymbolAtPositionAsync(document, position, cancellationToken: cancellationToken).ConfigureAwait(false); 306var definitionSymbol = await FindDefinitionSymbolAsync(symbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 323symbol, solution, cancellationToken).ConfigureAwait(false); 350var property = await TryGetPropertyFromAccessorOrAnOverrideAsync(bestSymbol, solution, cancellationToken).ConfigureAwait(false);
Rename\SymbolicRenameLocations.cs (7)
63symbol = await RenameUtilities.FindDefinitionSymbolAsync(symbol, solution, cancellationToken).ConfigureAwait(false); 66var originalSymbolResult = await AddLocationsReferenceSymbolsAsync(symbol, solution, cancellationToken).ConfigureAwait(false); 69var overloadsResult = options.RenameOverloads ? await GetOverloadsAsync(symbol, solution, cancellationToken).ConfigureAwait(false) : 79cancellationToken).ConfigureAwait(false); 119overloadsResult.Add(await AddLocationsReferenceSymbolsAsync(overloadedSymbol, solution, cancellationToken).ConfigureAwait(false)); 131[symbol], solution, cancellationToken).ConfigureAwait(false); 136await ReferenceProcessing.GetRenamableDefinitionLocationsAsync(referencedSymbol.Definition, symbol, solution, cancellationToken).ConfigureAwait(false));
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (7)
94if (await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false) || 95await IsPropertyAccessorOrAnOverrideAsync(originalSymbol, solution, cancellationToken).ConfigureAwait(false)) 140symbol, solution, cancellationToken).ConfigureAwait(false); 164var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, false, cancellationToken).ConfigureAwait(false); 188var isRenamableAccessor = await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false); 253var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, true, cancellationToken).ConfigureAwait(false); 318isRenamableAccessor: await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false)));
Serialization\SerializableSourceText.cs (1)
101text = await _storageHandle!.ReadFromTemporaryStorageAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\ISolutionExtensions.cs (1)
29var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
Shared\Extensions\SyntaxGeneratorExtensions.cs (5)
53var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 80&& (await SymbolFinder.FindSourceDefinitionAsync(overriddenProperty, document.Project.Solution, cancellationToken).ConfigureAwait(false)) 206modifiers, containingType, document, cancellationToken).ConfigureAwait(false); 211modifiers, containingType, document, cancellationToken).ConfigureAwait(false); 244var compilation = await newDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
123remoteHostClient = await remoteHostClientProvider.TryGetRemoteHostClientAsync(CancellationToken.None).ConfigureAwait(false);
Shared\Utilities\IOUtilities.cs (1)
42return await function().ConfigureAwait(false);
Simplification\Simplifier.cs (8)
161return await ReduceAsync(document, root.FullSpan, optionSet, cancellationToken).ConfigureAwait(false); 168return await ReduceAsync(document, root.FullSpan, options, cancellationToken).ConfigureAwait(false); 189return await ReduceAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan), optionSet, cancellationToken).ConfigureAwait(false); 196return await ReduceAsync(document, root.GetAnnotatedNodesAndTokens(annotation).Select(t => t.FullSpan), options, cancellationToken).ConfigureAwait(false); 234var options = await GetOptionsAsync(document, optionSet, cancellationToken).ConfigureAwait(false); 237document, spans.ToImmutableArrayOrEmpty(), options, reducers: default, cancellationToken).ConfigureAwait(false); 251reducers, cancellationToken).ConfigureAwait(false); 257optionSet ??= await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (11)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 56diagnosticSpan.Value, fixAllContext.Scope, fixAllContext.CancellationToken).ConfigureAwait(false); 57return await GetSpanDiagnosticsAsync(fixAllContext, documentsAndSpans).ConfigureAwait(false); 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 122var documentDiagnostics = await fixAllContext.GetDocumentSpanDiagnosticsAsync(document, span).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (8)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 50semanticModel = await document.GetSemanticModelAsync(SemanticModelOptions.DisableNullableAnalysis, cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
Storage\SQLite\v2\SQLitePersistentStorage_Threading.cs (1)
26return await task.ConfigureAwait(false);
TemporaryStorage\TemporaryStorageService.cs (1)
101=> await WriteToTemporaryStorageAsync(text, cancellationToken).ConfigureAwait(false);
Workspace\Host\DocumentService\SpanMappingHelper.cs (2)
30var result = await sourceGeneratedSpanMappingService.MapSpansAsync(sourceGeneratedDocument, textSpans, cancellationToken).ConfigureAwait(false); 47var mappedSpanResult = await spanMappingService.MapSpansAsync(document, textSpans, cancellationToken).ConfigureAwait(false);
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (1)
247var analyzerReferences = await getReferencesAsync().ConfigureAwait(false);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
494_project.Id, _project._filePath, projectSystemPath, CancellationToken.None).ConfigureAwait(false);
Workspace\Solution\Document.cs (12)
131var textVersion = await this.GetTextVersionAsync(cancellationToken).ConfigureAwait(false); 233var tree = (await this.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false))!; 234return await tree.GetRootAsync(cancellationToken).ConfigureAwait(false); 289).ConfigureAwait(false); 300semanticModel = await this.GetSemanticModelAsync(SemanticModelOptions.DisableNullableAnalysis, cancellationToken).ConfigureAwait(false); 331var semanticModel = await GetSemanticModelWorkerAsync().ConfigureAwait(false); 351var compilation = await this.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 443return await GetTextChangesAsync(useAsync: true, oldDocument, cancellationToken).ConfigureAwait(false); 496var tree = useAsync ? await GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false) : this.GetSyntaxTreeSynchronously(cancellationToken); 497var oldTree = useAsync ? await oldDocument.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false) : oldDocument.GetSyntaxTreeSynchronously(cancellationToken); 504text = useAsync ? await this.GetTextAsync(cancellationToken).ConfigureAwait(false) : this.GetTextSynchronously(cancellationToken); 505oldText = useAsync ? await oldDocument.GetTextAsync(cancellationToken).ConfigureAwait(false) : oldDocument.GetTextSynchronously(cancellationToken);
Workspace\Solution\DocumentState.cs (5)
138var textAndVersion = await newTextSource.GetValueAsync(loadTextOptions, cancellationToken).ConfigureAwait(false); 200var newTextAndVersion = await newTextSource.GetValueAsync(loadTextOptions, cancellationToken).ConfigureAwait(false); 201var oldTreeAndVersion = await oldTreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false); 603var treeAndVersion = await TreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false); 648treeAndVersion = await TreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\DocumentState_LinkedFileReuse.cs (3)
244var siblingTreeAndVersion = await siblingTreeSource.GetValueAsync(cancellationToken).ConfigureAwait(false); 247var siblingRoot = await siblingTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 253return await IncrementallyParseTreeAsync(treeSource, siblingTextSource, loadTextOptions, cancellationToken).ConfigureAwait(false);
Workspace\Solution\DocumentState_TreeTextSource.cs (1)
31var text = await textSource.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\FileTextLoader.cs (2)
182using var readStream = await SerializableBytes.CreateReadableStreamAsync(stream, cancellationToken: t.cancellationToken).ConfigureAwait(false); 185}, (self: this, prevLastWriteTime, options, cancellationToken)).ConfigureAwait(false);
Workspace\Solution\Project.cs (1)
492var results = await Task.WhenAll(this.Documents.Select(predicateAsync)).ConfigureAwait(false);
Workspace\Solution\ProjectState.AnalyzerConfigOptionsCache.cs (1)
42var analyzerConfigs = await Task.WhenAll(tasks).ConfigureAwait(false);
Workspace\Solution\ProjectState.cs (4)
186var map = await LazyContentHashToDocumentId.GetValueAsync(cancellationToken).ConfigureAwait(false); 401var cache = await projectState._analyzerConfigOptionsCache.Lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 473var cache = await projectState._analyzerConfigOptionsCache.Lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 615var docVersion = await _lazyLatestDocumentTopLevelChangeVersion.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Solution.cs (1)
1574return (await session.MergeDiffsAsync(cancellationToken).ConfigureAwait(false)).MergedSolution;
Workspace\Solution\SolutionCompilationState.cs (3)
76var (checksums, projectCone) = await self.ComputeChecksumsAsync(projectId: null, cancellationToken).ConfigureAwait(false); 1298var compilation = await tracker.GetCompilationAsync(this, cancellationToken).ConfigureAwait(false); 1310return await tracker.GetOrBuildSkeletonReferenceAsync(this, properties, cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (25)
238var finalState = await GetOrBuildFinalStateAsync(compilationState, cancellationToken: cancellationToken).ConfigureAwait(false); 267return await BuildFinalStateAsync().ConfigureAwait(false); 304var collapsedInProgressState = await CollapseInProgressStateAsync(expandedInProgressState).ConfigureAwait(false); 305return await FinalizeCompilationAsync(collapsedInProgressState).ConfigureAwait(false); 366var hasSourceGenerators = await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false); 376await ApplyFirstTransformationAsync(currentState, hasSourceGenerators).ConfigureAwait(false); 423compilationWithoutGeneratedDocuments = await translationAction.TransformCompilationAsync(compilationWithoutGeneratedDocuments, cancellationToken).ConfigureAwait(false); 432staleCompilationWithGeneratedDocuments = await translationAction.TransformCompilationAsync(staleCompilationWithGeneratedDocuments, cancellationToken).ConfigureAwait(false); 455return await FinalizeCompilationWorkerAsync(inProgressState).ConfigureAwait(false); 517projectReference.ProjectId, cancellationToken).ConfigureAwait(false); 538projectReference, this.ProjectState, includeCrossLanguage: true, cancellationToken).ConfigureAwait(false); 550projectReference, this.ProjectState, includeCrossLanguage: false, cancellationToken).ConfigureAwait(false); 563projectReference, this.ProjectState, includeCrossLanguage: true, cancellationToken).ConfigureAwait(false); 589cancellationToken).ConfigureAwait(false); 682compilationState, cancellationToken: cancellationToken).ConfigureAwait(false); 860if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false)) 864compilationState, cancellationToken: cancellationToken).ConfigureAwait(false); 871if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false)) 875compilationState, cancellationToken: cancellationToken).ConfigureAwait(false); 898if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false)) 902compilationState, cancellationToken).ConfigureAwait(false); 1043var docVersion = await projectState.GetLatestDocumentVersionAsync(cancellationToken).ConfigureAwait(false); 1052var dependentProjectVersion = await compilationState.GetDependentVersionAsync(dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false); 1081var version = await projectState.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 1090dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (7)
59compilationState, compilationWithoutGeneratedFiles, generatorInfo.Documents, compilationWithStaleGeneratedTrees, cancellationToken).ConfigureAwait(false); 75cancellationToken).ConfigureAwait(false); 88var hasRequiredGenerators = await HasRequiredGeneratorsAsync(compilationState, cancellationToken).ConfigureAwait(false); 99var presence = await compilationState.GetProjectGeneratorPresenceAsync(ProjectState.Id, cancellationToken).ConfigureAwait(false); 112var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 120using var _ = await RemoteKeepAliveSession.CreateAsync(compilationState, cancellationToken).ConfigureAwait(false); 269if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (5)
147compilationState, cancellationToken).ConfigureAwait(false); 151compilationTracker, compilationState, version, cancellationToken).ConfigureAwait(false); 178var currentSkeletonReferenceSet = await CreateSkeletonReferenceSetAsync(compilationTracker, compilationState, cancellationToken).ConfigureAwait(false); 203var compilation = await compilationTracker.GetCompilationAsync(compilationState, cancellationToken).ConfigureAwait(false); 215return await lazy.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (1)
187cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (1)
123var newCompilation = await UnderlyingTracker.GetCompilationAsync(compilationState, cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState_Checksum.cs (6)
64var collection = await GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 82var (checksum, projectCone) = await arg.self.ComputeChecksumsAsync(arg.projectId, cancellationToken).ConfigureAwait(false); 91var collection = await checksums.GetValueAsync(cancellationToken).ConfigureAwait(false); 98var (checksums, _) = await GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 115solutionStateChecksum = await this.SolutionState.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 120var stateChecksums = await this.SolutionState.GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (4)
107var state = await GetProjectGeneratorPresenceAsync(projectId, cancellationToken).ConfigureAwait(false); 127return await lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 138var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 146var projectStateChecksums = await projectState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionState_Checksum.cs (4)
58var collection = await GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false); 81var collection = await checksums.GetValueAsync(cancellationToken).ConfigureAwait(false); 88var checksums = await GetStateChecksumsAsync(projectId, cancellationToken).ConfigureAwait(false); 120var allResults = await Task.WhenAll(projectChecksumTasks).ConfigureAwait(false);
Workspace\Solution\TextDocumentStates.cs (1)
318var stateChecksums = await state.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\TextLoader.cs (1)
106return await LoadTextAndVersionAsync(options, cancellationToken).ConfigureAwait(continueOnCapturedContext: false);
Workspace\Solution\VersionSource\LoadableTextAndVersionSource.cs (2)
77textAndVersion = await LoadAsync(cancellationToken).ConfigureAwait(false); 149var value = await GetValueAsync(options, cancellationToken).ConfigureAwait(false);
Workspace\Solution\VersionSource\RecoverableTextAndVersion.cs (5)
91? await source.GetValueAsync(options, cancellationToken).ConfigureAwait(false) 106? await recoverableText.InitialSource.GetValueAsync(options, cancellationToken).ConfigureAwait(false) 129return recoverableText.ToTextAndVersion(await recoverableText.GetValueAsync(cancellationToken).ConfigureAwait(false)); 177return await _storageHandle.ReadFromTemporaryStorageAsync(cancellationToken).ConfigureAwait(false); 195var handle = await _storageService.WriteToTemporaryStorageAsync(text, cancellationToken).ConfigureAwait(false);
Workspace\Solution\VersionSource\RecoverableTextAndVersion.RecoverableText.cs (1)
115instance = await RecoverAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild (38)
MSBuild\BuildHostProcessManager.cs (7)
52var (buildHost, _) = await GetBuildHostWithFallbackAsync(GetKindForProject(projectFilePath), projectFilePath, cancellationToken).ConfigureAwait(false); 68var buildHost = await GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath: null, cancellationToken).ConfigureAwait(false); 75if (!await buildHost.HasUsableMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false)) 79return (await GetBuildHostAsync(BuildHostProcessKind.NetCore, projectOrSolutionFilePath, dotnetPath: null, cancellationToken).ConfigureAwait(false), BuildHostProcessKind.NetCore); 97buildHostProcess = await NoLock_GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath, cancellationToken).ConfigureAwait(false); 136var msbuildLocation = await buildHostProcess.BuildHost.FindBestMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false); 157return await NoLock_GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath, cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.cs (3)
175var (absoluteSolutionPath, projects) = await SolutionFileReader.ReadSolutionFileAsync(solutionFilePath, _pathResolver, reportingMode, cancellationToken).ConfigureAwait(false); 201var projectInfos = await worker.LoadAsync(cancellationToken).ConfigureAwait(false); 261return await worker.LoadAsync(cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker.cs (10)
108result = await doFunc().ConfigureAwait(false); 146var projectFileInfos = await LoadProjectInfosFromPathAsync(absoluteProjectPath, _requestedProjectOptions, cancellationToken).ConfigureAwait(false); 172var (buildHost, actualBuildHostKind) = await _buildHostProcessManager.GetBuildHostWithFallbackAsync(preferredBuildHostKind, projectPath, cancellationToken).ConfigureAwait(false); 178).ConfigureAwait(false); 181var diagnosticItems = await projectFile.GetDiagnosticLogItemsAsync(cancellationToken).ConfigureAwait(false); 194).ConfigureAwait(false); 206diagnosticItems = await projectFile.GetDiagnosticLogItemsAsync(cancellationToken).ConfigureAwait(false); 223var projectFileInfos = await LoadProjectFileInfosAsync(projectPath, reportingOptions, cancellationToken).ConfigureAwait(false); 254var projectInfo = await CreateProjectInfoAsync(fileInfo, id, addDiscriminator, cancellationToken).ConfigureAwait(false); 359var resolvedReferences = await ResolveReferencesAsync(projectId, projectFileInfo, commandLineArgs, cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (8)
219await VerifyUnloadableProjectOutputExistsAsync(projectReferencePath, builder, cancellationToken).ConfigureAwait(false)) 227await VerifyProjectOutputExistsAsync(projectReferencePath, builder, cancellationToken).ConfigureAwait(false)) 233if (await TryLoadAndAddReferenceAsync(id, projectReferencePath, aliases, builder, cancellationToken).ConfigureAwait(false)) 241_ = await LoadProjectInfosFromPathAsync(projectReferencePath, _discoveredProjectOptions, cancellationToken).ConfigureAwait(false); 270var projectReferenceInfos = await LoadProjectInfosFromPathAsync(projectReferencePath, _discoveredProjectOptions, cancellationToken).ConfigureAwait(false); 343var buildHost = await _buildHostProcessManager.GetBuildHostWithFallbackAsync(projectPath, cancellationToken).ConfigureAwait(false); 344var outputFilePath = await buildHost.TryGetProjectOutputPathAsync(projectPath, cancellationToken).ConfigureAwait(false); 353var projectFileInfos = await LoadProjectFileInfosAsync(projectPath, DiagnosticReportingOptions.IgnoreAll, cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildWorkspace.cs (2)
206var solutionInfo = await _loader.LoadSolutionInfoAsync(solutionFilePath, progress, msbuildLogger, cancellationToken).ConfigureAwait(false); 253var projects = await _loader.LoadProjectInfoAsync(projectFilePath, projectMap, progress, msbuildLogger, cancellationToken).ConfigureAwait(false);
MSBuild\SolutionFileReader.cs (2)
34var projects = await TryReadSolutionFileAsync(absoluteSolutionPath, pathResolver, projectFilter, diagnosticReportingMode, cancellationToken).ConfigureAwait(false); 55var solutionModel = await serializer.OpenAsync(solutionFilePath, cancellationToken).ConfigureAwait(false);
Rpc\RemoteBuildHost.cs (2)
42var remoteProjectFileTargetObject = await _client.InvokeAsync<int>(BuildHostTargetObject, nameof(IBuildHost.LoadProjectFileAsync), parameters: [projectFilePath, languageName], cancellationToken).ConfigureAwait(false); 54var remoteProjectFileTargetObject = await _client.InvokeAsync<int>(BuildHostTargetObject, nameof(IBuildHost.LoadProject), parameters: [projectFilePath, projectContent, languageName], cancellationToken).ConfigureAwait(false);
Rpc\RpcClient.cs (4)
58while ((line = await _receivingStreamReader.TryReadLineOrReturnNullIfCancelledAsync(_shutdownTokenSource.Token).ConfigureAwait(false)) != null) 129var result = await InvokeCoreAsync(targetObject, methodName, parameters, expectedReturnType: typeof(T), cancellationToken).ConfigureAwait(false); 135var result = await InvokeCoreAsync(targetObject, methodName, parameters, expectedReturnType: typeof(T), cancellationToken).ConfigureAwait(false); 186return await requestCompletionSource.Task.ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
Build\ProjectBuildManager.cs (4)
98using var readStream = await SerializableBytes.CreateReadableStreamAsync(stream, cancellationToken).ConfigureAwait(false); 211var (project, _) = await LoadProjectAsync(path, cancellationToken).ConfigureAwait(false); 315var result = await BuildAsync(buildRequestData, cancellationToken).ConfigureAwait(false); 336return await BuildAsync(MSB.Execution.BuildManager.DefaultBuildManager, requestData, cancellationToken).ConfigureAwait(false);
BuildHost.cs (1)
187var projectFile = await projectLoader.LoadProjectFileAsync(projectFilePath, _buildManager, cancellationToken).ConfigureAwait(false);
MSBuild\ProjectFile\ProjectFile.cs (3)
76var projectFileInfo = await BuildProjectFileInfoAsync(cancellationToken).ConfigureAwait(false); 96var projectFileInfo = await BuildProjectFileInfoAsync(cancellationToken).ConfigureAwait(false); 109var project = await _buildManager.BuildProjectAsync(_loadedProject, Log, cancellationToken).ConfigureAwait(false);
MSBuild\ProjectFile\ProjectFileLoader.cs (1)
28var (project, log) = await buildManager.LoadProjectAsync(path, cancellationToken).ConfigureAwait(false);
Rpc\Contracts\TextReaderExtensions.cs (1)
40await Task.WhenAny(readLineTask, cancellationTaskSource.Task).ConfigureAwait(false);
Rpc\RpcServer.cs (1)
65while ((line = await _streamReader.TryReadLineOrReturnNullIfCancelledAsync(_shutdownTokenSource.Token).ConfigureAwait(false)) != null)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
src\Workspaces\MSBuild\BuildHost\Rpc\RpcServer.cs (1)
65while ((line = await _streamReader.TryReadLineOrReturnNullIfCancelledAsync(_shutdownTokenSource.Token).ConfigureAwait(false)) != null)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
MEF\ExportProviderCache.cs (2)
65var parts = Task.Run(async () => await discovery.CreatePartsAsync(assemblies).ConfigureAwait(false)).Result; 76var parts = Task.Run(async () => await discovery.CreatePartsAsync(types).ConfigureAwait(false)).Result;
Remote\InProcRemostHostClient.cs (1)
48var client = (InProcRemoteHostClient?)await TryGetClientAsync(workspace, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
FindAllDeclarationsTests.cs (13)
95var declarations = await SymbolFinder.FindDeclarationsAsync(project, searchTerm, ignoreCase).ConfigureAwait(false); 255var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, searchTerm, ignoreCase).ConfigureAwait(false); 354var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, searchTerm, ignoreCase).ConfigureAwait(false); 399var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test")).ConfigureAwait(false); 407var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => true).ConfigureAwait(false); 415var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => false).ConfigureAwait(false); 460var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test")).ConfigureAwait(false); 468var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => true).ConfigureAwait(false); 476var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => false).ConfigureAwait(false); 521var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, "test").ConfigureAwait(false); 534var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, pattern).ConfigureAwait(false); 579var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, "test").ConfigureAwait(false); 592var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, pattern).ConfigureAwait(false);
SolutionTests\SolutionTests.cs (3)
3949var text = await doc.GetTextAsync().ConfigureAwait(false); 3951var exceptionMessage = await doc.State.GetFailedToLoadExceptionMessageAsync(CancellationToken.None).ConfigureAwait(false); 3957var compilation = await doc.Project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
SolutionTests\SolutionWithSourceGeneratorTests.cs (2)
814.AddDocument(originalDocument1.Name, await originalDocument1.GetTextAsync().ConfigureAwait(false), filePath: originalDocument1.FilePath); 1411using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false);
Microsoft.CommonLanguageServerProtocol.Framework.Package (10)
AbstractLanguageServer.cs (1)
213var result = await queue.ExecuteAsync(requestObject, _method, lspServices, cancellationToken).ConfigureAwait(false);
NewtonsoftLanguageServer.cs (1)
79var result = await InvokeAsync(queue, request, lspServices, cancellationToken).ConfigureAwait(false);
QueueItem.cs (4)
102var context = await requestContextFactory.CreateRequestContextAsync(this, handler, deserializedRequest, cancellationToken).ConfigureAwait(false); 191var result = await requestHandler.HandleRequestAsync(request, context, cancellationToken).ConfigureAwait(false); 197var result = await parameterlessRequestHandler.HandleRequestAsync(context, cancellationToken).ConfigureAwait(false); 246await _completionSource.Task.ConfigureAwait(false);
RequestExecutionQueue.cs (3)
204queueItem = await _queue.DequeueAsync(_cancelSource.Token).ConfigureAwait(false); 339var contextInfo = await work.CreateRequestContextAsync<TRequest>(handler, metadata, _languageServer, cancellationToken).ConfigureAwait(false); 485var (_, _, cancellationToken) = await _queue._queue.DequeueAsync().ConfigureAwait(false);
SystemTextJsonLanguageServer.cs (1)
87var result = await InvokeAsync(queue, request, lspServices, cancellationToken).ConfigureAwait(false);
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
184var httpResponse = await httpClient.GetAsync(uri, _cancellationSource.Token).ConfigureAwait(false);
Microsoft.DotNet.Build.Tasks.Feed (8)
src\AzureStorageExtensions.cs (1)
60BlobDownloadInfo download = await client.DownloadAsync(range).ConfigureAwait(false);
src\common\AzureStorageUtils.cs (5)
122.ConfigureAwait(false); 130}).ConfigureAwait(false); 144await Container.CreateIfNotExistsAsync(publicAccess).ConfigureAwait(false); 160await Container.ExistsAsync().ConfigureAwait(false); 163await GetBlob(blobPath).ExistsAsync().ConfigureAwait(false);
src\PublishArtifactsInManifestBase.cs (2)
1009}).ConfigureAwait(false); 1074}).ConfigureAwait(false);
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Helix.Client (80)
generated-code\Aggregate.cs (22)
230var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 245content = await reader.ReadToEndAsync().ConfigureAwait(false); 325var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 340content = await reader.ReadToEndAsync().ConfigureAwait(false); 430var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 445content = await reader.ReadToEndAsync().ConfigureAwait(false); 542var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 557content = await reader.ReadToEndAsync().ConfigureAwait(false); 649var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 664content = await reader.ReadToEndAsync().ConfigureAwait(false); 791var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 806content = await reader.ReadToEndAsync().ConfigureAwait(false); 885var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 900content = await reader.ReadToEndAsync().ConfigureAwait(false); 960var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 975content = await reader.ReadToEndAsync().ConfigureAwait(false); 1077var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 1092content = await reader.ReadToEndAsync().ConfigureAwait(false); 1197var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 1212content = await reader.ReadToEndAsync().ConfigureAwait(false); 1278var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 1293content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\Analysis.cs (3)
138content = await reader.ReadToEndAsync().ConfigureAwait(false); 224var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 239content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\Information.cs (6)
97var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 112content = await reader.ReadToEndAsync().ConfigureAwait(false); 171var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 186content = await reader.ReadToEndAsync().ConfigureAwait(false); 240var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 255content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\Job.cs (14)
153var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 168content = await reader.ReadToEndAsync().ConfigureAwait(false); 252var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 267content = await reader.ReadToEndAsync().ConfigureAwait(false); 327var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 342content = await reader.ReadToEndAsync().ConfigureAwait(false); 402var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 417content = await reader.ReadToEndAsync().ConfigureAwait(false); 477var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 492content = await reader.ReadToEndAsync().ConfigureAwait(false); 552var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 567content = await reader.ReadToEndAsync().ConfigureAwait(false); 638content = await reader.ReadToEndAsync().ConfigureAwait(false); 704content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\LogSearch.cs (2)
125content = await reader.ReadToEndAsync().ConfigureAwait(false); 215content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\Machine.cs (3)
114content = await reader.ReadToEndAsync().ConfigureAwait(false); 180var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 195content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\ScaleSets.cs (4)
92var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 107content = await reader.ReadToEndAsync().ConfigureAwait(false); 166var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 181content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\Storage.cs (6)
91var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 106content = await reader.ReadToEndAsync().ConfigureAwait(false); 177var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 192content = await reader.ReadToEndAsync().ConfigureAwait(false); 263var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 278content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\Telemetry.cs (11)
150var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 165content = await reader.ReadToEndAsync().ConfigureAwait(false); 240var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 255content = await reader.ReadToEndAsync().ConfigureAwait(false); 347content = await reader.ReadToEndAsync().ConfigureAwait(false); 422var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 437content = await reader.ReadToEndAsync().ConfigureAwait(false); 534content = await reader.ReadToEndAsync().ConfigureAwait(false); 631content = await reader.ReadToEndAsync().ConfigureAwait(false); 728content = await reader.ReadToEndAsync().ConfigureAwait(false); 825content = await reader.ReadToEndAsync().ConfigureAwait(false);
generated-code\WorkItem.cs (8)
136content = await reader.ReadToEndAsync().ConfigureAwait(false); 207var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 222content = await reader.ReadToEndAsync().ConfigureAwait(false); 298content = await reader.ReadToEndAsync().ConfigureAwait(false); 358var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 373content = await reader.ReadToEndAsync().ConfigureAwait(false); 439var _content = await _reader.ReadToEndAsync().ConfigureAwait(false); 454content = await reader.ReadToEndAsync().ConfigureAwait(false);
Job.cs (1)
22var pf = await PassFailAsync(jobCorrelationId, cancellationToken).ConfigureAwait(false);
Microsoft.DotNet.Helix.JobSender (2)
JobDefinition.cs (1)
242var newJob = await JobApi.NewAsync(creationRequest, jobStartIdentifier, cancellationToken: cancellationToken).ConfigureAwait(false);
StorageHelpers\ApiBlobHelper.cs (1)
25ContainerInformation info = await _helixApiStorage.NewAsync(new ContainerCreationRequest(30, requestedName, targetQueue), cancellationToken).ConfigureAwait(false);
Microsoft.DotNet.Helix.Sdk (6)
AzureDevOpsTask.cs (1)
212return await function().ConfigureAwait(false);
GetHelixWorkItems.cs (3)
34WorkItems = (await Task.WhenAll(Jobs.Select(j => GetWorkItemsAsync(j, cancellationToken))).ConfigureAwait(false)).SelectMany(r => r).ToArray(); 43var status = await HelixApi.Job.PassFailAsync(jobName, cancellationToken).ConfigureAwait(false); 99var files = await HelixApi.WorkItem.ListFilesAsync(wi, jobName, false, cancellationToken).ConfigureAwait(false);
WaitForHelixJobCompletion.cs (2)
56var jd = await HelixApi.Job.DetailsAsync(jobName, cancellationToken).ConfigureAwait(false); 66var pf = await HelixApi.Job.PassFailAsync(jobName, cancellationToken).ConfigureAwait(false);
Microsoft.DotNet.Internal.SymbolHelper (12)
SymbolUploadHelper.cs (10)
125return await RunSymbolCommand("help", ".", logger).ConfigureAwait(false); 141return await RunSymbolCommand(arguments, ".", logger).ConfigureAwait(false); 162return await AddDirectoryCore(name!, pathToAdd, manifestPath: null, logger).ConfigureAwait(false); 188return await AddPackageToRequestCore(name!, packagePath, logger).ConfigureAwait(false); 209result = await AddPackageToRequestCore(name!, package, logger).ConfigureAwait(false); 231return await RunSymbolCommand(arguments, ".", logger).ConfigureAwait(false); 249return await RunSymbolCommand(arguments, ".", logger).ConfigureAwait(false); 262return await RunSymbolCommand(arguments, pathToAdd, logger).ConfigureAwait(false); 317return await AddDirectoryCore(name, packageExtractDir, manifest, logger).ConfigureAwait(false); 469Task alertedTask = await Task.WhenAny(outputAvailable, errorAvailable).ConfigureAwait(false);
SymbolUploadHelperFactory.cs (2)
155using HttpResponseMessage response = await s_symbolDownloadClient.SendAsync(getToolRequest, token).ConfigureAwait(false); 160using (Stream zipStream = await response.Content.ReadAsStreamAsync(token).ConfigureAwait(false))
Microsoft.Extensions.AI (3)
ChatCompletion\ReducingChatClient.cs (3)
34messages = await _reducer.ReduceAsync(messages, cancellationToken).ConfigureAwait(false); 36return await base.GetResponseAsync(messages, options, cancellationToken).ConfigureAwait(false); 43messages = await _reducer.ReduceAsync(messages, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.Abstractions (4)
ChatCompletion\ChatResponseExtensions.cs (1)
122list.AddMessages(await updates.ToChatResponseAsync(cancellationToken).ConfigureAwait(false));
Embeddings\EmbeddingGeneratorExtensions.cs (3)
111var embedding = await GenerateAsync(generator, value, options, cancellationToken).ConfigureAwait(false); 143var embeddings = await generator.GenerateAsync([value], options, cancellationToken).ConfigureAwait(false); 196var embeddings = await generator.GenerateAsync(values, options, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.AzureAIInference (4)
AzureAIInferenceChatClient.cs (2)
93cancellationToken: cancellationToken).ConfigureAwait(false)).Value; 155var updates = await _chatCompletionsClient.CompleteStreamingAsync(ToAzureAIOptions(messages, options), cancellationToken).ConfigureAwait(false);
AzureAIInferenceEmbeddingGenerator.cs (1)
96var embeddings = (await _embeddingsClient.EmbedAsync(azureAIOptions, cancellationToken).ConfigureAwait(false)).Value;
AzureAIInferenceImageEmbeddingGenerator.cs (1)
92var embeddings = (await _imageEmbeddingsClient.EmbedAsync(azureAIOptions, cancellationToken).ConfigureAwait(false)).Value;
Microsoft.Extensions.AI.Evaluation (3)
Utilities\TaskExtensions.cs (2)
53yield return await task.ConfigureAwait(false); 62yield return await task.ConfigureAwait(false);
Utilities\TimingHelper.cs (1)
86result = await operation().ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.Console (3)
Program.cs (1)
151return await rootCmd.InvokeAsync(args).ConfigureAwait(false);
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
86result = await operation().ConfigureAwait(false);
Utilities\LoggerExtensions.cs (1)
106return await operation().ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.NLP (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
86result = await operation().ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.Quality (2)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
86result = await operation().ConfigureAwait(false);
Utilities\JsonOutputFixer.cs (1)
75cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.Reporting (6)
ResponseCachingChatClient.cs (2)
38ChatResponse? response = await base.ReadCacheAsync(key, cancellationToken).ConfigureAwait(false); 71await base.ReadCacheStreamingAsync(key, cancellationToken).ConfigureAwait(false);
SimpleChatClient.cs (1)
35response = await base.GetResponseAsync(messages, options, cancellationToken).ConfigureAwait(false);
Storage\DiskBasedResponseCache.cs (3)
85await CacheEntry.ReadAsync(entryFilePath, cancellationToken: cancellationToken).ConfigureAwait(false); 94return await File.ReadAllBytesAsync(contentsFilePath, cancellationToken).ConfigureAwait(false); 271cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (15)
Storage\AzureStorageResponseCache.CacheEntry.cs (2)
60await fileClient.ReadContentAsync(cancellationToken).ConfigureAwait(false); 98_ = await fileClient.UploadAsync(stream, overwrite: true, cancellationToken).ConfigureAwait(false);
Storage\AzureStorageResponseCache.cs (9)
79cancellationToken: cancellationToken).ConfigureAwait(false); 89await client.GetFileClient(contentsFilePath).ReadContentAsync(cancellationToken).ConfigureAwait(false); 154cancellationToken: cancellationToken).ConfigureAwait(false); 186overwrite: true, cancellationToken).ConfigureAwait(false); 195cancellationToken: cancellationToken).ConfigureAwait(false); 213cancellationToken: cancellationToken).ConfigureAwait(false); 221cancellationToken: cancellationToken).ConfigureAwait(false); 242bool entryFileExists = await entryClient.ExistsAsync(cancellationToken).ConfigureAwait(false); 245bool contentsFileExists = await contentsClient.ExistsAsync(cancellationToken).ConfigureAwait(false);
Storage\AzureStorageResultStore.cs (4)
113await fileClient.ReadContentAsync(cancellationToken).ConfigureAwait(false); 139.DeleteIfExistsAsync(recursive: true, cancellationToken: cancellationToken).ConfigureAwait(false); 145.DeleteIfExistsAsync(cancellationToken: cancellationToken).ConfigureAwait(false); 177cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.Safety (7)
ContentSafetyChatClient.cs (1)
84cancellationToken).ConfigureAwait(false);
ContentSafetyService.cs (5)
229await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); 281await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); 338await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); 410await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); 431HttpResponseMessage response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false);
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
86result = await operation().ConfigureAwait(false);
Microsoft.Extensions.AI.Integration.Tests (5)
QuantizationEmbeddingGenerator.cs (2)
38var embeddings = await _floatService.GenerateAsync(values, options, cancellationToken).ConfigureAwait(false); 71var embeddings = await _floatService.GenerateAsync(values, options, cancellationToken).ConfigureAwait(false);
VerbatimHttpHandler.cs (3)
31string? actualInput = await request.Content.ReadAsStringAsync().ConfigureAwait(false); 46using var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false); 47string? actualOutput = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
Microsoft.Extensions.AI.OpenAI (11)
OpenAIAssistantsChatClient.cs (3)
151var thread = await _client.CreateThreadAsync(threadCreationOptions, cancellationToken).ConfigureAwait(false); 157_ = await _client.CancelRunAsync(threadId, threadRun.Id, cancellationToken).ConfigureAwait(false); 336var assistant = await _client.GetAssistantAsync(_assistantId, cancellationToken).ConfigureAwait(false);
OpenAIChatClient.cs (1)
77var response = await _chatClient.CompleteChatAsync(openAIChatMessages, openAIOptions, cancellationToken).ConfigureAwait(false);
OpenAIEmbeddingGenerator.cs (1)
65var embeddings = (await _embeddingClient.GenerateEmbeddingsAsync(values, openAIOptions, cancellationToken).ConfigureAwait(false)).Value;
OpenAIImageGenerator.cs (2)
102imageStream, fileName, prompt, options?.Count ?? 1, editOptions, cancellationToken).ConfigureAwait(false); 109GeneratedImageCollection result = await _imageClient.GenerateImagesAsync(prompt, options?.Count ?? 1, openAIOptions, cancellationToken).ConfigureAwait(false);
OpenAIResponsesChatClient.cs (1)
80var openAIResponse = (await _responseClient.CreateResponseAsync(openAIResponseItems, openAIOptions, cancellationToken).ConfigureAwait(false)).Value;
OpenAISpeechToTextClient.cs (3)
81var translation = (await _audioClient.TranslateAudioAsync(audioSpeechStream, filename, ToOpenAITranslationOptions(options), cancellationToken).ConfigureAwait(false)).Value; 95var transcription = (await _audioClient.TranscribeAudioAsync(audioSpeechStream, filename, ToOpenAITranscriptionOptions(options), cancellationToken).ConfigureAwait(false)).Value; 132foreach (var update in (await GetTextAsync(audioSpeechStream, options, cancellationToken).ConfigureAwait(false)).ToSpeechToTextResponseUpdates())
Microsoft.Extensions.Caching.Abstractions (2)
DistributedCacheExtensions.cs (1)
135byte[]? data = await cache.GetAsync(key, token).ConfigureAwait(false);
MemoryCacheExtensions.cs (1)
235result = await factory(entry).ConfigureAwait(false);
Microsoft.Extensions.Caching.Hybrid (5)
Internal\DefaultHybridCache.L2.cs (1)
67byte[]? bytes = await pending.ConfigureAwait(false);
Internal\DefaultHybridCache.StampedeStateT.cs (3)
100Task first = await System.Threading.Tasks.Task.WhenAny(stampede.Task, cancelStub.Task).ConfigureAwait(false); 110result = await stampede.Task.ConfigureAwait(false); 158=> (await task.ConfigureAwait(false)).GetReservedValue(log);
Internal\DefaultHybridCache.TagInvalidation.cs (1)
194static async ValueTask<bool> AwaitedAsync(Task<long> pending, long timestamp) => timestamp <= await pending.ConfigureAwait(false);
Microsoft.Extensions.Caching.SqlServer (9)
DatabaseOperations.cs (7)
75await command.ExecuteNonQueryAsync(token).ConfigureAwait(false); 100var arr = await GetCacheItemAsync(key, includeValue: true, destination: destination, token: token).ConfigureAwait(false); 192await upsertCommand.ExecuteNonQueryAsync(token).ConfigureAwait(false); 289CommandBehavior.SequentialAccess | CommandBehavior.SingleRow | CommandBehavior.SingleResult, token).ConfigureAwait(false); 291if (await reader.ReadAsync(token).ConfigureAwait(false)) 295value = await reader.GetFieldValueAsync<byte[]>(Columns.Indexes.CacheItemValueIndex, token).ConfigureAwait(false); 306await command.ExecuteNonQueryAsync(token).ConfigureAwait(false);
SqlServerCache.cs (2)
105var value = await _dbOperations.GetCacheItemAsync(key, token).ConfigureAwait(false); 117var value = await _dbOperations.TryGetCacheItemAsync(key, destination, token).ConfigureAwait(false);
Microsoft.Extensions.Caching.StackExchangeRedis (9)
RedisCache.cs (9)
128return await GetAndRefreshAsync(key, getData: true, token: token).ConfigureAwait(false); 271await GetAndRefreshAsync(key, getData: false, token: token).ConfigureAwait(false); 338connection = await ConnectionMultiplexer.ConnectAsync(_options.GetConfiguredOptions()).ConfigureAwait(false); 342connection = await _options.ConnectionMultiplexerFactory().ConfigureAwait(false); 442results = await cache.HashGetAsync(_instancePrefix.Append(key), GetHashFields(getData)).ConfigureAwait(false); 494await cache.KeyDeleteAsync(_instancePrefix.Append(key)).ConfigureAwait(false); 564await cache.KeyExpireAsync(_instancePrefix.Append(key), expr).ConfigureAwait(false); 764data = await cache.HashGetLeaseAsync(prefixed, DataKey).ConfigureAwait(false); 765metadata = await pendingMetadata.ConfigureAwait(false);
Microsoft.Extensions.Diagnostics.HealthChecks (3)
DefaultHealthCheckService.cs (2)
59await Task.WhenAll(tasks).ConfigureAwait(false); 106result = await healthCheck.CheckHealthAsync(context, checkCancellationToken).ConfigureAwait(false);
HealthCheckPublisherHostedService.cs (1)
192var report = await _healthCheckService.CheckHealthAsync(withOptionsPredicate, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.Diagnostics.Probes (1)
TcpEndpointProbesService.cs (1)
43var report = await _healthCheckService.CheckHealthAsync(_options.FilterChecks, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceLifetime.cs (1)
133await _serviceDispatcherStopped.Task.ConfigureAwait(false);
Microsoft.Extensions.Http (3)
Logging\HttpClientLoggerHandler.cs (1)
38response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Logging\LoggingHttpMessageHandler.cs (1)
66? await base.SendAsync(request, cancellationToken).ConfigureAwait(false)
Logging\LoggingScopeHttpMessageHandler.cs (1)
66? await base.SendAsync(request, cancellationToken).ConfigureAwait(false)
Microsoft.Extensions.Http.Diagnostics (8)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
47return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Logging\Internal\HttpRequestBodyReader.cs (2)
82var streamToReadFrom = await request.Content.ReadAsStreamAsync().WaitAsync(cancellationToken).ConfigureAwait(false); 92var read = await streamToReadFrom.ReadAsync(buffer, 0, readLimit, cancellationToken).ConfigureAwait(false);
Logging\Internal\HttpResponseBodyReader.cs (4)
96Stream streamToReadFrom = await response.Content.ReadAsStreamAsync().WaitAsync(cancellationToken).ConfigureAwait(false); 101string bufferedString = await BufferStreamAndWriteToPipeAsync(streamToReadFrom, pipe.Writer, readSizeLimit, cancellationToken).ConfigureAwait(false); 186int read = await stream.ReadAsync(buffer, 0, chunkSize, cancellationToken).ConfigureAwait(false); 214int bytesRead = await stream.ReadAsync(buffer, 0, ChunkSize, cancellationToken).ConfigureAwait(false);
src\LegacySupport\TaskWaitAsync\TaskExtensions.cs (1)
43var t = await Task.WhenAny(task, tcs.Task).ConfigureAwait(false);
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (48)
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (16)
48.ConfigureAwait(false); 58.ConfigureAwait(false); 68.ConfigureAwait(false); 78.ConfigureAwait(false); 88.ConfigureAwait(false); 98.ConfigureAwait(false); 108.ConfigureAwait(false); 118.ConfigureAwait(false); 128.ConfigureAwait(false); 138.ConfigureAwait(false); 148.ConfigureAwait(false); 158.ConfigureAwait(false); 168.ConfigureAwait(false); 178.ConfigureAwait(false); 188.ConfigureAwait(false); 198.ConfigureAwait(false);
Benchmarks\MediumHttpClientLoggingBenchmark.cs (16)
48.ConfigureAwait(false); 58.ConfigureAwait(false); 68.ConfigureAwait(false); 78.ConfigureAwait(false); 88.ConfigureAwait(false); 98.ConfigureAwait(false); 108.ConfigureAwait(false); 118.ConfigureAwait(false); 128.ConfigureAwait(false); 138.ConfigureAwait(false); 148.ConfigureAwait(false); 158.ConfigureAwait(false); 168.ConfigureAwait(false); 178.ConfigureAwait(false); 188.ConfigureAwait(false); 198.ConfigureAwait(false);
Benchmarks\SmallHttpClientLoggingBenchmark.cs (16)
48.ConfigureAwait(false); 58.ConfigureAwait(false); 68.ConfigureAwait(false); 78.ConfigureAwait(false); 88.ConfigureAwait(false); 98.ConfigureAwait(false); 108.ConfigureAwait(false); 118.ConfigureAwait(false); 128.ConfigureAwait(false); 138.ConfigureAwait(false); 148.ConfigureAwait(false); 158.ConfigureAwait(false); 168.ConfigureAwait(false); 178.ConfigureAwait(false); 188.ConfigureAwait(false); 198.ConfigureAwait(false);
Microsoft.Extensions.Http.Diagnostics.Tests (5)
Logging\AcceptanceTests.cs (1)
199.ConfigureAwait(false);
Logging\HttpClientLoggerTest.cs (4)
73await client.SendAsync(null!, It.IsAny<CancellationToken>()).ConfigureAwait(false); 108await client.SendAsync(httpRequestMessage, It.IsAny<CancellationToken>()).ConfigureAwait(false); 151await httpClient.SendAsync(httpRequestMessage, It.IsAny<CancellationToken>()).ConfigureAwait(false); 557.ConfigureAwait(false);
Microsoft.Extensions.Http.Polly (2)
PolicyHttpMessageHandler.cs (2)
129response = await policy.ExecuteAsync((c, ct) => SendCoreAsync(request, c, ct), context, cancellationToken).ConfigureAwait(false); 168var result = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.Http.Resilience (1)
Resilience\ResilienceHandler.cs (1)
76.ConfigureAwait(context.ContinueOnCapturedContext);
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
EmptyHandler.cs (1)
14return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.Identity.Core (160)
AuthenticatorTokenProvider.cs (2)
23var key = await manager.GetAuthenticatorKeyAsync(user).ConfigureAwait(false); 50var key = await manager.GetAuthenticatorKeyAsync(user).ConfigureAwait(false);
DefaultUserConfirmation.cs (1)
22return await manager.IsEmailConfirmedAsync(user).ConfigureAwait(false);
EmailTokenProvider.cs (3)
23var email = await manager.GetEmailAsync(user).ConfigureAwait(false); 25return !string.IsNullOrWhiteSpace(email) && await manager.IsEmailConfirmedAsync(user).ConfigureAwait(false); 38var email = await manager.GetEmailAsync(user).ConfigureAwait(false);
PhoneNumberTokenProvider.cs (3)
34var phoneNumber = await manager.GetPhoneNumberAsync(user).ConfigureAwait(false); 36return !string.IsNullOrWhiteSpace(phoneNumber) && await manager.IsPhoneNumberConfirmedAsync(user).ConfigureAwait(false); 53var phoneNumber = await manager.GetPhoneNumberAsync(user).ConfigureAwait(false);
RoleManager.cs (10)
159var result = await ValidateRoleAsync(role).ConfigureAwait(false); 165result = await Store.CreateAsync(role, CancellationToken).ConfigureAwait(false); 178var name = await GetRoleNameAsync(role).ConfigureAwait(false); 224return await FindByNameAsync(roleName).ConfigureAwait(false) != null; 331return await UpdateRoleAsync(role).ConfigureAwait(false); 350return await UpdateRoleAsync(role).ConfigureAwait(false); 402var result = await v.ValidateAsync(this, role).ConfigureAwait(false); 413Logger.LogWarning(LoggerEventIds.RoleValidationFailed, "Role {roleId} validation failed: {errors}.", await GetRoleIdAsync(role).ConfigureAwait(false), string.Join(";", errors.Select(e => e.Code))); 427var result = await ValidateRoleAsync(role).ConfigureAwait(false); 433return await Store.UpdateAsync(role, CancellationToken).ConfigureAwait(false);
RoleValidator.cs (5)
38var errors = await ValidateRoleName(manager, role).ConfigureAwait(false); 49var roleName = await manager.GetRoleNameAsync(role).ConfigureAwait(false); 57var owner = await manager.FindByNameAsync(roleName).ConfigureAwait(false); 59!string.Equals(await manager.GetRoleIdAsync(owner).ConfigureAwait(false), await manager.GetRoleIdAsync(role).ConfigureAwait(false)))
TotpSecurityStampBasedTokenProvider.cs (5)
40var token = await manager.CreateSecurityTokenAsync(user).ConfigureAwait(false); 41var modifier = await GetUserModifierAsync(purpose, manager, user).ConfigureAwait(false); 67var securityToken = await manager.CreateSecurityTokenAsync(user).ConfigureAwait(false); 68var modifier = await GetUserModifierAsync(purpose, manager, user).ConfigureAwait(false); 86var userId = await manager.GetUserIdAsync(user).ConfigureAwait(false);
UserClaimsPrincipalFactory.cs (10)
62var id = await GenerateClaimsAsync(user).ConfigureAwait(false); 73var userId = await UserManager.GetUserIdAsync(user).ConfigureAwait(false); 74var userName = await UserManager.GetUserNameAsync(user).ConfigureAwait(false); 82var email = await UserManager.GetEmailAsync(user).ConfigureAwait(false); 91await UserManager.GetSecurityStampAsync(user).ConfigureAwait(false))); 95id.AddClaims(await UserManager.GetClaimsAsync(user).ConfigureAwait(false)); 138var id = await base.GenerateClaimsAsync(user).ConfigureAwait(false); 141var roles = await UserManager.GetRolesAsync(user).ConfigureAwait(false); 147var role = await RoleManager.FindByNameAsync(roleName).ConfigureAwait(false); 150id.AddClaims(await RoleManager.GetClaimsAsync(role).ConfigureAwait(false));
UserManager.cs (111)
489var result = await CreateCoreAsync(user).ConfigureAwait(false); 504var validateUserResult = await ValidateUserAsync(user).ConfigureAwait(false); 516return await Store.CreateAsync(user, CancellationToken).ConfigureAwait(false); 536return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.Update, startTimeStamp).ConfigureAwait(false); 562var result = await Store.DeleteAsync(user, CancellationToken).ConfigureAwait(false); 600var user = await Store.FindByNameAsync(userName, CancellationToken).ConfigureAwait(false); 612user = await Store.FindByNameAsync(oldKey, CancellationToken).ConfigureAwait(false); 643var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false); 657return await CreateAsync(user).ConfigureAwait(false); 697var normalizedName = NormalizeName(await GetUserNameAsync(user).ConfigureAwait(false)); 711return await Store.GetUserNameAsync(user, CancellationToken).ConfigureAwait(false); 730return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetUserName, startTimeStamp).ConfigureAwait(false); 747return await Store.GetUserIdAsync(user, CancellationToken).ConfigureAwait(false); 763var (result, userMissing) = await CheckPasswordCoreAsync(user, password).ConfigureAwait(false); 790var result = await VerifyPasswordAsync(passwordStore, user, password).ConfigureAwait(false); 795await UpdatePasswordHash(passwordStore, user, password, validatePassword: false).ConfigureAwait(false); 796await UpdateUserAndRecordMetricAsync(user, UserUpdateType.PasswordRehash, startTimeStamp).ConfigureAwait(false); 834var result = await AddPasswordCoreAsync(user, password).ConfigureAwait(false); 851var hash = await passwordStore.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false); 857var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false); 862return await UpdateUserAsync(user).ConfigureAwait(false); 881var result = await ChangePasswordCoreAsync(user, currentPassword, newPassword).ConfigureAwait(false); 898if (await VerifyPasswordAsync(passwordStore, user, currentPassword).ConfigureAwait(false) != PasswordVerificationResult.Failed) 900var updateResult = await UpdatePasswordHash(passwordStore, user, newPassword).ConfigureAwait(false); 905return await UpdateUserAsync(user).ConfigureAwait(false); 928await UpdatePasswordHash(passwordStore, user, null, validatePassword: false).ConfigureAwait(false); 929return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemovePassword, startTimeStamp).ConfigureAwait(false); 950var hash = await store.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false); 970var stamp = await securityStore.GetSecurityStampAsync(user, CancellationToken).ConfigureAwait(false); 1000return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.UpdateSecurityStamp, startTimeStamp).ConfigureAwait(false); 1041if (!await VerifyUserTokenAsync(user, Options.Tokens.PasswordResetTokenProvider, ResetPasswordTokenPurpose, token).ConfigureAwait(false)) 1048var result = await UpdatePasswordHash(user, newPassword, validatePassword: true).ConfigureAwait(false); 1054return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetPassword, startTimeStamp).ConfigureAwait(false); 1098return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveLogin, startTimeStamp).ConfigureAwait(false); 1121var result = await AddLoginCoreAsync(user, login).ConfigureAwait(false); 1139var existingUser = await FindByLoginAsync(login.LoginProvider, login.ProviderKey).ConfigureAwait(false); 1146return await UpdateUserAsync(user).ConfigureAwait(false); 1161return await loginStore.GetLoginsAsync(user, CancellationToken).ConfigureAwait(false); 1198return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.AddClaims, startTimeStamp).ConfigureAwait(false); 1229return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ReplaceClaim, startTimeStamp).ConfigureAwait(false); 1272return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveClaims, startTimeStamp).ConfigureAwait(false); 1293return await claimStore.GetClaimsAsync(user, CancellationToken).ConfigureAwait(false); 1310var result = await AddToRoleCoreAsync(user, role).ConfigureAwait(false); 1328if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1333return await UpdateUserAsync(user).ConfigureAwait(false); 1350var result = await AddToRolesCoreAsync(user, roles).ConfigureAwait(false); 1371if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1377return await UpdateUserAsync(user).ConfigureAwait(false); 1398if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1406return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveFromRoles, startTimeStamp).ConfigureAwait(false); 1441var result = await RemoveFromRolesCoreAsync(user, roles).ConfigureAwait(false); 1462if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1468return await UpdateUserAsync(user).ConfigureAwait(false); 1481return await userRoleStore.GetRolesAsync(user, CancellationToken).ConfigureAwait(false); 1498return await userRoleStore.IsInRoleAsync(user, NormalizeName(role), CancellationToken).ConfigureAwait(false); 1511return await store.GetEmailAsync(user, CancellationToken).ConfigureAwait(false); 1535return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetEmail, startTimeStamp).ConfigureAwait(false); 1560var user = await store.FindByEmailAsync(email, CancellationToken).ConfigureAwait(false); 1572user = await store.FindByEmailAsync(oldKey, CancellationToken).ConfigureAwait(false); 1593var email = await GetEmailAsync(user).ConfigureAwait(false); 1625var result = await ConfirmEmailCoreAsync(user, token).ConfigureAwait(false); 1642if (!await VerifyUserTokenAsync(user, Options.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token).ConfigureAwait(false)) 1647return await UpdateUserAsync(user).ConfigureAwait(false); 1664return await store.GetEmailConfirmedAsync(user, CancellationToken).ConfigureAwait(false); 1696return await ChangeEmailCoreAsync(user, newEmail, token, startTimeStamp).ConfigureAwait(false); 1711if (!await VerifyUserTokenAsync(user, Options.Tokens.ChangeEmailTokenProvider, GetChangeEmailTokenPurpose(newEmail), token).ConfigureAwait(false)) 1719return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ChangeEmail, startTimestamp).ConfigureAwait(false); 1732return await store.GetPhoneNumberAsync(user, CancellationToken).ConfigureAwait(false); 1756return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetPhoneNumber, startTimestamp).ConfigureAwait(false); 1781var result = await ChangePhoneNumberCoreAsync(user, phoneNumber, token).ConfigureAwait(false); 1798if (!await VerifyChangePhoneNumberTokenAsync(user, token, phoneNumber).ConfigureAwait(false)) 1806return await UpdateUserAsync(user).ConfigureAwait(false); 1883var result = await provider.ValidateAsync(purpose, token, this, user).ConfigureAwait(false); 1960if (await f.Value.CanGenerateTwoFactorTokenAsync(this, user).ConfigureAwait(false)) 1990var result = await provider.ValidateAsync("TwoFactor", token, this, user).ConfigureAwait(false); 2050return await store.GetTwoFactorEnabledAsync(user, CancellationToken).ConfigureAwait(false); 2073return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetTwoFactorEnabled, startTimestamp).ConfigureAwait(false); 2096if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false)) 2100var lockoutTime = await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false); 2123return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetLockoutEnabled, startTimestamp).ConfigureAwait(false); 2144return await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false); 2160return await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false); 2174var result = await SetLockoutEndDateCoreAsync(user, lockoutEnd).ConfigureAwait(false); 2191if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false)) 2197return await UpdateUserAsync(user).ConfigureAwait(false); 2217var count = await store.IncrementAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false); 2220return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.IncrementAccessFailed, startTimestamp).ConfigureAwait(false); 2226return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.IncrementAccessFailed, startTimestamp).ConfigureAwait(false); 2245var result = await ResetAccessFailedCountCoreAsync(user).ConfigureAwait(false); 2262if (await GetAccessFailedCountAsync(user).ConfigureAwait(false) == 0) 2267return await UpdateUserAsync(user).ConfigureAwait(false); 2281return await store.GetAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false); 2356return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetAuthenticationToken, startTimestamp).ConfigureAwait(false); 2384return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveAuthenticationToken, startTimestamp).ConfigureAwait(false); 2421return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetAuthenticatorKey, startTimestamp).ConfigureAwait(false); 2459var update = await UpdateUserAndRecordMetricAsync(user, UserUpdateType.GenerateNewTwoFactorRecoveryCodes, startTimestamp).ConfigureAwait(false); 2561var result = await RedeemTwoFactorRecoveryCodeCoreAsync(user, code).ConfigureAwait(false); 2578var success = await store.RedeemCodeAsync(user, code, CancellationToken).ConfigureAwait(false); 2581return await UpdateUserAsync(user).ConfigureAwait(false); 2611var result = await AddOrUpdatePasskeyCoreAsync(user, passkey).ConfigureAwait(false); 2630return await UpdateUserAsync(user).ConfigureAwait(false); 2697var result = await RemovePasskeyCoreAsync(user, credentialId).ConfigureAwait(false); 2716return await UpdateUserAsync(user).ConfigureAwait(false); 2783return Encoding.Unicode.GetBytes(await GetSecurityStampAsync(user).ConfigureAwait(false)); 2810var validate = await ValidatePasswordAsync(user, newPassword).ConfigureAwait(false); 2893var stamp = await GetSecurityStampAsync(user).ConfigureAwait(false); 2902var result = await v.ValidateAsync(this, user).ConfigureAwait(false); 2933var result = await v.ValidateAsync(this, user, password).ConfigureAwait(false); 2965var result = await ValidateUserAsync(user).ConfigureAwait(false); 2972return await Store.UpdateAsync(user, CancellationToken).ConfigureAwait(false); 2977var result = await UpdateUserAsync(user).ConfigureAwait(false);
UserValidator.cs (10)
44var errors = await ValidateUserName(manager, user).ConfigureAwait(false); 47errors = await ValidateEmail(manager, user, errors).ConfigureAwait(false); 55var userName = await manager.GetUserNameAsync(user).ConfigureAwait(false); 69var owner = await manager.FindByNameAsync(userName).ConfigureAwait(false); 71!string.Equals(await manager.GetUserIdAsync(owner).ConfigureAwait(false), await manager.GetUserIdAsync(user).ConfigureAwait(false))) 84var email = await manager.GetEmailAsync(user).ConfigureAwait(false); 97var owner = await manager.FindByEmailAsync(email).ConfigureAwait(false); 99!string.Equals(await manager.GetUserIdAsync(owner).ConfigureAwait(false), await manager.GetUserIdAsync(user).ConfigureAwait(false)))
Microsoft.Extensions.Identity.Stores (7)
UserStoreBase.cs (7)
431var userLogin = await FindUserLoginAsync(loginProvider, providerKey, cancellationToken).ConfigureAwait(false); 434return await FindUserAsync(userLogin.UserId, cancellationToken).ConfigureAwait(false); 835var token = await FindTokenAsync(user, loginProvider, name, cancellationToken).ConfigureAwait(false); 860var entry = await FindTokenAsync(user, loginProvider, name, cancellationToken).ConfigureAwait(false); 881var entry = await FindTokenAsync(user, loginProvider, name, cancellationToken).ConfigureAwait(false); 920var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? ""; 974var mergedCodes = await GetTokenAsync(user, InternalLoginProvider, RecoveryCodeTokenName, cancellationToken).ConfigureAwait(false) ?? "";
Microsoft.Extensions.Logging.AzureAppServices (3)
BlobAppendReferenceWrapper.cs (3)
44var response = await AppendDataAsync().ConfigureAwait(false); 61response = await _client.SendAsync(message, cancellationToken).ConfigureAwait(false); 68response = await AppendDataAsync().ConfigureAwait(false);
Microsoft.Extensions.ML (1)
ModelLoaders\UriModelLoader.cs (1)
49if (LoadModelAsync().ConfigureAwait(false).GetAwaiter().GetResult())
Microsoft.Extensions.ServiceDiscovery (2)
Http\ResolvingHttpClientHandler.cs (1)
30return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Http\ResolvingHttpDelegatingHandler.cs (1)
53return await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.ServiceDiscovery.Dns (2)
FallbackDnsResolver.cs (2)
29var addresses = await System.Net.Dns.GetHostAddressesAsync(name, cancellationToken).ConfigureAwait(false); 48var queryResult = await _lookupClient.QueryAsync(name, DnsClient.QueryType.SRV, cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
ServiceDiscoveryDestinationResolver.cs (2)
33await Task.WhenAll(tasks).ConfigureAwait(false); 37var (configs, changeToken) = await task.ConfigureAwait(false);
Microsoft.Gen.ComplianceReports.Unit.Tests (15)
GeneratorTests.cs (1)
179new OptionsProvider(analyzerOptions: options)).ConfigureAwait(false);
test\Generators\Shared\RoslynTestUtils.cs (14)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 369var comp = await proj.GetCompilationAsync().ConfigureAwait(false); 409var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 410var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 473var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 474var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 501proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 539document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.ContextualOptions.Unit.Tests (19)
ParserTests.cs (1)
107sources).ConfigureAwait(true))!;
SyntaxContextReceiverTests.cs (4)
29var comp = await RoslynTestUtils.RunSyntaxContextReceiver(sut, new[] { typeof(OptionsContextAttribute).Assembly }, sources).ConfigureAwait(true); 52var comp = await RoslynTestUtils.RunSyntaxContextReceiver(sut, Enumerable.Empty<Assembly>(), sources).ConfigureAwait(true); 67var comp = await RoslynTestUtils.RunSyntaxContextReceiver(sut, new[] { typeof(OptionsContextAttribute).Assembly }, sources).ConfigureAwait(true); 85var comp = await RoslynTestUtils.RunSyntaxContextReceiver(sut, new[] { typeof(OptionsContextAttribute).Assembly }, sources).ConfigureAwait(true);
test\Generators\Shared\RoslynTestUtils.cs (14)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 369var comp = await proj.GetCompilationAsync().ConfigureAwait(false); 409var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 410var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 473var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 474var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 501proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 539document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.Logging.Unit.Tests (16)
AttributeParserTests.cs (1)
248new[] { text }).ConfigureAwait(false);
ParserTests.cs (1)
736cancellationToken: cancellationToken).ConfigureAwait(false);
test\Generators\Shared\RoslynTestUtils.cs (14)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 369var comp = await proj.GetCompilationAsync().ConfigureAwait(false); 409var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 410var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 473var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 474var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 501proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 539document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.MetadataExtractor.Unit.Tests (15)
GeneratorTests.cs (1)
226cancellationToken: cancellationToken).ConfigureAwait(false);
test\Generators\Shared\RoslynTestUtils.cs (14)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 369var comp = await proj.GetCompilationAsync().ConfigureAwait(false); 409var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 410var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 473var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 474var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 501proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 539document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.Metrics.Unit.Tests (15)
ParserTests.cs (1)
790cancellationToken: cancellationToken).ConfigureAwait(false);
test\Generators\Shared\RoslynTestUtils.cs (14)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 369var comp = await proj.GetCompilationAsync().ConfigureAwait(false); 409var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 410var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 473var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 474var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 501proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 539document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.MetricsReports.Unit.Tests (15)
GeneratorTests.cs (1)
169cancellationToken: cancellationToken).ConfigureAwait(false);
test\Generators\Shared\RoslynTestUtils.cs (14)
276var comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 320Compilation? comp = await proj!.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 369var comp = await proj.GetCompilationAsync().ConfigureAwait(false); 409var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 410var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 473var comp = await proj!.GetCompilationAsync().ConfigureAwait(false); 474var diags = await comp!.WithAnalyzers(analyzers).GetAllDiagnosticsAsync().ConfigureAwait(false); 496var operations = await actions[0].GetOperationsAsync(CancellationToken.None).ConfigureAwait(false); 501proj = await RecreateProjectDocumentsAsync(changedProj!).ConfigureAwait(false); 512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 539document = await RecreateDocumentAsync(document!).ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Interop.ComInterfaceGenerator (13)
Analyzers\AddMarshalAsToElementFixer.cs (2)
26SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 47DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false);
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (1)
99var comImportAttribute = await declaringType.GetAttributes().First(attr => attr.AttributeClass.Equals(comImportAttributeType, SymbolEqualityComparer.Default)).ApplicationSyntaxReference.GetSyntaxAsync(ct).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (6)
109var docEditor = await editor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 121SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 151DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false); 177ImmutableArray<Diagnostic> diagnosticsInScope = await fixAllContext.GetDiagnosticsInScopeAsync().ConfigureAwait(false); 199DocumentEditor editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 200SyntaxNode root = await diagnostic.Location.SourceTree.GetRootAsync(ct).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (4)
20return await context.GetDocumentDiagnosticsAsync(context.Document).ConfigureAwait(false); 22return await context.GetAllDiagnosticsAsync(context.Project).ConfigureAwait(false); 42return (await Task.WhenAll(sortedProjects.Select(context.GetAllDiagnosticsAsync)).ConfigureAwait(false)).SelectMany(diag => diag).ToImmutableArray(); 61ImmutableArray<Diagnostic> diagnostics = await context.GetAllDiagnosticsAsync(project).ConfigureAwait(false);
Microsoft.Interop.LibraryImportGenerator (27)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (2)
58DocumentEditor editor = await DocumentEditor.CreateAsync(assemblyInfo, cancellationToken).ConfigureAwait(false); 60var syntaxRoot = await assemblyInfo.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Analyzers\ConvertToLibraryImportFixer.cs (5)
179cancellationToken).ConfigureAwait(false); 183bool shouldWarn = await TransformCallersOfNoPreserveSigMethod(editor, methodSymbol, cancellationToken).ConfigureAwait(false); 216var dllImportSyntax = (AttributeSyntax)await dllImportAttr!.ApplicationSyntaxReference!.GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 275methodSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 277SyntaxNode root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Analyzers\CustomMarshallerAttributeFixer.cs (10)
31ImmutableArray<Diagnostic> diagnostics = await GetAllDiagnosticsInScope(fixAllContext).ConfigureAwait(false); 37SemanticModel model = await doc.GetSemanticModelAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 42SyntaxNode root = await diagnostic.Location.SourceTree.GetRootAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 79fixAllContext.CancellationToken).ConfigureAwait(false); 92return await context.GetDocumentDiagnosticsAsync(context.Document).ConfigureAwait(false); 94return await context.GetAllDiagnosticsAsync(context.Project).ConfigureAwait(false); 96return ImmutableArray.CreateRange((await Task.WhenAll(context.Solution.Projects.Select(context.GetAllDiagnosticsAsync)).ConfigureAwait(false)).SelectMany(arr => arr)); 112SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 156var model = await doc.GetSemanticModelAsync(ct).ConfigureAwait(false); 173await editor.EditOneDeclarationAsync(marshallerType, (editor, decl) => AddMissingMembers(editor, decl, marshallerType, managedType, missingMemberNames, isLinearCollectionMarshaller), ct).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (6)
109var docEditor = await editor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 121SyntaxNode? root = await doc.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 151DocumentEditor editor = await DocumentEditor.CreateAsync(doc, ct).ConfigureAwait(false); 177ImmutableArray<Diagnostic> diagnosticsInScope = await fixAllContext.GetDiagnosticsInScopeAsync().ConfigureAwait(false); 199DocumentEditor editor = await solutionEditor.GetDocumentEditorAsync(documentId, ct).ConfigureAwait(false); 200SyntaxNode root = await diagnostic.Location.SourceTree.GetRootAsync(ct).ConfigureAwait(false);
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (4)
20return await context.GetDocumentDiagnosticsAsync(context.Document).ConfigureAwait(false); 22return await context.GetAllDiagnosticsAsync(context.Project).ConfigureAwait(false); 42return (await Task.WhenAll(sortedProjects.Select(context.GetAllDiagnosticsAsync)).ConfigureAwait(false)).SelectMany(diag => diag).ToImmutableArray(); 61ImmutableArray<Diagnostic> diagnostics = await context.GetAllDiagnosticsAsync(project).ConfigureAwait(false);
Microsoft.Maui (3)
Dispatching\DispatcherExtensions.cs (1)
67 var ret = await funcTask().ConfigureAwait(false);
TaskExtensions.cs (2)
18 result = await task.ConfigureAwait(false); 68 var result = await task.ConfigureAwait(false);
Microsoft.Maui.Controls (17)
Internals\ImageParser.cs (12)
123 int bytesRead = await ReadAsync(_blockBuffer, _currentBlockSize).ConfigureAwait(false); 147 await ReadAsync(_blockBuffer, _currentBlockSize).ConfigureAwait(false); 210 int bytesRead = await stream.ReadAsync(_colorData, toRead).ConfigureAwait(false); 309 GlobalColorTable = await GIFColorTable.CreateColorTableAsync(stream, GlobalColorTableSize(flags)).ConfigureAwait(false); 454 int blockSize = await stream.ReadBlockAsync().ConfigureAwait(false); 466 blockSize = await stream.ReadBlockAsync().ConfigureAwait(false); 472 var blockSize = await stream.ReadBlockAsync().ConfigureAwait(false); 495 ColorTable = await GIFColorTable.CreateColorTableAsync(stream, LocalColorTableSize(flags)).ConfigureAwait(false); 774 count = await stream.ReadBlockAsync().ConfigureAwait(false); 875 GIFHeader header = await GIFHeader.CreateHeaderAsync(reader, skipTypeIdentifier).ConfigureAwait(false); 877 currentBitmap = await GIFBitmap.CreateBitmapAsync(reader, header, decoder, previousBitmap, ignoreImageData).ConfigureAwait(false); 882 currentBitmap = await GIFBitmap.CreateBitmapAsync(reader, header, decoder, previousBitmap, ignoreImageData).ConfigureAwait(false);
StreamWrapper.cs (2)
95 var response = await client.GetAsync(uri, cancellationToken).ConfigureAwait(false); 106 return new StreamWrapper(await response.Content.ReadAsStreamAsync().ConfigureAwait(false), response);
UriImageSource.cs (3)
101 stream = await DownloadStreamAsync(uri, cancellationToken).ConfigureAwait(false); 107 stream = await DownloadStreamAsync(uri, cancellationToken).ConfigureAwait(false); 121 return await StreamWrapper.GetStreamAsync(uri, cancellationToken, client).ConfigureAwait(false);
Microsoft.Maui.Essentials (3)
MainThread\MainThread.shared.cs (2)
147 var ret = await funcTask().ConfigureAwait(false); 167 ret = SynchronizationContext.Current).ConfigureAwait(false);
Types\Shared\Utils.shared.cs (1)
37 .ConfigureAwait(false);
Microsoft.Maui.Maps (2)
src\Core\src\TaskExtensions.cs (2)
18 result = await task.ConfigureAwait(false); 68 var result = await task.ConfigureAwait(false);
Microsoft.ML.AutoML.Tests (2)
DatasetUtil.cs (2)
210var response = await client.GetAsync(url).ConfigureAwait(false); 211var stream = await response.EnsureSuccessStatusCode().Content.ReadAsStreamAsync().ConfigureAwait(false);
Microsoft.ML.Core (2)
Utilities\ResourceManagerUtils.cs (2)
268var response = await httpClient.GetAsync(uri, ct).ConfigureAwait(false); 280var stream = await response.EnsureSuccessStatusCode().Content.ReadAsStreamAsync().ConfigureAwait(false);
Microsoft.ML.InternalCodeAnalyzer (2)
ContractsCheckNameofFixProvider.cs (1)
39var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false);
NameFixProvider.cs (1)
115var newSolution = await Renamer.RenameSymbolAsync(document.Project.Solution, typeSymbol, renameOptions, newName, cancellationToken).ConfigureAwait(false);
Microsoft.ML.Samples (5)
Dynamic\TensorFlow\ImageClassification.cs (1)
125var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
274var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
306var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
262var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
283var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Microsoft.ML.Samples.GPU (5)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (1)
125var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
274var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
306var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
262var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
283var response = await client.GetStreamAsync(new Uri($"{url}")).ConfigureAwait(false);
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
198var response = await client.GetStreamAsync(new Uri($"{baseGitPath}")).ConfigureAwait(false);
Microsoft.ML.Tokenizers (7)
Model\BertTokenizer.cs (1)
726return await CreateAsync(stream, options, cancellationToken).ConfigureAwait(false);
Model\TiktokenTokenizer.cs (2)
1427return await CreateAsync(vocabStream, preTokenizer, normalizer, specialTokens, cacheSize, cancellationToken).ConfigureAwait(false); 1505cacheSize, cancellationToken).ConfigureAwait(false);
Model\WordPieceTokenizer.cs (2)
195disposeStream: true).ConfigureAwait(false); 212await CreateAsync(vocabStream, options, cancellationToken, disposeStream: false).ConfigureAwait(false);
Utils\Helpers.netstandard.cs (2)
29HttpResponseMessage response = await client.GetAsync(url, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); 31return await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices (285)
CallHierarchy\CallHierarchyCommandHandler.cs (2)
80document, caretPosition, preferPrimaryConstructor: true, cancellationToken).ConfigureAwait(false); 84var node = await _provider.CreateItemAsync(symbol, project, callsites: [], cancellationToken).ConfigureAwait(false);
CallHierarchy\CallHierarchyDetail.cs (1)
79context.UserCancellationToken).ConfigureAwait(false);
CallHierarchy\CallHierarchyItem.cs (1)
144NavigationOptions.Default with { PreferProvisionalTab = true }, context.UserCancellationToken).ConfigureAwait(false);
CallHierarchy\CallHierarchyProvider.cs (4)
63var finders = await CreateFindersAsync(symbol, project, cancellationToken).ConfigureAwait(false); 65symbol, project.Solution, this.ThreadingContext, _streamingPresenter.Value, cancellationToken).ConfigureAwait(false); 115var @overrides = await SymbolFinder.FindOverridesAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false); 126var implementedInterfaceMembers = await SymbolFinder.FindImplementedInterfaceMembersAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\AbstractCallFinder.cs (3)
101var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 150var callers = await GetCallersAsync(symbol, project, documents, cancellationToken).ConfigureAwait(false); 166var item = await Provider.CreateItemAsync(caller.CallingSymbol, callingProject, [.. caller.Locations], cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\BaseMemberFinder.cs (1)
29var calls = await SymbolFinder.FindCallersAsync(symbol, project.Solution, documents, cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\CallToOverrideFinder.cs (2)
25var overrides = await SymbolFinder.FindOverridesAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false); 30var calls = await SymbolFinder.FindCallersAsync(@override, project.Solution, documents, cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\FieldReferenceFinder.cs (1)
32var callers = await SymbolFinder.FindCallersAsync(symbol, project.Solution, documents, cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\ImplementerFinder.cs (2)
38var implementations = await SymbolFinder.FindImplementationsAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false); 46var item = await Provider.CreateItemAsync(implementation, bestLocation.Project, [], cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\InterfaceImplementationCallFinder.cs (1)
32var calls = await SymbolFinder.FindCallersAsync(symbol, project.Solution, documents, cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\MethodCallFinder.cs (1)
35var callers = await SymbolFinder.FindCallersAsync(symbol, project.Solution, documents, cancellationToken).ConfigureAwait(false);
CallHierarchy\Finders\OverridingMemberFinder.cs (2)
34var overrides = await SymbolFinder.FindOverridesAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false); 42var item = await Provider.CreateItemAsync(@override, bestLocation.Project, [], cancellationToken).ConfigureAwait(false);
CodeCleanup\AbstractCodeCleanUpFixer.cs (8)
63context).ConfigureAwait(false); 101context).ConfigureAwait(false); 129var newDocument = await FixDocumentAsync(document, context.EnabledFixIds, progress, cancellationToken).ConfigureAwait(true); 132context).ConfigureAwait(false); 163var newDoc = await FixDocumentAsync(document, context.EnabledFixIds, progress, cancellationToken).ConfigureAwait(true); 185var solution = await applyFixAsync(progress, cancellationToken).ConfigureAwait(true); 224var fixedDocument = await FixDocumentAsync(document, enabledFixIds, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 253document, enabledDiagnostics, progressTracker, cancellationToken).ConfigureAwait(false);
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (2)
35var vsCodeDefView = await _codeDefView.GetValueAsync(cancellationToken).ConfigureAwait(true); 53var vsCodeDefView = await _codeDefView.GetValueAsync(cancellationToken).ConfigureAwait(true);
CodeLens\CodeLensCallbackListener.cs (10)
98cancellationToken).ConfigureAwait(false); 115var maxSearchResults = await GetMaxResultCapAsync(cancellationToken).ConfigureAwait(false); 116return await service.GetReferenceCountAsync(solution, document.Id, node, maxSearchResults, cancellationToken).ConfigureAwait(false); 130cancellationToken).ConfigureAwait(false); 137var references = await service.FindReferenceLocationsAsync(solution, document.Id, node, cancellationToken).ConfigureAwait(false); 144return (projectVersion.ToString(), await service.MapReferenceLocationsAsync(solution, references.Value, _globalOptionService.GetClassificationOptions(document.Project.Language), cancellationToken).ConfigureAwait(false)); 158cancellationToken).ConfigureAwait(false); 166solution, projectGuid, filePath, span, sourceGeneratorDocumentId, cancellationToken).ConfigureAwait(false); 173return await service.FindReferenceMethodsAsync(solution, document.Id, node, cancellationToken).ConfigureAwait(false); 181solution, projectGuid, filePath, sourceGeneratorDocumentId, cancellationToken).ConfigureAwait(false);
CodeLens\VisualStudioCodeLensReferencesService.cs (8)
42var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 53return await CodeLensReferencesServiceFactory.Instance.GetReferenceCountAsync(solution, documentId, syntaxNode, maxSearchResults, cancellationToken).ConfigureAwait(false); 67var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 79return await CodeLensReferencesServiceFactory.Instance.FindReferenceLocationsAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false); 99var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 110return await CodeLensReferencesServiceFactory.Instance.FindReferenceMethodsAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false); 124var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 135return await CodeLensReferencesServiceFactory.Instance.GetFullyQualifiedNameAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false);
ColorSchemes\ColorSchemeApplier.cs (3)
75var settingsManager = await _asyncServiceProvider.GetServiceAsync<SVsSettingsPersistenceManager, ISettingsManager>(cancellationToken).ConfigureAwait(false); 96var colorScheme = await TryGetUpdatedColorSchemeAsync(cancellationToken).ConfigureAwait(false); 125var appliedColorScheme = await _settings.GetAppliedColorSchemeAsync(cancellationToken).ConfigureAwait(false);
DesignerAttribute\VisualStudioDesignerAttributeService.cs (2)
129var client = await RemoteHostClient.TryGetClientAsync(_workspace, cancellationToken).ConfigureAwait(false); 175var cpsUpdateService = await GetUpdateServiceIfCpsProjectAsync(projectId, cancellationToken).ConfigureAwait(false);
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
56var provider = await _providerFactory.GetOrCreateProviderAsync(CancellationToken.None).ConfigureAwait(false);
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (2)
63var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(throwOnFailure: false, cancellationToken).ConfigureAwait(false); 197this, await _statusbar.GetValueOrNullAsync(cancellationToken).ConfigureAwait(true),
DocumentOutline\DocumentOutlineViewModel.cs (2)
269var (documentSymbolData, newTextSnapshot) = await ComputeDocumentSymbolDataAsync(cancellationToken).ConfigureAwait(false); 421_textBuffer, _languageServiceBroker.RequestAsync, filePath, cancellationToken).ConfigureAwait(false);
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (1)
57var response = await callbackAsync(request, cancellationToken).ConfigureAwait(false);
EditorConfigSettings\SettingsEditorControl.xaml.cs (1)
101updatedText = await view.UpdateEditorConfigAsync(updatedText).ConfigureAwait(false);
EditorConfigSettings\SettingsEditorPane.SearchTask.cs (1)
47var results = await control.ForceUpdateAsync().ConfigureAwait(false);
ErrorReporting\VisualStudioErrorReportingService.cs (1)
90var activityLog = await _activityLog.GetValueAsync(_threadingContext.DisposalToken).ConfigureAwait(true);
ErrorReporting\VisualStudioInfoBar.cs (4)
59await ShowInfoBarMessageAsync(message, isCloseButtonVisible, imageMoniker, items).ConfigureAwait(false); 73if (await GetInfoBarHostObjectAsync().ConfigureAwait(true) is not IVsInfoBarHost infoBarHost) 105var factory = await _vsInfoBarUIFactory.GetValueAsync().ConfigureAwait(true); 144var shell = await _vsShell.GetValueAsync().ConfigureAwait(true);
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (6)
397cancellationToken).ConfigureAwait(false); 410var mappedDocumentSpan = await AbstractDocumentSpanEntry.TryMapAndGetFirstAsync(documentSpan, sourceText, cancellationToken).ConfigureAwait(false); 441var (excerptResult, lineText) = await ExcerptAsync(sourceText, documentSpan, classifiedSpans, cancellationToken).ConfigureAwait(false); 443var mappedDocumentSpan = await AbstractDocumentSpanEntry.TryMapAndGetFirstAsync(documentSpan, sourceText, cancellationToken).ConfigureAwait(false); 482var result = await excerptService.TryExcerptAsync(document, sourceSpan, ExcerptMode.SingleLine, options.Value, cancellationToken).ConfigureAwait(false); 492documentSpan, classifiedSpans, options.Value, cancellationToken).ConfigureAwait(false);
FindReferences\Contexts\WithoutReferencesFindUsagesContext.cs (2)
65var entry = await SimpleMessageEntry.CreateAsync(definitionBucket, navigationBucket: null, message).ConfigureAwait(false); 96var entry = await TryCreateDefinitionEntryAsync(definitionBucket, definition, cancellationToken).ConfigureAwait(false);
FindReferences\Contexts\WithReferencesFindUsagesContext.cs (1)
159var entry = await createEntryAsync(definitionBucket).ConfigureAwait(false);
FindReferences\Entries\AbstractDocumentSpanEntry.cs (2)
66cancellationToken).ConfigureAwait(false); 83var results = await SpanMappingHelper.TryGetMappedSpanResultAsync(documentSpan.Document, [documentSpan.SourceSpan], cancellationToken).ConfigureAwait(false);
FindReferences\Entries\MetadataDefinitionItemEntry.cs (2)
45Presenter._workspace, cancellationToken).ConfigureAwait(false); 46await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
FindReferences\RoslynDefinitionBucket.cs (2)
80_presenter._workspace, cancellationToken).ConfigureAwait(false); 81await location.TryNavigateToAsync(_threadingContext, options, cancellationToken).ConfigureAwait(false);
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (1)
35var result = await symbolNavigationService.GetExternalNavigationSymbolLocationAsync(definitionItem, cancellationToken).ConfigureAwait(false);
Implementation\AbstractEditorFactory.cs (1)
341addedDocument = await formattingService.FormatNewDocumentAsync(addedDocument, hintDocument: null, cleanupOptions, cancellationToken).ConfigureAwait(true);
Implementation\AbstractVsTextViewFilter.cs (7)
50return await GetDataTipTextImplAsync(pSpan).ConfigureAwait(true); 64return await GetDataTipTextImplAsync(subjectBuffer, pSpan).ConfigureAwait(true); 113document, spanOpt.Value.Start, includeKind: false, cancellationToken).ConfigureAwait(true); 155waitContext.UserCancellationToken).ConfigureAwait(true); 192document, position, options, cancellationToken).ConfigureAwait(true); 227document, matchingSpan.Value.Start, options, cancellationToken).ConfigureAwait(true); 247document, matchingSpan.Value.End, options, cancellationToken).ConfigureAwait(true);
InheritanceMargin\MarginGlyph\InheritanceMarginContextMenu.xaml.cs (2)
68var rehydrated = await viewModel.DefinitionItem.TryRehydrateAsync(_workspace.CurrentSolution, cancellationToken).ConfigureAwait(false); 77cancellationToken).ConfigureAwait(false);
Interactive\VsInteractiveWindowPackage.cs (3)
43var shell = (IVsShell)await GetServiceAsync(typeof(SVsShell)).ConfigureAwait(true); 44_componentModel = (IComponentModel)await GetServiceAsync(typeof(SComponentModel)).ConfigureAwait(true); 45var menuCommandService = (OleMenuCommandService)await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(true);
Interactive\VsResetInteractive.cs (1)
307var compilation = await document.Project.GetCompilationAsync().ConfigureAwait(true);
KeybindingReset\KeybindingResetDetector.cs (2)
286var suspendFlag = await QueryStatusAsync(SuspendId).ConfigureAwait(false); 295var resumeFlag = await QueryStatusAsync(ResumeId).ConfigureAwait(false);
LanguageClient\VisualStudioLogHubLoggerFactory.cs (1)
45var serviceContainer = await _brokeredServiceContainer.GetValueAsync(cancellationToken).ConfigureAwait(false);
LanguageService\AbstractLanguageService`2.IVsLanguageContextProvider.cs (1)
41document, span, cancellationToken).ConfigureAwait(true);
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (5)
111var debugLocationInfo = await _languageDebugInfo.GetLocationInfoAsync(document, point, cancellationToken).ConfigureAwait(true); 153document, point.Position, context.UserCancellationToken).ConfigureAwait(true); 203solution, pszName, cancellationToken).ConfigureAwait(true); 252pBuffer, iLine, iCol, pCodeSpan, waitContext.UserCancellationToken).ConfigureAwait(true); 328document, new TextSpan(point.Position, length), cancellationToken).ConfigureAwait(true);
LanguageService\AbstractPackage.cs (1)
64_componentModel_doNotAccessDirectly = (IComponentModel?)await GetServiceAsync(typeof(SComponentModel)).ConfigureAwait(false);
LanguageService\AbstractPackage`2.cs (2)
51var shell = (IVsShell7?)await GetServiceAsync(typeof(SVsShell)).ConfigureAwait(true); 141=> AddService(t, async (container, cancellationToken, type) => await serviceCreator(cancellationToken).ConfigureAwait(true), promote: true);
Library\AbstractObjectList.cs (1)
251var ppNavInfo = await GetNavInfoAsync(index, CancellationToken.None).ConfigureAwait(true);
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (3)
49context.OperationContext).ConfigureAwait(true); 62var semanticModel = await document.GetSemanticModelAsync(userCancellationToken).ConfigureAwait(true); 64var root = await semanticModel.SyntaxTree.GetRootAsync(userCancellationToken).ConfigureAwait(true);
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (5)
76namespaceSymbol, _project, await GetCompilationAsync(cancellationToken).ConfigureAwait(true), useExpandedHierarchy: false); 121typeSymbol, _project, await GetCompilationAsync(cancellationToken).ConfigureAwait(true), useExpandedHierarchy: false); 148var compilation = await GetCompilationAsync(cancellationToken).ConfigureAwait(true); 168var compilation = await GetCompilationAsync(cancellationToken).ConfigureAwait(true); 196var compilation = await GetCompilationAsync(cancellationToken).ConfigureAwait(true);
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
485var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(true); 511var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(true);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (5)
209return await project.GetCompilationAsync(cancellationToken).ConfigureAwait(true); 313this.Workspace.CurrentSolution, _languageName, CancellationToken.None).ConfigureAwait(true); 314return await GetSearchListAsync(listKind, flags, pobSrch, projectAndAssemblySet, cancellationToken).ConfigureAwait(true); 424this.Workspace, cancellationToken).ConfigureAwait(true); 546var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Description.cs (1)
25.ConfigureAwait(true);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (2)
75var compilation = await this.GetCompilationAsync(projectId, cancellationToken).ConfigureAwait(true); 94var compilation = await this.GetCompilationAsync(projectId, cancellationToken).ConfigureAwait(true);
Library\ObjectBrowser\ObjectList.cs (9)
412return await IsExpandableTypeAsync(index, cancellationToken).ConfigureAwait(true); 426this.LibraryManager.Workspace, cancellationToken).ConfigureAwait(true); 503project, lookInReferences, cancellationToken).ConfigureAwait(true); 505listKind, flags, pobSrch, projectAndAssemblySet, cancellationToken).ConfigureAwait(true); 509this.LibraryManager.Workspace, cancellationToken).ConfigureAwait(true); 573symbolListItem, useExpandedHierarchy: IsClassView(), cancellationToken).ConfigureAwait(true); 684var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(true); 752var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 755await this.LibraryManager.Workspace.TryGoToDefinitionAsync(symbol, project, cancellationToken).ConfigureAwait(false);
Library\ObjectBrowser\ObjectListItem.cs (1)
79return await project.GetCompilationAsync(cancellationToken).ConfigureAwait(true);
NavigateTo\RoslynSearchItemsSource.cs (1)
56await Task.WhenAny(cancellationTriggeredTask, searchTask).ConfigureAwait(false);
Packaging\PackageInstallerServiceFactory.cs (11)
286progressTracker, cancellationToken).ConfigureAwait(false); 317var installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 334installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 342}, cancellationToken).ConfigureAwait(false); 389var installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 403}, cancellationToken).ConfigureAwait(false); 492}, cancellationToken).ConfigureAwait(false); 502var serviceContainer = await _brokeredServiceContainer.GetValueOrNullAsync(cancellationToken).ConfigureAwait(false); 562nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 580var installedPackagesMap = await GetInstalledPackagesMapAsync(nugetService, projectGuid, cancellationToken).ConfigureAwait(false); 592var installedPackagesResult = await nugetService.GetInstalledPackagesAsync(projectGuid, cancellationToken).ConfigureAwait(false);
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (4)
25projectGuid, dte, dteProject, progressTracker, cancellationToken).ConfigureAwait(false); 45packageName, projectGuid, dte, dteProject, progressTracker, cancellationToken).ConfigureAwait(false); 153context.UserCancellationToken).ConfigureAwait(false); 191context.UserCancellationToken).ConfigureAwait(false);
PdbSourceDocument\AbstractSourceLinkService.cs (2)
54var result = await LocateSymbolFileAsync(pdbInfo, flags, cancellationToken).ConfigureAwait(false); 78var result = await GetSourceLinkAsync(url, relativePath, cancellationToken).ConfigureAwait(false);
PdbSourceDocument\SourceLinkService.cs (2)
37return await _debuggerSymbolLocatorService.LocateSymbolFileAsync(pdbInfo, flags, progress: null, cancellationToken).ConfigureAwait(false); 42return await _debuggerSourceLinkService.GetSourceLinkAsync(url, relativePath, allowInteractiveLogin: false, cancellationToken).ConfigureAwait(false);
ProjectSystem\BrokeredService\WorkspaceProjectFactoryService.cs (1)
32cancellationToken).ConfigureAwait(false);
ProjectSystem\FileChangeTracker.cs (1)
113uint? result = await ((IVsAsyncFileChangeEx2)self._fileChangeService).AdviseFileChangeAsync(self.FilePath, self._fileChangeFlags, self, CancellationToken.None).ConfigureAwait(false);
ProjectSystem\FileChangeWatcher.cs (5)
60var service = await _fileChangeService.ConfigureAwait(false); 307var cookie = await service.AdviseDirChangeAsync(_paths[0], watchSubdirectories: true, _sink, cancellationToken).ConfigureAwait(false); 316var cookies = await service.AdviseFileChangesAsync(_paths.ToImmutable(), _fileChangeFlags, _sink, cancellationToken).ConfigureAwait(false); 326await service.UnadviseDirChangesAsync(_cookies, cancellationToken).ConfigureAwait(false); 330await service.UnadviseFileChangesAsync(_tokens.Select(token => token.Cookie!.Value).ToArray(), cancellationToken).ConfigureAwait(false);
ProjectSystem\FileChangeWatcherProvider.cs (1)
33var fileChangeService = (IVsAsyncFileChangeEx2?)await serviceProvider.GetServiceAsync(typeof(SVsFileChangeEx)).ConfigureAwait(true);
ProjectSystem\RuleSets\RuleSetEventHandler.cs (1)
44var trackProjectDocuments = await serviceProvider.GetServiceAsync<SVsTrackProjectDocuments, IVsTrackProjectDocuments2>(cancellationToken).ConfigureAwait(false);
ProjectSystem\VisualStudioProjectFactory.cs (3)
84var solution = await _solution.GetValueOrNullAsync(cancellationToken).ConfigureAwait(true); 93var project = await _visualStudioWorkspaceImpl.ProjectSystemProjectFactory.CreateAndAddToWorkspaceAsync(projectSystemName, language, creationInfo, hostInfo).ConfigureAwait(true); 129var visualStudioProject = await this.CreateAndAddToWorkspaceAsync(projectSystemName, language, projectInfo, cancellationToken).ConfigureAwait(false);
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
616oldDocument, newDocument, cancellationToken).ConfigureAwait(true); 639var mappedTextChanges = await sourceGeneratedDocumentMappingService.GetMappedTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(true);
PullMemberUp\SymbolDependentsBuilder.cs (2)
59var syntaxes = await Task.WhenAll(tasks).ConfigureAwait(false); 60var compilation = await _project.GetCompilationAsync(_cancellationToken).ConfigureAwait(false);
Remote\VisualStudioRemoteHostClientProvider.cs (2)
131var brokeredServiceContainer = await _brokeredServiceContainer.GetValueAsync().ConfigureAwait(false); 139var client = await ServiceHubRemoteHostClient.CreateAsync(Services, configuration, localSettingsDirectory, _listenerProvider, serviceBroker, _callbackDispatchers, _threadingContext.DisposalToken).ConfigureAwait(false);
RoslynPackage.cs (3)
55var shell = (IVsShell7?)await serviceProvider.GetServiceAsync(typeof(SVsShell)).ConfigureAwait(true); 123var serviceBrokerContainer = await this.GetServiceAsync<SVsBrokeredServiceContainer, IBrokeredServiceContainer>(cancellationToken).ConfigureAwait(false); 191var menuCommandService = (OleMenuCommandService?)await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(true);
Snippets\AbstractSnippetInfoService.cs (2)
62var textManager = (IVsTextManager2?)await asyncServiceProvider.GetServiceAsync(typeof(SVsTextManager)).ConfigureAwait(true); 131).ConfigureAwait(false);
Snippets\SnippetExpansionClient.cs (3)
745var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(true); 765var token = await semanticModel.SyntaxTree.GetTouchingWordAsync(caretPosition.Position, document.GetRequiredLanguageService<ISyntaxFactsService>(), cancellationToken).ConfigureAwait(false); 1072documentWithImports, addImportOptions, formattingOptions, position, snippetNode, cancellationToken).ConfigureAwait(true);
Snippets\SnippetFunctions\SnippetFunctionClassName.cs (1)
43value = await snippetFunctionService.GetContainingClassNameAsync(document, subjectBufferFieldSpan.Start.Position, cancellationToken).ConfigureAwait(false);
Snippets\SnippetFunctions\SnippetFunctionGenerateSwitchCases.cs (1)
60var value = await snippetFunctionService.GetSwitchExpansionAsync(document, caseGenerationSpan.Value, switchExpressionSpan.Value, simplifierOptions, cancellationToken).ConfigureAwait(false);
Snippets\SnippetFunctions\SnippetFunctionSimpleTypeName.cs (1)
47var simplifiedTypeName = await SnippetFunctionService.GetSimplifiedTypeNameAsync(document, fieldSpan.Value, _fullyQualifiedName, simplifierOptions, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackFrameViewModel.cs (6)
61var definition = await GetDefinitionAsync(StackFrameSymbolPart.ContainingType, cancellationToken).ConfigureAwait(false); 75_workspace, cancellationToken).ConfigureAwait(false); 77_threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: false), cancellationToken).ConfigureAwait(false); 90var definition = await GetDefinitionAsync(StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false); 129.ConfigureAwait(false); 223_definitionCache[symbolPart] = await _stackExplorerService.TryFindDefinitionAsync(_workspace.CurrentSolution, _frame, symbolPart, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerCommandHandler.cs (1)
61var shouldActivate = await window.ShouldShowOnActivatedAsync(default).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerRootViewModel.cs (1)
72var result = await StackTraceAnalyzer.AnalyzeAsync(text, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerToolWindow.cs (1)
77var result = await StackTraceAnalyzer.AnalyzeAsync(text, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerViewModel.cs (1)
70var result = await StackTraceAnalyzer.AnalyzeAsync(text, cancellationToken).ConfigureAwait(false);
SymbolSearch\VisualStudioSymbolSearchService.cs (4)
128var engine = await GetEngineAsync(cancellationToken).ConfigureAwait(false); 135var engine = await GetEngineAsync(cancellationToken).ConfigureAwait(false); 145var engine = await GetEngineAsync(cancellationToken).ConfigureAwait(false); 206var engine = await GetEngineAsync(cancellationToken).ConfigureAwait(false);
SyncNamespaces\SyncNamespacesCommandHandler.cs (1)
55var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(throwOnFailure: false, cancellationToken).ConfigureAwait(false);
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (3)
61_shellService = await serviceProvider.GetServiceAsync<SVsUIShell, IVsUIShell>(throwOnFailure: false, cancellationToken).ConfigureAwait(false); 62var errorList = await serviceProvider.GetServiceAsync<SVsErrorList, IErrorList>(throwOnFailure: false, cancellationToken).ConfigureAwait(false); 253filePathMap = await GetFilePathToDocumentMapAsync(project, cancellationToken).ConfigureAwait(false);
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (16)
67var errorList = await serviceProvider.GetServiceAsync<SVsErrorList, IErrorList>(throwOnFailure: false, cancellationToken).ConfigureAwait(false); 82var diagnosticsToFix = await GetDiagnosticsToFixAsync(selectedEntriesOnly: false, isAddSuppression: true).ConfigureAwait(true); 104showPreviewChangesDialog: true).ConfigureAwait(true); 122showPreviewChangesDialog: true).ConfigureAwait(true); 158? await _suppressionStateService.GetSelectedItemsAsync(isAddSuppression, cancellationToken).ConfigureAwait(true) 163}, GetFixTitle(isAddSuppression), GetWaitDialogMessage(isAddSuppression)).ConfigureAwait(true); 179var diagnosticsToFix = await GetDiagnosticsToFixAsync(selectedEntriesOnly, isAddSuppression).ConfigureAwait(true); 225diagnosticsToFix, shouldFixInProject, filterStaleDiagnostics, cancellationToken).ConfigureAwait(false); 230: await GetProjectDiagnosticsToFixAsync(diagnosticsToFix, shouldFixInProject, filterStaleDiagnostics, cancellationToken).ConfigureAwait(false); 278cancellationToken).ConfigureAwait(false); 303cancellationToken).ConfigureAwait(false); 346cancellationToken).ConfigureAwait(false); 488.ConfigureAwait(false)).Where(IsDocumentDiagnostic); 529var diagnostics = await documentDiagnosticsToFix.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false); 567.ConfigureAwait(false)); 582var projectDiagnostics = await projectDiagnosticsToFix.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
TaskList\ExternalErrorDiagnosticUpdateSource.cs (4)
127return await state.IsSupportedDiagnosticIdAsync(projectId, id, cancellationToken).ConfigureAwait(false); 175var diagnosticManagerService = await GetOrCreateDiagnosticManagerAsync(cancellationToken).ConfigureAwait(false); 189var diagnosticManagerService = await GetOrCreateDiagnosticManagerAsync(cancellationToken).ConfigureAwait(false); 357var descriptorMap = await service.GetDiagnosticDescriptorsPerReferenceAsync(project, cancellationToken).ConfigureAwait(false);
Telemetry\VisualStudioWorkspaceTelemetryService.cs (1)
51var client = await RemoteHostClient.TryGetClientAsync(_workspace.Value, cancellationToken).ConfigureAwait(false);
UnusedReferences\ProjectAssets\ProjectAssetsFileReader.cs (2)
32return await reader.ReadToEndAsync().ConfigureAwait(false); 33}).ConfigureAwait(false);
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (3)
68var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(throwOnFailure: false, cancellationToken).ConfigureAwait(false); 192var projectReferences = await this.ReferenceCleanupService.GetProjectReferencesAsync(projectFilePath, cancellationToken).ConfigureAwait(true); 194return await unusedReferenceAnalysisService.GetUnusedReferencesAsync(solution, projectFilePath, projectAssetsFile, projectReferences, cancellationToken).ConfigureAwait(true);
UnusedReferences\UnusedReferenceAnalysisService.cs (3)
29var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 46var references = await ProjectAssetsFileReader.ReadReferencesAsync(projectReferences, projectAssetsFilePath).ConfigureAwait(false); 49var unusedReferences = await UnusedReferencesRemover.GetUnusedReferencesAsync(solution, projectFilePath, references, cancellationToken).ConfigureAwait(false);
UnusedReferences\VisualStudioReferenceCleanupService.cs (3)
34var projectSystemReferences = await _projectSystemReferenceUpdateService.GetProjectReferencesAsync(projectPath, cancellationToken).ConfigureAwait(false); 40var operation = await _projectSystemReferenceUpdateService.GetUpdateReferenceOperationAsync(projectPath, referenceUpdate.ToProjectSystemReferenceUpdate(), cancellationToken).ConfigureAwait(true); 44return await operation.ApplyAsync(cancellationToken).ConfigureAwait(true);
ValueTracking\ValueTrackedTreeItemViewModel.cs (4)
111documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false); 149var children = await CalculateChildrenAsync(ThreadingContext.DisposalToken).ConfigureAwait(false); 188this.ThreadingContext, Workspace, DocumentId, _trackedItem.Span, options, context.UserCancellationToken).ConfigureAwait(false); 194_solution, _trackedItem, cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTrackingCommandHandler.cs (4)
102var items = await service.TrackValueSourceAsync(textSpan, document, cancellationToken).ConfigureAwait(false); 116var toolWindow = await GetOrCreateToolWindowAsync(textView, cancellationToken).ConfigureAwait(false); 176roslynPackage.DisposalToken).ConfigureAwait(false); 191roslynPackage.DisposalToken).ConfigureAwait(false);
Venus\ContainedDocument.DocumentServiceProvider.cs (4)
77var textChanges = (await newDocument.GetTextChangesAsync(oldDocument, cancellationToken).ConfigureAwait(false)).ToImmutableArray(); 78var mappedSpanResults = await MapSpansAsync(oldDocument, textChanges.Select(tc => tc.Span), CancellationToken.None).ConfigureAwait(false); 167var classifiedSpansOnContent = await GetClassifiedSpansOnContentAsync(document, roslynSnapshot, contentSpanOnPrimarySnapshot.Value, classificationOptions, cancellationToken).ConfigureAwait(false); 200document, fixedUpSpan.Span.ToTextSpan(), options, includeAdditiveSpans: false, cancellationToken).ConfigureAwait(false);
Venus\VenusCommandFilter.cs (1)
75var (pbstrText, hr) = await GetDataTipTextImplAsync(_subjectBuffer, subjectBufferSpanData).ConfigureAwait(true);
Workspace\SourceGeneratedFileManager.cs (4)
153await openFile.NavigateToSpanAsync(sourceSpan, cancellationToken).ConfigureAwait(false); 454if (await oldProject.GetDependentVersionAsync(_cancellationTokenSource.Token).ConfigureAwait(false) != 455await newProject.GetDependentVersionAsync(_cancellationTokenSource.Token).ConfigureAwait(false)) 524message, isCloseButtonVisible: false, imageMoniker, infoBarItems).ConfigureAwait(true);
Workspace\VisualStudioActiveDocumentTracker.cs (1)
60var monitorSelectionService = (IVsMonitorSelection?)await asyncServiceProvider.GetServiceAsync(typeof(SVsShellMonitorSelection)).ConfigureAwait(true);
Workspace\VisualStudioDocumentNavigationService.cs (16)
64documentId, vsTextSpan, cancellationToken).ConfigureAwait(false); 96documentId, vsTextSpan, cancellationToken).ConfigureAwait(false); 102if (!await this.CanNavigateToSpanAsync(workspace, documentId, textSpan, allowInvalidSpan, cancellationToken).ConfigureAwait(false)) 110cancellationToken).ConfigureAwait(false); 116if (!await this.CanNavigateToPositionAsync(workspace, documentId, position, virtualSpace, allowInvalidPosition, cancellationToken).ConfigureAwait(false)) 124cancellationToken).ConfigureAwait(false); 164workspace, documentId, getTextSpanForMappingAsync, getVsTextSpan, getVsTextSpanForMapping, cancellationToken).ConfigureAwait(true); 174return await callback(cancellationToken).ConfigureAwait(true); 204await getTextSpanForMappingAsync(document).ConfigureAwait(false), 205cancellationToken).ConfigureAwait(false); 226workspace, document, mappedSpan, cancellationToken).ConfigureAwait(false); 234await getTextSpanForMappingAsync(generatedDocument).ConfigureAwait(false)); 272_threadingContext, documentId, cancellationToken).ConfigureAwait(false); 280text.Container.GetTextBuffer(), vsTextSpan, cancellationToken).ConfigureAwait(false); 317var results = await SpanMappingHelper.TryGetMappedSpanResultAsync(generatedDocument, [textSpan], cancellationToken).ConfigureAwait(false); 419_threadingContext, documentId, cancellationToken).ConfigureAwait(false);
Workspace\VisualStudioSourceGeneratorTelemetryCollectorWorkspaceServiceFactory.cs (1)
89var client = await RemoteHostClient.TryGetClientAsync(_visualStudioWorkspace.Value, cancellationToken).ConfigureAwait(false);
Workspace\VisualStudioSymbolNavigationService.cs (10)
68solution.Workspace, targetDocument.Id, sourceLocation.SourceSpan.Start, cancellationToken).ConfigureAwait(false); 88assemblyName, docCommentId, cancellationToken).ConfigureAwait(false); 103var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 121return await GetNavigableLocationForMetadataAsync(project, symbol, cancellationToken).ConfigureAwait(false); 129var result = await _metadataAsSourceFileService.GetGeneratedFileAsync(_workspace, project, symbol, signaturesOnly: false, options: masOptions, cancellationToken: cancellationToken).ConfigureAwait(false); 174cancellationToken).ConfigureAwait(false); 188var result = await TryGetNavigationAPIRequiredArgumentsAsync(definitionItem, rqName, cancellationToken).ConfigureAwait(true); 207return await GetExternalNavigationLocationForSpecificSymbolAsync(definitionItem, rqName1, cancellationToken).ConfigureAwait(false) ?? 208await GetExternalNavigationLocationForSpecificSymbolAsync(definitionItem, rqName2, cancellationToken).ConfigureAwait(false); 218definitionItem, rqName, cancellationToken).ConfigureAwait(false);
Workspace\VisualStudioWorkspaceStatusServiceFactory.cs (3)
80var shell = await _serviceProvider.GetServiceAsync<SVsShell, IVsShell7>(_threadingContext.DisposalToken).ConfigureAwait(true); 92var service = await serviceProvider.GetServiceAsync<SVsOperationProgress, IVsOperationProgressStatusService>(throwOnFailure: false, _threadingContext.DisposalToken).ConfigureAwait(true); 138=> await _progressStageStatus.JoinAsync(cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CodeLens (3)
ReferenceCodeLensProvider.cs (3)
111_cancellationTokenSource.Token).ConfigureAwait(false); 207cancellationToken).ConfigureAwait(false); 250cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CSharp (28)
Interactive\OpenInteractiveWindowCommand.cs (2)
30var threadingContext = await mefThreadingContext.GetServiceAsync().ConfigureAwait(false); 31var interactiveWindowProvider = await mefInteractiveWindowProvider.GetServiceAsync().ConfigureAwait(false);
Interactive\ResetInteractiveWindowFromProjectCommand.cs (8)
44var threadingContext = await mefThreadingContext.GetServiceAsync().ConfigureAwait(false); 45var interactiveWindowProvider = await mefInteractiveWindowProvider.GetServiceAsync().ConfigureAwait(false); 46var workspace = await mefWorkspace.GetServiceAsync().ConfigureAwait(false); 47var editorOptionsService = await mefEditorOptionsService.GetServiceAsync().ConfigureAwait(false); 48var uiThreadOperationExecutor = await mefUIThreadOperationExecutor.GetServiceAsync().ConfigureAwait(false); 53var dte = await dteProvider.GetServiceAsync().ConfigureAwait(true); 54var monitorSelection = await monitorSelectionProvider.GetServiceAsync().ConfigureAwait(true); 55var solutionBuildManager = await solutionBuildManagerProvider.GetServiceAsync().ConfigureAwait(true);
LanguageService\CSharpHelpContextService.cs (3)
46var token = await syntaxTree.GetTouchingTokenAsync(span.Start, cancellationToken, findInsideTrivia: true).ConfigureAwait(false); 63var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 74var text = await syntaxTree.GetTextAsync(cancellationToken).ConfigureAwait(false);
Options\CSharpVisualStudioCopilotOptionsService.cs (1)
82var settingsManager = await _settingsManagerTask.ConfigureAwait(false);
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
133var compilation = await project.GetRequiredCompilationAsync(CancellationToken.None).ConfigureAwait(true);
SemanticSearch\SemanticSearchPresenterController.cs (1)
42await executor.ExecuteAsync(query, queryDocument: null, workspace.CurrentSolution, queryCancellationSource.Token).ConfigureAwait(false);
SemanticSearch\SemanticSearchQueryExecutor.cs (4)
72var oldText = await newSolution.GetRequiredDocument(documentId).GetTextAsync(cancellationToken).ConfigureAwait(false); 85newDocument = await organizeImportsService.OrganizeImportsAsync(newDocument, options, cancellationToken).ConfigureAwait(false); 86var updatedText = await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 124query ??= (await queryDocument!.GetTextAsync(cancellationToken).ConfigureAwait(false)).ToString();
SemanticSearch\SemanticSearchToolWindow.cs (1)
45_impl = await impl.GetServiceAsync().ConfigureAwait(false);
SemanticSearch\SemanticSearchToolWindowController.cs (2)
33var extensibility = await _lazyExtensibilityService.GetValueAsync(cancellationToken).ConfigureAwait(false); 38_ = await toolWindowImpl.InitializeAsync(cancellationToken).ConfigureAwait(false);
SemanticSearch\SemanticSearchToolWindowImpl.cs (3)
118var element = await CreateContentAsync(cancellationToken).ConfigureAwait(false); 134var vsUIShell = await vsUIShellProvider.GetValueAsync(cancellationToken).ConfigureAwait(false); 435var (newSolution, fileUpdates) = await executor.ExecuteAsync(query: null, queryDocument, oldSolution, cancellationToken).ConfigureAwait(false);
Snippets\CSharpSnippetExpansionLanguageHelper.cs (2)
96var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(true); 101var formattedDocument = await Formatter.FormatAsync(newDocument, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(true);
Microsoft.VisualStudio.LanguageServices.DevKit (4)
SourceLink\VSCodeSourceLinkService.cs (2)
38var result = await proxy.LocateSymbolFileAsync(pdbInfo, flags, progress: null, cancellationToken).ConfigureAwait(false); 62var result = await proxy.GetSourceLinkAsync(url, relativePath, allowInteractiveLogin: false, cancellationToken).ConfigureAwait(false);
src\VisualStudio\Core\Def\PdbSourceDocument\AbstractSourceLinkService.cs (2)
54var result = await LocateSymbolFileAsync(pdbInfo, flags, cancellationToken).ConfigureAwait(false); 78var result = await GetSourceLinkAsync(url, relativePath, cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.Implementation (29)
CodeModel\AbstractCodeModelService.cs (2)
1052cancellationToken).ConfigureAwait(false); 1092return await Simplifier.ReduceAsync(document, annotation, simplifierOptions, cancellationToken).ConfigureAwait(false);
CodeModel\FileCodeModel.cs (3)
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); 704return await Simplifier.ReduceAsync(_batchDocument, Simplifier.Annotation, simplifierOptions, CancellationToken.None).ConfigureAwait(false);
CodeModel\ProjectCodeModelFactory.cs (1)
168await this.Listener.Delay(DelayTimeSpan.NearImmediate, cancellationToken).ConfigureAwait(true);
CodeModel\RootCodeModel.cs (3)
132var compilation = await GetCompilationAsync().ConfigureAwait(true); 144var compilation = await GetCompilationAsync().ConfigureAwait(true); 171var compilation = await GetCompilationAsync().ConfigureAwait(true);
ProjectSystem\CPS\CPSProjectFactory.cs (2)
108uniqueName, languageName, creationInfo, cancellationToken).ConfigureAwait(false); 117var shell = await _serviceProvider.GetServiceAsync<SVsShell, IVsShell7>(cancellationToken).ConfigureAwait(true);
ProjectSystem\CPS\TempPECompiler.cs (1)
44var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
RoslynVisualStudioWorkspace.cs (3)
102var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 109_threadingContext, _streamingPresenter.Value, cancellationToken).ConfigureAwait(false); 128var compilation = await symbolListItem.GetCompilationAsync(this, cancellationToken).ConfigureAwait(true);
SolutionExplorer\AnalyzerItem\AnalyzerItemSource.cs (2)
124project, cancellationToken).ConfigureAwait(false); 147var client = await RemoteHostClient.TryGetClientAsync(this.Workspace, cancellationToken).ConfigureAwait(false);
SolutionExplorer\AnalyzerItemTracker.cs (1)
37_vsMonitorSelection ??= await serviceProvider.GetServiceAsync<SVsShellMonitorSelection, IVsMonitorSelection>(throwOnFailure: false, cancellationToken).ConfigureAwait(false);
SolutionExplorer\AnalyzerNodeSetup.cs (1)
35await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(throwOnFailure: false, cancellationToken).ConfigureAwait(false),
SolutionExplorer\AnalyzersCommandHandler.cs (2)
462var newSolution = await selectedDiagnostic.GetSolutionWithUpdatedAnalyzerConfigSeverityAsync(selectedAction.Value, project, context.UserCancellationToken).ConfigureAwait(false); 471context.UserCancellationToken).ConfigureAwait(true);
SolutionExplorer\DiagnosticItem\BaseDiagnosticAndGeneratorItemSource.cs (6)
119project, analyzerReference, cancellationToken).ConfigureAwait(false); 146var client = await RemoteHostClient.TryGetClientAsync(this.Workspace, cancellationToken).ConfigureAwait(false); 148var latestDiagnosticItems = await GenerateDiagnosticItemsAsync().ConfigureAwait(false); 149var latestSourceGeneratorItems = await GenerateSourceGeneratorItemsAsync().ConfigureAwait(false); 196return await project.GetDiagnosticDescriptorsAsync(analyzerReference, cancellationToken).ConfigureAwait(false); 201var identifies = await GetIdentitiesAsync().ConfigureAwait(false);
SolutionExplorer\Search\RoslynSolutionExplorerSearchProvider.cs (1)
118var isFullyLoaded = await statusService.IsFullyLoadedAsync(cancellationToken).ConfigureAwait(false);
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItem.cs (1)
63item._threadingContext, item.Workspace, item.DocumentId, position: 0, CancellationToken.None).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.LiveShare (8)
Client\Projects\RemoteProjectInfoProvider.cs (1)
37foreach (var projectInfo in await remoteProjectInfoProvider.GetRemoteProjectInfosAsync(cancellationToken).ConfigureAwait(false))
Client\Projects\RoslynRemoteProjectInfoProvider.cs (2)
56projects = await lspClient.RequestAsync(request, new object(), cancellationToken).ConfigureAwait(false); 79var files = await Task.WhenAll(filesTasks).ConfigureAwait(false);
Client\RemoteLanguageServiceWorkspace.cs (3)
152var (remoteRootPaths, externalPaths) = await GetLocalPathsOfRemoteRootsAsync(session).ConfigureAwait(false); 168var roots = await session.ListRootsAsync(CancellationToken.None).ConfigureAwait(false); 399await _session.DownloadFileAsync(_session.ConvertLocalPathToSharedUri(doc.FilePath), CancellationToken.None).ConfigureAwait(true);
Client\RemoteLanguageServiceWorkspaceHost.cs (2)
95await _projectsLoadedTaskCompletionSource.Task.ConfigureAwait(false); 116var projectInfos = await _remoteProjectInfoProvider.GetRemoteProjectInfosAsync(cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.Xaml (31)
CodeFixes\RemoveUnnecessaryUsings\XamlRemoveUnnecessaryUsingsCodeFixProvider.cs (1)
58return await service.RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false);
Diagnostics\Analyzers\XamlDocumentDiagnosticAnalyzer.cs (2)
23: await XamlProjectService.AnalyzerService.AnalyzeSyntaxAsync(document, cancellationToken).ConfigureAwait(false); 28: await XamlProjectService.AnalyzerService.AnalyzeSemanticsAsync(document, cancellationToken).ConfigureAwait(false);
Features\InlineRename\XamlEditorInlineRenameService.cs (2)
42var renameInfo = await _renameService.GetRenameInfoAsync(document, position, cancellationToken).ConfigureAwait(false); 84cancellationToken: cancellationToken).ConfigureAwait(false);
Features\OrganizeImports\XamlOrganizeImportsService.cs (1)
25return await _organizeService.OrganizeNamespacesAsync(document, options.PlaceSystemNamespaceFirst, cancellationToken).ConfigureAwait(false) ?? document;
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (2)
48var semanticModel = await codeDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 55var quickInfo = await QuickInfoUtilities.CreateQuickInfoItemAsync(services, semanticModel, span: default, [symbol], options, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Commands\CreateEventCommandHandler.cs (1)
64return await commandService.ExecuteCommandAsync(document, request.Command, arguments, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
68var completionResult = await completionService.GetCompletionsAsync(new XamlCompletionContext(document, offset, request.Context?.TriggerCharacter?.FirstOrDefault() ?? '\0'), cancellationToken: cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Completion\CompletionResolveHandler.cs (3)
71var offset = await document.GetPositionFromLinePositionAsync(ProtocolConversions.PositionToLinePosition(data.Position), cancellationToken).ConfigureAwait(false); 73var symbol = await completionService.GetSymbolAsync(new XamlCompletionContext(document, offset), completionItem.Label, cancellationToken: cancellationToken).ConfigureAwait(false); 80var description = await symbol.GetDescriptionAsync(document, options, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (8)
69var position = await document.GetPositionFromLinePositionAsync(ProtocolConversions.PositionToLinePosition(request.Position), cancellationToken).ConfigureAwait(false); 70var definitions = await xamlGoToDefinitionService.GetDefinitionsAsync(document, position, cancellationToken).ConfigureAwait(false); 78foreach (var location in await this.GetLocationsAsync(definition, document, solution, cancellationToken).ConfigureAwait(false)) 97locations.AddIfNotNull(await GetSourceDefinitionLocationAsync(sourceDefinition, solution, cancellationToken).ConfigureAwait(false)); 101locations.AddRange(await GetSymbolDefinitionLocationsAsync(symbolDefinition, document, solution, _metadataAsSourceFileService, _globalOptions, cancellationToken).ConfigureAwait(false)); 125cancellationToken).ConfigureAwait(false); 168navigableDocument, item.SourceSpan, item.IsStale, cancellationToken).ConfigureAwait(false); 181var declarationFile = await metadataAsSourceFileService.GetGeneratedFileAsync(workspace, project, symbol, signaturesOnly: true, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
107var diagnosticReport = await _xamlDiagnosticService.GetDiagnosticReportAsync(document, previousResultId, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\FoldingRanges\FoldingRangesHandler.cs (1)
48var structureTags = await xamlStructureService.GetStructureTagsAsync(document, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
48var textChanges = await formattingService.GetFormattingChangesAsync(document, options, textSpan, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Formatting\FormatDocumentOnTypeHandler.cs (2)
46var position = await document.GetPositionFromLinePositionAsync(ProtocolConversions.PositionToLinePosition(request.Position), cancellationToken).ConfigureAwait(false); 48var textChanges = await formattingService.GetFormattingChangesAsync(document, options, request.Character[0], position, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Hover\HoverHandler.cs (3)
51var position = await document.GetPositionFromLinePositionAsync(ProtocolConversions.PositionToLinePosition(request.Position), cancellationToken).ConfigureAwait(false); 59var info = await quickInfoService.GetQuickInfoAsync(document, position, cancellationToken).ConfigureAwait(false); 69var description = await info.Symbol.GetDescriptionAsync(document, options, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
49var result = await insertService.GetAutoInsertAsync(document, request.Character[0], offset, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\OnTypeRename\OnTypeRenameHandler.cs (1)
82var result = await renameService.GetTypeRenameAsync(document, offset, cancellationToken).ConfigureAwait(false);
Replay (12)
Replay.cs (5)
23return await RunAsync(options).ConfigureAwait(false); 130cancellationToken: CancellationToken.None).ConfigureAwait(false); 160var completedTask = await Task.WhenAny(tasks).ConfigureAwait(false); 166var buildData = await completedTask.ConfigureAwait(false); 216cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildProtocol.cs (1)
620cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false); 184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false); 191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false); 299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false); 309response = await responseTask.ConfigureAwait(false); 350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Roslyn.Compilers.Extension (8)
CompilerPackage.cs (8)
33var reg = (ILocalRegistry2)await GetServiceAsync(typeof(SLocalRegistry)).ConfigureAwait(true); 72filesToWrite.Add(await GetMSBuildRelativePathAsync($@"Imports\Microsoft.Common.props\ImportBefore\Roslyn.Compilers.Extension.{hiveName}.props", cancellationToken).ConfigureAwait(true), 97filesToWrite.Add(await GetMSBuildRelativePathAsync($@"Microsoft.CSharp.targets\ImportBefore\Roslyn.Compilers.Extension.{hiveName}.targets", cancellationToken).ConfigureAwait(true), targetsContent); 98filesToWrite.Add(await GetMSBuildRelativePathAsync($@"Microsoft.VisualBasic.targets\ImportBefore\Roslyn.Compilers.Extension.{hiveName}.targets", cancellationToken).ConfigureAwait(true), targetsContent); 102var msbuildDirectory = new DirectoryInfo(await GetMSBuildPathAsync(cancellationToken).ConfigureAwait(true)); 151var dte = (DTE)await GetServiceAsync(typeof(SDTE)).ConfigureAwait(true); 174var version = await GetMSBuildVersionStringAsync(cancellationToken).ConfigureAwait(true); 181return Path.Combine(await GetMSBuildPathAsync(cancellationToken).ConfigureAwait(true), relativePath);
Roslyn.Diagnostics.Analyzers (112)
AbstractApplyTraitToClass`1.cs (3)
34var attribute = await context.TryGetRelevantNodeAsync<TAttributeSyntax>(RefactoringHelpers).ConfigureAwait(false); 48var semanticModel = (await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false))!; 69var syntaxRoot = await state.SemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
AbstractCreateTestAccessor`1.cs (5)
32var type = await context.TryGetRelevantNodeAsync<TTypeDeclarationSyntax>(RefactoringHelpers).ConfigureAwait(false); 36var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 60var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 63var syntaxRoot = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
AbstractExposeMemberForTesting`1.cs (6)
38var type = await GetRelevantTypeFromHeaderAsync(context).ConfigureAwait(false); 42var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 84var type = await context.TryGetRelevantNodeAsync<TTypeDeclarationSyntax>(RefactoringHelpers).ConfigureAwait(false); 102var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 104var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 105var syntaxRoot = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
AbstractRunIterations`1.cs (3)
27var method = await context.TryGetRelevantNodeAsync<TMethodDeclarationSyntax>(RefactoringHelpers).ConfigureAwait(false); 31var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 132var root = await method.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (5)
81var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 143var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 160var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 161var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs (2)
34var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 35var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Refactoring\CodeRefactoringContextExtensions.cs (2)
34var potentialNodes = await GetRelevantNodesAsync<TSyntaxNode>(document, helpers, span, cancellationToken).ConfigureAwait(false); 44var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
TestExportsShouldNotBeDiscoverableCodeFixProvider.cs (2)
52var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 53var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Roslyn.Diagnostics.CSharp.Analyzers (20)
CSharpAvoidOptSuffixForNullableEnableCodeCodeFixProvider.cs (3)
37var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 44var semanticModel = await context.Document.GetSemanticModelAsync(context.CancellationToken).ConfigureAwait(false); 69document.Project.Solution, variableSymbol, newName, document.Project.Solution.Options, cancellationToken).ConfigureAwait(false);
CSharpDoNotUseDebugAssertForInterpolatedStringsFixer.cs (1)
31var compilation = await context.Document.Project.GetCompilationAsync(context.CancellationToken).ConfigureAwait(false);
NumberCommentsRefactoring.cs (2)
37var literal = await context.TryGetRelevantNodeAsync<LiteralExpressionSyntax>(CSharpRefactoringHelpers.Instance).ConfigureAwait(false); 61var editor = await DocumentEditor.CreateAsync(document, c).ConfigureAwait(false);
PreferNullLiteralCodeFixProvider.cs (2)
50var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 59var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
66context, destination, @event, cancellationToken).ConfigureAwait(false); 73var compilation = await newDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 79return await AddNamedTypeAsync(newContext, newDestinationSymbol.ContainingType, namedType, cancellationToken).ConfigureAwait(false); 83return await AddNamedTypeAsync(newContext, newDestinationSymbol.ContainingNamespace, namedType, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
120var root = await semanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
61var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
46document, predicate, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (5)
53var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false); 63var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 83var editor = await solutionEditor.GetDocumentEditorAsync(editingDocument.Id, cancellationToken).ConfigureAwait(false); 107var references = await SymbolFinder.FindReferencesAsync(parameter, solution, documents, cancellationToken).ConfigureAwait(false); 112var editor = await solutionEditor.GetDocumentEditorAsync(group.Key.Id, cancellationToken).ConfigureAwait(false);
Roslyn.VisualStudio.DiagnosticsWindow (6)
Panels\TelemetryPanel.xaml.cs (1)
41var text = await Task.Run(GetTelemetryString).ConfigureAwait(true);
Panels\WorkspacePanel.xaml.cs (2)
48return await DiagnoseAsync(CancellationToken.None).ConfigureAwait(false); 54}).ConfigureAwait(true);
VisualStudioDiagnosticsWindowPackage.cs (3)
51var window = (DiagnosticsWindow)await ShowToolWindowAsync(typeof(DiagnosticsWindow), id: 0, create: true, this.DisposalToken).ConfigureAwait(true); 70var componentModel = (IComponentModel)await GetServiceAsync(typeof(SComponentModel)).ConfigureAwait(true); 71var menuCommandService = (IMenuCommandService)await GetServiceAsync(typeof(IMenuCommandService)).ConfigureAwait(true);
Roslyn.VisualStudio.Next.UnitTests (25)
Remote\SerializationValidator.cs (10)
26=> await validator.GetValueAsync<T>(checksum).ConfigureAwait(false); 92var data = await GetRequiredAssetAsync(checksum).ConfigureAwait(false); 114scope.SolutionChecksum, this.Services.SolutionServices, CancellationToken.None).ConfigureAwait(false); 127(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false); 131var projectObject = await GetValueAsync<ProjectStateChecksums>(projectChecksum).ConfigureAwait(false); 141(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false); 186(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false); 199var syncObject = await GetRequiredAssetAsync(checksum).ConfigureAwait(false); 201var recoveredValue = await GetValueAsync<T>(checksum).ConfigureAwait(false); 341var otherObject = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
Remote\SnapshotSerializationTests.cs (1)
535var text = await document.GetTextAsync().ConfigureAwait(false);
Services\ServiceHubServicesTests.cs (14)
72using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 94var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 147using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 198using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 240using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 268using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 320using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 727using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 811using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 866using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 1422using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 1494using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 1578using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false); 1657using var client = await InProcRemoteHostClient.GetTestClientAsync(workspace).ConfigureAwait(false);
RunTests (3)
HelixTestRunner.cs (1)
106var processResult = await process.Result.ConfigureAwait(false);
Program.cs (1)
151var result = await testRunner.RunAllAsync(assemblyFilePaths, cancellationToken).ConfigureAwait(true);
TestRunner.cs (1)
96var testResult = await task.ConfigureAwait(false);
Sockets.BindTests (3)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
109var count = await task.ConfigureAwait(false); 133var count = await _reader.ReadAsync(ch, 0, 128).TimeoutAfter(Timeout).ConfigureAwait(false);
src\Servers\Kestrel\shared\test\TransportTestHelpers\HostNameIsReachableAttribute.cs (1)
73await tcs.Task.ConfigureAwait(false);
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (2)
109var count = await task.ConfigureAwait(false); 133var count = await _reader.ReadAsync(ch, 0, 128).TimeoutAfter(Timeout).ConfigureAwait(false);
src\Servers\Kestrel\shared\test\TransportTestHelpers\HostNameIsReachableAttribute.cs (1)
73await tcs.Task.ConfigureAwait(false);
System.Data.Common (6)
System\Data\Common\DbDataSource.cs (6)
142.ConfigureAwait(false); 195.ConfigureAwait(false); 251.ConfigureAwait(false); 401.ConfigureAwait(false); 454.ConfigureAwait(false); 510.ConfigureAwait(false);
System.IO.Compression (25)
System\IO\Compression\ZipArchive.Async.cs (6)
209await ZipCentralDirectoryFileHeader.TryReadBlockAsync(sizedFileBuffer.AsMemory(currPosition), _archiveStream, saveExtraFieldsAndComments, cancellationToken).ConfigureAwait(false); 247cancellationToken).ConfigureAwait(false)) 253ZipEndOfCentralDirectoryBlock eocd = await ZipEndOfCentralDirectoryBlock.ReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 302Zip64EndOfCentralDirectoryLocator.FieldLengths.Signature, cancellationToken).ConfigureAwait(false)) 305Zip64EndOfCentralDirectoryLocator locator = await Zip64EndOfCentralDirectoryLocator.TryReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 309Zip64EndOfCentralDirectoryRecord record = await Zip64EndOfCentralDirectoryRecord.TryReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipArchiveEntry.Async.cs (16)
30return await OpenInReadModeAsync(checkOpenable: true, cancellationToken).ConfigureAwait(false); 36return await OpenInUpdateModeAsync(cancellationToken).ConfigureAwait(false); 48if (!await ZipLocalFileHeader.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false)) 68Stream decompressor = await OpenInReadModeAsync(false, cancellationToken).ConfigureAwait(false); 151Debug.Assert(await GetIsOpenableAsync(false, true, cancellationToken).ConfigureAwait(false)); 157(_lhUnknownExtraFields, _lhTrailingExtraFieldData) = await ZipLocalFileHeader.GetExtraFieldsAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false); 165Debug.Assert(await GetIsOpenableAsync(false, true, cancellationToken).ConfigureAwait(false)); 171_archive.ArchiveStream.Seek(await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false), SeekOrigin.Begin); 184(bool result, _) = await IsOpenableAsync(needToUncompress, needToLoadIntoMemory, cancellationToken).ConfigureAwait(false); 191(bool openable, string? message) = await IsOpenableAsync(needToUncompress, needToLoadIntoMemory, cancellationToken).ConfigureAwait(false); 203await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false)); 218Stream uncompressedData = await GetUncompressedDataAsync(cancellationToken).ConfigureAwait(false); 244if (!await ZipLocalFileHeader.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false)) 251long offsetOfCompressedData = await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false); 315await WriteLocalFileHeaderAsync(isEmptyFile: _uncompressedSize == 0, forceWrite: true, cancellationToken).ConfigureAwait(false); 333await WriteLocalFileHeaderAsync(isEmptyFile: _uncompressedSize == 0, forceWrite: forceWrite, cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipArchiveEntry.cs (2)
1532_usedZip64inLH = await _entry.WriteLocalFileHeaderAsync(isEmptyFile: false, forceWrite: true, cancellationToken).ConfigureAwait(false); 1593await _entry.WriteLocalFileHeaderAsync(isEmptyFile: true, forceWrite: true, cancellationToken: default).ConfigureAwait(false);
System\IO\Compression\ZipHelper.Async.cs (1)
51int bytesRead = await SeekBackwardsAndReadAsync(stream, bufferMemory, overlap, cancellationToken).ConfigureAwait(false);
System.IO.Compression.ZipFile (8)
System\IO\Compression\ZipFile.Create.Async.cs (4)
165return await ZipArchive.CreateAsync(fs, mode, leaveOpen: false, entryNameEncoding: entryNameEncoding, cancellationToken).ConfigureAwait(false); 437ZipArchive archive = await OpenAsync(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding, cancellationToken).ConfigureAwait(false); 451ZipArchive archive = await ZipArchive.CreateAsync(destination, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding, cancellationToken).ConfigureAwait(false); 476await ZipFileExtensions.DoCreateEntryFromFileAsync(archive, fullPath, entryName, compressionLevel, cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipFile.Extract.Async.cs (2)
197ZipArchive archive = await OpenAsync(sourceArchiveFileName, ZipArchiveMode.Read, entryNameEncoding, cancellationToken).ConfigureAwait(false); 351ZipArchive archive = await ZipArchive.CreateAsync(source, ZipArchiveMode.Read, leaveOpen: true, entryNameEncoding, cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (1)
92Stream es = await entry.OpenAsync(cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.Async.cs (1)
77Stream es = await source.OpenAsync(cancellationToken).ConfigureAwait(false);
System.Memory.Data (1)
System\BinaryData.cs (1)
360await File.ReadAllBytesAsync(path, cancellationToken).ConfigureAwait(false),
System.Net.Http (32)
src\libraries\Common\src\System\Threading\Tasks\TaskCompletionSourceWithCancellation.cs (1)
21return await Task.ConfigureAwait(false);
System\Net\Http\DiagnosticsHandler.cs (1)
166await _innerHandler.SendAsync(request, cancellationToken).ConfigureAwait(false) :
System\Net\Http\HttpClient.cs (7)
188response = await base.SendAsync(request, cts.Token).ConfigureAwait(false); 207using Stream responseStream = c.TryReadAsStream() ?? await c.ReadAsStreamAsync(cts.Token).ConfigureAwait(false); 260response = await base.SendAsync(request, cts.Token).ConfigureAwait(false); 283using Stream responseStream = c.TryReadAsStream() ?? await c.ReadAsStreamAsync(cts.Token).ConfigureAwait(false); 334response = await base.SendAsync(request, cts.Token).ConfigureAwait(false); 339return c.TryReadAsStream() ?? await c.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); 523response = await base.SendAsync(request, cts.Token).ConfigureAwait(false);
System\Net\Http\HttpMessageInvoker.cs (1)
84response = await handler.SendAsync(request, cancellationToken).ConfigureAwait(false);
System\Net\Http\Metrics\MetricsHandler.cs (1)
65await _innerHandler.SendAsync(request, cancellationToken).ConfigureAwait(false) :
System\Net\Http\MultipartContent.cs (2)
270readStream = nestedContent.TryReadAsStream() ?? await nestedContent.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); 288return async ? await base.CreateContentReadStreamAsync().ConfigureAwait(false) : base.CreateContentReadStream(cancellationToken);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.cs (1)
189string? parameter = await GetDigestTokenForCredential(credential, request, digestResponse).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
150string content = request.Content == null ? string.Empty : await request.Content.ReadAsStringAsync().ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (3)
78HttpResponseMessage response = await InnerSendAsync(request, async, isProxyAuth, connectionPool, connection, cancellationToken).ConfigureAwait(false); 144IPHostEntry result = await Dns.GetHostEntryAsync(authUri.IdnHost, cancellationToken).ConfigureAwait(false); 200response = await InnerSendAsync(request, async, isProxyAuth, connectionPool, connection, cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
465response = await connection.SendAsync(request, async, cancellationToken).ConfigureAwait(false); 486response = await SendWithNtConnectionAuthAsync(connection, request, async, doRequestAuth, cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
107HttpResponseMessage response = await connection.SendAsync(request, waitForConnectionActivity, streamAvailable, cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (2)
148using (Stream decompressedStream = TryCreateContentReadStream() ?? await CreateContentReadStreamAsync(cancellationToken).ConfigureAwait(false)) 176originalStream = _originalContent.TryReadAsStream() ?? await _originalContent.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
2033await Task.WhenAny(requestBodyTask, responseHeadersTask).ConfigureAwait(false) == requestBodyTask ||
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (1)
355bool shouldSendContent = await waiter.Task.ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
339return await responseTask.ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (2)
201await Task.WhenAny(sendRequestTask, readResponseTask).ConfigureAwait(false) == sendRequestTask || 464if (!await _expect100ContinueCompletionSource.Task.ConfigureAwait(false))
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
1002bool sendRequestContent = await allowExpect100ToContinueTask.ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (2)
629HttpMessageHandlerStage handler = await _handlerChainSetupTask.ConfigureAwait(false); 630return await handler.SendAsync(request, cancellationToken).ConfigureAwait(false);
System\Net\Http\SocketsHttpHandler\SocksHelper.cs (1)
252? await Dns.GetHostAddressesAsync(host, AddressFamily.InterNetwork, cancellationToken).ConfigureAwait(false)
System.Net.Http.Json (3)
System\Net\Http\Json\HttpClientJsonExtensions.cs (1)
83using HttpResponseMessage response = await responseTask.ConfigureAwait(false);
System\Net\Http\Json\HttpClientJsonExtensions.Get.AsyncEnumerable.cs (1)
160.ConfigureAwait(false);
System\Net\Http\Json\HttpContentJsonExtensions.cs (1)
143Stream contentStream = await task.ConfigureAwait(false);
System.Net.Mail (20)
System\Net\Mail\SmtpClient.cs (2)
521message.BuildDeliveryStatusNotificationString(), allowUnicode, cancellationToken).ConfigureAwait(false); 686var (ex, _) = await task.ConfigureAwait(false);
System\Net\Mail\SmtpCommands.cs (11)
22return await conn.Reader!.GetNextReplyReader().ReadLineAsync<TIOAdapter>(cancellationToken).ConfigureAwait(false); 32return await conn.Reader!.GetNextReplyReader().ReadLinesAsync<TIOAdapter>(cancellationToken).ConfigureAwait(false); 42LineInfo[] lines = await ReadLinesCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 50LineInfo[] lines = await ReadLinesCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 86LineInfo info = await CheckCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 129LineInfo info = await CheckCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 174LineInfo[] lines = await ReadLinesCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 220LineInfo info = await CheckCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 263LineInfo info = await CheckCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 311LineInfo info = await CheckCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false); 363LineInfo info = await CheckCommand.SendAsync<TIOAdapter>(conn, cancellationToken).ConfigureAwait(false);
System\Net\Mail\SmtpConnection.cs (5)
116LineInfo info = await _responseReader.GetNextReplyReader().ReadLineAsync<TIOAdapter>(cancellationToken).ConfigureAwait(false); 129_extensions = await EHelloCommand.SendAsync<TIOAdapter>(this, _client!._clientDomain, cancellationToken).ConfigureAwait(false); 188_extensions = await EHelloCommand.SendAsync<TIOAdapter>(this, _client!._clientDomain, cancellationToken).ConfigureAwait(false); 211info = await AuthCommand.SendAsync<TIOAdapter>(this, _authenticationModules[i].AuthenticationType, auth.Message, cancellationToken).ConfigureAwait(false); 225info = await AuthCommand.SendAsync<TIOAdapter>(this, auth.Message, cancellationToken).ConfigureAwait(false);
System\Net\Mail\SmtpReplyReaderFactory.cs (1)
330LineInfo[] lines = await ReadLinesAsync<TIOAdapter>(caller, oneLine: true, cancellationToken).ConfigureAwait(false);
System\Net\Mail\SmtpTransport.cs (1)
124(bool success, string? response) = await RecipientCommand.SendAsync<TIOAdapter>(_connection, to, cancellationToken).ConfigureAwait(false);
System.Net.NameResolution (1)
System\Net\Dns.cs (1)
670result = await ((Task<T>)task).ConfigureAwait(false);
System.Net.NetworkInformation (1)
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (1)
191await socket.ReceiveAsync(Array.Empty<byte>(), SocketFlags.None).ConfigureAwait(false);
System.Net.Ping (3)
System\Net\NetworkInformation\Ping.cs (2)
648(await Dns.GetHostAddressesAsync(hostName, cancellationToken).ConfigureAwait(false))[0], 725return await pingTask.ConfigureAwait(false);
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
85string stdout = await pingProcess.StandardOutput.ReadToEndAsync(timeoutOrCancellationToken).ConfigureAwait(false);
System.Net.Quic (1)
System\Net\Quic\QuicConnection.cs (1)
397IPAddress[] addresses = await Dns.GetHostAddressesAsync(host, cancellationToken).ConfigureAwait(false);
System.Net.Requests (7)
System\Net\HttpWebRequest.cs (5)
1111Task result = await Task.WhenAny(getStreamTask, _sendRequestTask).ConfigureAwait(false); 1114await _sendRequestTask.ConfigureAwait(false); // Propagate the exception 1119_requestStream = new RequestStream(await getStreamTask.ConfigureAwait(false), completeTcs); 1281HttpResponseMessage responseMessage = await _sendRequestTask.ConfigureAwait(false); 1796await Dns.GetHostAddressesAsync(context.DnsEndPoint.Host, cancellationToken).ConfigureAwait(false) :
System\Net\WebRequest.cs (2)
526this).ConfigureAwait(false); 537this).ConfigureAwait(false);
System.Net.Security (1)
System\Net\Security\SslStreamCertificateContext.Linux.cs (1)
320ret = await System.Net.Http.X509ResourceClient.DownloadAssetAsync(url, TimeSpan.MaxValue).ConfigureAwait(false);
System.Net.Sockets (5)
System\Net\Sockets\Socket.cs (2)
2754Socket s = await AcceptAsync(acceptSocket).ConfigureAwait(false); 2768bytesReceived = await s.ReceiveAsync(buffer, SocketFlags.None).ConfigureAwait(false);
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
726foreach (IPAddress address in await addressesTask.ConfigureAwait(false))
System\Net\Sockets\SocketPal.Unix.cs (1)
2119error = await tcs.Task.ConfigureAwait(false);
System\Net\Sockets\UDPClient.cs (1)
626SocketReceiveFromResult result = await task.ConfigureAwait(false);
System.Net.WebClient (2)
System\Net\WebClient.cs (2)
877WebResponse response = _webResponse = await GetWebResponseTaskAsync(request).ConfigureAwait(false); 1021using (Stream writeStream = await request.GetRequestStreamAsync().ConfigureAwait(false))
System.Net.WebSockets (2)
System\Net\WebSockets\WebSocket.cs (2)
39WebSocketReceiveResult r = await ReceiveAsync(arraySegment, cancellationToken).ConfigureAwait(false); 46WebSocketReceiveResult r = await ReceiveAsync(new ArraySegment<byte>(array, 0, buffer.Length), cancellationToken).ConfigureAwait(false);
System.Net.WebSockets.Client (1)
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
130response = await sendTask.ConfigureAwait(false);
System.Private.CoreLib (4)
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
322int result = await readTask.ConfigureAwait(false);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredValueTaskAwaitable.cs (2)
164t.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().OnCompleted(continuation); 186t.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().UnsafeOnCompleted(continuation);
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
817return await asyncWaiter.ConfigureAwait(false);
System.Private.DataContractSerialization (3)
System\Xml\XmlBaseWriter.cs (1)
547prefix = await StartElementAsync(prefix, localName, namespaceUri, null).ConfigureAwait(false);
System\Xml\XmlUTF8TextWriter.cs (2)
676BytesWithOffset bufferResult = await GetBufferAsync(charCount).ConfigureAwait(false); 686BytesWithOffset bufferResult = await GetBufferAsync(4).ConfigureAwait(false);
System.Private.Xml (380)
System\Xml\AsyncHelper.cs (3)
76return await func(arg).ConfigureAwait(false); 93if (await task.ConfigureAwait(false)) 96return await func(arg).ConfigureAwait(false);
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (24)
28if (!await InitAsync().ConfigureAwait(false)) 38return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 54return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 72if (!await InitAsync().ConfigureAwait(false)) 82return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 98return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 116if (!await InitOnElementAsync().ConfigureAwait(false)) 128return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 142return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 160if (!await InitOnElementAsync().ConfigureAwait(false)) 172return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 186return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 193while (await MoveToNextContentNodeAsync(true).ConfigureAwait(false)) 202await _reader.ReadAsync().ConfigureAwait(false); 212if (!await MoveToNextContentNodeAsync(false).ConfigureAwait(false)) 228await _reader.ReadAsync().ConfigureAwait(false); 235if (!await MoveToNextContentNodeAsync(false).ConfigureAwait(false)) 242await _reader.ReadAsync().ConfigureAwait(false); 278if ((_valueChunkLength = await _reader.ReadValueChunkAsync(_valueChunk!, 0, ChunkSize).ConfigureAwait(false)) == 0) 288string value = await _reader.GetValueAsync().ConfigureAwait(false); 301if (!await MoveToNextContentNodeAsync(true).ConfigureAwait(false)) 316int decoded = await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 329await _reader.ReadAsync().ConfigureAwait(false); 367} while (await _reader.ReadAsync().ConfigureAwait(false));
System\Xml\Core\XmlCharCheckingReaderAsync.cs (24)
43if (!await base.reader.ReadAsync().ConfigureAwait(false)) 63return await ReadAsync().ConfigureAwait(false); 69return await ReadAsync().ConfigureAwait(false); 75return await ReadAsync().ConfigureAwait(false); 85return await ReadAsync().ConfigureAwait(false); 119CheckCharacters(await base.reader.GetValueAsync().ConfigureAwait(false)); 134return await ReadAsync().ConfigureAwait(false); 146return await ReadAsync().ConfigureAwait(false); 161return await ReadAsync().ConfigureAwait(false); 189return await ReadAsync().ConfigureAwait(false); 193CheckWhitespace(await base.reader.GetValueAsync().ConfigureAwait(false)); 200CheckWhitespace(await base.reader.GetValueAsync().ConfigureAwait(false)); 234return await base.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 247return await base.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 255int readCount = await _readBinaryHelper.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 277return await base.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 290return await base.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 298int readCount = await _readBinaryHelper.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 330return await base.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 343return await base.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 351int readCount = await _readBinaryHelper.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 384return await base.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 397return await base.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 405int readCount = await _readBinaryHelper.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false);
System\Xml\Core\XmlReaderAsync.cs (26)
30return await InternalReadContentAsStringAsync().ConfigureAwait(false); 53string strContentValue = await InternalReadContentAsStringAsync().ConfigureAwait(false); 76if (await SetupReadElementContentAsXxxAsync("ReadElementContentAsObject").ConfigureAwait(false)) 78object value = await ReadContentAsObjectAsync().ConfigureAwait(false); 79await FinishReadElementContentAsXxxAsync().ConfigureAwait(false); 88if (await SetupReadElementContentAsXxxAsync("ReadElementContentAsString").ConfigureAwait(false)) 90string value = await ReadContentAsStringAsync().ConfigureAwait(false); 91await FinishReadElementContentAsXxxAsync().ConfigureAwait(false); 100if (await SetupReadElementContentAsXxxAsync("ReadElementContentAs").ConfigureAwait(false)) 102object value = await ReadContentAsAsync(returnType, namespaceResolver).ConfigureAwait(false); 103await FinishReadElementContentAsXxxAsync().ConfigureAwait(false); 174} while (await ReadAsync().ConfigureAwait(false)); 187await ReadAsync().ConfigureAwait(false); 214while (await ReadAsync().ConfigureAwait(false) && d < Depth) 228xtw.WriteString(await GetValueAsync().ConfigureAwait(false)); 232xtw.WriteWhitespace(await GetValueAsync().ConfigureAwait(false)); 257await ReadAsync().ConfigureAwait(false); 270await ReadAsync().ConfigureAwait(false); 304while (await ReadAsync().ConfigureAwait(false) && depth < Depth) 311return await ReadAsync().ConfigureAwait(false); 315return await ReadAsync().ConfigureAwait(false); 338value = await GetValueAsync().ConfigureAwait(false); 343sb.Append(await GetValueAsync().ConfigureAwait(false)); 361} while (AttributeCount != 0 ? ReadAttributeValue() : await ReadAsync().ConfigureAwait(false)); 377await ReadAsync().ConfigureAwait(false); 387await ReadAsync().ConfigureAwait(false);
System\Xml\Core\XmlSubtreeReaderAsync.cs (29)
54if (await reader.ReadAsync().ConfigureAwait(false)) 81if (!await FinishReadElementContentAsBinaryAsync().ConfigureAwait(false)) 85return await ReadAsync().ConfigureAwait(false); 89if (!await FinishReadContentAsBinaryAsync().ConfigureAwait(false)) 93return await ReadAsync().ConfigureAwait(false); 106await ReadAsync().ConfigureAwait(false); 119if (await reader.ReadAsync().ConfigureAwait(false)) 160if (await FinishReadElementContentAsBinaryAsync().ConfigureAwait(false)) 168if (await FinishReadContentAsBinaryAsync().ConfigureAwait(false)) 188object value = await reader.ReadContentAsObjectAsync().ConfigureAwait(false); 204string value = await reader.ReadContentAsStringAsync().ConfigureAwait(false); 220object value = await reader.ReadContentAsAsync(returnType, namespaceResolver).ConfigureAwait(false); 282return await reader.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 293int read = await reader.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 325if (!await InitReadElementContentAsBinaryAsync(State.ReadElementContentAsBase64).ConfigureAwait(false)) 332int read = await reader.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 354await ReadAsync().ConfigureAwait(false); 420return await reader.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 431int read = await reader.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 463if (!await InitReadElementContentAsBinaryAsync(State.ReadElementContentAsBinHex).ConfigureAwait(false)) 469int read = await reader.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 491await ReadAsync().ConfigureAwait(false); 567if (!await ReadAsync().ConfigureAwait(false) || isEmpty) 579await ReadAsync().ConfigureAwait(false); 595while (await reader.ReadContentAsBase64Async(bytes, 0, 256).ConfigureAwait(false) > 0) ; 599while (await reader.ReadContentAsBinHexAsync(bytes, 0, 256).ConfigureAwait(false) > 0) ; 619return await ReadAsync().ConfigureAwait(false); 629while (await reader.ReadContentAsBase64Async(bytes, 0, 256).ConfigureAwait(false) > 0) ; 633while (await reader.ReadContentAsBinHexAsync(bytes, 0, 256).ConfigureAwait(false) > 0) ;
System\Xml\Core\XmlTextReaderImplAsync.cs (126)
77Stream stream = (Stream)(await _laterInitParam!.inputUriResolver!.GetEntityAsync(_laterInitParam.inputbaseUri!, string.Empty, typeof(Stream)).ConfigureAwait(false)); 141await InitTextReaderInputAsync(_reportedBaseUri!, _laterInitParam!.inputTextReader!).ConfigureAwait(false); 287bool result = await task.ConfigureAwait(false); 288return await ReadAsync_SwitchToInteractiveXmlDecl_Helper(result).ConfigureAwait(false); 355while (await _outerReader.ReadAsync().ConfigureAwait(false) && _index > initialDepth) ; 365await _outerReader.ReadAsync().ConfigureAwait(false); 371bool result = await task.ConfigureAwait(false); 382return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 458return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 477if (!await InitReadContentAsBinaryAsync().ConfigureAwait(false)) 487return await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 492bool result = await task.ConfigureAwait(false); 503return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 579return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 597if (!await InitReadElementContentAsBinaryAsync().ConfigureAwait(false)) 607return await ReadElementContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 733var tuple_1 = await this.ParseNumericCharRefAsync(true, internalSubsetBuilder).ConfigureAwait(false); 750await ParsePIAsync(null).ConfigureAwait(false); 755await ParsePIAsync(sb).ConfigureAwait(false); 811retValue = await PushExternalEntityAsync(entity).ConfigureAwait(false); 850await EatWhitespacesAsync(null).ConfigureAwait(false); 852if (!await ParseXmlDeclarationAsync(true).ConfigureAwait(false)) 935await ReadDataAsync().ConfigureAwait(false); 1143return await ReadDataAsync().ConfigureAwait(false); 1173if (await ReadDataAsync().ConfigureAwait(false) == 0) 1203int wsCount = await EatWhitespacesAsync(xmlDeclState == 0 ? null : sb).ConfigureAwait(false); 1273int nameEndPos = await ParseNameAsync().ConfigureAwait(false); 1321await EatWhitespacesAsync(sb).ConfigureAwait(false); 1333await EatWhitespacesAsync(sb).ConfigureAwait(false); 1420if (await ReadDataAsync().ConfigureAwait(false) != 0) 1435if (_ps.isEof || await ReadDataAsync().ConfigureAwait(false) == 0) 1626var tuple_3 = await HandleEntityReferenceAsync(false, EntityExpandType.OnlyGeneral).ConfigureAwait(false); 1641if (await ParseTextAsync().ConfigureAwait(false)) 1645return await ParseDocumentContentAsync().ConfigureAwait(false); 1647return await ParseDocumentContentAsync().ConfigureAwait(false); 1678if (await task.ConfigureAwait(false)) 1686return await ParseDocumentContentAsync().ConfigureAwait(false); 1692if (await ReadDataAsync().ConfigureAwait(false) != 0) 1694return await ParseDocumentContentAsync().ConfigureAwait(false); 1710return await ParseDocumentContentAsync().ConfigureAwait(false); 1831if (await ReadDataAsync().ConfigureAwait(false) == 0) 1852return await ParseElementContentAsync().ConfigureAwait(false); 1943var tuple_4 = await task.ConfigureAwait(false); 2052if (await ReadDataAsync().ConfigureAwait(false) == 0) 2091if (await ReadDataAsync().ConfigureAwait(false) == 0) 2272if (await ReadDataAsync().ConfigureAwait(false) == 0) 2286var tuple_5 = await ParseQNameAsync().ConfigureAwait(false); 2461var tuple_6 = await ParseQNameAsync().ConfigureAwait(false); 2471var tuple_7 = await ParseQNameAsync().ConfigureAwait(false); 2490await EatWhitespacesAsync(null).ConfigureAwait(false); 2503await EatWhitespacesAsync(null).ConfigureAwait(false); 2570if (await ReadDataAsync().ConfigureAwait(false) != 0) 2702var tuple_8 = await HandleEntityReferenceAsync(true, EntityExpandType.All).ConfigureAwait(false); 2728string entityName = await ParseEntityNameAsync().ConfigureAwait(false); 2751await ParseEntityNameAsync().ConfigureAwait(false); 2821if (await ReadDataAsync().ConfigureAwait(false) == 0) 2972var tuple_10 = await parseTask.ConfigureAwait(false); 3098return await ParseTextAsync_IgnoreNode().ConfigureAwait(false); 3211await task.ConfigureAwait(false); 3380var tuple_14 = await HandleEntityReferenceAsync(false, EntityExpandType.All).ConfigureAwait(false); 3442if (await ZeroEndingStreamAsync(pos).ConfigureAwait(false)) 3467if (await ReadDataAsync().ConfigureAwait(false) == 0) 3659while (await MoveToNextContentNodeAsync(true).ConfigureAwait(false)) ; 3672await _outerReader.ReadAsync().ConfigureAwait(false); 3683await EatWhitespacesAsync(null).ConfigureAwait(false); 3684if (_ps.chars[_ps.charPos] == '<' || _ps.charsUsed - _ps.charPos == 0 || await ZeroEndingStreamAsync(_ps.charPos).ConfigureAwait(false)) 3692await EatWhitespacesAsync(_stringBuilder).ConfigureAwait(false); 3693if (_ps.chars[_ps.charPos] == '<' || _ps.charsUsed - _ps.charPos == 0 || await ZeroEndingStreamAsync(_ps.charPos).ConfigureAwait(false)) 3722_curNode.SetNamedNode(XmlNodeType.EntityReference, await ParseEntityNameAsync().ConfigureAwait(false)); 3733if (await ReadDataAsync().ConfigureAwait(false) == 0) 3744var tuple_17 = await ParseNumericCharRefAsync(expandType != EntityExpandType.OnlyGeneral, null).ConfigureAwait(false); 3757charRefEndPos = await ParseNamedCharRefAsync(expandType != EntityExpandType.OnlyGeneral, null).ConfigureAwait(false); 3779endPos = await ParseNameAsync().ConfigureAwait(false); 3799EntityType entType = await HandleGeneralEntityReferenceAsync(entityName, isInAttributeValue, false, entityLinePos).ConfigureAwait(false); 3867await PushExternalEntityAsync(entity).ConfigureAwait(false); 3875await PushExternalEntityAsync(entity).ConfigureAwait(false); 3911int nameEndPos = await ParseNameAsync().ConfigureAwait(false); 3935if (await EatWhitespacesAsync(piInDtdStringBuilder).ConfigureAwait(false) == 0) 3939await ReadDataAsync().ConfigureAwait(false); 3950var tuple_18 = await ParsePIValueAsync().ConfigureAwait(false); 3982tuple_19 = await ParsePIValueAsync().ConfigureAwait(false); 4001tuple_20 = await ParsePIValueAsync().ConfigureAwait(false); 4025if (await ReadDataAsync().ConfigureAwait(false) == 0) 4204var tuple_21 = await ParseCDataOrCommentTupleAsync(type).ConfigureAwait(false); 4220tuple_22 = await ParseCDataOrCommentTupleAsync(type).ConfigureAwait(false); 4235tuple_23 = await ParseCDataOrCommentTupleAsync(type).ConfigureAwait(false); 4250if (await ReadDataAsync().ConfigureAwait(false) == 0) 4419if (await ReadDataAsync().ConfigureAwait(false) == 0) 4444await EatWhitespacesAsync(null).ConfigureAwait(false); 4471_dtdInfo = await dtdParser.ParseInternalDtdAsync(new DtdParserProxy(this), true).ConfigureAwait(false); 4487var tuple_24 = await ParseQNameAsync().ConfigureAwait(false); 4494await EatWhitespacesAsync(null).ConfigureAwait(false); 4502if (await ReadDataAsync().ConfigureAwait(false) == 0) 4515if (await EatWhitespacesAsync(null).ConfigureAwait(false) == 0) 4524if (await EatWhitespacesAsync(null).ConfigureAwait(false) == 0) 4532await EatWhitespacesAsync(null).ConfigureAwait(false); 4539if (await ReadDataAsync().ConfigureAwait(false) == 0) 4552if (await EatWhitespacesAsync(null).ConfigureAwait(false) == 0) 4560await EatWhitespacesAsync(null).ConfigureAwait(false); 4574await EatWhitespacesAsync(null).ConfigureAwait(false); 4782if (await ReadDataAsync().ConfigureAwait(false) == 0) 4880if (await ReadDataAsync().ConfigureAwait(false) == 0) 4916if (await ReadDataAsync().ConfigureAwait(false) == 0) 4950if (await ReadDataAsync().ConfigureAwait(false) == 0) 4968var tuple_25 = await ParseQNameAsync(false, 0).ConfigureAwait(false); 4996var tuple_27 = await ReadDataInNameAsync(pos).ConfigureAwait(false); 5048var tuple_28 = await ReadDataInNameAsync(pos).ConfigureAwait(false); 5068bool newDataRead = (await ReadDataAsync().ConfigureAwait(false) != 0); 5079endPos = await ParseNameAsync().ConfigureAwait(false); 5110if (await OpenAndPushAsync(uri).ConfigureAwait(false)) 5125if (await OpenAndPushAsync(uri).ConfigureAwait(false)) 5166TextReader textReader = (TextReader)await _xmlResolver.GetEntityAsync(uri, null, typeof(TextReader)).ConfigureAwait(false); 5173await InitTextReaderInputAsync(uri.ToString(), uri, textReader).ConfigureAwait(false); 5180Stream stream = (Stream)await _xmlResolver.GetEntityAsync(uri, null, typeof(Stream)).ConfigureAwait(false); 5215await EatWhitespacesAsync(null).ConfigureAwait(false); 5217if (!await ParseXmlDeclarationAsync(true).ConfigureAwait(false)) 5245if (_v1Compat && pos == _ps.charsUsed - 1 && _ps.chars[pos] == (char)0 && await ReadDataAsync().ConfigureAwait(false) == 0 && _ps.isStreamEof) 5260_dtdInfo = await dtdParser.ParseFreeFloatingDtdAsync(_fragmentParserContext.BaseURI, _fragmentParserContext.DocTypeName, _fragmentParserContext.PublicId, _fragmentParserContext.SystemId, _fragmentParserContext.InternalSubset, new DtdParserProxy(this)).ConfigureAwait(false); 5283if (!await MoveToNextContentNodeAsync(false).ConfigureAwait(false)) 5302await _outerReader.ReadAsync().ConfigureAwait(false); 5309if (!await MoveToNextContentNodeAsync(false).ConfigureAwait(false)) 5316await _outerReader.ReadAsync().ConfigureAwait(false); 5353} while (await _outerReader.ReadAsync().ConfigureAwait(false)); 5441if (!await MoveToNextContentNodeAsync(true).ConfigureAwait(false)) 5458int decoded = await ReadContentAsBinaryAsync(buffer, index, count).ConfigureAwait(false); 5476await _outerReader.ReadAsync().ConfigureAwait(false);
System\Xml\Core\XmlValidatingReaderImplAsync.cs (7)
31if (await _coreReader.ReadAsync().ConfigureAwait(false)) 90int readCount = await _readBinaryHelper!.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 114int readCount = await _readBinaryHelper!.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 138int readCount = await _readBinaryHelper!.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 162int readCount = await _readBinaryHelper!.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 185IDtdInfo dtdInfo = await dtdParser.ParseFreeFloatingDtdAsync(_parserContext.BaseURI, _parserContext.DocTypeName, _parserContext.PublicId, _parserContext.SystemId, _parserContext.InternalSubset, proxy).ConfigureAwait(false); 196while (await _outerReader.ReadAsync().ConfigureAwait(false) && _coreReader.Depth > initialDepth) ;
System\Xml\Core\XmlWriterAsync.cs (4)
379while ((read = await reader.ReadValueChunkAsync(_writeNodeBuffer, 0, WriteNodeBufferSize).ConfigureAwait(false)) > 0) 387await WriteStringAsync(await reader.GetValueAsync().ConfigureAwait(false)).ConfigureAwait(false); 392await WriteWhitespaceAsync(await reader.GetValueAsync().ConfigureAwait(false)).ConfigureAwait(false); 415} while (await reader.ReadAsync().ConfigureAwait(false) && (d < reader.Depth || (d == reader.Depth && reader.NodeType == XmlNodeType.EndElement)));
System\Xml\Core\XsdCachingReaderAsync.cs (6)
41if (await _coreReader.ReadAsync().ConfigureAwait(false)) 63recordedNode.SetItemData(await _coreReader.GetValueAsync().ConfigureAwait(false)); 87return await _coreReader.ReadAsync().ConfigureAwait(false); 114while (await _coreReader.ReadAsync().ConfigureAwait(false) && _coreReader.Depth > startDepth) 117await _coreReader.ReadAsync().ConfigureAwait(false); 128await ReadAsync().ConfigureAwait(false);
System\Xml\Core\XsdValidatingReaderAsync.cs (25)
48object typedValue = await InternalReadContentAsObjectAsync().ConfigureAwait(false); 84var tuple_0 = await InternalReadContentAsObjectTupleAsync(false).ConfigureAwait(false); 129var tuple_1 = await InternalReadElementContentAsObjectAsync(true).ConfigureAwait(false); 143var content = await InternalReadElementContentAsObjectAsync().ConfigureAwait(false); 184var content = await InternalReadElementContentAsObjectTupleAsync(false).ConfigureAwait(false); 249if (await task.ConfigureAwait(false)) 378await ReadAsync().ConfigureAwait(false); 401int readCount = await _readBinaryHelper.ReadContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 428int readCount = await _readBinaryHelper.ReadContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 455int readCount = await _readBinaryHelper.ReadElementContentAsBase64Async(buffer, index, count).ConfigureAwait(false); 482int readCount = await _readBinaryHelper.ReadElementContentAsBinHexAsync(buffer, index, count).ConfigureAwait(false); 537static async Task ValidateWhitespace(Task<string> t, XmlSchemaValidator validator) => validator.ValidateWhitespace(await t.ConfigureAwait(false)); 539static async Task ValidateText(Task<string> t, XmlSchemaValidator validator) => validator.ValidateText(await t.ConfigureAwait(false)); 654if (await _coreReader.ReadAsync().ConfigureAwait(false)) 684var content = await InternalReadContentAsObjectTupleAsync(unwrapTypedValue).ConfigureAwait(false); 734object? value = ReturnBoxedValue(await ReadTillEndElementAsync().ConfigureAwait(false), _xmlSchemaInfo.XmlType!, unwrapTypedValue); 751originalStringValue = await InternalReadContentAsStringAsync().ConfigureAwait(false); 766var content = await InternalReadElementContentAsObjectTupleAsync(unwrapTypedValue).ConfigureAwait(false); 793await this.ReadAsync().ConfigureAwait(false); 799await this.ReadAsync().ConfigureAwait(false); 833var content = await InternalReadContentAsObjectTupleAsync(unwrapTypedValue).ConfigureAwait(false); 848await this.ReadAsync().ConfigureAwait(false); 857while (await _coreReader.ReadAsync().ConfigureAwait(false)) 873_validator.ValidateText(await GetValueAsync().ConfigureAwait(false)); 878_validator.ValidateWhitespace(await GetValueAsync().ConfigureAwait(false));
System\Xml\Schema\DtdParserAsync.cs (103)
78if (await GetTokenAsync(false).ConfigureAwait(false) != Token.QName) 85Token token = await GetTokenAsync(false).ConfigureAwait(false); 88var tuple_0 = await ParseExternalIdAsync(token, Token.DOCTYPE).ConfigureAwait(false); 92token = await GetTokenAsync(false).ConfigureAwait(false); 145if (!await _readerAdapter.PushExternalSubsetAsync(_systemId, _publicId).ConfigureAwait(false)) 173Token token = await GetTokenAsync(false).ConfigureAwait(false); 239if (await GetTokenAsync(false).ConfigureAwait(false) != Token.GreaterThan) 290if (await GetTokenAsync(true).ConfigureAwait(false) != Token.QName) 310switch (await GetTokenAsync(false).ConfigureAwait(false)) 398Token token = await GetTokenAsync(true).ConfigureAwait(false); 447if (await GetTokenAsync(true).ConfigureAwait(false) != Token.LeftParen) 453if (await GetTokenAsync(false).ConfigureAwait(false) != Token.Name) 470switch (await GetTokenAsync(false).ConfigureAwait(false)) 473if (await GetTokenAsync(false).ConfigureAwait(false) != Token.Name) 491if (await GetTokenAsync(false).ConfigureAwait(false) != Token.Nmtoken) 497switch (await GetTokenAsync(false).ConfigureAwait(false)) 500if (await GetTokenAsync(false).ConfigureAwait(false) != Token.Nmtoken) 527switch (await GetTokenAsync(true).ConfigureAwait(false)) 537if (await GetTokenAsync(true).ConfigureAwait(false) != Token.Literal) 575if (await GetTokenAsync(true).ConfigureAwait(false) != Token.QName) 606switch (await GetTokenAsync(true).ConfigureAwait(false)) 616switch (await GetTokenAsync(false).ConfigureAwait(false)) 649if (await GetTokenAsync(false).ConfigureAwait(false) != Token.GreaterThan) 668switch (await GetTokenAsync(false).ConfigureAwait(false)) 697switch (await GetTokenAsync(false).ConfigureAwait(false)) 751switch (await GetTokenAsync(false).ConfigureAwait(false)) 775switch (await GetTokenAsync(false).ConfigureAwait(false)) 783if (await GetTokenAsync(false).ConfigureAwait(false) == Token.Star && hasNames) 810if (await GetTokenAsync(false).ConfigureAwait(false) != Token.QName) 844switch (await GetTokenAsync(true).ConfigureAwait(false)) 848if (await GetTokenAsync(true).ConfigureAwait(false) != Token.Name) 876Token token = await GetTokenAsync(true).ConfigureAwait(false); 884var tuple_1 = await ParseExternalIdAsync(token, Token.EntityDecl).ConfigureAwait(false); 892if (await GetTokenAsync(false).ConfigureAwait(false) == Token.NData) 903if (await GetTokenAsync(true).ConfigureAwait(false) != Token.Name) 925if (await GetTokenAsync(false).ConfigureAwait(false) == Token.GreaterThan) 938if (await GetTokenAsync(true).ConfigureAwait(false) != Token.Name) 962Token token = await GetTokenAsync(true).ConfigureAwait(false); 967var tuple_2 = await ParseExternalIdAsync(token, Token.NOTATION).ConfigureAwait(false); 982if (await GetTokenAsync(false).ConfigureAwait(false) != Token.GreaterThan) 1036switch (await GetTokenAsync(false).ConfigureAwait(false)) 1039if (await GetTokenAsync(false).ConfigureAwait(false) != Token.LeftBracket) 1064if (await GetTokenAsync(false).ConfigureAwait(false) != Token.LeftBracket) 1073if (await GetTokenAsync(false).ConfigureAwait(false) != Token.CondSectionEnd) 1097if (await GetTokenAsync(true).ConfigureAwait(false) != Token.Literal) 1134if (await GetTokenAsync(false).ConfigureAwait(false) == Token.Literal) 1151if (await GetTokenAsync(false).ConfigureAwait(false) == Token.Literal) 1233await HandleEntityReferenceAsync(true, false, false).ConfigureAwait(false); 1247case ScanningFunction.Name: return await ScanNameExpectedAsync().ConfigureAwait(false); 1248case ScanningFunction.QName: return await ScanQNameExpectedAsync().ConfigureAwait(false); 1249case ScanningFunction.Nmtoken: return await ScanNmtokenExpectedAsync().ConfigureAwait(false); 1250case ScanningFunction.SubsetContent: return await ScanSubsetContentAsync().ConfigureAwait(false); 1251case ScanningFunction.Doctype1: return await ScanDoctype1Async().ConfigureAwait(false); 1253case ScanningFunction.Element1: return await ScanElement1Async().ConfigureAwait(false); 1254case ScanningFunction.Element2: return await ScanElement2Async().ConfigureAwait(false); 1255case ScanningFunction.Element3: return await ScanElement3Async().ConfigureAwait(false); 1260case ScanningFunction.Attlist1: return await ScanAttlist1Async().ConfigureAwait(false); 1261case ScanningFunction.Attlist2: return await ScanAttlist2Async().ConfigureAwait(false); 1265case ScanningFunction.Attlist6: return await ScanAttlist6Async().ConfigureAwait(false); 1267case ScanningFunction.Notation1: return await ScanNotation1Async().ConfigureAwait(false); 1268case ScanningFunction.SystemId: return await ScanSystemIdAsync().ConfigureAwait(false); 1269case ScanningFunction.PublicId1: return await ScanPublicId1Async().ConfigureAwait(false); 1270case ScanningFunction.PublicId2: return await ScanPublicId2Async().ConfigureAwait(false); 1271case ScanningFunction.Entity1: return await ScanEntity1Async().ConfigureAwait(false); 1272case ScanningFunction.Entity2: return await ScanEntity2Async().ConfigureAwait(false); 1273case ScanningFunction.Entity3: return await ScanEntity3Async().ConfigureAwait(false); 1274case ScanningFunction.CondSection1: return await ScanCondSection1Async().ConfigureAwait(false); 1276case ScanningFunction.CondSection3: return await ScanCondSection3Async().ConfigureAwait(false); 1288if (_readerAdapter.IsEof || await ReadDataAsync().ConfigureAwait(false) == 0) 1464if (await ReadDataAsync().ConfigureAwait(false) == 0) 1497if (!await EatPublicKeywordAsync().ConfigureAwait(false)) 1505if (!await EatSystemKeywordAsync().ConfigureAwait(false)) 1566if (await ReadDataAsync().ConfigureAwait(false) == 0) 1579if (await ReadDataAsync().ConfigureAwait(false) == 0) 1763if (await ReadDataAsync().ConfigureAwait(false) == 0) 1778await ScanLiteralAsync(LiteralType.AttributeValue).ConfigureAwait(false); 1830if (await ReadDataAsync().ConfigureAwait(false) == 0) 1953await HandleEntityReferenceAsync(true, true, literalType == LiteralType.AttributeValue).ConfigureAwait(false); 1971int endPos = await _readerAdapter.ParseNumericCharRefAsync(SaveInternalSubsetValue ? _internalSubsetValueSb : null).ConfigureAwait(false); 1985int endPos = await _readerAdapter.ParseNamedCharRefAsync(true, SaveInternalSubsetValue ? _internalSubsetValueSb : null).ConfigureAwait(false); 1998await HandleEntityReferenceAsync(false, true, true).ConfigureAwait(false); 2005int endPos = await _readerAdapter.ParseNamedCharRefAsync(false, null).ConfigureAwait(false); 2058if (_readerAdapter.IsEof || await ReadDataAsync().ConfigureAwait(false) == 0) 2074if (!await EatPublicKeywordAsync().ConfigureAwait(false)) 2082if (!await EatSystemKeywordAsync().ConfigureAwait(false)) 2102await ScanLiteralAsync(LiteralType.SystemOrPublicID).ConfigureAwait(false); 2130if (!await EatPublicKeywordAsync().ConfigureAwait(false)) 2138if (!await EatSystemKeywordAsync().ConfigureAwait(false)) 2148await ScanLiteralAsync(LiteralType.EntityReplText).ConfigureAwait(false); 2163if (await ReadDataAsync().ConfigureAwait(false) == 0) 2189await ScanLiteralAsync(LiteralType.SystemOrPublicID).ConfigureAwait(false); 2203await ScanLiteralAsync(LiteralType.SystemOrPublicID).ConfigureAwait(false); 2256if (await ReadDataAsync().ConfigureAwait(false) == 0) 2368if (_readerAdapter.IsEof || await ReadDataAsync().ConfigureAwait(false) == 0) 2405if (await ReadDataInNameAsync().ConfigureAwait(false)) 2451if (await ReadDataInNameAsync().ConfigureAwait(false)) 2470bool newDataRead = (await ReadDataAsync().ConfigureAwait(false) != 0); 2505if (await ReadDataAsync().ConfigureAwait(false) == 0) 2525if (await ReadDataAsync().ConfigureAwait(false) == 0) 2544if (await ReadDataAsync().ConfigureAwait(false) == 0) 2564int charsRead = await _readerAdapter.ReadDataAsync().ConfigureAwait(false); 2603var tuple_3 = await _readerAdapter.PushEntityAsync(entity).ConfigureAwait(false); 2619var tuple_4 = await _readerAdapter.PushEntityAsync(entity).ConfigureAwait(false);
System\Xml\Schema\ParserAsync.cs (1)
30while (reader.NodeType != XmlNodeType.Element && await reader.ReadAsync().ConfigureAwait(false)) { }
System\Xml\XmlDownloadManager.cs (1)
56using (Stream respStream = await client.GetStreamAsync(uri).ConfigureAwait(false))
System\Xml\XmlUrlResolver.cs (1)
54return await XmlDownloadManager.GetStreamAsync(absoluteUri, _credentials, _proxy).ConfigureAwait(false);
System.Private.Xml.Linq (26)
System\Xml\Linq\XContainer.cs (15)
861while (await cr.ReadContentFromAsync(this, r).ConfigureAwait(false) && await r.ReadAsync().ConfigureAwait(false)); 878while (await cr.ReadContentFromContainerAsync(this, r).ConfigureAwait(false) && await r.ReadAsync().ConfigureAwait(false)); 967await r.GetValueAsync().ConfigureAwait(false))); 985_currentContainer.AddStringSkipNotify(await r.GetValueAsync().ConfigureAwait(false)); 988_currentContainer.AddNodeSkipNotify(new XCData(await r.GetValueAsync().ConfigureAwait(false))); 991_currentContainer.AddNodeSkipNotify(new XComment(await r.GetValueAsync().ConfigureAwait(false))); 994_currentContainer.AddNodeSkipNotify(new XProcessingInstruction(r.Name, await r.GetValueAsync().ConfigureAwait(false))); 997_currentContainer.AddNodeSkipNotify(new XDocumentType(r.LocalName, r.GetAttribute("PUBLIC"), r.GetAttribute("SYSTEM"), await r.GetValueAsync().ConfigureAwait(false))); 1149await r.GetValueAsync().ConfigureAwait(false)); 1194newNode = new XText(await r.GetValueAsync().ConfigureAwait(false)); 1198_currentContainer.AddStringSkipNotify(await r.GetValueAsync().ConfigureAwait(false)); 1202newNode = new XCData(await r.GetValueAsync().ConfigureAwait(false)); 1205newNode = new XComment(await r.GetValueAsync().ConfigureAwait(false)); 1208newNode = new XProcessingInstruction(r.Name, await r.GetValueAsync().ConfigureAwait(false)); 1211newNode = new XDocumentType(r.LocalName, r.GetAttribute("PUBLIC"), r.GetAttribute("SYSTEM"), await r.GetValueAsync().ConfigureAwait(false));
System\Xml\Linq\XDocument.cs (3)
302return await LoadAsync(r, options, cancellationToken).ConfigureAwait(false); 385return await LoadAsync(r, options, cancellationToken).ConfigureAwait(false); 466await reader.ReadAsync().ConfigureAwait(false);
System\Xml\Linq\XElement.cs (6)
689return await LoadAsync(r, options, cancellationToken).ConfigureAwait(false); 771return await LoadAsync(r, options, cancellationToken).ConfigureAwait(false); 846if (await reader.MoveToContentAsync().ConfigureAwait(false) != XmlNodeType.Element) throw new InvalidOperationException(SR.Format(SR.InvalidOperation_ExpectedNodeType, XmlNodeType.Element, reader.NodeType)); 852await reader.MoveToContentAsync().ConfigureAwait(false); 2034await r.ReadAsync().ConfigureAwait(false); 2040await r.ReadAsync().ConfigureAwait(false);
System\Xml\Linq\XNode.cs (2)
498return await XElement.CreateAsync(reader, cancellationToken).ConfigureAwait(false); 510await reader.ReadAsync().ConfigureAwait(false);
System.Security.Cryptography.Cose (2)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (1)
281int bytesWritten = await CreateCoseMultiSignMessageAsync(content, buffer, signer, protectedHeaders, unprotectedHeaders, associatedData, cancellationToken).ConfigureAwait(false);
System\Security\Cryptography\Cose\CoseSign1Message.cs (1)
224int bytesWritten = await CreateCoseSign1MessageAsync(content, buffer, signer, associatedData, cancellationToken).ConfigureAwait(false);
System.ServiceModel.Federation (1)
System\ServiceModel\Federation\WSTrustChannel.cs (1)
361Message response = await Task.Factory.FromAsync(RequestChannel.BeginRequest, RequestChannel.EndRequest, requestMessage, null, TaskCreationOptions.None).ConfigureAwait(false);
System.ServiceModel.NetFramingBase (1)
System\ServiceModel\Channels\SingletonConnectionReader.cs (1)
545int result = await readTask.ConfigureAwait(false);
System.ServiceModel.Primitives (2)
System\ServiceModel\Channels\BufferedReadStream.cs (2)
398return bytesAlreadySatisfied + await _stream.ReadAsync(array, offset, count, cancellationToken).ConfigureAwait(false); 402_readLen = await _stream.ReadAsync(_buffer, 0, _bufferSize, cancellationToken).ConfigureAwait(false);
System.Text.Json (1)
System\Text\Json\Nodes\JsonNode.Parse.cs (1)
148JsonDocument document = await JsonDocument.ParseAsyncCoreUnrented(utf8Json, documentOptions, cancellationToken).ConfigureAwait(false);
System.Text.RegularExpressions.Generator (5)
UpgradeToGeneratedRegexCodeFixer.cs (5)
45SyntaxNode? root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); 78SemanticModel? semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 104typeDeclarationOrCompilationUnit ??= await nodeToFix.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 149await nodeToFix.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 155DocumentEditor editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
System.Threading.RateLimiting (1)
System\Threading\RateLimiting\DefaultPartitionedRateLimiter.cs (1)
158await _disposeComplete.Task.ConfigureAwait(false);
System.Threading.Tasks.Dataflow (2)
Base\DataflowBlock.cs (1)
1439return await target.Task.ConfigureAwait(false);
Base\DataflowBlock.netstandard21.cs (1)
25while (await source.OutputAvailableAsync(cancellationToken).ConfigureAwait(false))
System.Windows.Forms (4)
System\Windows\Forms\Control_InvokeAsync.cs (2)
196return await completion.Task.ConfigureAwait(false); 404return await completion.Task.ConfigureAwait(false);
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
483_uriImageStream = await s_httpClient.GetStreamAsync(uri).ConfigureAwait(false);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
414result = await completion.Task.ConfigureAwait(true);
System.Windows.Forms.Analyzers.CodeFixes.CSharp (2)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (2)
36.ConfigureAwait(false))!; 78SyntaxNode root = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false))!;
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Generators\ApplicationConfigurationGenerator\ApplicationConfigurationGeneratorTests.cs (1)
223string input = await TestFileLoader.GetGeneratorTestCodeAsync($"{GetType().Name}.{testName}.cs").ConfigureAwait(false);
System.Windows.Forms.Analyzers.Tests (5)
TestFileLoader.cs (5)
49return await reader.ReadToEndAsync().ConfigureAwait(false); 57return await LoadTestFileAsync(Path.Join("Analyzers", toolName), testName, SourceLanguage.None).ConfigureAwait(false); 65return await LoadTestFileAsync(Path.Join("Generators", toolName), testName, SourceLanguage.None).ConfigureAwait(false); 73return await LoadTestFileAsync(Path.Join("Analyzers", toolName), testName).ConfigureAwait(false); 81return await LoadTestFileAsync(Path.Join("Analyzers", toolName), testName, SourceLanguage.VisualBasic).ConfigureAwait(false);
System.Windows.Forms.Tests (16)
System\Windows\Forms\ControlTests_InvokeAsync.cs (15)
78.ConfigureAwait(false); 202.ConfigureAwait(false); 254cts.Token).ConfigureAwait(false); 290cts.Token).ConfigureAwait(false); 343await started.Task.ConfigureAwait(false); 350.ConfigureAwait(false); 370async () => await task.ConfigureAwait(false)).ConfigureAwait(false); 379control.InvokeAsync(ct => default, CancellationToken.None)).ConfigureAwait(true); 384CancellationToken.None)).ConfigureAwait(false); 391control.InvokeAsync(() => { })).ConfigureAwait(false); 402.ConfigureAwait(false); 406.ConfigureAwait(false); 410.ConfigureAwait(false); 414.ConfigureAwait(false); 428.ConfigureAwait(false);
System\Windows\Forms\FormTests.cs (1)
2707.ConfigureAwait(false);
Test.Utilities (17)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
Text.Analyzers (84)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Compilers\Core\Portable\Hashing\NonCryptographicHashAlgorithm.cs (1)
167int read = await stream.ReadAsync(buffer, 0, buffer.Length, cancellationToken).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
602return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
577if (await predicateAsync(item).ConfigureAwait(false)) 588if (await predicateAsync(item, arg).ConfigureAwait(false)) 599if (await predicateAsync(item).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Threading\ProducerConsumer.cs (3)
216cancellationToken).ConfigureAwait(false); 346return await readTask.ConfigureAwait(false); 351return await consumeItems(channel.Reader, args, cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(assembly), context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (4)
267SymbolKind.Assembly => await AssemblyMetricData.ComputeAsync((IAssemblySymbol)symbol, context).ConfigureAwait(false), 269SymbolKind.Namespace => await NamespaceMetricData.ComputeAsync((INamespaceSymbol)symbol, context).ConfigureAwait(false), 271SymbolKind.NamedType => await NamedTypeMetricData.ComputeAsync((INamedTypeSymbol)symbol, context).ConfigureAwait(false), 329select Task.Run(() => ComputeAsync(child, context))).ConfigureAwait(false)).ToImmutableArray();
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
35ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(members, context).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32ImmutableArray<CodeAnalysisMetricData> children = await ComputeAsync(GetChildSymbols(@namespace), context).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (3)
442var newNode = await computeReplacementNodeAsync!(original, currentNode, cancellationToken).ConfigureAwait(false); 448var newToken = await computeReplacementTokenAsync!(original, currentToken, cancellationToken).ConfigureAwait(false); 454var newTrivia = await computeReplacementTriviaAsync!(original, currentTrivia, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (1)
79var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (2)
45var text = await tree.GetTextAsync(cancellationToken).ConfigureAwait(false); 46var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
51var bytesRead = await stream.ReadAsync(chunk, chunkOffset, count, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (1)
93result.Add(await task.ConfigureAwait(false));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (2)
21var document1 = await syntaxFormatting.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 24var document2 = await syntaxFormatting.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (8)
38if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 40var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 48if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 67allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 86callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 98cancellationToken).ConfigureAwait(false); 110fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 146if (!await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (1)
48return await FixAllAsync(document, filteredDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (3)
35var decl = await GetContainingMemberOrTypeDeclarationAsync(document, fixAllInContainingMember, span, cancellationToken).ConfigureAwait(false); 37return await GetFixAllSpansIfWithinGlobalStatementAsync(document, span, cancellationToken).ConfigureAwait(false); 55var root = await syntaxRef.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (2)
249var root = await destinationTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 263cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (3)
58return await AddImportDirectivesFromSymbolAnnotationsAsync(document, annotatedNodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 65return await AddImportDirectivesFromSyntaxesAsync(document, nodes, addImportsService, generator, options, cancellationToken).ConfigureAwait(false); 243cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (7)
38semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 62syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 79root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 166var errors = await GetErrorsAsync(document, cancellationToken, ignoreErrorCode).ConfigureAwait(false); 178var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188var errors = await newDocument.GetErrorsAsync(cancellationToken, ignoreErrorCodes).ConfigureAwait(false); 209await generatedCodeRecognitionService.IsGeneratedCodeAsync(document, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
111var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxEditorExtensions.cs (4)
172var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 173var currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 187semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 188currentRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
26var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (2)
98document, parameter, fieldOrProperty, functionDeclaration, cancellationToken).ConfigureAwait(false); 104document, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (8)
40var state = await ComputeStateAsync(document, node, cancellationToken).ConfigureAwait(false); 54var state = await State.GenerateAsync((TService)this, document, statement, cancellationToken).ConfigureAwait(false); 62!await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false)) 80var state = await ComputeStateAsync(document, localDeclarationStatement, cancellationToken).ConfigureAwait(false); 84var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 92var canMergeDeclarationAndAssignment = await CanMergeDeclarationAndAssignmentAsync(document, state, cancellationToken).ConfigureAwait(false); 124state.DeclarationStatement, document, cancellationToken: cancellationToken).ConfigureAwait(false); 226document, localSymbol, state.DeclarationStatement, right, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (4)
45if (!await state.TryInitializeAsync(service, document, statement, cancellationToken).ConfigureAwait(false)) 82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 91var findReferencesResult = await SymbolFinder.FindReferencesAsync(LocalSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false); 104var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (2)
66var previousRoot = await previousSemanticModel.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 67var currentRoot = await currentBodyNode.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (4)
125var updatedMap = await ComputeUpdatedMapAsync(originalMap, document, bodyNode, cancellationToken).ConfigureAwait(false); 145var topLevelSemanticVersion = await document.Project.GetDependentSemanticVersionAsync(cancellationToken).ConfigureAwait(false); 150map, document, bodyNode, topLevelSemanticVersion, cancellationToken).ConfigureAwait(false); 202var semanticModel = await reuseService.TryGetSpeculativeSemanticModelAsync(reuseInfo.PreviousNonSpeculativeSemanticModel, bodyNode, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (4)
82return await this.ReduceCoreAsync(document, spanList, options, reducers, cancellationToken).ConfigureAwait(false); 141document = await this.RemoveUnusedNamespaceImportsAsync(document, removeIfUnusedAnnotation, cancellationToken).ConfigureAwait(false); 237newRoot = await semanticModelForReduce.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 292var root = await model.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SymbolFinder\SymbolFinderInternal.cs (1)
81var projectCompilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
29return await CreateAsync(newDocument, cancellationToken).ConfigureAwait(false);
vbc (7)
src\Compilers\Shared\BuildProtocol.cs (1)
620cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false); 184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false); 191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false); 299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false); 309response = await responseTask.ConfigureAwait(false); 350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
VBCSCompiler (23)
src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
164cancellationToken).ConfigureAwait(false);
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (11)
41return await ProcessCoreAsync().ConfigureAwait(false); 51using var clientConnection = await clientConnectionTask.ConfigureAwait(false); 52var request = await clientConnection.ReadBuildRequestAsync(cancellationToken).ConfigureAwait(false); 62cancellationToken).ConfigureAwait(false); 72cancellationToken).ConfigureAwait(false); 82cancellationToken).ConfigureAwait(false); 92cancellationToken).ConfigureAwait(false); 95return await ProcessCompilationRequestAsync(clientConnection, request, cancellationToken).ConfigureAwait(false); 118await Task.WhenAny(compilationTask, clientConnection.DisconnectTask).ConfigureAwait(false); 128response = await compilationTask.ConfigureAwait(false); 151cancellationToken).ConfigureAwait(false);
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnection.cs (1)
56var request = await BuildRequest.ReadAsync(Stream, cancellationToken).ConfigureAwait(false);
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (2)
145var listenResult = await _queue.DequeueAsync(_cancellationTokenSource.Token).ConfigureAwait(false); 199var completedTask = await Task.WhenAny(new[] { connectTask, cancelTask }).ConfigureAwait(false);
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (1)
339return await clientHandler.ProcessAsync(clientStreamTask, allowCompilationRequests, cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildProtocol.cs (1)
620cancellationToken).ConfigureAwait(false);
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false); 184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false); 191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false); 299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false); 309response = await responseTask.ConfigureAwait(false); 350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
VBCSCompiler.UnitTests (1)
ServerUtil.cs (1)
135var response = await SendAsync(BuildRequest.CreateShutdown(), cancellationToken).ConfigureAwait(false);