6288 references to ConfigureAwait
AnalyzerRunner (21)
CodeRefactoringRunner.cs (4)
59var newDocument = await RefactorDocumentAsync(document, cancellationToken).ConfigureAwait(false); 65updatedSolution = updatedSolution.WithDocumentSyntaxRoot(document.Id, await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)); 78var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 95document.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 (20)
Backchannel\AppHostBackchannel.cs (10)
36var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 55var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 68var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 83var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 103var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 169var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 189var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 196cancellationToken).ConfigureAwait(false); 204var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 217var rpc = await _rpcTaskCompletionSource.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
Backchannel\ExtensionBackchannel.cs (1)
78await Task.WhenAny(_connectionSetupTcs.Task, cancellationTask).ConfigureAwait(false);
Commands\PublishCommandBase.cs (1)
159return await backchannelCompletionSource.Task.ConfigureAwait(false);
Interaction\ExtensionInteractionService.cs (8)
49var value = await task.ConfigureAwait(false); 74var result = await _backchannel.PromptForStringAsync(promptText.RemoveSpectreFormatting(), defaultValue, validator, required, _cancellationToken).ConfigureAwait(false); 83return await tcs.Task.ConfigureAwait(false); 87return await _consoleInteractionService.PromptForStringAsync(promptText, defaultValue, validator, isSecret, required, cancellationToken).ConfigureAwait(false); 101var result = await _backchannel.ConfirmAsync(promptText.RemoveSpectreFormatting(), defaultValue, _cancellationToken).ConfigureAwait(false); 111return await tcs.Task.ConfigureAwait(false); 130var result = await _backchannel.PromptForSelectionAsync(promptText.RemoveSpectreFormatting(), choices, choiceFormatter, _cancellationToken).ConfigureAwait(false); 140return 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)
220return 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 (47)
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)
216_plotlyChart.CancellationToken).ConfigureAwait(false);
Components\Controls\SpanDetails.razor.cs (1)
139_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)
97var result = await page.SessionStorage.GetAsync<TSerializableViewModel>(page.SessionStorageKey).ConfigureAwait(false);
DashboardEndpointsBuilder.cs (2)
70return await ValidateTokenMiddleware.TryAuthenticateAsync(token, httpContext, dashboardOptions).ConfigureAwait(false); 114requestCulture = 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\MetricsHelpers.cs (2)
46}).ConfigureAwait(false); 68var result = await reference.Result.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\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); 270var resultTask = await Task.WhenAny(successfulStartupTask, AppExited.Task, startupTimeoutTask).ConfigureAwait(false); 291var completedTask = await Task.WhenAny(allOutputCompleteTask, allOutputCompleteTimeoutTask).ConfigureAwait(false); 448(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 (133)
ApplicationModel\ExpressionResolver.cs (9)
72await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false), 73await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)), 75await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false), 76await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)), 178ConnectionStringReference cs => await ResolveConnectionStringReferenceAsync(cs).ConfigureAwait(false), 180ReferenceExpression ex => await EvalExpressionAsync(ex).ConfigureAwait(false), 181EndpointReference endpointReference when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false), 182EndpointReferenceExpression ep when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false), 183IValueProvider vp => await EvalValueProvider(vp).ConfigureAwait(false),
ApplicationModel\InteractionService.cs (8)
41return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false); 50return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false); 67var completion = await newState.CompletionTcs.Task.ConfigureAwait(false); 76return await PromptInputAsync(title, message, new InteractionInput { InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false); 81var result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false); 103var completion = await newState.CompletionTcs.Task.ConfigureAwait(false); 123var completion = await newState.CompletionTcs.Task.ConfigureAwait(false); 198if (!await RunValidationAsync(interactionState, result, cancellationToken).ConfigureAwait(false))
ApplicationModel\ParameterResource.cs (1)
87return await WaitForValueTcs.Task.WaitAsync(cancellationToken).ConfigureAwait(false);
ApplicationModel\ResourceCommandService.cs (4)
39return await ExecuteCommandCoreAsync(resourceEvent.ResourceId, resourceEvent.Resource, commandName, cancellationToken).ConfigureAwait(false); 55return await ExecuteCommandCoreAsync(names[0], resource, commandName, cancellationToken).ConfigureAwait(false); 66var results = await Task.WhenAll(tasks).ConfigureAwait(false); 112var 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)
162var resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && IsContinuableState(waitBehavior, re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false); 197await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && re.Snapshot.HealthStatus == HealthStatus.Healthy, cancellationToken).ConfigureAwait(false); 202resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && re.Snapshot.ResourceReadyEvent is not null, cancellationToken: cancellationToken).ConfigureAwait(false); 247cancellationToken).ConfigureAwait(false); 278var resourceEvent = await WaitForResourceCoreAsync(resourceName, re => ShouldYield(waitBehavior, re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false); 324var resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && IsKnownTerminalState(re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false); 411var resourceEvent = await WaitForResourceCoreAsync(resourceName, predicate, cancellationToken).ConfigureAwait(false);
Backchannel\AppHostRpcTarget.cs (2)
37var channel = await _logChannelTcs.Task.WaitAsync(cancellationToken).ConfigureAwait(false); 138cancellationToken).ConfigureAwait(false);
Dashboard\DashboardLifecycleHook.cs (1)
211var resourceServiceUrl = await dashboardEndpointProvider.GetResourceServiceUriAsync(context.CancellationToken).ConfigureAwait(false);
Dashboard\DashboardService.cs (1)
320var (result, errorMessage) = await serviceData.ExecuteCommandAsync(request.ResourceName, request.CommandName, context.CancellationToken).ConfigureAwait(false);
Dashboard\DashboardServiceData.cs (1)
99var 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 (19)
117_dcpInfo = await _dcpDependencyCheckService.GetDcpInfoAsync(cancellationToken: cancellationToken).ConfigureAwait(false); 686var dcpSvc = await _kubernetesService.GetAsync<Service>(sar.Service.Metadata.Name, cancellationToken: cancellationToken).ConfigureAwait(false); 711await _kubernetesService.CreateAsync(cn, cancellationToken).ConfigureAwait(false); 1060(var appHostArgs, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false); 1074(spec.Env, var failedToApplyConfiguration) = await BuildEnvVarsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false); 1081await _kubernetesService.CreateAsync(exe, cancellationToken).ConfigureAwait(false); 1298spec.CreateFiles = await BuildCreateFilesAsync(modelContainerResource, cancellationToken).ConfigureAwait(false); 1300(spec.RunArgs, var failedToApplyRunArgs) = await BuildRunArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false); 1302(var args, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false); 1306(spec.Env, var failedToApplyConfiguration) = await BuildEnvVarsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false); 1323await _kubernetesService.CreateAsync(dcpContainerResource, cancellationToken).ConfigureAwait(false); 1538await _kubernetesService.CreateAsync(res, cancellationToken).ConfigureAwait(false); 1581await _kubernetesService.PatchAsync(c, patch, attemptCancellationToken).ConfigureAwait(false); 1582var cu = await _kubernetesService.GetAsync<Container>(c.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1596await _kubernetesService.PatchAsync(e, patch, attemptCancellationToken).ConfigureAwait(false); 1597var eu = await _kubernetesService.GetAsync<Executable>(e.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1693var r = await _kubernetesService.DeleteAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1714var r = await _kubernetesService.GetAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false); 1777cancellationToken).ConfigureAwait(false);
Dcp\DcpHost.cs (2)
64var dcpInfo = await _dependencyCheckService.GetDcpInfoAsync(cancellationToken: cancellationToken).ConfigureAwait(false); 100dcpInfo = await _dependencyCheckService.GetDcpInfoAsync(force: true, cancellationToken: timeoutCancellation.Token).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);
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);
Orchestrator\ApplicationOrchestrator.cs (1)
99var completedTask = await Task.WhenAny(waitForDependenciesTask, waitForNonWaitingStateTask).ConfigureAwait(false);
Orchestrator\ParameterProcessor.cs (2)
138.ConfigureAwait(false); 173.ConfigureAwait(false);
OtlpConfigurationExtensions.cs (1)
68var dcpInfo = await dcpDependencyCheckService.GetDcpInfoAsync(cancellationToken: context.CancellationToken).ConfigureAwait(false);
Publishing\DockerContainerRuntime.cs (3)
36.ConfigureAwait(false); 55cancellationToken).ConfigureAwait(false); 89var processResult = await pendingResult.WaitAsync(ct).ConfigureAwait(false);
Publishing\PodmanContainerRuntime.cs (3)
36.ConfigureAwait(false); 55cancellationToken).ConfigureAwait(false); 89var 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)
55cancellationToken).ConfigureAwait(false); 64cancellationToken).ConfigureAwait(false); 68var containerRuntimeHealthy = await ContainerRuntime.CheckIfRunningAsync(cancellationToken).ConfigureAwait(false); 76cancellationToken).ConfigureAwait(false); 84cancellationToken).ConfigureAwait(false); 143).ConfigureAwait(false); 179.ConfigureAwait(false); 185await publishingTask.FailAsync($"Building image for {resource.Name} failed", cancellationToken).ConfigureAwait(false); 190await publishingTask.SucceedAsync($"Building image for {resource.Name} completed", cancellationToken).ConfigureAwait(false); 232.ConfigureAwait(false); 255).ConfigureAwait(false); 269await publishingTask.SucceedAsync($"Building image for {resourceName} completed", cancellationToken).ConfigureAwait(false); 274await publishingTask.FailAsync($"Building image for {resourceName} failed", cancellationToken).ConfigureAwait(false); 309return await step.CreateTaskAsync(description, cancellationToken).ConfigureAwait(false);
ResourceBuilderExtensions.cs (2)
1830var response = await httpClient.SendAsync(request, context.CancellationToken).ConfigureAwait(false); 1842return 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\VersionCheckService.cs (2)
94latestVersion = await _versionFetcher.TryFetchLatestVersionAsync(appHostDirectory, cancellationToken).ConfigureAwait(false); 137cancellationToken: cancellationToken).ConfigureAwait(false);
VersionChecking\VersionFetcher.cs (1)
50.ConfigureAwait(false);
Aspire.Hosting.Azure (28)
AzurePublishingContext.cs (9)
81).ConfigureAwait(false); 85var writeTask = await step.CreateTaskAsync("Writing Azure Bicep templates", cancellationToken).ConfigureAwait(false); 95await writeTask.SucceedAsync($"Azure Bicep templates written successfully to {outputPath}.", cancellationToken).ConfigureAwait(false); 99await writeTask.FailAsync($"Failed to write Azure Bicep templates: {ex.Message}", cancellationToken).ConfigureAwait(false); 220).ConfigureAwait(false); 233.ConfigureAwait(false); 262).ConfigureAwait(false); 302.ConfigureAwait(false); 326).ConfigureAwait(false);
AzureResourcePreparer.cs (1)
142var azureReferences = await GetAzureReferences(resource, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\BicepCompiler.cs (2)
47if (!await ExecuteCommand(templateSpec).ConfigureAwait(false)) 62var result = await task.ConfigureAwait(false);
Provisioning\Internal\DefaultArmClientProvider.cs (1)
25var subscription = await armClient.GetDefaultSubscriptionAsync(cancellationToken).ConfigureAwait(false);
Provisioning\Internal\DefaultProvisioningContextProvider.cs (4)
44var (subscriptionResource, tenantResource) = await armClient.GetSubscriptionAndTenantAsync(cancellationToken).ConfigureAwait(false); 98var response = await resourceGroups.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false); 116var operation = await resourceGroups.CreateOrUpdateAsync(WaitUntil.Completed, resourceGroupName, rgData, cancellationToken).ConfigureAwait(false); 122var principal = await userPrincipalProvider.GetUserPrincipalAsync(cancellationToken).ConfigureAwait(false);
Provisioning\Internal\DefaultSubscriptionResource.cs (2)
29var response = await resourceGroupCollection.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false); 35var 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\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)
111var response = await context.Subscription.GetResourceGroups().GetAsync(existingResourceGroupName, cancellationToken).ConfigureAwait(false); 143var armTemplateContents = await bicepCompiler.CompileBicepToArmAsync(path, cancellationToken).ConfigureAwait(false); 173cancellationToken).ConfigureAwait(false); 287var secret = await client.GetSecretAsync(secretRef.SecretName, cancellationToken: ct).ConfigureAwait(false);
Aspire.Hosting.Azure.AIFoundry (2)
AzureAIFoundryExtensions.cs (1)
231_ = await manager.LoadModelAsync(deployment.DeploymentName, ct: ct).ConfigureAwait(false);
LocalModelHealthCheck.cs (1)
13var 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)
109await cosmosClient.ReadAccountAsync().WaitAsync(ct).ConfigureAwait(false); 113var db = (await cosmosClient.CreateDatabaseIfNotExistsAsync(database.DatabaseName, cancellationToken: ct).ConfigureAwait(false)).Database; 119await 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 (1)
AzureStorageExtensions.cs (1)
158await blobContainerClient.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); 167cancellationToken: cancellationToken).ConfigureAwait(false); 172cancellationToken: cancellationToken).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)
232var value = await this.ProcessValueAsync(environmentContext, executionContext, arg).ConfigureAwait(false); 258var 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 (2)
MySqlBuilderExtensions.cs (2)
142await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 148await command.ExecuteNonQueryAsync(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.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
571await 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)
246await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 267await command.ExecuteNonQueryAsync(ct).ConfigureAwait(false); 287await 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.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
220return await factory.CreateConnectionAsync(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); 301project.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); 270var resultTask = await Task.WhenAny(successfulStartupTask, AppExited.Task, startupTimeoutTask).ConfigureAwait(false); 291var completedTask = await Task.WhenAny(allOutputCompleteTask, allOutputCompleteTimeoutTask).ConfigureAwait(false); 448(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 (69)
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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 (2)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (1)
129var items = await BenchmarksHelpers.GenerateInheritanceMarginItemsAsync(workspace.CurrentSolution, cancellationToken).ConfigureAwait(false);
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
62CancellationToken.None).ConfigureAwait(false);
IdentitySample.PasskeyConformance (1)
Program.cs (1)
109var 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 (36)
Program.cs (8)
62(ImmutableArray<(string, CodeAnalysisMetricData)> metricDatas, ErrorCode exitCode) = await GetMetricDatasAsync(projectsOrSolutions, quiet, cancellationToken).ConfigureAwait(false); 69errorCode = await writeOutputAsync().ConfigureAwait(false); 305var project = await workspace.OpenProjectAsync(projectFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 318var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 319var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false); 331var solution = await workspace.OpenSolutionAsync(solutionFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 351var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 352var 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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (36)
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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); 305var project = await workspace.OpenProjectAsync(projectFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 318var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 319var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false); 331var solution = await workspace.OpenSolutionAsync(solutionFile, cancellationToken: CancellationToken.None).ConfigureAwait(false); 351var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false); 352var 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\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (26)
Latency\ChecpointAcceptanceTests.cs (1)
105var e = await Record.ExceptionAsync(async () => response = await host.GetTestClient().GetAsync("/").ConfigureAwait(false));
Logging\AcceptanceTests.cs (19)
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); 825using HttpResponseMessage response = await client.GetAsync("/flushrequestlogs").ConfigureAwait(false); 836using HttpResponseMessage response2 = await client.GetAsync("/flushalllogs").ConfigureAwait(false); 880using HttpResponseMessage response2 = await client.GetAsync("/flushalllogs").ConfigureAwait(false); 931using HttpResponseMessage response2 = await client.GetAsync("/flushalllogs").ConfigureAwait(false); 932using HttpResponseMessage response3 = await client.GetAsync("/logatrequest").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 (11)
DefaultPasskeyHandler.cs (9)
35return await PerformAttestationCoreAsync(context).ConfigureAwait(false); 57return await PerformAssertionCoreAsync(context).ConfigureAwait(false); 231var isAttestationStatementValid = await VerifyAttestationStatementAsync(attestationObjectMemory, clientDataHash, context.HttpContext).ConfigureAwait(false); 247var existingUser = await context.UserManager.FindByPasskeyIdAsync(credentialId).ConfigureAwait(false); 337storedPasskey = await context.UserManager.GetPasskeyAsync(user, credentialId).ConfigureAwait(false); 344var userId = await context.UserManager.GetUserIdAsync(user).ConfigureAwait(false); 362user = await context.UserManager.FindByIdAsync(userHandle).ConfigureAwait(false); 367storedPasskey = await context.UserManager.GetPasskeyAsync(user, credentialId).ConfigureAwait(false); 507var isOriginValid = await IsValidOriginAsync(originInfo, httpContext).ConfigureAwait(false);
SignInManager.cs (2)
488var result = await _passkeyHandler.PerformAttestationAsync(context).ConfigureAwait(false); 722? await UserManager.GetUserIdAsync(user).ConfigureAwait(false)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (12)
UserOnlyStore.cs (6)
622var userPasskey = await FindUserPasskeyByIdAsync(passkey.CredentialId, cancellationToken).ConfigureAwait(false); 668.ConfigureAwait(false); 686var passkey = await FindUserPasskeyByIdAsync(credentialId, cancellationToken).ConfigureAwait(false); 689return await FindUserAsync(passkey.UserId, cancellationToken).ConfigureAwait(false); 707var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false); 740var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false);
UserStore.cs (6)
758var userPasskey = await FindUserPasskeyByIdAsync(passkey.CredentialId, cancellationToken).ConfigureAwait(false); 803.ConfigureAwait(false); 821var passkey = await FindUserPasskeyByIdAsync(credentialId, cancellationToken).ConfigureAwait(false); 824return await FindUserAsync(passkey.UserId, cancellationToken).ConfigureAwait(false); 842var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false); 875var passkey = await FindUserPasskeyAsync(user.Id, credentialId, cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.InternalTesting (26)
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 (4)
83return await task.ConfigureAwait(false); 96if (task == await Task.WhenAny(task, Task.Delay(timeout, cts.Token)).ConfigureAwait(false)) 99return await task.ConfigureAwait(false); 131if (task == await Task.WhenAny(task, Task.Delay(timeout, cts.Token)).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)
230return await builder.SendAsync(cancellationToken).ConfigureAwait(false);
Microsoft.AspNetCore.WebUtilities (1)
HttpRequestStreamReader.cs (1)
521await ReadIntoBufferAsync().ConfigureAwait(false);
Microsoft.Build (3)
Logging\BinaryLogger\Postprocessing\SubStream.cs (1)
79cancellationToken).ConfigureAwait(false);
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (1)
125cancellationToken).ConfigureAwait(false);
NodeEndpointOutOfProcBase.cs (1)
644bytesRead = readTask.ConfigureAwait(false).GetAwaiter().GetResult();
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.Build.Tasks.Core (3)
DownloadFile.cs (2)
153using (HttpResponseMessage response = await client.GetAsync(uri, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false)) 209).ConfigureAwait(false))
NodePipeBase.cs (1)
245int bytesRead = await NodeStream.ReadAsync(buffer, totalBytesRead, bytesToRead - totalBytesRead, 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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
Microsoft.CodeAnalysis.Analyzers (101)
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (1)
58var 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)
32ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(fixAllContext.Document!).ConfigureAwait(false); 40ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 49ImmutableArray<Diagnostic> diagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 106var newText = await AddEntriesToUnshippedFileForDiagnosticsAsync(unshippedDocument, diagnostics, cancellationToken).ConfigureAwait(false); 111var newText = await UpdateEntriesInUnshippedFileForDiagnosticsAsync(unshippedDocument, diagnostics, cancellationToken).ConfigureAwait(false); 140return await AddEntriesToUnshippedFileAsync(unshippedDataDocument, entriesToAdd, cancellationToken).ConfigureAwait(false); 155return await UpdateEntriesInUnshippedFileAsync(unshippedDataDocument, entriesToUpdate, cancellationToken).ConfigureAwait(false); 178newSolution = await AddAnalyzerReleaseTrackingFilesAsync(newSolution.GetProject(projectId)!).ConfigureAwait(false);
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (7)
73IBinaryOperation binaryOperation => await ConvertToEqualsAsync(document, semanticModel, binaryOperation, cancellationToken).ConfigureAwait(false), 74IInvocationOperation invocationOperation => await EnsureEqualsCorrectAsync(document, semanticModel, invocationOperation, cancellationToken).ConfigureAwait(false), 98.ConfigureAwait(false), 104.ConfigureAwait(false), 124var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 193var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 259var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
173var 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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (71)
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (182)
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 (7)
92? await FindMethodDeclarationReferencesAsync(invocationDocument, method, 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 (2)
51document, type, cancellationToken).ConfigureAwait(false); 128var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (2)
58return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false); 100return await generator.ImplementInterfaceAsync(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, this.Service.SyntaxFormatting, State.ClassOrStructType, cancellationToken).ConfigureAwait(false); 56cancellationToken).ConfigureAwait(false); 85return await AddFinalizerCommentAsync(docWithAllMembers, finalizer, cancellationToken).ConfigureAwait(false); 234SymbolKind.Field, Accessibility.Private, cancellationToken).ConfigureAwait(false); 237var 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 (4)
121? await RenameThenAddAsyncTokenAsync(keepVoid, document, node, methodSymbol, knownTypes, cancellationToken).ConfigureAwait(false) 122: await AddAsyncTokenAsync(keepVoid, document, methodSymbol, knownTypes, node, cancellationToken).ConfigureAwait(false); 169var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 177return await AddAsyncTokenAsync(keepVoid, newDocument, newMethod, knownTypes, newNode, 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 (1)
61cancellationToken: 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); 91newSolution = 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); 861if (await TryRemoveUnusedLocalAsync(declStatement, originalDeclStatement).ConfigureAwait(false)) 872var (canUse, mayChangeSemantics) = await moveDeclarationService.CanMoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false); 875document = await moveDeclarationService.MoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false); 901if (await IsLocalDeclarationWithNoReferencesAsync(newDecl, document, cancellationToken).ConfigureAwait(false)) 924var referencedSymbols = await SymbolFinder.FindReferencesAsync(local, document.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (1)
118=> await _createChangedSolution(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\CodeFixes\ForkingSyntaxEditorBasedCodeFixProvider.cs (1)
77cancellationToken).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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
Microsoft.CodeAnalysis.CSharp (1)
Syntax\CSharpSyntaxTree.cs (1)
881return await this.GetRootAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (59)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
139document, 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\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (2)
42var analyzedTypes = await TryGetOldAndNewReturnTypeAsync(document, diagnostics, cancellationToken).ConfigureAwait(false); 130await TryGetOldAndNewReturnTypeAsync(document, diagnostics, 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)
104document, compilationUnit, allUsingDirectives, 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 (1)
75cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (4)
56var text = await document.GetTextAsync(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 (1)
75cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
63cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
45? 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\Extensions\ITypeSymbolExtensions.cs (1)
123var 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\InitializeParameter\InitializeParameterHelpers.cs (4)
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)
2885var diagnostics = await GetDiagnosticsAsync(workspace, parameters).ConfigureAwait(false);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1253var diagnostics = await GetDiagnosticsAsync(workspace, testParameters).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (11)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (8)
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); 213documentWithNameAndAnnotationsAdded.WithSyntaxRoot(updatedRoot), Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false); 215simplifiedDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 263var newText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
EventHookup\EventHookupSessionManager_EventHookupSession.cs (2)
120var eventName = await eventNameTask.ConfigureAwait(false); 142var plusEqualsToken = await GetPlusEqualsTokenInsideAddAssignExpressionAsync(document, position, cancellationToken).ConfigureAwait(false);
GoToBase\CSharpGoToBaseService.cs (1)
40var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (12)
CodeActions\InlineMethod\CSharpInlineMethodTests_CrossLanguage.cs (1)
25var (actions, _) = await GetCodeActionsAsync(workspace).ConfigureAwait(false);
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
935var formattedDocument = await Formatter.FormatAsync(modifiedDocument, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).ConfigureAwait(false);
Completion\CompletionProviders\TypeImportCompletionProviderTests.cs (2)
1034var completionList = await GetCompletionListAsync(markup).ConfigureAwait(false); 1392var 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 (3)
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);
Workspaces\WorkspaceTests_EditorFeatures.cs (4)
1441Assert.Equal(originalText, (await eventArgs[0].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1442Assert.Equal(originalText, (await eventArgs[1].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1444Assert.Equal(updatedText, (await eventArgs[0].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1445Assert.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 (182)
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\EnableNullable\EnableNullableCodeRefactoringProvider.cs (2)
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 (1)
69CodeActionPurpose.Preview, progress, cancellationToken).ConfigureAwait(false);
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (10)
139var expressionToInline = await CreateExpressionToInlineAsync(document, declarator, cancellationToken).ConfigureAwait(false); 145declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false); 156declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false); 158allReferences = await FindReferenceAnnotatedNodesAsync(document, cancellationToken).ConfigureAwait(false); 173declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false); 185var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 190var semanticModel = await document.GetSemanticModelAsync(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\NodeSelectionHelpers.cs (1)
55var members = await CSharpSelectedMembers.Instance.GetSelectedMembersAsync(tree, span, allowPartialSelection: true, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
346var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\CSharpSyncNamespaceCodeRefactoringProvider.cs (1)
30if (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false) is not CompilationUnitSyntax compilationUnit)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (2)
35var declaration = await GetDeclarationAsync(context).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 (2)
70var nameInfo = await NameDeclarationInfo.GetDeclarationInfoAsync(document, position, cancellationToken).ConfigureAwait(false); 76var names = await recommender.Value.ProvideRecommendedNamesAsync(completionContext, document, context, nameInfo, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
46var info = await GetDeclarationInfoWorkerAsync(document, position, 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\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (3)
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)
92return await base.GetTextChangeAsync(document, selectedItem, ch, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\SymbolCompletionProvider.cs (4)
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) 155result = await IsTriggerInArgumentListAsync(document, caretPosition - 1, cancellationToken).ConfigureAwait(false);
ConvertNamespace\ConvertNamespaceCodeRefactoringProvider.cs (1)
103document = await ConvertAsync(document, namespaceDecl, options, cancellationToken).ConfigureAwait(false);
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (7)
77var compilation = await document.Project.GetCompilationAsync(cancellationToken).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 (1)
42document, oldClassDeclaration, mainMethod, accessibilityModifiersRequired, cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (3)
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)
ConvertProgram\ConvertToProgramMainCodeFixProvider.cs (1)
49var fixedDocument = await ConvertToProgramMainAsync(document, options.AccessibilityModifiersRequired, cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertToTopLevelStatementsCodeFixProvider.cs (1)
53var newDocument = await ConvertToTopLevelStatementsAsync(document, methodDeclaration, cancellationToken).ConfigureAwait(false);
ConvertToRecord\CSharpConvertToRecordRefactoringProvider.cs (1)
28document, typeDeclaration, cancellationToken).ConfigureAwait(false);
Copilot\CSharpCopilotCodeFixProvider.cs (1)
123var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (1)
99var references = await SymbolFinder.FindReferencesAsync(memberSymbol, document.Project.Solution, searchOptions, 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 (5)
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); 100var syntaxRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
EncapsulateField\CSharpEncapsulateFieldService.cs (5)
38var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 86var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 88root = await document.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);
ExtractMethod\CSharpMethodExtractor.cs (2)
200var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 203var newRoot = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (2)
123insertionPointNode, cancellationToken).ConfigureAwait(false); 1070var newDocument = await GenerateNewDocumentAsync(methodSymbol, returnType, originalDocument, cancellationToken).ConfigureAwait(false);
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
158var updatedRoot = await updatedDocument.GetSyntaxRootAsync(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 (1)
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 (2)
546var semanticModel = await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 725root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (2)
50var (container, explicitName, name) = await GetContainerAsync(context).ConfigureAwait(false); 252document.Id, cancellationToken).ConfigureAwait(false);
ImplementInterface\CSharpImplementExplicitlyCodeRefactoringProvider.cs (2)
53implMember, solution, findRefsOptions, cancellationToken).ConfigureAwait(false); 69document.Id, cancellationToken).ConfigureAwait(false);
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (2)
63cancellationToken).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);
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));
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);
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
139document, 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\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (2)
42var analyzedTypes = await TryGetOldAndNewReturnTypeAsync(document, diagnostics, cancellationToken).ConfigureAwait(false); 130await TryGetOldAndNewReturnTypeAsync(document, diagnostics, 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)
104document, compilationUnit, allUsingDirectives, 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 (1)
75cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (4)
56var text = await document.GetTextAsync(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 (1)
75cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (1)
63cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
45? 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 (1)
38var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (1)
86var codeActions = await computationTask.ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
741var newSyntaxTree = await newDocument.GetSyntaxTreeAsync().ConfigureAwait(false);
src\Analyzers\CSharp\Tests\RemoveUnnecessaryParentheses\RemoveUnnecessaryExpressionParenthesesTests.cs (1)
2885var diagnostics = await GetDiagnosticsAsync(workspace, parameters).ConfigureAwait(false);
src\Analyzers\CSharp\Tests\RemoveUnusedParametersAndValues\RemoveUnusedParametersTests.cs (1)
1253var diagnostics = await GetDiagnosticsAsync(workspace, testParameters).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Workspaces (9)
Rename\CSharpRenameRewriterLanguageService.cs (2)
853referencedSymbol, baseSolution, cancellationToken).ConfigureAwait(false); 879var compilationUnit = (CompilationUnitSyntax)await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
66context, destination, @event, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
123var 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\InitializeParameter\InitializeParameterHelpers.cs (4)
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)
799var syntaxRoot = await document.GetSyntaxRootAsync(CancellationToken.None).ConfigureAwait(false); 803var editor = await DocumentEditor.CreateAsync(document, CancellationToken.None).ConfigureAwait(false); 814? await ImportAdder.AddImportsFromSymbolAnnotationAsync(documentWithAttribute, addImportOptions, CancellationToken.None).ConfigureAwait(false) 815: await ImportAdder.AddImportsFromSyntaxesAsync(documentWithAttribute, addImportOptions, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures (192)
BraceMatching\BraceHighlightingViewTaggerProvider.cs (1)
69_braceMatcherService, document, position, options, cancellationToken).ConfigureAwait(false);
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (1)
66var document = await subjectBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(context.OperationContext).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 (8)
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))
CodeDefinitionWindow\DefinitionContextTracker.cs (6)
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);
DocumentationComments\CopilotGenerateDocumentationCommentManager.cs (2)
51var generateDocumentationCommentProvider = await CreateProviderAsync(document, textView, snippet.MemberNode, cancellationToken).ConfigureAwait(false); 60var copilotService = await IsGenerateDocumentationAvailableAsync(document, memberNode, 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\CombinedProvider.cs (1)
21sourceText = await provider.GetChangedEditorConfigAsync(sourceText).ConfigureAwait(false);
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (2)
78if (!await SettingsUpdater.HasAnyChangesAsync().ConfigureAwait(false)) 83var text = await SettingsUpdater.GetChangedEditorConfigAsync(sourceText, default).ConfigureAwait(false);
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
78var newText = await GetChangedEditorConfigAsync(analyzerConfigDocument, token).ConfigureAwait(false);
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (2)
73var document = await subjectBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(context).ConfigureAwait(false); 103var finalSolution = await result.GetSolutionAsync(cancellationToken).ConfigureAwait(false);
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (2)
50document, item, symbolItem, textVersion, cancellationToken).ConfigureAwait(false); 61allowInvalidPosition: false, NavigationOptions.Default, cancellationToken).ConfigureAwait(false))
ExternalAccess\IntelliCode\IntentProcessor.cs (4)
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\UnitTesting\UnitTestingReferencesService.cs (1)
32cancellationToken).ConfigureAwait(false);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptFindUsagesContext.cs (1)
70if (!await _navigator.CanNavigateToAsync(workspace, 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 (1)
87_threadingContext, workspace, result.NavigationDocumentId, position: 0, CancellationToken.None).ConfigureAwait(false);
ExtractMethod\ExtractMethodCommandHandler.cs (3)
138var document = await textBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(waitContext).ConfigureAwait(false); 171result = await NotifyUserIfNecessaryAsync(document, result, cancellationToken).ConfigureAwait(false); 204var disposable = await waitContext.SuppressAutoCancelAsync().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 (2)
132var disposable = await backgroundIndicator.SuppressAutoCancelAsync().ConfigureAwait(false); 137cancellationToken).ConfigureAwait(false);
GoToDefinition\GoToDefinitionHelpers.cs (3)
25symbol, solution, threadingContext, streamingPresenter, cancellationToken, thirdPartyNavigationAllowed).ConfigureAwait(false); 27threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), cancellationToken).ConfigureAwait(false); 45threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
Host\IStreamingFindReferencesPresenter.cs (2)
75threadingContext, workspace, title, items, cancellationToken).ConfigureAwait(false); 77threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), cancellationToken).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 (1)
51var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (2)
102.ConfigureAwait(false); 120var sessionInfo = await renameService.StartInlineSessionAsync(document, selectedSpans.Single().Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameService.cs (2)
76_threadingContext, renameInfo, document, cancellationToken).ConfigureAwait(false); 143workspace, document.Id, documentSpan.SourceSpan, cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameSession.cs (10)
319await AllRenameLocationsTask.JoinAsync(cancellationToken).ConfigureAwait(false); 322var inlineRenameLocations = await RenameInfo.FindRenameLocationsAsync(currentOptions, cancellationToken).ConfigureAwait(false); 550var result = await AllRenameLocationsTask.JoinAsync(cancellationToken).ConfigureAwait(false); 553return await result.GetReplacementsAsync(replacementText, options, cancellationToken).ConfigureAwait(false); 573var replacementInfo = await _conflictResolutionTask.JoinAsync(CancellationToken.None).ConfigureAwait(false); 581var computedMergeResult = await ComputeMergeResultAsync(replacementInfo, cancellationToken).ConfigureAwait(false); 773await CommitWorkerAsync(previewChanges, canUseBackgroundWorkIndicator: true, editorOperationContext).ConfigureAwait(false); 875var info = await _conflictResolutionTask.JoinAsync(cancellationToken).ConfigureAwait(true); 906var documentChanges = await CalculateFinalDocumentChangesAsync(newSolution, cancellationToken).ConfigureAwait(false); 949: (documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false)));
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (4)
334originalDocument, newDocument, cancellationToken).ConfigureAwait(true); 452cancellationToken).ConfigureAwait(true) 574return await textDiffService.GetTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(false); 620preMergeDocument, postMergeDocument, cancellationToken).ConfigureAwait(true);
InlineRename\UI\SmartRename\SmartRenameViewModel.cs (3)
232.ConfigureAwait(false); 246.ConfigureAwait(false); 251.ConfigureAwait(false);
IntelliSense\AsyncCompletion\CompletionSource.cs (4)
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);
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)
153var model = await lastTask.ConfigureAwait(false); 154return await transformModelAsync(model, _stopCancellationToken).ConfigureAwait(false);
IntelliSense\NavigationActionFactory.cs (2)
78.ConfigureAwait(false); 82.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\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)
160await _languageServer.WaitForExitAsync().WithCancellation(cancellationToken).ConfigureAwait(false); 172cancellationToken).ConfigureAwait(false);
NavigableSymbols\NavigableSymbolService.NavigableSymbol.cs (1)
64_service._threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), backgroundIndicator.UserCancellationToken).ConfigureAwait(false);
NavigateTo\NavigateToHelpers.cs (1)
57context.UserCancellationToken).ConfigureAwait(false);
Navigation\AbstractDefinitionLocationService.cs (5)
69document, controlFlowTarget.Value, cancellationToken).ConfigureAwait(false); 85project, position, symbol, originalDocument: document, cancellationToken).ConfigureAwait(false); 90symbol, position, document, cancellationToken).ConfigureAwait(false); 105_threadingContext, solution.Workspace, title, allDefinitions, cancellationToken).ConfigureAwait(false); 169_threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
Navigation\IDocumentNavigationServiceExtensions.cs (6)
34return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 41return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 48return await location.TryNavigateToAsync(threadingContext, NavigationOptions.Default, cancellationToken).ConfigureAwait(false); 55return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 69return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false); 96return location != null && await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
NavigationBar\NavigationBarController_ModelComputation.cs (1)
93var model = await ComputeModelAsync().ConfigureAwait(false);
Organizing\OrganizeDocumentCommandHandler.cs (4)
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);
Peek\DefinitionPeekableItem.cs (2)
62resultCollection, callback, cancellationToken).ConfigureAwait(false)); 75var compilation = await project.GetCompilationAsync(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 (2)
115mappingResult.Symbol, mappingResult.Project, _peekResultFactory, cancellationToken).ConfigureAwait(false)); 133workspace, document.Id, item.SourceSpan.Start, cancellationToken).ConfigureAwait(false))
Preview\AbstractPreviewFactoryService.cs (1)
696var 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)
183var prompt = await copilotService.GetOnTheFlyDocsPromptAsync(_onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false); 184var (responseString, isQuotaExceeded) = await copilotService.GetOnTheFlyDocsResponseAsync(prompt, cancellationToken).ConfigureAwait(false);
Remote\SolutionChecksumUpdater.cs (1)
171var wasSynchronized = await DispatchSynchronizeTextChangesHelperAsync().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 (9)
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);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (6)
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); 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;
Shared\Extensions\WorkspaceExtensions.cs (1)
28var changes = await newDocument.GetTextChangesAsync(oldDocument, cancellationToken).ConfigureAwait(true);
SpellCheck\RoslynSpellCheckFixerProvider.cs (1)
48var result = await TryRenameAsync(span, replacement, 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 (1)
62var newSolution = await originalCodeAction.GetChangedSolutionInternalAsync(originalSolution, progress, cancellationToken).ConfigureAwait(false);
Suggestions\SuggestedActions\SuggestedAction.cs (7)
82return await CodeAction.GetOperationsAsync(this.OriginalSolution, 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 (2)
180var result = await errorTask.ConfigureAwait(false) ?? await refactoringTask.ConfigureAwait(false); 210var result = await GetFixCategoryAsync(priorityProvider).ConfigureAwait(false);
Suggestions\SuggestedActionsSource_Async.cs (3)
214await Task.WhenAll(fixesTask, refactoringsTask).ConfigureAwait(false); 216var fixes = await fixesTask.ConfigureAwait(false); 217var refactorings = await refactoringsTask.ConfigureAwait(false);
Suggestions\SuggestedActionWithNestedFlavors.cs (3)
94var primarySuggestedActionSet = await GetPrimarySuggestedActionSetAsync(cancellationToken).ConfigureAwait(false); 121var refineUsingCopilotAction = await RefineUsingCopilotSuggestedAction.TryCreateAsync(this, cancellationToken).ConfigureAwait(false); 165var previewResult = await GetPreviewResultAsync(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 (5)
Completion\AbstractCompletionProviderTests.cs (1)
375return await GetCompletionListAsync(GetCompletionService(currentDocument.Project), currentDocument, position, RoslynCompletion.CompletionTrigger.Invoke, options).ConfigureAwait(false);
RefactoringHelpers\RefactoringHelpersTestBase.cs (4)
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);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
CodeFixes\CodeFixServiceTests.cs (1)
933var 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)
303var 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)
497var lspSnippetString = await RoslynLSPSnippetConverter.GenerateLSPSnippetAsync(document, cursorPosition!.Value, placeholders, textChange, stringSpan.Start, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (5)
CodeFixes\CodeFixServiceTests.vb (2)
226Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 251Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
InlineHints\AbstractInlineHintsTests.vb (2)
67Dim value = Await document.GetTextAsync().ConfigureAwait(False) 69Dim expectedText = Await expectedDocument.GetTextAsync().ConfigureAwait(False)
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (1)
671Dim text = Await document.GetTextAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.Extensions.Package (4)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (2)
AddPackage\AspNetCoreAddPackageCodeAction.cs (2)
45document, position, installPackageData.PackageNamespaceName, cancellationToken).ConfigureAwait(false); 63var updatedDocument = await AddImportAsync(document, position, generator, importDirective, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.Copilot (17)
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (16)
63return await GetAvailablePromptTitlesCoreAsync(document, 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); 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);
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 (1)
Rename\OmniSharpRenamer.cs (1)
26var resolution = await Renamer.RenameSymbolAsync(solution, symbol, newName, options.ToRenameOptions(), nonConflictSymbolsKeys, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (7)
Cohost\Handlers\CodeActions.cs (2)
56cancellationToken).ConfigureAwait(false); 61var operations = await codeActionToResolve.GetOperationsAsync(solution, CodeAnalysisProgress.None, 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);
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 (4)
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 (1)
55var location = await GetLocationAsync(document, item.SourceSpan, cancellationToken).ConfigureAwait(false);
Internal\XamlDiagnosticSource.cs (1)
28var diagnostics = await xamlDiagnosticSource.GetDiagnosticsAsync(xamlRequestContext, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (1149)
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 (4)
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))
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (2)
36await GetRelevantTypeFromHeaderAsync(context).ConfigureAwait(false) ?? 37await GetRelevantTypeFromMethodAsync(context).ConfigureAwait(false);
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
76var siblingBanner = await TryGetBannerAsync(siblingDocument, siblingRoot, cancellationToken).ConfigureAwait(false);
AddFileBanner\AbstractAddFileBannerNewDocumentFormattingProvider.cs (1)
37cancellationToken).ConfigureAwait(false);
AddImport\AbstractAddImportFeatureService.cs (7)
85packageSources, cancellationToken).ConfigureAwait(false); 109options, packageSources, cancellationToken).ConfigureAwait(false); 152var exactReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: true, cancellationToken).ConfigureAwait(false); 162var fuzzyReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: false, cancellationToken).ConfigureAwait(false); 211await finder.FindInAllSymbolsInStartingProjectAsync(exact, cancellationToken).ConfigureAwait(false)); 529packageSources, cancellationToken).ConfigureAwait(false); 558packageSources, cancellationToken).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, options, cancellationToken).ConfigureAwait(false);
AddImport\References\PackageReference.cs (1)
32document, node, options, cancellationToken).ConfigureAwait(false);
AddImport\References\Reference.cs (3)
94var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 114node, document, cancellationToken).ConfigureAwait(false); 117node, SearchResult.NameParts, document, options.AddImportOptions, cancellationToken).ConfigureAwait(false);
AddImport\References\SymbolReference.cs (4)
60contextNode, document, cancellationToken).ConfigureAwait(false); 64options.AddImportOptions, cancellationToken).ConfigureAwait(false); 79var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 111document, node, options, hasExistingImport, cancellationToken).ConfigureAwait(false);
AddImport\SearchScopes\AllSymbolsProjectSearchScope.cs (1)
28_project, searchQuery, filter, cancellationToken).ConfigureAwait(false);
AddImport\SymbolReferenceFinder.cs (12)
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);
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (4)
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);
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\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\AbstractChangeSignatureService.cs (10)
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); 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); 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);
ChangeSignature\ChangeSignatureCodeAction.cs (1)
35var changeSignatureResult = await _changeSignatureService.ChangeSignatureWithContextAsync(_context, changeSignatureOptions, 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 (13)
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); 305DiagnosticKind.All, cancellationToken).ConfigureAwait(false); 352document, textSpan, diagnosticId, severity, cancellationToken).ConfigureAwait(false); 361new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false); 570cancellationToken).ConfigureAwait(false); 734var fixes = await provider.GetFixesAsync(document, diagnosticsSpan, dxs, cancellationToken).ConfigureAwait(false); 737cancellationToken).ConfigureAwait(false);
CodeFixes\Service\CodeFixService.FixAllDiagnosticProvider.cs (4)
48document.Project, document.Id, _diagnosticIds, shouldIncludeAnalyzer: null, includeLocalDocumentDiagnostics: true, includeNonLocalDocumentDiagnostics: false, cancellationToken).ConfigureAwait(false)); 61DiagnosticKind.All, cancellationToken).ConfigureAwait(false)); 71project, documentId: null, _diagnosticIds, shouldIncludeAnalyzer: null, includeLocalDocumentDiagnostics: true, includeNonLocalDocumentDiagnostics: false, cancellationToken).ConfigureAwait(false)); 80project, _diagnosticIds, shouldIncludeAnalyzer: null, includeNonLocalDocumentDiagnostics: false, cancellationToken).ConfigureAwait(false));
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (12)
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); 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 (10)
151var codeFixes = await GetSuppressionsAsync(document, span, diagnostics, skipSuppressMessage: true, skipUnsuppress: true, cancellationToken: cancellationToken).ConfigureAwait(false); 158var suppressionTargetInfo = await GetSuppressionTargetInfoAsync(document, span, cancellationToken).ConfigureAwait(false); 165document, document.Project, diagnostics, suppressionTargetInfo, skipSuppressMessage, skipUnsuppress, cancellationToken).ConfigureAwait(false); 176var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 181cancellationToken).ConfigureAwait(false); 197var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 242var codeAction = await RemoveSuppressionCodeAction.CreateAsync(suppressionTargetInfo, documentOpt, project, diagnostic, this, cancellationToken).ConfigureAwait(false); 264var syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 271var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false); 287var semanticModel = await document.GetSemanticModelAsync(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 (2)
25var suppressionsDoc = await GetOrCreateSuppressionsDocumentAsync(cancellationToken).ConfigureAwait(false); 27var suppressionsRoot = await suppressionsDoc.GetSyntaxRootAsync(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 (5)
47document, span, [diagnostic], cancellationToken).ConfigureAwait(false); 92project, [diagnostic], cancellationToken).ConfigureAwait(false); 140var attributesToRemove = await GetAttributeNodesToFixAsync(attributeRemoveFixesForTree, 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)
28var suppressionFixes = await SuppressionFixProvider.GetFixesAsync(context.Document, context.Span, documentDiagnostics, context.CancellationToken).ConfigureAwait(false); 35var suppressionFixes = await SuppressionFixProvider.GetFixesAsync(context.Document.Project, projectDiagnostics, context.CancellationToken).ConfigureAwait(false);
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (6)
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);
CodeLens\CodeLensReferencesService.cs (11)
66symbol, solution, progress, documents: null, s_nonParallelSearch, progress.CancellationToken).ConfigureAwait(false); 68return await onResults(progress).ConfigureAwait(false); 75return await onCapped(progress).ConfigureAwait(false); 98maxSearchResults, cancellationToken).ConfigureAwait(false); 110var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 119var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true); 211var result = await Task.WhenAll(referenceTasks).ConfigureAwait(false); 214}, onCapped: null, searchCap: 0, cancellationToken: cancellationToken).ConfigureAwait(false); 253var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 269var result = await Task.WhenAll(descriptorTasks).ConfigureAwait(false); 280var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (5)
124newDocument, insertSpans, formattingOptions, 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\IAddMissingImportsFeatureService.cs (2)
38var analysisResult = await service.AnalyzeAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 40document, analysisResult, progressTracker, cancellationToken).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 (4)
52var typeDeclaration = await GetTypeDeclarationAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 58var typeDeclaration = await GetTypeDeclarationAsync(document, textSpan, 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 (8)
64var documentWithMovedType = await AddNewDocumentWithSingleTypeDeclarationAsync(newDocumentId).ConfigureAwait(false); 73var solutionWithBothDocumentsUpdated = await RemoveTypeFromSourceDocumentAsync(sourceDocument).ConfigureAwait(false); 75return await RemoveUnnecessaryImportsAsync(solutionWithBothDocumentsUpdated, sourceDocument.Id, documentWithMovedType.Id).ConfigureAwait(false); 121var documentEditor = await DocumentEditor.CreateAsync(document, CancellationToken).ConfigureAwait(false); 157modifiedRoot = await AddFinalNewLineIfDesiredAsync(document, modifiedRoot).ConfigureAwait(false); 167newDocument, FileName, document, this.CancellationToken).ConfigureAwait(false); 233var documentEditor = await DocumentEditor.CreateAsync(sourceDocument, CancellationToken).ConfigureAwait(false); 245updatedDocument = 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\SyncNamespace\AbstractChangeNamespaceService.cs (30)
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); 470document, refLocationsInCurrentDocument, oldNamespace, newNamespace, cancellationToken).ConfigureAwait(false); 497cancellationToken).ConfigureAwait(false); 512var referencedSymbols = await FindReferencesAsync(symbol, document, cancellationToken).ConfigureAwait(false); 530var referencedMethodSymbols = await FindReferencesAsync(methodSymbol, document, cancellationToken).ConfigureAwait(false); 547FindReferencesSearchOptions.Default, cancellationToken).ConfigureAwait(false); 588document, this, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false); 613cancellationToken).ConfigureAwait(false); 636return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false); 689document, changeNamespaceService, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false); 699cancellationToken).ConfigureAwait(false); 703documentWithAdditionalImports, Formatter.Annotation, documentOptions.FormattingOptions, cancellationToken).ConfigureAwait(false); 705return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false); 712var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 738var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false); 827cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.cs (1)
41var state = await State.CreateAsync(this, document, textSpan, cancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
88var applicableNode = await provider.TryGetApplicableInvocationNodeAsync(document, textSpan, 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 (3)
219var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 251var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 428cancellationToken).ConfigureAwait(false);
Completion\CompletionService_GetCompletions.cs (5)
73var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 88var additionalAugmentingProviders = await GetAugmentingProvidersAsync(document, triggeredProviders, caretPosition, trigger, options, cancellationToken).ConfigureAwait(false); 98document, caretPosition, trigger, options, completionListSpan, triggeredProviders, sharedContext, cancellationToken).ConfigureAwait(false); 117document, caretPosition, trigger, options, completionListSpan, augmentingProviders, sharedContext, cancellationToken).ConfigureAwait(false); 244provider, document, caretPosition, trigger, options, completionListSpan, sharedContext, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractAwaitCompletionProvider.cs (4)
88var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 168return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false); 187return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false); 199document, leftTokenPosition, "System.Threading.Tasks", 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)
39d => RecommendCompletionItemsAsync(d, context, cancellationToken)).ConfigureAwait(false)); 46var syntaxContext = (TContext)await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false); 47var keywords = await RecommendKeywordsAsync(document, position, syntaxContext, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (8)
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); 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)
53document, 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 (6)
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); 444: await GetSymbolsAsync(completionContext, syntaxContext, syntaxContext.Position, options, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\AbstractExtensionMethodImportCompletionProvider.cs (1)
60cancellationToken).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\AbstractTypeImportCompletionService.cs (3)
55var (getCacheResults, isPartialResult) = await GetCacheEntriesAsync(currentProject, syntaxContext.SemanticModel.Compilation, forceCacheCreation, cancellationToken).ConfigureAwait(false); 108var upToDateCacheEntry = await GetUpToDateCacheForProjectAsync(project, cancellationToken).ConfigureAwait(false); 165_ = await service.GetCacheEntriesAsync(project, compilation, forceCacheCreation: true, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (2)
89.ConfigureAwait(false); 109var extensionMethodSymbols = await symbolComputer.GetExtensionMethodSymbolsAsync(forceCacheCreation, hideAdvancedMembers, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (2)
75await GetUpToDateCacheEntryAsync(relevantProject, cancellationToken).ConfigureAwait(false); 144cacheEntry = await GetUpToDateCacheEntryAsync(project, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
154cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ImportCompletionProviderHelpers.cs (1)
47var formattedDocumentWithImport = await Formatter.FormatAsync(documentWithImport, Formatter.Annotation, formattingOptions, 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 (5)
26var (strippedDocument, position) = await GetDocumentWithoutInvokingTextAsync(document, SnippetCompletionItem.GetInvocationPosition(item), 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 (4)
187var symbols = await GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false); 188return await GetDescriptionForSymbolsAsync(item, document, symbols, options, cancellationToken).ConfigureAwait(false); 206return await CommonCompletionUtilities.CreateDescriptionAsync(services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false); 397return await CommonCompletionUtilities.CreateDescriptionAsync(document.Project.Solution.Services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (4)
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); 297localNameOpt: SyntaxGeneratorExtensions.OtherName, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
35var (anonymousNode, anonymousType) = await TryGetAnonymousObjectAsync(document, span, cancellationToken).ConfigureAwait(false);
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (3)
39var property = await GetPropertyAsync(context).ConfigureAwait(false); 99var fieldName = await GetFieldNameAsync(document, propertySymbol, cancellationToken).ConfigureAwait(false); 116var typeBlock = GetTypeBlock(await td.GetSyntaxAsync(cancellationToken).ConfigureAwait(false));
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.cs (1)
258analyzer.Features, convertToSwitchExpression, cancellationToken).ConfigureAwait(false);
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
36var queryExpression = await FindNodeToRefactorAsync(context).ConfigureAwait(false);
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (1)
122document, isVerbatimStringLiteral, pieces, cancellationToken).ConfigureAwait(false);
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (1)
125var (invocation, placeholderArgument) = await TryFindInvocationAsync().ConfigureAwait(false);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (17)
65document, textSpan, 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), 623containerToUpdate, cancellationToken).ConfigureAwait(false); 628containerToUpdate, cancellationToken).ConfigureAwait(false); 825localNameOpt: SyntaxGeneratorExtensions.OtherName, cancellationToken).ConfigureAwait(false);
Copilot\CopilotChangeAnalysisUtilities.cs (1)
57document, normalizedEdits, cancellationToken).ConfigureAwait(false);
Copilot\ICopilotChangeAnalysisService.cs (8)
77document, changes, cancellationToken).ConfigureAwait(false); 93var oldText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 118newDocument, newSpans, cancellationToken).ConfigureAwait(false); 124newDocument, newSpans, cancellationToken).ConfigureAwait(false); 190newDocument, newSpans, diagnosticKind, cancellationToken).ConfigureAwait(false); 228newDocument, span, diagnosticKind, cancellationToken).ConfigureAwait(false); 252var codeFixCollections = await ComputeCodeFixCollectionsAsync().ConfigureAwait(false); 277.ConfigureAwait(false);
Debugging\AbstractBreakpointResolver.cs (3)
102var members = await FindMembersAsync(nameParts, cancellationToken).ConfigureAwait(false); 137return FindMembers(await GetAllTypesAsync(cancellationToken).ConfigureAwait(false), nameParts[0]); 142var types = await GetAllTypesAsync(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 (1)
94var diagnostics = await _diagnosticAnalyzerService.ForceAnalyzeProjectAsync(project, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService.cs (1)
114document, range, shouldIncludeDiagnostic, priorityProvider, diagnosticKinds, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DocumentAnalysisExecutor.cs (14)
86: await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 88documentAnalyzer, textDocument, kind, _compilationWithAnalyzers?.HostCompilation, tree, cancellationToken).ConfigureAwait(false); 109var isEnabled = await textDocument.Project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false); 123AnalysisKind.Syntax => await GetSyntaxDiagnosticsAsync(analyzer, isCompilerAnalyzer, cancellationToken).ConfigureAwait(false), 124AnalysisKind.Semantic => await GetSemanticDiagnosticsAsync(analyzer, isCompilerAnalyzer, cancellationToken).ConfigureAwait(false), 129diagnostics = await RemapDiagnosticLocationsIfRequiredAsync(textDocument, diagnostics, cancellationToken).ConfigureAwait(false); 159analysisScope, _compilationWithAnalyzers, _logPerformanceInfo, getTelemetryInfo: false, cancellationToken).ConfigureAwait(false); 179var analysisResult = await GetAnalysisResultAsync(analysisScope, cancellationToken).ConfigureAwait(false); 206return await GetCompilerAnalyzerDiagnosticsAsync(analyzer, AnalysisScope.Span, cancellationToken).ConfigureAwait(false); 214var syntaxDiagnostics = await GetAnalysisResultAsync(analysisScope, cancellationToken).ConfigureAwait(false); 241var adjustedSpan = await GetAdjustedSpanForCompilerAnalyzerAsync().ConfigureAwait(false); 242return await GetCompilerAnalyzerDiagnosticsAsync(analyzer, adjustedSpan, cancellationToken).ConfigureAwait(false); 250var semanticDiagnostics = await GetAnalysisResultAsync(analysisScope, cancellationToken).ConfigureAwait(false); 368var diagnostic = await diagnosticData.ToDiagnosticAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (2)
94AnalysisKind.Syntax => await analyzer.AnalyzeSyntaxAsync(document, tree, cancellationToken).ConfigureAwait(false), 95AnalysisKind.Semantic => await analyzer.AnalyzeSemanticsAsync(document, tree, cancellationToken).ConfigureAwait(false),
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (8)
37var result = await ComputeDiagnosticsForAnalyzersAsync(analyzers).ConfigureAwait(false); 42result = await RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync(result).ConfigureAwait(false); 56var projectLoadedSuccessfully = await project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false); 100project, compilationWithAnalyzers, logPerformanceInfo: false, getTelemetryInfo: true, cancellationToken).ConfigureAwait(false); 109return await MergeProjectDiagnosticAnalyzerDiagnosticsAsync(ideAnalyzers, result).ConfigureAwait(false); 132? await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false) 134var syntaxDiagnostics = await DocumentAnalysisExecutor.ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(documentAnalyzer, textDocument, AnalysisKind.Syntax, compilation, tree, cancellationToken).ConfigureAwait(false); 135var semanticDiagnostics = await DocumentAnalysisExecutor.ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(documentAnalyzer, textDocument, AnalysisKind.Semantic, compilation, tree, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (6)
64var changedMemberAndIdAndSpansAndDocument = await TryGetChangedMemberAsync(document, root, cancellationToken).ConfigureAwait(false); 69return await ComputeDocumentDiagnosticsCoreAsync(executor, cancellationToken).ConfigureAwait(false); 76var oldDocumentVersion = await GetDiagnosticVersionAsync(oldDocument.Project, cancellationToken).ConfigureAwait(false); 105return await ComputeDocumentDiagnosticsCoreAsync(executor, cancellationToken).ConfigureAwait(false); 109var oldMemberSpans = await GetOrCreateMemberSpansAsync(oldDocument, oldDocumentVersion, cancellationToken).ConfigureAwait(false); 178var diagnostics = await ComputeDocumentDiagnosticsForAnalyzerCoreAsync(analyzer, executor, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer_MemberSpans.cs (1)
37var memberSpans = await CreateMemberSpansAsync(document, version, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (3)
49var hostAnalyzerInfo = await GetOrCreateHostAnalyzerInfoAsync(solution, project, cancellationToken).ConfigureAwait(false); 50var projectAnalyzerInfo = await GetOrCreateProjectAnalyzerInfoAsync(solution, project, cancellationToken).ConfigureAwait(false); 57var projectAnalyzerInfo = await GetOrCreateProjectAnalyzerInfoAsync(solution, project, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (1)
58=> TryGetProjectAnalyzerInfo(project) ?? await UpdateProjectAnalyzerInfoAsync(solution, project, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (5)
65solution.SolutionState, project.State, cancellationToken).ConfigureAwait(false); 67solution.SolutionState, project.State, cancellationToken).ConfigureAwait(false); 70var result = await GetOrComputeDiagnosticAnalysisResultsAsync(analyzers).ConfigureAwait(false); 131project, analyzers, hostAnalyzerInfo, AnalyzerService.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false); 134compilation, project, [.. analyzers.OfType<DocumentDiagnosticAnalyzer>()], cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (11)
33var diagnostics = await ComputeDocumentDiagnosticsForAnalyzerCoreAsync(analyzer, executor, cancellationToken).ConfigureAwait(false); 47var diagnostics = await executor.ComputeDiagnosticsAsync(analyzer, cancellationToken).ConfigureAwait(false); 65.ConfigureAwait(false); 68var hostAnalyzerInfo = await _stateManager.GetOrCreateHostAnalyzerInfoAsync(solutionState, project.State, cancellationToken).ConfigureAwait(false); 78document.Project, analyzers, hostAnalyzerInfo, AnalyzerService.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false); 214if (await TryDeprioritizeAnalyzerAsync(analyzer, kind, span).ConfigureAwait(false)) 227var hostAnalyzerInfo = await _stateManager.GetOrCreateHostAnalyzerInfoAsync(solutionState, project.State, cancellationToken).ConfigureAwait(false); 233var version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false); 244cancellationToken).ConfigureAwait(false); 250diagnosticsMap = await ComputeDocumentDiagnosticsCoreAsync(executor, cancellationToken).ConfigureAwait(false); 287if (!await IsCandidateForDeprioritizationBasedOnRegisteredActionsAsync(analyzer).ConfigureAwait(false))
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (5)
48box = new(await ComputeForceAnalyzeProjectAsync().ConfigureAwait(false)); 79var allAnalyzers = await _stateManager.GetOrCreateAnalyzersAsync(solutionState, projectState, cancellationToken).ConfigureAwait(false); 80var hostAnalyzerInfo = await _stateManager.GetOrCreateHostAnalyzerInfoAsync(solutionState, projectState, cancellationToken).ConfigureAwait(false); 88project, fullSolutionAnalysisAnalyzers, hostAnalyzerInfo, AnalyzerService.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false); 91compilationWithAnalyzers, project, [.. fullSolutionAnalysisAnalyzers.OfType<DocumentDiagnosticAnalyzer>()], cancellationToken).ConfigureAwait(false);
Diagnostics\Service\EngineV2\InProcOrRemoteHostAnalyzerRunner.cs (3)
60var result = await AnalyzeCoreAsync().ConfigureAwait(false); 72logPerformanceInfo, getTelemetryInfo, cancellationToken).ConfigureAwait(false); 76client: null, logPerformanceInfo, getTelemetryInfo, cancellationToken).ConfigureAwait(false);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (8)
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 (3)
575var capabilities = new EditAndContinueCapabilitiesGrantor(await lazyCapabilities.GetValueAsync(cancellationToken).ConfigureAwait(false)); 576var oldActiveStatementMap = await lazyOldActiveStatementMap.GetValueAsync(cancellationToken).ConfigureAwait(false); 651cancellationToken).ConfigureAwait(false);
EditAndContinue\CommittedSolution.cs (2)
249var sourceTextVersion = (committedDocument == null) ? await document.GetTextVersionAsync(cancellationToken).ConfigureAwait(false) : default; 376return await Task.Run(() => TryGetPdbMatchingSourceTextFromDisk(log, filePath, sourceText.Encoding, requiredChecksum, checksumAlgorithm), cancellationToken).ConfigureAwait(false);
EditAndContinue\DebuggingSession.cs (6)
467var (mvid, _) = await GetProjectModuleIdAsync(project, cancellationToken).ConfigureAwait(false); 473var (oldDocument, oldDocumentState) = await LastCommittedSolution.GetDocumentAndStateAsync(document, cancellationToken).ConfigureAwait(false); 730var baseActiveStatements = await EditSession.BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 788var (oldDocument, _) = await LastCommittedSolution.GetDocumentAndStateAsync(newDocument, cancellationToken).ConfigureAwait(false); 895var baseActiveStatements = await EditSession.BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 920var (oldUnmappedDocument, _) = await LastCommittedSolution.GetDocumentAndStateAsync(newUnmappedDocument, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (4)
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);
EditAndContinue\EditAndContinueService.cs (1)
155initialDocumentStates = await CommittedSolution.GetMatchingDocumentsAsync(Log, documentsByProject, _compilationOutputsProvider, sourceTextProvider, cancellationToken).ConfigureAwait(false);
EditAndContinue\EditSession.cs (11)
133var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false); 560var (oldDocument, oldDocumentState) = await DebuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(newDocument, cancellationToken, reloadOutOfSyncDocument: true).ConfigureAwait(false); 932var (mvid, mvidReadError) = await DebuggingSession.GetProjectModuleIdAsync(newProject, cancellationToken).ConfigureAwait(false); 967await AnalyzeDocumentsAsync(solution, documentDifferences, solutionActiveStatementSpanProvider, projectDiagnostics, cancellationToken).ConfigureAwait(false); 1012var moduleBlockingDiagnosticId = await ReportModuleDiagnosticsAsync(mvid, oldProject, newProject, changedDocumentAnalyses, projectDiagnostics, cancellationToken).ConfigureAwait(false); 1039var oldCompilation = await oldProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 1055var newCompilation = await newProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 1060var oldActiveStatementsMap = await BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false); 1071var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false); 1133var unsupportedChangesDiagnostic = await GetUnsupportedChangesDiagnosticAsync(emitResult, cancellationToken).ConfigureAwait(false); 1227Telemetry.LogRuntimeCapabilities(await Capabilities.GetValueAsync(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 (14)
47var fields = await GetFieldsAsync(document, span, cancellationToken).ConfigureAwait(false); 60var fields = await GetFieldsAsync(document, span, 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); 263cancellationToken).ConfigureAwait(false); 271cancellationToken).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);
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 (2)
45return await GetSourceLocationInProcessAsync(project, query, 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.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 (5)
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);
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);
ExtractMethod\AbstractExtractMethodService.cs (1)
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 (6)
73OriginalSelectionResult, analyzeResult, insertionPointNode, cancellationToken).ConfigureAwait(false); 75var triviaResult = await PreserveTriviaAsync(analyzedDocument.Root, cancellationToken).ConfigureAwait(false); 81var generatedCode = await generator.GenerateAsync(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)
40documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false); 129cancellationToken).ConfigureAwait(false);
FindUsages\AbstractFindUsagesService_FindImplementations.cs (9)
29document, position, 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 (4)
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);
FindUsages\DefinitionItem.cs (2)
152var location = await GetNavigableLocationAsync(workspace, cancellationToken).ConfigureAwait(false); 154await location.NavigateToAsync(options, cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (2)
51symbol, project, cancellationToken).ConfigureAwait(false); 57return await SourceSpans[0].GetNavigableLocationAsync(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 (1)
49document = await provider.FormatNewDocumentAsync(document, hintDocument, options, cancellationToken).ConfigureAwait(false);
FullyQualify\AbstractFullyQualifyService.cs (7)
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); 213var textChanges = await ProcessNodeAsync(document, simpleName, containerName, symbolResult.OriginalSymbol, cancellationToken).ConfigureAwait(false); 220var newRoot = await ReplaceNodeAsync(simpleName, containerName, originalSymbol.IsType, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (2)
98cancellationToken: cancellationToken).ConfigureAwait(false); 100return await AddNavigationAnnotationAsync(result, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (7)
103priorDocument, action, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false); 113priorDocument.Project.Solution, codeAction, 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); 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 (4)
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);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (6)
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); 121newDocument = await ImportAdder.AddImportsFromSymbolAnnotationAsync(newDocument, addImportOptions, cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (4)
61var actions = await GenerateEqualsAndGetHashCodeFromMembersAsync(document, textSpan, cancellationToken).ConfigureAwait(false); 118hasEquals, hasGetHashCode, withDialog: true, globalOptions, cancellationToken).ConfigureAwait(false); 176var info = await GetSelectedMemberInfoAsync(document, textSpan, allowPartialSelection: false, cancellationToken).ConfigureAwait(false); 192hasEquals, hasGetHashCode, withDialog: false, globalOptions: null, cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
83return await action.GetOperationsAsync(solution, progressTracker, cancellationToken).ConfigureAwait(false);
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (2)
57var syntaxTree = await _document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 80cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.CodeAction.cs (2)
71return await editor.GetOperationsAsync().ConfigureAwait(false); 180operations = await editor.GetOperationsAsync().ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.cs (1)
273var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (19)
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); 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); 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 (2)
51var mapping = await mappingService.MapSymbolAsync(document, symbol, cancellationToken).ConfigureAwait(false); 60var explicitlyDeclaredSymbol = await FindRelatedExplicitlyDeclaredSymbolAsync(project, symbol, cancellationToken).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);
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
64cancellationToken).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 (6)
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);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (5)
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);
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (2)
100document, selectedParameter, parameter, functionDeclaration, methodSymbol, blockStatementOpt, cancellationToken).ConfigureAwait(false); 121listOfPotentiallyValidParametersNodes.ToImmutable(), selectedParameter.Span, cancellationToken).ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (5)
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); 298.ConfigureAwait(false);
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (3)
319cancellationToken).ConfigureAwait(false); 365cancellationToken).ConfigureAwait(false); 442.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 (4)
96var actions = await GetActionsAsync(document, expression, methodSymbol, containingMethod, cancellationToken).ConfigureAwait(false); 150document, expression, cancellationToken).ConfigureAwait(false); 157var methodCallSites = await FindCallSitesAsync(document, methodSymbol, cancellationToken).ConfigureAwait(false); 282documents: null, FindReferencesSearchOptions.Default, cancellationToken).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 (2)
200document, declarationStatement, statementsToSurround, usingStatement, surroundingStatements, declarationStatementIndex, cancellationToken).ConfigureAwait(false); 235document, expressionStatement, statementsToSurround, usingStatement, surroundingStatements, statementIndex, cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (4)
34var expressionStatement = await GetExpressionStatementAsync(context).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 (2)
72var state = await State.GenerateAsync((TService)this, semanticDocument, options, textSpan, cancellationToken).ConfigureAwait(false); 454.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 (1)
52if (!await state.TryInitializeAsync(document, textSpan, cancellationToken).ConfigureAwait(false))
InvertConditional\AbstractInvertConditionalCodeRefactoringProvider.cs (1)
24var conditional = await FindConditionalAsync(document, span, cancellationToken).ConfigureAwait(false);
InvertLogical\AbstractInvertLogicalCodeRefactoringProvider.cs (2)
94var document2 = await InvertInnerExpressionAsync(document1, binaryExpression, cancellationToken).ConfigureAwait(false); 95var document3 = await InvertOuterExpressionAsync(document2, cancellationToken).ConfigureAwait(false);
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (5)
541var parts = await GetFieldPartsAsync(symbol).ConfigureAwait(false); 563var initializerParts = await GetInitializerSourcePartsAsync(symbol).ConfigureAwait(false); 582var parts = await GetLocalPartsAsync(symbol).ConfigureAwait(false); 595var initializerParts = await GetInitializerSourcePartsAsync(symbol).ConfigureAwait(false); 652var initializerParts = await GetInitializerSourcePartsAsync(symbol).ConfigureAwait(false);
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (3)
30var parts = await ToDescriptionPartsAsync(semanticModel, position, symbols, options, groups, cancellationToken).ConfigureAwait(false); 42return await builder.BuildDescriptionAsync(symbols, groups).ConfigureAwait(false); 54return await builder.BuildDescriptionSectionsAsync(symbols).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 (6)
105var infoKey = await GetUniqueDocumentKeyAsync(sourceProject, topLevelNamedType, signaturesOnly: !useDecompiler, cancellationToken).ConfigureAwait(false); 207navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, temporaryDocument, cancellationToken).ConfigureAwait(false); 211navigateLocation ??= await RelocateSymbol_NoLockAsync(metadataSolution, fileInfo, symbolId, cancellationToken).ConfigureAwait(false); 261return await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, document, cancellationToken).ConfigureAwait(false); 268return await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, temporaryDocument, cancellationToken).ConfigureAwait(false); 368var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
MetadataAsSource\MetadataAsSourceFileService.cs (1)
108var result = await provider.GetGeneratedFileAsync(_workspace, sourceWorkspace, sourceProject, symbol, signaturesOnly, options, providerTempPath, telemetryMessage, cancellationToken).ConfigureAwait(false);
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
30var selectedMemberNodes = await GetSelectedNodesAsync(context).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (11)
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); 239cancellationToken).ConfigureAwait(false); 266var docEditor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false); 362: await SymbolFinder.FindReferencesAsync(resolvedMember, solution, cancellationToken).ConfigureAwait(false);
MoveToNamespace\AbstractMoveToNamespaceService.cs (9)
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); 103var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false); 154var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false); 220var memberSymbols = await GetMemberSymbolsAsync(document, container, cancellationToken).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);
MoveToNamespace\MoveToNamespaceCodeAction.cs (1)
51cancellationToken).ConfigureAwait(false);
NameTupleElement\AbstractNameTupleElementCodeRefactoringProvider.cs (2)
25var (_, argument, elementName) = await TryGetArgumentInfoAsync(document, span, cancellationToken).ConfigureAwait(false); 84var (root, argument, elementName) = await TryGetArgumentInfoAsync(document, span, cancellationToken).ConfigureAwait(false);
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
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.NormalSearch.cs (1)
96var relatedDocuments = await GetRelatedDocumentsAsync().ConfigureAwait(false);
NavigateTo\INavigateToSearcherHost.cs (1)
66var isProjectSystemFullyLoaded = await service.IsFullyLoadedAsync(cancellationToken).ConfigureAwait(false);
Navigation\AbstractNavigableItemsService.cs (4)
32await GetSymbolAsync(document.WithFrozenPartialSemantics(cancellationToken)).ConfigureAwait(false) ?? 33await GetSymbolAsync(document).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 (1)
39var items = await GetItemsInCurrentProcessAsync(document, supportsCodeGeneration, cancellationToken).ConfigureAwait(false);
OrganizeImports\OrganizeImportsCodeRefactoringProvider.cs (2)
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 (3)
185using var documentDebugInfoReader = await _pdbFileLocatorService.GetDocumentDebugInfoReaderAsync(dllPath, options.AlwaysUseDefaultSymbolServers, telemetryMessage, cancellationToken).ConfigureAwait(false); 259var sourceFileInfos = await Task.WhenAll(sourceFileInfoTasks).ConfigureAwait(false); 289var 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 (7)
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); 387destinationDocument = await Formatter.FormatAsync(destinationDocument, s_removableImportAnnotation, options.CleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
QuickInfo\CommonQuickInfoProvider.cs (6)
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); 77return await BuildQuickInfoAsync(context, token).ConfigureAwait(false); 90return await BuildQuickInfoAsync(context, token).ConfigureAwait(false);
QuickInfo\CommonSemanticQuickInfoProvider.cs (5)
26var (tokenInformation, supportedPlatforms) = await ComputeQuickInfoDataAsync(context, token).ConfigureAwait(false); 33var onTheFlyDocsInfo = await GetOnTheFlyDocsInfoAsync(context, cancellationToken).ConfigureAwait(false); 35services, semanticModel, token, tokenInformation, supportedPlatforms, context.Options, onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false); 47context.Services, context.SemanticModel, token, tokenInformation, supportedPlatforms: null, context.Options, onTheFlyDocsInfo: null, context.CancellationToken).ConfigureAwait(false); 59return await ComputeFromLinkedDocumentsAsync(context, token, linkedDocumentIds).ConfigureAwait(false);
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
143document, relatedSpan, context.ClassificationOptions, includeAdditiveSpans: false, cancellationToken).ConfigureAwait(false);
QuickInfo\QuickInfoUtilities.cs (1)
42var groups = await descriptionService.ToDescriptionGroupsAsync(semanticModel, span.Start, symbols, options, 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 (4)
116var triggerToken = await GetTriggerTokenAsync(document, position, cancellationToken).ConfigureAwait(false); 120return await GetRenameInfoAsync(document, triggerToken, cancellationToken).ConfigureAwait(false); 162var symbol = await RenameUtilities.TryGetRenamableSymbolAsync(document, triggerToken.SpanStart, cancellationToken: cancellationToken).ConfigureAwait(false); 175semanticModel, triggerToken.SpanStart, document.Project.Solution.Services, cancellationToken: cancellationToken).ConfigureAwait(false);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (15)
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); 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\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (11)
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); 297var definitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, references, cancellationToken).ConfigureAwait(false); 305desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false); 324var syntax = await definition.DeclaringSyntaxReferences[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false); 353updatedSolution, semanticModel.Compilation, documentId, originalDefinitions, cancellationToken).ConfigureAwait(false); 402var declaration = await GetPropertyDeclarationAsync(property, cancellationToken).ConfigureAwait(false); 419return await reference.GetSyntaxAsync(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 (3)
89cancellationToken).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);
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)
48var simplifiedTypeName = await GetSimplifiedTypeNameAtSpanAsync(documentWithFullyQualifiedTypeName, updatedTextSpan, simplifierOptions, cancellationToken).ConfigureAwait(false); 58var typeSymbol = await GetEnumSymbolAsync(document, switchExpressionLocation, cancellationToken).ConfigureAwait(false); 72var simplifiedTypeName = await GetSimplifiedEnumNameAsync(document, fullyQualifiedEnumName, enumFields.First().Name, caseGenerationLocation, simplifierOptions, cancellationToken).ConfigureAwait(false); 133var (documentWithFullyQualified, fullyQualifiedTypeLocation) = await GetDocumentWithEnumCaseAsync(document, fullyQualifiedTypeName, firstEnumMemberName, caseGenerationLocation, cancellationToken).ConfigureAwait(false); 136var simplifiedEnum = await GetSimplifiedTypeNameAtSpanAsync(documentWithFullyQualified, fullyQualifiedTypeLocation, simplifierOptions, cancellationToken).ConfigureAwait(false); 155var simplifiedDocument = await Simplifier.ReduceAsync(documentWithAnnotations, simplifierOptions, 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 (12)
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); 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 (3)
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 (2)
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 (2)
37var attribute = await GetObsoleteAttributeAsync(document, 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 (5)
92? await FindMethodDeclarationReferencesAsync(invocationDocument, method, cancellationToken).ConfigureAwait(false) 154solution = await AddConstructorAssignmentsAsync(solution).ConfigureAwait(false); 160var finalSolution = await TryAddConstructorAssignmentsAsync(rewrittenSolution).ConfigureAwait(false); 202cancellationToken).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 (3)
46=> document.WithSyntaxRoot(await GetTransformedSyntaxRootAsync(document, cancellationToken).ConfigureAwait(false)); 54return await GetTransformedSyntaxRootAsync(generator.SyntaxFacts, FileHeaderHelper, newLineTrivia, document, fileHeaderTemplate: null, cancellationToken).ConfigureAwait(false); 234return await this.GetTransformedDocumentAsync(document, context.CancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
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\GenerateDefaultConstructorsCodeAction.cs (1)
39cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
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 (1)
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 (1)
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 (1)
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 (4)
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))
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 (2)
75var data = await TryGetDataAsync(document, classNode, classIdentifier, cancellationToken).ConfigureAwait(false); 79return await data.ImplementAbstractClassAsync(throughMember: null, canDelegateAllMembers: null, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (2)
58return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false); 100return await generator.ImplementInterfaceAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (1)
97cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (4)
47document, this.Service.SyntaxFormatting, State.ClassOrStructType, cancellationToken).ConfigureAwait(false); 56cancellationToken).ConfigureAwait(false); 85return await AddFinalizerCommentAsync(docWithAllMembers, finalizer, cancellationToken).ConfigureAwait(false); 234SymbolKind.Field, Accessibility.Private, 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 (4)
121? await RenameThenAddAsyncTokenAsync(keepVoid, document, node, methodSymbol, knownTypes, cancellationToken).ConfigureAwait(false) 122: await AddAsyncTokenAsync(keepVoid, document, methodSymbol, knownTypes, node, cancellationToken).ConfigureAwait(false); 169var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false); 177return await AddAsyncTokenAsync(keepVoid, newDocument, newMethod, knownTypes, newNode, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (8)
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); 90return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, 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); 91newSolution = 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\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
56var newDocument = await RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (10)
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); 861if (await TryRemoveUnusedLocalAsync(declStatement, originalDeclStatement).ConfigureAwait(false)) 901if (await IsLocalDeclarationWithNoReferencesAsync(newDecl, document, cancellationToken).ConfigureAwait(false)) 924var referencedSymbols = await SymbolFinder.FindReferencesAsync(local, document.Project.Solution, 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 (1)
72return await StackTraceExplorerUtilities.GetDefinitionAsync(solution, parsedFrame.Root, symbolPart, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerUtilities.cs (4)
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); 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);
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 (1)
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);
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (8)
94return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false); 106diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false); 148cancellationToken).ConfigureAwait(false); 264var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 281newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 282newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false); 382document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false); 387document, codeCleanupOptions, cancellationToken).ConfigureAwait(false);
UseAutoProperty\UseAutoPropertyFixAllProvider.cs (1)
58var documentToDiagnostics = await FixAllContextHelper.GetDocumentDiagnosticsToFixAsync(currentContext).ConfigureAwait(false);
ValueTracking\ValueTracker.cs (7)
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); 171documents: null, FindReferencesSearchOptions.Default, cancellationToken).ConfigureAwait(false); 185documents: null, FindReferencesSearchOptions.Default, cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTracker.OperationCollector.cs (2)
62var childrenVisited = await TryVisitChildrenAsync(operation, cancellationToken).ConfigureAwait(false); 178cancellationToken: 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 (1)
59document, position, node, options, containsSyntaxError, 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),
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer (4)
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 (164)
Extensions\ProtocolConversions.cs (6)
147var insertionChar = await GetInsertionCharacterAsync(document, position, cancellationToken).ConfigureAwait(false); 377documentSpan.Document, documentSpan.SourceSpan, isStale: false, cancellationToken).ConfigureAwait(false); 419var mappedResults = await GetMappedSpanResultAsync(oldDocument, [.. textChanges.Select(tc => tc.Span)], cancellationToken).ConfigureAwait(false); 474var result = await GetMappedSpanResultAsync(document, [textSpan], cancellationToken).ConfigureAwait(false); 476return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false); 480return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false);
ExternalAccess\Razor\FormatNewFileHandler.cs (1)
64return await GetFormattedNewFileContentAsync(document, cancellationToken).ConfigureAwait(false);
ExternalAccess\Razor\SemanticTokensRangesHandler.cs (1)
43_globalOptions, _semanticTokenRefreshQueue, request.Ranges, context, cancellationToken).ConfigureAwait(false);
ExternalAccess\Razor\SimplifyMethodHandler.cs (3)
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);
Features\CodeCleanup\AbstractCodeCleanupService.cs (10)
41thirdPartyDiagnosticIdsAndTitles = await GetThirdPartyDiagnosticIdsAndTitlesAsync(document, cancellationToken).ConfigureAwait(false); 65document, enabledDiagnostics.Diagnostics, progressTracker, cancellationToken).ConfigureAwait(false); 70document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false); 78document, enabledDiagnostics.OrganizeUsings, cancellationToken).ConfigureAwait(false); 89document = await Formatter.FormatAsync(document, formattingOptions, cancellationToken).ConfigureAwait(false); 97document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false); 140document, diagnosticSet.DiagnosticIds, diagnosticSet.IsAnyDiagnosticIdExplicitlyEnabled, progressTracker, cancellationToken).ConfigureAwait(false); 161document, diagnosticId, minimumSeverity, progressTracker, cancellationToken).ConfigureAwait(false); 184new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false); 229document, diagnosticId, DiagnosticSeverity.Warning, progressTracker, cancellationToken).ConfigureAwait(false);
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
42var compileTimeDocument = await CompileTimeSolutionProvider.TryGetCompileTimeDocumentAsync(designTimeDocument, compileTimeSolution, cancellationToken).ConfigureAwait(false);
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (9)
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)); 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 (1)
61var tree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Handler\CodeActions\CodeActionFixAllResolveHandler.cs (2)
51cancellationToken).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 (1)
90var syntaxVersion = await document.GetSyntaxVersionAsync(cancellationToken).ConfigureAwait(false);
Handler\CodeLens\CodeLensResolveHandler.cs (1)
39var currentDocumentSyntaxVersion = await document.GetSyntaxVersionAsync(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)
79lspCompletionItems.Add(await CreateLSPCompletionItemAsync(item, typedText).ConfigureAwait(false)); 130cancellationToken).ConfigureAwait(false); 338cancellationToken).ConfigureAwait(false); 518var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, item, cancellationToken).ConfigureAwait(false); 534var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false); 536var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 557return await completionService.GetChangeAsync(document, completionItem, cancellationToken: cancellationToken).ConfigureAwait(false); 594document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false); 607roslynItem, document, completionService, cancellationToken).ConfigureAwait(false); 613document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: false, cancellationToken).ConfigureAwait(false); 643document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false); 662var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 664document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: true, cancellationToken).ConfigureAwait(false); 682var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false); 687var 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\Definitions\AbstractGoToDefinitionHandler.cs (3)
53var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 71cancellationToken).ConfigureAwait(false); 79var symbol = await SymbolFinder.FindSymbolAtPositionAsync(semanticModel, position, document.Project.Solution.Services, includeType: true, 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)
155var namedDiagnostics = await source.GetDiagnosticsAsync(context, cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (1)
69var result = await lazyDiagnostics.GetValueAsync(cancellationToken).ConfigureAwait(false);
Handler\Diagnostics\DiagnosticsPullCache.cs (2)
38return (state.GlobalStateVersion, await state.Project.GetDependentVersionAsync(cancellationToken).ConfigureAwait(false)); 49var diagnostics = await state.DiagnosticSource.GetDiagnosticsAsync(state.Context, cancellationToken).ConfigureAwait(false);
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
41var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(options, document, cancellationToken).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 (3)
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);
Handler\Hover\HoverHandler.cs (4)
78.ConfigureAwait(false); 83document, position, options, supportsVSExtensions, supportsMarkdown, cancellationToken).ConfigureAwait(false); 102? await CreateVsHoverAsync(document, info, options, cancellationToken).ConfigureAwait(false) 103: await CreateDefaultHoverAsync(document, info, supportsMarkdown, cancellationToken).ConfigureAwait(false);
Handler\InlayHint\InlayHintHandler.cs (2)
53var hints = await CalculateInlayHintsAsync(document, range, options, displayAllOverride, cancellationToken).ConfigureAwait(false); 54var syntaxVersion = await document.GetSyntaxVersionAsync(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 (1)
55var simplifiedTypeName = await SnippetFunctionService.GetSimplifiedTypeNameAsync(documentWithSnippet, fieldSpan, FunctionParam, simplifierOptions, cancellationToken).ConfigureAwait(false);
Handler\MapCode\MapCodeHandler.cs (4)
48var mappingResult = await MapCodeAsync(codeMapping).ConfigureAwait(false); 95cancellationToken).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 (5)
74cheapVersion = await cache.ComputeCheapVersionAsync(state, cancellationToken).ConfigureAwait(false); 86expensiveVersion = await cache.ComputeExpensiveVersionAsync(state, cancellationToken).ConfigureAwait(false); 96cheapVersion = await cache.ComputeCheapVersionAsync(state, cancellationToken).ConfigureAwait(false); 97expensiveVersion = await cache.ComputeExpensiveVersionAsync(state, cancellationToken).ConfigureAwait(false); 101var data = await cache.ComputeDataAsync(state, cancellationToken).ConfigureAwait(false);
Handler\PullHandlers\VersionedPullCache.cs (3)
79var isFullyLoaded = await IsFullyLoadedAsync(project.Solution, cancellationToken).ConfigureAwait(false); 87this, previousResult, isFullyLoaded, state, project.Language, cancellationToken).ConfigureAwait(false); 98var 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 (6)
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);
Handler\RelatedDocuments\RelatedDocumentsHandler.cs (1)
65var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Rename\PrepareRenameHandler.cs (2)
33var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 40var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Rename\RenameHandler.cs (2)
36var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false); 81textDiffService, cancellationToken).ConfigureAwait(false);
Handler\RequestContext.cs (2)
270(workspace, solution, document) = await lspWorkspaceManager.GetLspDocumentInfoAsync(textDocument, cancellationToken).ConfigureAwait(false); 275(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 (4)
38var text = await contextDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 49var tokensData = await HandleRequestHelperAsync(contextDocument, spans.MoveToImmutable(), supportsVisualStudioExtensions, options, cancellationToken).ConfigureAwait(false); 76cancellationToken).ConfigureAwait(false); 128document, textSpans, options, includeAdditiveSpans: true, cancellationToken).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensRangeHandler.cs (1)
38_globalOptions, _semanticTokenRefreshQueue, [request.Range], context, cancellationToken).ConfigureAwait(false);
Handler\SignatureHelp\SignatureHelpHandler.cs (1)
45var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false);
Handler\SourceGenerators\SourceGeneratedDocumentCache.cs (1)
24var dependentVersion = await state.Document.Project.GetDependentVersionAsync(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\Symbols\WorkspaceSymbolsHandler.cs (1)
90document, 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)
230var updatedSolutions = await GetLspSolutionsAsync(cancellationToken).ConfigureAwait(false); 249var lspSolutions = await GetLspSolutionsAsync(cancellationToken).ConfigureAwait(false); 328var (lspSolution, isForked) = await GetLspSolutionForWorkspaceAsync(workspace, cancellationToken).ConfigureAwait(false); 388var doesAllTextMatch = await DoesAllTextMatchWorkspaceSolutionAsync(documentsInWorkspace, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (153)
Completion\CompletionFeaturesTests.cs (2)
597var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 890var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionResolveTests.cs (16)
63label: "A").ConfigureAwait(false); 69testLspServer, clientCompletionItem).ConfigureAwait(false); 85var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "A").ConfigureAwait(false); 91testLspServer, clientCompletionItem).ConfigureAwait(false); 109var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "M()").ConfigureAwait(false); 111testLspServer, clientCompletionItem).ConfigureAwait(false); 153label: "M()").ConfigureAwait(false); 156testLspServer, clientCompletionItem).ConfigureAwait(false); 245label: "AMethod").ConfigureAwait(false); 263clientCompletionItem).ConfigureAwait(false); 306label: "AMethod").ConfigureAwait(false); 321clientCompletionItem).ConfigureAwait(false); 338var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "(byte)").ConfigureAwait(false); 341testLspServer, clientCompletionItem).ConfigureAwait(false); 361var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "svm").ConfigureAwait(false); 366testLspServer, clientCompletionItem).ConfigureAwait(false);
Completion\CompletionTests.cs (44)
100var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 151var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 180var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 214var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 253var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 281var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 359var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 388var results = (LSP.VSInternalCompletionList)await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 418var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 443var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 479var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 516var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 553var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 607var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 639await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 645await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 653await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 663await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 698var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 726var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 754var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 780var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 830var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 884var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 938var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 951results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1004var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1017results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1070var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1082results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1094results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1107results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1165var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1176results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1228var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1288var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1305results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1320results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1352var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1404var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1417results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1443var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1498var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false); 1526var results = await RunGetCompletionsAsync(testLspServer, completionParams).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 (13)
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); 1419await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1625await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1707await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1732results = await RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, previousResults: previousResultIds).ConfigureAwait(false); 1781await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1849await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1912await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 1968await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false); 2012await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (3)
37var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.DocumentUri).ConfigureAwait(false); 88var solution = await GetLSPSolutionAsync(testLspServer, caretLocation.DocumentUri).ConfigureAwait(false); 102var (_, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new TextDocumentIdentifier { DocumentUri = uri }, CancellationToken.None).ConfigureAwait(false);
HandlerTests.cs (1)
296await 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); 265expectedLocation).ConfigureAwait(false); 332expectedLocation).ConfigureAwait(false); 386expectedLocation).ConfigureAwait(false); 423expectedLocation).ConfigureAwait(false); 465expectedLocation).ConfigureAwait(false); 498expectedLocation).ConfigureAwait(false); 526expectedLocation).ConfigureAwait(false); 626expectedLocation).ConfigureAwait(false);
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
77var hover = await RunGetHoverAsync(testLspServer, caret).ConfigureAwait(false); 327var (lspWorkspace, _, _) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = fileUri }, CancellationToken.None).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 (4)
122var results = await RunGetDocumentSpellCheckSpansAsync(testLspServer, document.GetURI()).ConfigureAwait(false); 136results = await RunGetDocumentSpellCheckSpansAsync(testLspServer, document.GetURI(), results.Single().ResultId).ConfigureAwait(false); 590CancellationToken.None).ConfigureAwait(false); 611CancellationToken.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);
Workspaces\LspWorkspaceManagerTests.cs (37)
38var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 44(_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 51var (_, closedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 90var (_, firstDocumentWithChange) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false); 91var (_, secondDocumentUnchanged) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false); 125var (_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false); 130(_, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false); 163(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 196(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 230var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false); 255var (miscWorkspace, miscDocument) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false); 262(_, miscDocument) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false); 271var (documentWorkspace, document) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false); 318var (_, hostSolution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false); 342var (_, solution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false); 380var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 385var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 394var (_, changedFirstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 401var (_, unchangedSecondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 435var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 440var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 450var (_, secondDocumentChangedProject) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 456var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false); 486var (_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false); 506(_, documentServerOne) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerOne).ConfigureAwait(false); 509(_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false); 527var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 550var (workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 569(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 587(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 607var (workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 623(workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 646var (workspace, originalDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 659var (_, newDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 748var (_, removedSourceGeneratorDocument) = await GetLspWorkspaceAndDocumentAsync(sourceGeneratorDocumentUri, testLspServer).ConfigureAwait(false); 759var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false); 772var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(CreateTextDocumentIdentifier(uri), CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (71)
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (46)
Host\RemoteWorkspace.cs (4)
149var solution = await solutionTask.WithCancellation(cancellationToken).ConfigureAwait(false); 212if (await IsIncrementalUpdateAsync().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 (9)
65solution, oldSolutionChecksums, newSolutionChecksums, cancellationToken).ConfigureAwait(false); 227solution, isConeSync, oldProjectIdToStateChecksums, newProjectIdToStateChecksums, cancellationToken).ConfigureAwait(false); 333solution.GetRequiredProject(projectId), oldProjectChecksums, newProjectChecksums, cancellationToken).ConfigureAwait(false); 395cancellationToken).ConfigureAwait(false); 407cancellationToken).ConfigureAwait(false); 419cancellationToken).ConfigureAwait(false); 469return await UpdateDocumentsAsync(project, addDocuments, removeDocuments, oldDocumentIdToChecksums, newDocumentIdToChecksums, cancellationToken).ConfigureAwait(false); 530project = await UpdateDocumentAsync(document, oldDocumentChecksums, newDocumentChecksums, cancellationToken).ConfigureAwait(false); 545document = await UpdateDocumentInfoAsync(document, newDocumentChecksums.attributeChecksum, cancellationToken).ConfigureAwait(false);
Host\RemoteWorkspace_SolutionCaching.cs (1)
93async cancellationToken => cachedSolution ?? await ComputeDisconnectedSolutionAsync(assetProvider, solutionChecksum, cancellationToken).ConfigureAwait(false));
Host\TestUtils.cs (5)
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);
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (2)
65var wasSynchronized = await SynchronizeTextChangesHelperAsync().ConfigureAwait(false); 86var text = await TryGetSourceTextAsync(WorkspaceManager, workspace, documentId, baseTextChecksum, cancellationToken).ConfigureAwait(false);
Services\CodeLensReferences\RemoteCodeLensReferencesService.cs (1)
117solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false);
Services\ConvertTupleToStructCodeRefactoringProvider\RemoteConvertTupleToStructCodeRefactoringService.cs (2)
43var cleanedSolution = await CleanupAsync(solution, updatedSolution, cancellationToken).ConfigureAwait(false); 48solution, cleanedSolution, 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 (6)
130var (compilationWithAnalyzers, analyzerToIdMap) = await GetOrCreateCompilationWithAnalyzersAsync(cancellationToken).ConfigureAwait(false); 169logPerformanceInfo, getTelemetryInfo, cancellationToken).ConfigureAwait(false); 327var cacheEntry = await GetOrCreateCacheEntryAsync().ConfigureAwait(false); 335return await CreateCompilationWithAnalyzersCacheEntryAsync(cancellationToken).ConfigureAwait(false); 347var entry = await CreateCompilationWithAnalyzersCacheEntryAsync(cancellationToken).ConfigureAwait(false); 415? await CreateCompilationWithAnalyzerAsync(projectAnalyzerBuilder.ToImmutable(), hostAnalyzerBuilder.ToImmutable(), cancellationToken).ConfigureAwait(false)
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (1)
69cancellationToken).ConfigureAwait(false);
Services\Initialization\RemoteInitializationService.cs (1)
27var errorMessage = await RemoteExportProviderBuilder.InitializeAsync(localSettingsDirectory, cancellationToken).ConfigureAwait(false);
Services\Renamer\RemoteRenamerService.cs (1)
39solution, symbol, newName, options, nonConflictSymbolKeys, cancellationToken).ConfigureAwait(false);
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (2)
88documentKey, type, checksum, cancellationToken).ConfigureAwait(false); 233documentKey, type, checksum, 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\UnusedReferences\RemoteUnusedReferenceAnalysisService.cs (1)
31var references = await ProjectAssetsFileReader.ReadReferencesAsync(projectReferences, projectAssetsFilePath).ConfigureAwait(false);
src\VisualStudio\Core\Def\UnusedReferences\ProjectAssets\ProjectAssetsFileReader.cs (2)
32return await reader.ReadToEndAsync().ConfigureAwait(false); 33}).ConfigureAwait(false);
Microsoft.CodeAnalysis.Remote.Workspaces (11)
AbstractAssetProvider.cs (8)
56AssetPathKind.SolutionAnalyzerReferences, solutionChecksums.AnalyzerReferences, cancellationToken).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);
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (5)
AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (8)
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
61Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
36Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (3)
96Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 118Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 138Dim expandedStatement = Await Simplifier.ExpandAsync(containingStatement, document, cancellationToken:=cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\SimplifyObjectCreation\VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
35Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
40Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
47Dim node = Await _reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (19)
GoToBase\VisualBasicGoToBaseService.vb (1)
43Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
ImplementAbstractClass\ImplementAbstractClassCommandHandler.vb (2)
52document, classBlock, classBlock.ClassStatement.Identifier, cancellationToken).ConfigureAwait(True) 58Dim changes = Await updatedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(True)
LineCommit\CommitBufferManager.vb (2)
306Dim compilation = Await project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 311Dim refCompilation = Await refProject.GetCompilationAsync(cancellationToken).ConfigureAwait(False)
NavigationBar\VisualBasicEditorNavigationBarItemService.vb (1)
50Dim root = Await destinationDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
NavigationBar\VisualBasicEditorNavigationBarItemService_CodeGeneration.vb (11)
54Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 67newDocument = Await Simplifier.ReduceAsync(newDocument, Simplifier.Annotation, simplifierOptions, cancellationToken).ConfigureAwait(False) 79rules:=formatterRules).ConfigureAwait(False) 116Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 151cancellationToken).ConfigureAwait(False) 160Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 206cancellationToken).ConfigureAwait(False) 215Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 250cancellationToken).ConfigureAwait(False) 259Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 277cancellationToken).ConfigureAwait(False)
Utilities\CommandHandlers\AbstractImplementAbstractClassOrInterfaceCommandHandler.vb (2)
188newDocument = Await Simplifier.ReduceAsync(newDocument, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(True) 189newDocument = Await Formatter.FormatAsync(newDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(True)
Microsoft.CodeAnalysis.VisualBasic.Features (96)
AddImport\VisualBasicAddImportFeatureService.vb (2)
297Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 301Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
BraceMatching\InterpolatedStringBraceMatcher.vb (1)
29Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
BraceMatching\StringLiteralBraceMatcher.vb (1)
25Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
ChangeSignature\VisualBasicChangeSignatureService.vb (6)
100Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 120Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 688Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 689Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 704convertedType = If(Await SymbolFinder.FindSourceDefinitionAsync(convertedType, document.Project.Solution, cancellationToken).ConfigureAwait(False), convertedType) 723nodeType = If(Await SymbolFinder.FindSourceDefinitionAsync(nodeType, document.Project.Solution, cancellationToken).ConfigureAwait(False), nodeType)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.CodeAction.vb (1)
30Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
37Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
CodeFixes\GenerateEndConstruct\GenerateEndConstructCodeFixProvider.vb (2)
65Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 255Dim tree = Await updatedDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (9)
45Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False) 77Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 108Dim sourceDefinition = Await SymbolFinder.FindSourceDefinitionAsync(targetType, document.Project.Solution, cancellationToken).ConfigureAwait(False) 132document.Project.Solution, eventHandlerName, Not syntaxFactService.IsCaseSensitive, SymbolFilter.Type, cancellationToken).ConfigureAwait(False) 252Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 259Dim targetType = TryCast(Await SymbolFinder.FindSourceDefinitionAsync(semanticModel.GetSymbolInfo(node.Left, cancellationToken).Symbol, document.Project.Solution, cancellationToken).ConfigureAwait(False), INamedTypeSymbol) 319Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 350targetType = TryCast(Await SymbolFinder.FindSourceDefinitionAsync(withEventsProperty.Type, document.Project.Solution, cancellationToken).ConfigureAwait(False), INamedTypeSymbol) 354targetType = TryCast(Await SymbolFinder.FindSourceDefinitionAsync(targetType, document.Project.Solution, cancellationToken).ConfigureAwait(False), INamedTypeSymbol)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.AddKeywordCodeAction.vb (1)
41Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceKeywordCodeAction.vb (1)
40Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceTokenKeywordCodeAction.vb (1)
33Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (1)
62Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (3)
46Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 53Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 81Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.vb (1)
48Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
42Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.vb (1)
35Dim root = Await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(False)
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (6)
225Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 235Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 369Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 381Dim explicitInitializer = Await Simplifier.ExpandAsync(initializer, updatedDocument, cancellationToken:=cancellationToken).ConfigureAwait(False) 421Dim syntaxRootBeforeInline = Await semanticModelBeforeInline.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(False) 431Dim syntaxRootAfterInline = Await inlinedDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeRefactorings\NodeSelectionHelpers.vb (2)
44Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 46GetSelectedMembersAsync(tree, span, allowPartialSelection:=True, cancellationToken).ConfigureAwait(False)
CodeRefactorings\RemoveStatementCodeAction.vb (1)
30Dim root = Await _document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Completion\CompletionProviders\CrefCompletionProvider.vb (2)
62Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 101Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
50Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (1)
71Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Debugging\DataTipInfoGetter.vb (1)
24Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
Debugging\LocationInfoGetter.vb (3)
19Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 20Dim root = Await tree.GetRootAsync(cancellationToken).ConfigureAwait(False) 33Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False)
Debugging\ProximityExpressionsGetter.vb (3)
29Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 62Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 73Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Debugging\VisualBasicBreakpointService.vb (2)
28Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 49Dim root = Await tree.GetRootAsync(cancellationToken).ConfigureAwait(False)
EncapsulateField\VisualBasicEncapsulateFieldService.vb (3)
32Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 72Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 73Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
ExtractInterface\VisualBasicExtractInterfaceService.vb (2)
30Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 31Dim root = Await tree.GetRootAsync(cancellationToken).ConfigureAwait(False)
FullyQualify\VisualBasicFullyQualifyService.vb (1)
69Dim root = Await tree.GetRootAsync(cancellationToken).ConfigureAwait(False)
GenerateType\VisualBasicGenerateTypeService.vb (2)
421Dim semanticModel = Await selectedDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 626root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
LanguageServices\VisualBasicSymbolDisplayService.SymbolDescriptionBuilder.vb (3)
98Dim syntax = Await syntaxRef.GetSyntaxAsync(Me.CancellationToken).ConfigureAwait(False) 111Dim syntax = Await syntaxRef.GetSyntaxAsync(Me.CancellationToken).ConfigureAwait(False) 160LanguageServices, semanticModel, equalsValue.Value.Span, Options.ClassificationOptions, CancellationToken).ConfigureAwait(False)
LineSeparators\VisualBasicLineSeparatorService.vb (2)
58Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 59Dim root = Await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(False)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (2)
40Dim oldRoot = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 59Dim syntaxRoot = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
NavigationBar\VisualBasicNavigationBarItemService.vb (1)
42Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
Organizing\VisualBasicOrganizerService.vb (2)
23Dim root = DirectCast(Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False), SyntaxNode) 24Dim rewriter = New Rewriter(Me, organizers, Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False), cancellationToken)
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (1)
33Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\AttributeSignatureHelpProvider.vb (2)
52Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 59Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\CollectionInitializerSignatureHelpProvider.vb (3)
46Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 53document, collectionInitializer.Parent, options, cancellationToken).ConfigureAwait(False) 61Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\FunctionAggregationSignatureHelpProvider.vb (2)
55Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 62Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\GenericNameSignatureHelpProvider.vb (1)
61Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\InvocationExpressionSignatureHelpProvider.vb (1)
63Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (2)
62Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 69Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
SignatureHelp\PredefinedCastExpressionSignatureHelpProvider.vb (1)
29Return SpecializedCollections.SingletonEnumerable(New PredefinedCastExpressionDocumentation(node.Keyword.Kind, Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(False)))
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (2)
68Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 75Dim semanticModel = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (1)
61Dim model = Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryByVal\VisualBasicRemoveUnnecessaryByValCodeFixProvider.vb (1)
36Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnnecessaryCast\VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (3)
96Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 118Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False) 138Dim expandedStatement = Await Simplifier.ExpandAsync(containingStatement, document, cancellationToken:=cancellationToken).ConfigureAwait(False)
src\Analyzers\VisualBasic\CodeFixes\SimplifyObjectCreation\VisualBasicSimplifyObjectCreationCodeFixProvider.vb (1)
35Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
UseAutoProperty\VisualBasicUseAutoPropertyCodeFixProvider.vb (2)
78Dim semanticsModel = Await propertyDocument.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False) 95Dim identifier = TryCast(Await fieldSymbol.DeclaringSyntaxReferences(0).GetSyntaxAsync(cancellationToken).ConfigureAwait(False), ModifiedIdentifierSyntax)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (8)
CodeCleanup\Providers\AbstractTokensCodeCleanupProvider.vb (1)
23Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
36Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
CodeCleanup\Providers\RemoveUnnecessaryLineContinuationCodeCleanupProvider.vb (1)
39Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
FindSymbols\VisualBasicReferenceFinder.vb (2)
40Dim compilation = Await project.GetCompilationAsync(cancellationToken).ConfigureAwait(False) 53Dim compilation = Await project.GetCompilationAsync(cancellationToken).ConfigureAwait(False)
OrganizeImports\VisualBasicOrganizeImportsService.vb (1)
21Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
40Dim root = Await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(False)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSymbolDeclarationService.vb (1)
47Dim node = Await _reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(False)
Microsoft.CodeAnalysis.Workspaces (555)
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\ClassifierHelper.cs (1)
37.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 (10)
77var document1 = await Formatter.FormatAsync(document, Formatter.Annotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 80var document2 = await Formatter.FormatAsync(document1, SyntaxAnnotation.ElasticAnnotation, options.FormattingOptions, cancellationToken).ConfigureAwait(false); 117cancellationToken).ConfigureAwait(false); 128var documentIdsAndOptionsToClean = await GetDocumentIdsAndOptionsToCleanAsync().ConfigureAwait(false); 132changedSolution, documentIdsAndOptionsToClean, progress, passes, cancellationToken).ConfigureAwait(false); 168cancellationToken).ConfigureAwait(false); 185currentSolution = await RunParallelCleanupPassAsync(currentSolution, cleanupPass).ConfigureAwait(false); 195using var _ = await RemoteKeepAliveSession.CreateAsync(solution, cancellationToken).ConfigureAwait(false); 213var cleanedDocument = await cleanupDocumentAsync(document, options, cancellationToken).ConfigureAwait(false); 222cancellationToken).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\FixAllContextHelper.cs (11)
37if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 39var documentDiagnostics = await fixAllContext.GetDocumentDiagnosticsAsync(document).ConfigureAwait(false); 47if (document != null && !await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false)) 54diagnosticSpan.Value, fixAllContext.Scope, fixAllContext.CancellationToken).ConfigureAwait(false); 55return await GetSpanDiagnosticsAsync(fixAllContext, documentsAndSpans).ConfigureAwait(false); 62allDiagnostics = await fixAllContext.GetAllDiagnosticsAsync(project).ConfigureAwait(false); 82callback(await fixAllContext.GetAllDiagnosticsAsync(projectToFix).ConfigureAwait(false)); 94cancellationToken).ConfigureAwait(false); 106fixAllContext.Solution, allDiagnostics, fixAllContext.CancellationToken).ConfigureAwait(false); 117var documentDiagnostics = await fixAllContext.GetDocumentSpanDiagnosticsAsync(document, span).ConfigureAwait(false); 140if (!await document.IsGeneratedCodeAsync(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)
69? await ProjectCompilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false) 72? await HostCompilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false) 81? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(tree, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false) 84? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(tree, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false) 93? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(file, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false) 96? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(file, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false) 105? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(model, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false) 108? 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); 327var result = await GetAnalysisResultAsync(compilationWithAnalyzers, documentAnalysisScope, cancellationToken).ConfigureAwait(false); 329documentAnalysisScope, project, analyzerInfoCache, cancellationToken).ConfigureAwait(false); 340return await compilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false); 352return await compilationWithAnalyzers.GetAnalysisResultAsync(tree, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false); 356return await compilationWithAnalyzers.GetAnalysisResultAsync(documentAnalysisScope.AdditionalFile, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false); 361return await compilationWithAnalyzers.GetAnalysisResultAsync(model, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false); 407cancellationToken).ConfigureAwait(false); 492var projectChecksum = await project.State.GetChecksumAsync(cancellationToken).ConfigureAwait(false); 503solution.GetProject(projectRef.ProjectId), cancellationToken).ConfigureAwait(false)); 513var remoteHostClient = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false); 524return 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)
95var disposable = await _progressTracker.AddSingleItemAsync(cancellationToken).ConfigureAwait(false); 101this, unifiedSymbols, includeImplementationsThroughDerivedTypes: true, cancellationToken).ConfigureAwait(false); 107await ReportGroupsSeriallyAsync(allSymbols, symbolToGroup, cancellationToken).ConfigureAwait(false); 111var projectsToSearch = await GetProjectsToSearchAsync(allSymbols, cancellationToken).ConfigureAwait(false); 152symbolSet.GetAllSymbols(), symbolToGroup, cancellationToken).ConfigureAwait(false); 186var linkedSymbols = await SymbolFinder.FindLinkedSymbolsAsync(symbol, _solution, cancellationToken).ConfigureAwait(false); 352symbol, 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); 327optionSet ??= await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false); 363return await organizeImportsService.OrganizeImportsAsync(document, options, cancellationToken).ConfigureAwait(false); 369var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);
LanguageServices\FixAllSpanMappingService\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);
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 (1)
36var textChanges = await newDoc.GetTextChangesAsync(oldDoc, cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.cs (8)
63var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 75return await result.Value.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false); 81var heavyweightLocations = await lightweightRenameLocations.ToSymbolicLocationsAsync(symbol, cancellationToken).ConfigureAwait(false); 86heavyweightLocations, replacementText, nonConflictSymbolKeys, cancellationToken).ConfigureAwait(false); 108renameLocations, renameSymbolDeclarationLocation, replacementText, nonConflictSymbolKeys, cancellationToken).ConfigureAwait(false); 210cancellationToken).ConfigureAwait(false); 303cancellationToken).ConfigureAwait(false); 410var originalsourcesymbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.Session.cs (14)
96var (documentsIdsToBeCheckedForConflict, possibleNameConflicts) = await FindDocumentsAndPossibleNameConflictsAsync().ConfigureAwait(false); 142possibleNameConflicts).ConfigureAwait(false)); 150conflictLocations).ConfigureAwait(false); 202conflictResolution.UpdateCurrentSolution(await renamedSpansTracker.SimplifyAsync(conflictResolution.CurrentSolution, documentsByProject, _replacementTextValid, _renameAnnotations, _cancellationToken).ConfigureAwait(false)); 204intermediateSolution, documentsByProject, _renameAnnotations, _cancellationToken).ConfigureAwait(false); 210var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false); 270documentIdErrorStateLookup.Add(documentId, await originalDoc.HasAnyErrorsAsync(_cancellationToken).ConfigureAwait(false)); 313var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false); 344var nonConflictSymbols = await GetNonConflictSymbolsAsync(currentProject).ConfigureAwait(false); 387await CheckForConflictAsync(conflictResolution, renamedSymbolInNewSolution, conflictAnnotation, newReferencedSymbols).ConfigureAwait(false); 473var compilation = await currentProject.GetRequiredCompilationAsync(_cancellationToken).ConfigureAwait(false); 603var overridingSymbol = await SymbolFinder.FindSymbolAtPositionAsync(solution.GetRequiredDocument(newLocation.SourceTree), newLocation.SourceSpan.Start, cancellationToken: _cancellationToken).ConfigureAwait(false); 685var newSymbol = await SymbolFinder.FindSymbolAtPositionAsync(document, start, cancellationToken: _cancellationToken).ConfigureAwait(false); 792var originalSyntaxRoot = await semanticModel.SyntaxTree.GetRootAsync(_cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\RenamedSpansTracker.cs (2)
158document = await Simplifier.ReduceAsync(document, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false); 159document = await Formatter.FormatAsync(document, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Rename\IRemoteRenamerService.cs (1)
189oldSolution, 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, nonConflictSymbolKeys: default, cancellationToken).ConfigureAwait(false); 117var renameAction = await RenameSymbolDocumentAction.TryCreateAsync(document, newDocumentName, cancellationToken).ConfigureAwait(false); 160var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 175return await result.Value.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false); 184nonConflictSymbolKeys, cancellationToken).ConfigureAwait(false); 204var renameLocations = await SymbolicRenameLocations.FindLocationsInCurrentProcessAsync(symbol, solution, options, cancellationToken).ConfigureAwait(false); 206renameLocations, newName, nonConflictSymbolKeys, 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)
93if (await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false) || 94await IsPropertyAccessorOrAnOverrideAsync(originalSymbol, solution, cancellationToken).ConfigureAwait(false)) 139symbol, solution, cancellationToken).ConfigureAwait(false); 163var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, false, cancellationToken).ConfigureAwait(false); 187var isRenamableAccessor = await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false); 251var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, true, cancellationToken).ConfigureAwait(false); 316isRenamableAccessor: 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\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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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\IsolatedAnalyzerReferenceSet.Desktop.cs (1)
40return 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)
197var map = await LazyContentHashToDocumentId.GetValueAsync(cancellationToken).ConfigureAwait(false); 410var cache = await projectState._analyzerConfigOptionsCache.Lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 482var cache = await projectState._analyzerConfigOptionsCache.Lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 624var docVersion = await _lazyLatestDocumentTopLevelChangeVersion.GetValueAsync(cancellationToken).ConfigureAwait(false);
Workspace\Solution\Solution.cs (1)
1575return (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 (5)
57compilationState, compilationWithoutGeneratedFiles, generatorInfo.Documents, compilationWithStaleGeneratedTrees, cancellationToken).ConfigureAwait(false); 72cancellationToken).ConfigureAwait(false); 86var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 94using var _ = await RemoteKeepAliveSession.CreateAsync(compilationState, cancellationToken).ConfigureAwait(false); 239if (!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 (3)
121return await lazy.GetValueAsync(cancellationToken).ConfigureAwait(false); 132var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false); 139var 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)
120instance = await RecoverAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild (35)
MSBuild\BuildHostProcessManager.cs (4)
50var (buildHost, _) = await GetBuildHostWithFallbackAsync(GetKindForProject(projectFilePath), projectFilePath, cancellationToken).ConfigureAwait(false); 66var buildHost = await GetBuildHostAsync(buildHostKind, cancellationToken).ConfigureAwait(false); 73if (!await buildHost.HasUsableMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false)) 77return (await GetBuildHostAsync(BuildHostProcessKind.NetCore, cancellationToken).ConfigureAwait(false), actualKind: BuildHostProcessKind.NetCore);
MSBuild\MSBuildProjectLoader.cs (3)
175var (absoluteSolutionPath, projects) = await SolutionFileReader.ReadSolutionFileAsync(solutionFilePath, _pathResolver, reportingMode, cancellationToken).ConfigureAwait(false); 202var projectInfos = await worker.LoadAsync(cancellationToken).ConfigureAwait(false); 263return await worker.LoadAsync(cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker.cs (10)
115result = await doFunc().ConfigureAwait(false); 153var projectFileInfos = await LoadProjectInfosFromPathAsync(absoluteProjectPath, _requestedProjectOptions, cancellationToken).ConfigureAwait(false); 179var (buildHost, actualBuildHostKind) = await _buildHostProcessManager.GetBuildHostWithFallbackAsync(preferredBuildHostKind, projectPath, cancellationToken).ConfigureAwait(false); 185).ConfigureAwait(false); 188var diagnosticItems = await projectFile.GetDiagnosticLogItemsAsync(cancellationToken).ConfigureAwait(false); 201).ConfigureAwait(false); 213diagnosticItems = await projectFile.GetDiagnosticLogItemsAsync(cancellationToken).ConfigureAwait(false); 230var projectFileInfos = await LoadProjectFileInfosAsync(projectPath, reportingOptions, cancellationToken).ConfigureAwait(false); 261var projectInfo = await CreateProjectInfoAsync(fileInfo, id, addDiscriminator, cancellationToken).ConfigureAwait(false); 366var 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)
27var remoteProjectFileTargetObject = await _client.InvokeAsync<int>(BuildHostTargetObject, nameof(IBuildHost.LoadProjectFileAsync), parameters: [projectFilePath, languageName], cancellationToken).ConfigureAwait(false); 37var 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)
169var 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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).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.Test.Utilities (2)
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;
Microsoft.CodeAnalysis.Workspaces.UnitTests (16)
FindAllDeclarationsTests.cs (13)
95var declarations = await SymbolFinder.FindDeclarationsAsync(project, searchTerm, ignoreCase).ConfigureAwait(false); 261var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, searchTerm, ignoreCase).ConfigureAwait(false); 366var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, searchTerm, ignoreCase).ConfigureAwait(false); 417var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test")).ConfigureAwait(false); 425var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => true).ConfigureAwait(false); 433var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => false).ConfigureAwait(false); 484var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test")).ConfigureAwait(false); 492var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => true).ConfigureAwait(false); 500var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => false).ConfigureAwait(false); 551var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, "test").ConfigureAwait(false); 564var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, pattern).ConfigureAwait(false); 615var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, "test").ConfigureAwait(false); 628var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, pattern).ConfigureAwait(false);
SolutionTests\SolutionTests.cs (2)
3942var text = await doc.GetTextAsync().ConfigureAwait(false); 3950var compilation = await doc.Project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
817.AddDocument(originalDocument1.Name, await originalDocument1.GetTextAsync().ConfigureAwait(false), filePath: originalDocument1.FilePath);
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 (6)
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);
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.Abstractions (4)
ChatCompletion\ChatResponseExtensions.cs (1)
119list.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; 154var 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 (4)
Utilities\TaskExtensions.cs (3)
53yield return await task.ConfigureAwait(false); 71var task = await Task.WhenAny(remaining).ConfigureAwait(false); 73yield return await task.ConfigureAwait(false);
Utilities\TimingHelper.cs (1)
86result = await operation().ConfigureAwait(false);
Microsoft.Extensions.AI.Evaluation.Console (2)
Program.cs (1)
151return await rootCmd.InvokeAsync(args).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)
34ChatResponse? response = await base.ReadCacheAsync(key, cancellationToken).ConfigureAwait(false); 63await base.ReadCacheStreamingAsync(key, cancellationToken).ConfigureAwait(false);
SimpleChatClient.cs (1)
32response = await base.GetResponseAsync(messages, options, cancellationToken).ConfigureAwait(false);
Storage\DiskBasedResponseCache.cs (3)
85await CacheEntry.ReadAsync(entryFilePath, cancellationToken: cancellationToken).ConfigureAwait(false); 117cancellationToken).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)
90cancellationToken).ConfigureAwait(false);
ContentSafetyService.cs (5)
221await response.Content.ReadAsStringAsync().ConfigureAwait(false); 270await response.Content.ReadAsStringAsync().ConfigureAwait(false); 324await response.Content.ReadAsStringAsync().ConfigureAwait(false); 396await response.Content.ReadAsStringAsync().ConfigureAwait(false); 415HttpResponseMessage 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 (8)
QuantizationEmbeddingGenerator.cs (2)
38var embeddings = await _floatService.GenerateAsync(values, options, cancellationToken).ConfigureAwait(false); 71var embeddings = await _floatService.GenerateAsync(values, options, cancellationToken).ConfigureAwait(false);
ReducingChatClientTests.cs (3)
78messages = await _reducer.ReduceAsync(messages, cancellationToken).ConfigureAwait(false); 80return await base.GetResponseAsync(messages, options, cancellationToken).ConfigureAwait(false); 87messages = await _reducer.ReduceAsync(messages, 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.Ollama (5)
OllamaChatClient.cs (3)
97cancellationToken).ConfigureAwait(false); 135using var httpResponse = await _httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); 151.ConfigureAwait(false);
OllamaEmbeddingGenerator.cs (1)
117cancellationToken).ConfigureAwait(false);
OllamaUtilities.cs (1)
47await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.OpenAI (9)
OpenAIAssistantChatClient.cs (3)
139var thread = await _client.CreateThreadAsync(threadCreationOptions, cancellationToken).ConfigureAwait(false); 145_ = await _client.CancelRunAsync(threadId, threadRun.Id, cancellationToken).ConfigureAwait(false); 283var assistant = await _client.GetAssistantAsync(_assistantId, cancellationToken).ConfigureAwait(false);
OpenAIChatClient.cs (1)
77var response = await _chatClient.CompleteChatAsync(openAIChatMessages, openAIOptions, cancellationToken).ConfigureAwait(false);
OpenAIEmbeddingGenerator.cs (1)
69var embeddings = (await _embeddingClient.GenerateEmbeddingsAsync(values, openAIOptions, cancellationToken).ConfigureAwait(false)).Value;
OpenAIResponseChatClient.cs (1)
78var openAIResponse = (await _responseClient.CreateResponseAsync(openAIResponseItems, openAIOptions, cancellationToken).ConfigureAwait(false)).Value;
OpenAISpeechToTextClient.cs (3)
83var translation = (await _audioClient.TranslateAudioAsync(audioSpeechStream, filename, ToOpenAITranslationOptions(options), cancellationToken).ConfigureAwait(false)).Value; 97var transcription = (await _audioClient.TranscribeAudioAsync(audioSpeechStream, filename, ToOpenAITranscriptionOptions(options), cancellationToken).ConfigureAwait(false)).Value; 134foreach (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 (4)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
51var response = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
Logging\Internal\HttpRequestBodyReader.cs (1)
90var streamToReadFrom = await request.Content!.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
Logging\Internal\HttpResponseBodyReader.cs (2)
94Stream streamToReadFrom = await response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); 101string bufferedString = await BufferStreamAndWriteToPipeAsync(streamToReadFrom, pipe.Writer, readSizeLimit, cancellationToken).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); 553.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 (141)
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 (92)
480var result = await ValidateUserAsync(user).ConfigureAwait(false); 492return await Store.CreateAsync(user, CancellationToken).ConfigureAwait(false); 553var user = await Store.FindByNameAsync(userName, CancellationToken).ConfigureAwait(false); 565user = await Store.FindByNameAsync(oldKey, CancellationToken).ConfigureAwait(false); 592var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false); 597return await CreateAsync(user).ConfigureAwait(false); 637var normalizedName = NormalizeName(await GetUserNameAsync(user).ConfigureAwait(false)); 651return await Store.GetUserNameAsync(user, CancellationToken).ConfigureAwait(false); 667return await UpdateUserAsync(user).ConfigureAwait(false); 678return await Store.GetUserIdAsync(user, CancellationToken).ConfigureAwait(false); 699var result = await VerifyPasswordAsync(passwordStore, user, password).ConfigureAwait(false); 702await UpdatePasswordHash(passwordStore, user, password, validatePassword: false).ConfigureAwait(false); 703await UpdateUserAsync(user).ConfigureAwait(false); 747var hash = await passwordStore.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false); 753var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false); 758return await UpdateUserAsync(user).ConfigureAwait(false); 778if (await VerifyPasswordAsync(passwordStore, user, currentPassword).ConfigureAwait(false) != PasswordVerificationResult.Failed) 780var result = await UpdatePasswordHash(passwordStore, user, newPassword).ConfigureAwait(false); 785return await UpdateUserAsync(user).ConfigureAwait(false); 805await UpdatePasswordHash(passwordStore, user, null, validatePassword: false).ConfigureAwait(false); 806return await UpdateUserAsync(user).ConfigureAwait(false); 821var hash = await store.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false); 839var stamp = await securityStore.GetSecurityStampAsync(user, CancellationToken).ConfigureAwait(false); 866return await UpdateUserAsync(user).ConfigureAwait(false); 899if (!await VerifyUserTokenAsync(user, Options.Tokens.PasswordResetTokenProvider, ResetPasswordTokenPurpose, token).ConfigureAwait(false)) 903var result = await UpdatePasswordHash(user, newPassword, validatePassword: true).ConfigureAwait(false); 908return await UpdateUserAsync(user).ConfigureAwait(false); 949return await UpdateUserAsync(user).ConfigureAwait(false); 968var existingUser = await FindByLoginAsync(login.LoginProvider, login.ProviderKey).ConfigureAwait(false); 975return await UpdateUserAsync(user).ConfigureAwait(false); 990return await loginStore.GetLoginsAsync(user, CancellationToken).ConfigureAwait(false); 1028return await UpdateUserAsync(user).ConfigureAwait(false); 1050return await UpdateUserAsync(user).ConfigureAwait(false); 1088return await UpdateUserAsync(user).ConfigureAwait(false); 1103return await claimStore.GetClaimsAsync(user, CancellationToken).ConfigureAwait(false); 1122if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1127return await UpdateUserAsync(user).ConfigureAwait(false); 1149if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1155return await UpdateUserAsync(user).ConfigureAwait(false); 1174if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1179return await UpdateUserAsync(user).ConfigureAwait(false); 1219if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false)) 1225return await UpdateUserAsync(user).ConfigureAwait(false); 1238return await userRoleStore.GetRolesAsync(user, CancellationToken).ConfigureAwait(false); 1255return await userRoleStore.IsInRoleAsync(user, NormalizeName(role), CancellationToken).ConfigureAwait(false); 1268return await store.GetEmailAsync(user, CancellationToken).ConfigureAwait(false); 1289return await UpdateUserAsync(user).ConfigureAwait(false); 1308var user = await store.FindByEmailAsync(email, CancellationToken).ConfigureAwait(false); 1320user = await store.FindByEmailAsync(oldKey, CancellationToken).ConfigureAwait(false); 1341var email = await GetEmailAsync(user).ConfigureAwait(false); 1374if (!await VerifyUserTokenAsync(user, Options.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token).ConfigureAwait(false)) 1379return await UpdateUserAsync(user).ConfigureAwait(false); 1396return await store.GetEmailConfirmedAsync(user, CancellationToken).ConfigureAwait(false); 1429if (!await VerifyUserTokenAsync(user, Options.Tokens.ChangeEmailTokenProvider, GetChangeEmailTokenPurpose(newEmail), token).ConfigureAwait(false)) 1437return await UpdateUserAsync(user).ConfigureAwait(false); 1450return await store.GetPhoneNumberAsync(user, CancellationToken).ConfigureAwait(false); 1471return await UpdateUserAsync(user).ConfigureAwait(false); 1491if (!await VerifyChangePhoneNumberTokenAsync(user, token, phoneNumber).ConfigureAwait(false)) 1499return await UpdateUserAsync(user).ConfigureAwait(false); 1575var result = await provider.ValidateAsync(purpose, token, this, user).ConfigureAwait(false); 1636if (await f.Value.CanGenerateTwoFactorTokenAsync(this, user).ConfigureAwait(false)) 1664var result = await provider.ValidateAsync("TwoFactor", token, this, user).ConfigureAwait(false); 1707return await store.GetTwoFactorEnabledAsync(user, CancellationToken).ConfigureAwait(false); 1727return await UpdateUserAsync(user).ConfigureAwait(false); 1744if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false)) 1748var lockoutTime = await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false); 1768return await UpdateUserAsync(user).ConfigureAwait(false); 1783return await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false); 1799return await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false); 1814if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false)) 1820return await UpdateUserAsync(user).ConfigureAwait(false); 1837var count = await store.IncrementAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false); 1840return await UpdateUserAsync(user).ConfigureAwait(false); 1846return await UpdateUserAsync(user).ConfigureAwait(false); 1860if (await GetAccessFailedCountAsync(user).ConfigureAwait(false) == 0) 1865return await UpdateUserAsync(user).ConfigureAwait(false); 1879return await store.GetAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false); 1951return await UpdateUserAsync(user).ConfigureAwait(false); 1970return await UpdateUserAsync(user).ConfigureAwait(false); 1998return await UpdateAsync(user).ConfigureAwait(false); 2027var update = await UpdateAsync(user).ConfigureAwait(false); 2124var success = await store.RedeemCodeAsync(user, code, CancellationToken).ConfigureAwait(false); 2127return await UpdateAsync(user).ConfigureAwait(false); 2160return await UpdateUserAsync(user).ConfigureAwait(false); 2230return await UpdateUserAsync(user).ConfigureAwait(false); 2297return Encoding.Unicode.GetBytes(await GetSecurityStampAsync(user).ConfigureAwait(false)); 2324var validate = await ValidatePasswordAsync(user, newPassword).ConfigureAwait(false); 2405var stamp = await GetSecurityStampAsync(user).ConfigureAwait(false); 2414var result = await v.ValidateAsync(this, user).ConfigureAwait(false); 2445var result = await v.ValidateAsync(this, user, password).ConfigureAwait(false); 2475var result = await ValidateUserAsync(user).ConfigureAwait(false); 2482return await Store.UpdateAsync(user, CancellationToken).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.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)
1363return await CreateAsync(vocabStream, preTokenizer, normalizer, specialTokens, cacheSize, cancellationToken).ConfigureAwait(false); 1441cacheSize, 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 (221)
CallHierarchy\CallHierarchyCommandHandler.cs (2)
80document, caretPosition, preferPrimaryConstructor: true, cancellationToken).ConfigureAwait(false); 84var node = await _provider.CreateItemAsync(symbol, project, callsites: [], cancellationToken).ConfigureAwait(false);
CallHierarchy\CallHierarchyItem.cs (1)
144NavigationOptions.Default with { PreferProvisionalTab = true }, context.UserCancellationToken).ConfigureAwait(false);
CallHierarchy\CallHierarchyProvider.cs (3)
64var finders = await CreateFindersAsync(symbol, project, cancellationToken).ConfigureAwait(false); 116var @overrides = await SymbolFinder.FindOverridesAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false); 127var 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 (7)
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);
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (2)
35var vsCodeDefView = await _codeDefView.GetValueAsync(cancellationToken).ConfigureAwait(true); 53var vsCodeDefView = await _codeDefView.GetValueAsync(cancellationToken).ConfigureAwait(true);
CodeLens\CodeLensCallbackListener.cs (6)
93cancellationToken).ConfigureAwait(false); 110var maxSearchResults = await GetMaxResultCapAsync(cancellationToken).ConfigureAwait(false); 125cancellationToken).ConfigureAwait(false); 153cancellationToken).ConfigureAwait(false); 161solution, projectGuid, filePath, span, sourceGeneratorDocumentId, cancellationToken).ConfigureAwait(false); 176solution, projectGuid, filePath, sourceGeneratorDocumentId, cancellationToken).ConfigureAwait(false);
CodeLens\RemoteCodeLensReferencesService.cs (3)
76var descriptors = await FindReferenceLocationsWorkerAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false); 83return await FixUpDescriptorsAsync(solution, descriptors.Value, cancellationToken).ConfigureAwait(false); 133return 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 (1)
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)
281var (documentSymbolData, newTextSnapshot) = await ComputeDocumentSymbolDataAsync(cancellationToken).ConfigureAwait(false); 433_textBuffer, _languageServiceBroker.RequestAsync, filePath, cancellationToken).ConfigureAwait(false);
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (1)
56var 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 (4)
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);
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\VisualStudioDefinitionsAndReferencesFactory.cs (1)
35var result = await symbolNavigationService.GetExternalNavigationSymbolLocationAsync(definitionItem, cancellationToken).ConfigureAwait(false);
Implementation\AbstractVsTextViewFilter.cs (3)
50return await GetDataTipTextImplAsync(pSpan).ConfigureAwait(true); 64return await GetDataTipTextImplAsync(subjectBuffer, pSpan).ConfigureAwait(true); 155waitContext.UserCancellationToken).ConfigureAwait(true);
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.VsLanguageDebugInfo.cs (2)
225this.ThreadingContext, document.Id, cancellationToken).ConfigureAwait(true); 245pBuffer, iLine, iCol, pCodeSpan, waitContext.UserCancellationToken).ConfigureAwait(true);
LanguageService\AbstractPackage.cs (1)
64_componentModel_doNotAccessDirectly = (IComponentModel?)await GetServiceAsync(typeof(SComponentModel)).ConfigureAwait(false);
LanguageService\AbstractPackage`2.cs (3)
51var shell = (IVsShell7?)await GetServiceAsync(typeof(SVsShell)).ConfigureAwait(true); 140=> AddService(typeof(T), async (container, cancellationToken, type) => await serviceCreator(cancellationToken).ConfigureAwait(true), promote: true); 144=> AddService(t, async (container, cancellationToken, type) => await serviceCreator(cancellationToken).ConfigureAwait(true), promote: true);
Library\AbstractObjectList.cs (1)
250var ppNavInfo = await GetNavInfoAsync(index, CancellationToken.None).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);
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 (2)
92var solution = await _solution.GetValueOrNullAsync(cancellationToken).ConfigureAwait(true); 137var visualStudioProject = await this.CreateAndAddToWorkspaceAsync(projectSystemName, language, projectInfo, cancellationToken).ConfigureAwait(false);
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
209var openFileTracker = await OpenFileTracker.CreateAsync(this, ProjectSystemProjectFactory, asyncServiceProvider).ConfigureAwait(true);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
93var componentModel = (IComponentModel?)await asyncServiceProvider.GetServiceAsync(typeof(SComponentModel)).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 (1)
131var brokeredServiceContainer = await _brokeredServiceContainer.GetValueAsync().ConfigureAwait(false);
RoslynPackage.cs (8)
59var shell = (IVsShell7?)await serviceProvider.GetServiceAsync(typeof(SVsShell)).ConfigureAwait(true); 133var serviceBrokerContainer = await this.GetServiceAsync<SVsBrokeredServiceContainer, IBrokeredServiceContainer>(cancellationToken).ConfigureAwait(false); 149await GetServiceAsync(typeof(SVsErrorList)).ConfigureAwait(false); 150await GetServiceAsync(typeof(SVsSolution)).ConfigureAwait(false); 151await GetServiceAsync(typeof(SVsShell)).ConfigureAwait(false); 152await GetServiceAsync(typeof(SVsRunningDocumentTable)).ConfigureAwait(false); 153await GetServiceAsync(typeof(SVsTextManager)).ConfigureAwait(false); 207var 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 (1)
1072documentWithImports, addImportOptions, formattingOptions, position, snippetNode, cancellationToken).ConfigureAwait(true);
Snippets\SnippetFunctions\SnippetFunctionSimpleTypeName.cs (1)
47var simplifiedTypeName = await SnippetFunctionService.GetSimplifiedTypeNameAsync(document, fieldSpan.Value, _fullyQualifiedName, simplifierOptions, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackFrameViewModel.cs (2)
61var definition = await GetDefinitionAsync(StackFrameSymbolPart.ContainingType, cancellationToken).ConfigureAwait(false); 90var definition = await GetDefinitionAsync(StackFrameSymbolPart.Method, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerCommandHandler.cs (1)
61var shouldActivate = await window.ShouldShowOnActivatedAsync(default).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 (12)
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);
TaskList\ExternalErrorDiagnosticUpdateSource.cs (2)
154var diagnosticManagerService = await GetOrCreateDiagnosticManagerAsync(cancellationToken).ConfigureAwait(false); 168var diagnosticManagerService = await GetOrCreateDiagnosticManagerAsync(cancellationToken).ConfigureAwait(false);
UnusedReferences\ProjectAssets\ProjectAssetsFileReader.cs (2)
32return await reader.ReadToEndAsync().ConfigureAwait(false); 33}).ConfigureAwait(false);
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
68var menuCommandService = await serviceProvider.GetServiceAsync<IMenuCommandService, IMenuCommandService>(throwOnFailure: false, cancellationToken).ConfigureAwait(false);
UnusedReferences\UnusedReferenceAnalysisService.cs (1)
46var references = await ProjectAssetsFileReader.ReadReferencesAsync(projectReferences, projectAssetsFilePath).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 (1)
149var children = await CalculateChildrenAsync(ThreadingContext.DisposalToken).ConfigureAwait(false);
ValueTracking\ValueTrackingCommandHandler.cs (3)
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); 456if (await oldProject.GetDependentVersionAsync(_cancellationTokenSource.Token).ConfigureAwait(false) != 457await newProject.GetDependentVersionAsync(_cancellationTokenSource.Token).ConfigureAwait(false)) 526message, isCloseButtonVisible: false, imageMoniker, infoBarItems).ConfigureAwait(true);
Workspace\VisualStudioActiveDocumentTracker.cs (1)
60var monitorSelectionService = (IVsMonitorSelection?)await asyncServiceProvider.GetServiceAsync(typeof(SVsShellMonitorSelection)).ConfigureAwait(true);
Workspace\VisualStudioDocumentNavigationService.cs (15)
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); 202await getTextSpanForMappingAsync(generatedDocument).ConfigureAwait(false)); 212await getTextSpanForMappingAsync(document).ConfigureAwait(false), 213cancellationToken).ConfigureAwait(false); 234workspace, document, mappedSpan, cancellationToken).ConfigureAwait(false); 273_threadingContext, documentId, cancellationToken).ConfigureAwait(false); 281text.Container.GetTextBuffer(), vsTextSpan, cancellationToken).ConfigureAwait(false); 415_threadingContext, documentId, cancellationToken).ConfigureAwait(false);
Workspace\VisualStudioSourceGeneratorTelemetryCollectorWorkspaceServiceFactory.cs (1)
76var shellService = await _serviceProvider.GetServiceAsync<SVsSolution, IVsSolution>(_threadingContext.DisposalToken).ConfigureAwait(true);
Workspace\VisualStudioSymbolNavigationService.cs (6)
103var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false); 121return await GetNavigableLocationForMetadataAsync(project, symbol, cancellationToken).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 (18)
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);
Options\CSharpVisualStudioCopilotOptionsService.cs (1)
82var settingsManager = await _settingsManagerTask.ConfigureAwait(false);
SemanticSearch\SemanticSearchQueryExecutor.cs (1)
62query ??= (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 (2)
101var element = await CreateContentAsync(cancellationToken).ConfigureAwait(false); 117var vsUIShell = await vsUIShellProvider.GetValueAsync(cancellationToken).ConfigureAwait(false);
Snippets\CSharpSnippetExpansionLanguageHelper.cs (1)
101var formattedDocument = await Formatter.FormatAsync(newDocument, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(true);
Microsoft.VisualStudio.LanguageServices.DevKit (2)
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.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.UnitTests (6)
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
32Dim tree = Await workspaceDoc.GetSyntaxTreeAsync().ConfigureAwait(False)
RQName\RQNameTests.vb (1)
248Dim symbol = Await SymbolFinder.FindSymbolAtPositionAsync(Await workspaceDoc.GetSemanticModelAsync(), token.SpanStart, workspace).ConfigureAwait(False)
Venus\DocumentService_IntegrationTests.vb (2)
277Dim mappedSource = Await mappedDocument.GetTextAsync(cancellationToken).ConfigureAwait(False) 315Dim mappedSource = Await mappedDocument.GetTextAsync(cancellationToken).ConfigureAwait(False)
VsNavInfo\VsNavInfoTests.vb (2)
829Dim symbol = Await SymbolFinder.FindSymbolAtPositionAsync(semanticModel, position, workspace).ConfigureAwait(False) 867Dim symbol = Await SymbolFinder.FindSymbolAtPositionAsync(semanticModel, position, workspace).ConfigureAwait(False)
Microsoft.VisualStudio.LanguageServices.VisualBasic (5)
Help\VisualBasicHelpContextService.vb (2)
40Dim tree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False) 48Dim visitor = New Visitor(token.Span, Await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(False), document.Project.Solution.WorkspaceKind <> WorkspaceKind.MetadataAsSource, Me, cancellationToken)
Snippets\SnippetCompletionProvider.vb (1)
59Dim syntaxTree = Await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(False)
Snippets\VisualBasicSnippetExpansionLanguageHelper.vb (2)
71Dim formattedDocument = Await Formatter.FormatAsync(newDocument, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(True) 105Dim compilation = Await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(True)
Microsoft.VisualStudio.LanguageServices.Xaml (22)
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 (1)
80var description = await symbol.GetDescriptionAsync(document, options, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (4)
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));
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 (1)
48var textChanges = await formattingService.GetFormattingChangesAsync(document, options, request.Character[0], position, cancellationToken).ConfigureAwait(false);
Implementation\LanguageServer\Handler\Hover\HoverHandler.cs (2)
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);
MSBuild (1)
NodeEndpointOutOfProcBase.cs (1)
644bytesRead = readTask.ConfigureAwait(false).GetAwaiter().GetResult();
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 (110)
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);
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (8)
89var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 90var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 121var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 122var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 142var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 143var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 167var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false); 186var root = await document.GetSyntaxRootAsync(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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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)
33var potentialNodes = await GetRelevantNodesAsync<TSyntaxNode>(document, helpers, span, cancellationToken).ConfigureAwait(false); 43var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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 (13)
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 (1)
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\Extensions\ITypeSymbolExtensions.cs (1)
123var 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\InitializeParameter\InitializeParameterHelpers.cs (4)
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.Diagnostics.VisualBasic.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicRemoveUnnecessaryImportsService.vb (1)
40Dim root = Await document.GetSyntaxRootAsync(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 (10)
Remote\SerializationValidator.cs (9)
26=> await validator.GetValueAsync<T>(checksum).ConfigureAwait(false); 92var data = await GetRequiredAssetAsync(checksum).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);
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 (29)
System\IO\Compression\ZipArchive.Async.cs (6)
209await ZipCentralDirectoryFileHeader.TryReadBlockAsync(sizedFileBuffer.AsMemory(currPosition), _archiveStream, saveExtraFieldsAndComments, cancellationToken).ConfigureAwait(false); 247cancellationToken).ConfigureAwait(false)) 251ZipEndOfCentralDirectoryBlock eocd = await ZipEndOfCentralDirectoryBlock.ReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 294Zip64EndOfCentralDirectoryLocator.FieldLengths.Signature, cancellationToken).ConfigureAwait(false)) 297Zip64EndOfCentralDirectoryLocator locator = await Zip64EndOfCentralDirectoryLocator.TryReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false); 301Zip64EndOfCentralDirectoryRecord record = await Zip64EndOfCentralDirectoryRecord.TryReadBlockAsync(_archiveStream, cancellationToken).ConfigureAwait(false);
System\IO\Compression\ZipArchiveEntry.Async.cs (18)
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); 175await ZipHelper.ReadBytesAsync(_archive.ArchiveStream, _compressedBytes[i], maxSingleBufferSize, cancellationToken).ConfigureAwait(false); 177await ZipHelper.ReadBytesAsync(_archive.ArchiveStream, _compressedBytes[_compressedBytes.Length - 1], (int)(_compressedSize % maxSingleBufferSize), cancellationToken).ConfigureAwait(false); 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 (3)
60int bytesRead = await SeekBackwardsAndReadAsync(stream, bufferMemory, signatureToFind.Length, cancellationToken).ConfigureAwait(false); 112bytesRead = await ReadBytesAsync(stream, buffer, buffer.Length, cancellationToken).ConfigureAwait(false); 119bytesRead = await ReadBytesAsync(stream, buffer, bytesToRead, 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)
164await _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)
63await _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)
461response = await connection.SendAsync(request, async, cancellationToken).ConfigureAwait(false); 482response = 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)
2032await 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)
628HttpMessageHandlerStage handler = await _handlerChainSetupTask.ConfigureAwait(false); 629return 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)
125(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)
396IPAddress[] 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)
720foreach (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)
757return 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)
501return await XElement.CreateAsync(reader, cancellationToken).ConfigureAwait(false); 513await 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.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.IAsyncEnumerable.cs (1)
25while (await source.OutputAvailableAsync(cancellationToken).ConfigureAwait(false))
System.Windows.Forms (4)
System\Windows\Forms\Control_InvokeAsync.cs (2)
110return await completion.Task.ConfigureAwait(false); 239return await completion.Task.ConfigureAwait(false);
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
484_uriImageStream = await s_httpClient.GetStreamAsync(uri).ConfigureAwait(false);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (1)
418result = 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.CodeFixes.VisualBasic (2)
AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.vb (2)
42ConfigureAwait(False) 109ConfigureAwait(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);
Test.Utilities (20)
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (1)
343return await operation(arg).ConfigureAwait(false);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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 (74)
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)
536return (await Task.WhenAll(sequence.Select(item => selector(item, cancellationToken))).ConfigureAwait(false)).Flatten();
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (3)
622if (await predicateAsync(a).ConfigureAwait(false)) 638if (await predicateAsync(a, arg).ConfigureAwait(false)) 654if (await predicateAsync(a).ConfigureAwait(false))
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (1)
237var (ranToCompletion, result) = await updateTask.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\Workspaces\DocumentExtensions.cs (3)
21semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); 30syntaxTree = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false); 39root = await document.GetSyntaxRootAsync(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\ProducerConsumer.cs (3)
233cancellationToken).ConfigureAwait(false); 363return await readTask.ConfigureAwait(false); 368return await consumeItems(channel.Reader, args, 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\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\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 (22)
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 (1)
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);