7815 references to ConfigureAwait
AnalyzerRunner (21)
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);
aspire (166)
Interaction\ExtensionInteractionService.cs (18)
74return await _consoleInteractionService.ShowStatusAsync(statusText, action, emoji, allowMarkup).ConfigureAwait(false);
115var hasSecretPromptsCapability = await Backchannel.HasCapabilityAsync(KnownCapabilities.SecretPrompts, _cancellationToken).ConfigureAwait(false);
120result = await Backchannel.PromptForSecretStringAsync(promptText.RemoveSpectreFormatting(), validator, required, _cancellationToken).ConfigureAwait(false);
125result = await Backchannel.PromptForStringAsync(promptText.RemoveSpectreFormatting(), defaultValue, validator, required, _cancellationToken).ConfigureAwait(false);
130result = await Backchannel.PromptForStringAsync(promptText.RemoveSpectreFormatting(), defaultValue, validator, required, _cancellationToken).ConfigureAwait(false);
141return await tcs.Task.ConfigureAwait(false);
145return await _consoleInteractionService.PromptForStringAsync(promptText, defaultValue, validator, isSecret, required, cancellationToken).ConfigureAwait(false);
153var hasFilePickersCapability = await Backchannel.HasCapabilityAsync(KnownCapabilities.FilePickers, _cancellationToken).ConfigureAwait(false);
163var result = await Backchannel.PromptForFilePathAsync(promptText.RemoveSpectreFormatting(), defaultValue, directory, _cancellationToken).ConfigureAwait(false);
172var picked = await tcs.Task.ConfigureAwait(false);
195return await PromptForStringAsync(promptText, defaultValue, validator, isSecret: false, required, cancellationToken).ConfigureAwait(false);
198return await _consoleInteractionService.PromptForFilePathAsync(promptText, defaultValue, validator, directory, required, cancellationToken).ConfigureAwait(false);
211var result = await Backchannel.ConfirmAsync(promptText.RemoveSpectreFormatting(), defaultValue, _cancellationToken).ConfigureAwait(false);
224return await tcs.Task.ConfigureAwait(false);
243var result = await Backchannel.PromptForSelectionAsync(promptText.RemoveSpectreFormatting(), choices, choiceFormatter, _cancellationToken).ConfigureAwait(false);
256return await tcs.Task.ConfigureAwait(false);
277var result = await Backchannel.PromptForSelectionsAsync(promptText.RemoveSpectreFormatting(), choices, choiceFormatter, _cancellationToken).ConfigureAwait(false);
290return await tcs.Task.ConfigureAwait(false);
Npm\SigstoreNpmProvenanceChecker.cs (6)
32var json = await FetchAttestationJsonAsync(packageName, version, cancellationToken).ConfigureAwait(false);
66packageName, version, cancellationToken).ConfigureAwait(false);
96var response = await httpClient.GetAsync(url, cancellationToken).ConfigureAwait(false);
104return await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
213digestBytes, HashAlgorithmType.Sha512, bundle, policy, cancellationToken).ConfigureAwait(false);
224bundle.DsseEnvelope.Payload, bundle, policy, cancellationToken).ConfigureAwait(false);
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Search.Documents (1)
Aspire.Azure.Storage.Files.DataLake (1)
Aspire.Cli.Tests (3)
Aspire.Components.Common.TestUtilities (1)
Aspire.Confluent.Kafka (2)
Aspire.Dashboard (79)
Telemetry\DashboardTelemetryService.cs (14)
70await _telemetrySender.TryStartTelemetrySessionAsync().ConfigureAwait(false);
116var response = await PostRequestAsync<StartOperationRequest, StartOperationResponse>(client, TelemetryEndpoints.TelemetryStartOperation, new StartOperationRequest(eventName, scopeSettings)).ConfigureAwait(false);
137await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryEndOperation, new EndOperationRequest(Id: (string)propertyGetter(operationId), Result: result, ErrorMessage: errorMessage)).ConfigureAwait(false);
162var response = await PostRequestAsync<StartOperationRequest, StartOperationResponse>(client, TelemetryEndpoints.TelemetryStartUserTask, new StartOperationRequest(eventName, scopeSettings)).ConfigureAwait(false);
183await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryEndUserTask, new EndOperationRequest(Id: (string)propertyGetter(operationId), Result: result, ErrorMessage: errorMessage)).ConfigureAwait(false);
209var response = await PostRequestAsync<PostOperationRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostOperation, request).ConfigureAwait(false);
237var response = await PostRequestAsync<PostOperationRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostUserTask, request).ConfigureAwait(false);
265var response = await PostRequestAsync<PostFaultRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostFault, request).ConfigureAwait(false);
294var response = await PostRequestAsync<PostAssetRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostAsset, request).ConfigureAwait(false);
315await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostProperty, request).ConfigureAwait(false);
333await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostRecurringProperty, request).ConfigureAwait(false);
351await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostCommandLineFlags, request).ConfigureAwait(false);
357var httpResponseMessage = await client.PostAsJsonAsync(endpoint, request).ConfigureAwait(false);
359var response = await httpResponseMessage.Content.ReadFromJsonAsync<TResponse>().ConfigureAwait(false);
Aspire.Dashboard.Components.Tests (6)
Aspire.Dashboard.Tests (7)
Aspire.EndToEnd.Tests (6)
Aspire.Hosting (207)
ApplicationModel\ResourceExtensions.cs (8)
198.BuildAsync(new(applicationOperation), NullLogger.Instance, CancellationToken.None).ConfigureAwait(false);
242.BuildAsync(new(applicationOperation), NullLogger.Instance, CancellationToken.None).ConfigureAwait(false);
535(DistributedApplicationOperation.Run, IValueProvider provider) => await resource.GetValue(executionContext, key, provider, logger, cancellationToken).ConfigureAwait(false),
536(DistributedApplicationOperation.Run, IResourceBuilder<IResource> rb) when rb.Resource is IValueProvider provider => await resource.GetValue(executionContext, key, provider, logger, cancellationToken).ConfigureAwait(false),
577IValueProvider valueProvider => (await resource.GetValue(executionContext, key: null, valueProvider, logger, cancellationToken).ConfigureAwait(false))?.Value,
1202var pushOptions = await resource.ProcessImagePushOptionsCallbackAsync(cancellationToken).ConfigureAwait(false);
1204return await pushOptions.GetFullRemoteImageNameAsync(registry, cancellationToken).ConfigureAwait(false);
1369var rawValues = await GatherRawEnvironmentAndArgumentValuesAsync(resource, executionContext, cancellationToken).ConfigureAwait(false);
Backchannel\AuxiliaryBackchannelRpcTarget.cs (19)
61var legacyInfo = await GetAppHostInformationAsync(cancellationToken).ConfigureAwait(false);
83var info = await DashboardUrlsHelper.GetDashboardConnectionInfoAsync(serviceProvider, logger, cancellationToken).ConfigureAwait(false);
114var snapshots = await GetResourceSnapshotsAsync(cancellationToken).ConfigureAwait(false);
183var result = await CallResourceMcpToolAsync(request.ResourceName, request.ToolName, arguments, cancellationToken).ConfigureAwait(false);
220var result = await resourceCommandService.ExecuteCommandAsync(request.ResourceName, request.CommandName, cancellationToken).ConfigureAwait(false);
257"healthy" => await WaitForHealthyAsync(notificationService, request.ResourceName, linkedCts.Token).ConfigureAwait(false),
258"up" => await WaitForRunningAsync(notificationService, request.ResourceName, linkedCts.Token).ConfigureAwait(false),
259"down" => await WaitForTerminalAsync(notificationService, request.ResourceName, linkedCts.Token).ConfigureAwait(false),
275var resourceEvent = await notificationService.WaitForResourceHealthyAsync(resourceName, WaitBehavior.StopOnResourceUnavailable, cancellationToken).ConfigureAwait(false);
290cancellationToken).ConfigureAwait(false);
309cancellationToken).ConfigureAwait(false);
426return await DashboardUrlsHelper.GetDashboardUrlsAsync(serviceProvider, logger, cancellationToken).ConfigureAwait(false);
466var snapshot = await CreateResourceSnapshotFromEventAsync(resourceEvent, cancellationToken).ConfigureAwait(false);
494var snapshot = await CreateResourceSnapshotFromEventAsync(resourceEvent, cancellationToken).ConfigureAwait(false);
514var endpointUri = await mcpAnnotation.EndpointUrlResolver(resourceWithEndpoints, cancellationToken).ConfigureAwait(false);
517var tools = await TryListToolsAsync(endpointUri, cancellationToken).ConfigureAwait(false);
781var endpointUri = await annotation.EndpointUrlResolver(resource, cancellationToken).ConfigureAwait(false);
792mcpClient = await McpClient.CreateAsync(transport, cancellationToken: cancellationToken).ConfigureAwait(false)
877var mcpClient = await McpClient.CreateAsync(transport, cancellationToken: linked.Token).ConfigureAwait(false);
Dcp\DcpExecutor.cs (24)
145_dcpInfo = await _dcpDependencyCheckService.GetDcpInfoAsync(cancellationToken: ct).ConfigureAwait(false);
199var (regular, tunnelDependent, regularContainerExes, tunnelDependentContainerExes) = await GetContainerCreationSetsAsync(ct).ConfigureAwait(false);
900var dcpSvc = await _kubernetesService.GetAsync<Service>(sar.Metadata.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
984await _kubernetesService.CreateAsync(rtc, cancellationToken).ConfigureAwait(false);
1250var containerDependencies = await ResourceExtensions.GetDependenciesAsync(containers, _executionContext, ResourceDependencyDiscoveryMode.DirectOnly, cancellationToken).ConfigureAwait(false);
1716await _kubernetesService.CreateAsync(containerExe, cancellationToken).ConfigureAwait(false);
1786.ConfigureAwait(false);
1815var bundleBytes = await bundleFactory.Value(certificateTrustConfiguration.Certificates, cancellationToken).ConfigureAwait(false);
1827(var keyPem, var pfxBytes) = await GetCertificateKeyMaterialAsync(tlsCertificateConfiguration, cancellationToken).ConfigureAwait(false);
1898await _kubernetesService.CreateAsync(exe, cancellationToken).ConfigureAwait(false);
2148(spec.RunArgs, var failedToApplyRunArgs) = await BuildRunArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false);
2192.ConfigureAwait(false);
2227var bundleBytes = await bundleFactory.Value(certificateTrustConfiguration.Certificates, cancellationToken).ConfigureAwait(false);
2262cancellationToken).ConfigureAwait(false);
2284(var keyPem, var pfxBytes) = await GetCertificateKeyMaterialAsync(tlsCertificateConfiguration, cancellationToken).ConfigureAwait(false);
2357await _kubernetesService.CreateAsync(dcpContainerResource, cancellationToken).ConfigureAwait(false);
2577await _kubernetesService.PatchAsync(c, patch, attemptCancellationToken).ConfigureAwait(false);
2578var cu = await _kubernetesService.GetAsync<Container>(c.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
2592await _kubernetesService.PatchAsync(e, patch, attemptCancellationToken).ConfigureAwait(false);
2593var eu = await _kubernetesService.GetAsync<Executable>(e.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
2701var r = await _kubernetesService.DeleteAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
2722var r = await _kubernetesService.GetAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
2767cancellationToken).ConfigureAwait(false);
3097var dependencies = await cr.ModelResource.GetResourceDependenciesAsync(_executionContext, ResourceDependencyDiscoveryMode.DirectOnly, cancellationToken).ConfigureAwait(false);
Dcp\ResourceLogSource.cs (5)
90var startupStderrStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStartupStdErr, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
91var startupStdoutStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStartupStdOut, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
99var stdoutStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStdOut, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
100var stderrStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStdErr, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
108var systemStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeSystem, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
InteractionService.cs (8)
65return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false);
74return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false);
94var completion = await newState.CompletionTcs.Task.ConfigureAwait(false);
108return await PromptInputAsync(title, message, new InteractionInput { Name = InteractionHelpers.LabelToName(inputLabel), InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
113var result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false);
208var completion = await newState.CompletionTcs.Task.ConfigureAwait(false);
235var completion = await newState.CompletionTcs.Task.ConfigureAwait(false);
330if (!await RunValidationAsync(interactionState, result, cancellationToken).ConfigureAwait(false))
Aspire.Hosting.Azure (82)
Provisioning\Internal\BaseProvisioningContextProvider.cs (10)
91var (subscriptionResource, tenantResource) = await armClient.GetSubscriptionAndTenantAsync(cancellationToken).ConfigureAwait(false);
102var azureStateSection = await deploymentStateManager.AcquireSectionAsync("Azure", cancellationToken).ConfigureAwait(false);
137var response = await resourceGroups.GetAsync(resourceGroupName, cancellationToken).ConfigureAwait(false);
158var operation = await resourceGroups.CreateOrUpdateAsync(WaitUntil.Completed, resourceGroupName, rgData, cancellationToken).ConfigureAwait(false);
170var principal = await _userPrincipalProvider.GetUserPrincipalAsync(cancellationToken).ConfigureAwait(false);
210var availableTenants = await armClient.GetAvailableTenantsAsync(cancellationToken).ConfigureAwait(false);
259var availableSubscriptions = await armClient.GetAvailableSubscriptionsAsync(tenantId, cancellationToken).ConfigureAwait(false);
280return await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false);
294var availableResourceGroups = await armClient.GetAvailableResourceGroupsWithLocationAsync(subscriptionId, cancellationToken).ConfigureAwait(false);
328var availableLocations = await armClient.GetAvailableLocationsAsync(subscriptionId, cancellationToken).ConfigureAwait(false);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (31)
79return await base.CreateProvisioningContextAsync(cancellationToken).ConfigureAwait(false);
123cancellationToken).ConfigureAwait(false);
129var task = await step.CreateTaskAsync("Fetching available tenants", cancellationToken).ConfigureAwait(false);
133(tenantOptions, fetchSucceeded) = await TryGetTenantsAsync(cancellationToken).ConfigureAwait(false);
138await step.SucceedAsync($"Found {tenantOptions!.Count} available tenant(s)", cancellationToken).ConfigureAwait(false);
142await step.WarnAsync("Failed to fetch tenants, falling back to manual entry", cancellationToken).ConfigureAwait(false);
148await step.FailAsync($"Failed to retrieve tenant information: {ex.Message}", cancellationToken).ConfigureAwait(false);
172cancellationToken).ConfigureAwait(false);
207cancellationToken).ConfigureAwait(false);
222cancellationToken).ConfigureAwait(false);
228var task = await step.CreateTaskAsync("Fetching available subscriptions", cancellationToken).ConfigureAwait(false);
232(subscriptionOptions, fetchSucceeded) = await TryGetSubscriptionsAsync(_options.TenantId, cancellationToken).ConfigureAwait(false);
237await step.SucceedAsync($"Found {subscriptionOptions!.Count} available subscription(s)", cancellationToken).ConfigureAwait(false);
241await step.WarnAsync("Failed to fetch subscriptions, falling back to manual entry", cancellationToken).ConfigureAwait(false);
247await step.FailAsync($"Failed to retrieve subscription information: {ex.Message}", cancellationToken).ConfigureAwait(false);
271cancellationToken).ConfigureAwait(false);
306cancellationToken).ConfigureAwait(false);
321cancellationToken).ConfigureAwait(false);
327var task = await step.CreateTaskAsync("Fetching resource groups", cancellationToken).ConfigureAwait(false);
331(resourceGroupOptions, resourceGroupFetchSucceeded) = await TryGetResourceGroupsWithLocationAsync(_options.SubscriptionId!, cancellationToken).ConfigureAwait(false);
336await step.SucceedAsync($"Found {resourceGroupOptions.Count} resource group(s)", cancellationToken).ConfigureAwait(false);
340await step.WarnAsync("Failed to fetch resource groups", cancellationToken).ConfigureAwait(false);
346await step.FailAsync($"Failed to retrieve resource group information: {ex.Message}", cancellationToken).ConfigureAwait(false);
382cancellationToken).ConfigureAwait(false);
416cancellationToken).ConfigureAwait(false);
422var task = await step.CreateTaskAsync("Fetching supported regions", cancellationToken).ConfigureAwait(false);
426(locationOptions, locationFetchSucceeded) = await TryGetLocationsAsync(_options.SubscriptionId!, cancellationToken).ConfigureAwait(false);
431await step.SucceedAsync($"Found {locationOptions!.Count} region(s)", cancellationToken).ConfigureAwait(false);
435await step.WarnAsync("Failed to fetch regions, falling back to manual entry", cancellationToken).ConfigureAwait(false);
441await step.FailAsync($"Failed to retrieve region information: {ex.Message}", cancellationToken).ConfigureAwait(false);
463cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AppContainers (2)
Aspire.Hosting.Azure.AppService (3)
Aspire.Hosting.Azure.ContainerRegistry (3)
Aspire.Hosting.Azure.CosmosDB (3)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.Kusto (6)
Aspire.Hosting.Azure.Kusto.Tests (2)
Aspire.Hosting.Azure.Storage (2)
Aspire.Hosting.DevTunnels (34)
DevTunnelCliClient.cs (18)
23var exitCode = await _cli.GetVersionAsync(outputWriter, errorWriter, logger, cancellationToken).ConfigureAwait(false);
68logger, cancellationToken).ConfigureAwait(false);
82logger, cancellationToken).ConfigureAwait(false);
92logger, cancellationToken).ConfigureAwait(false);
102logger, cancellationToken).ConfigureAwait(false);
133logger, cancellationToken).ConfigureAwait(false);
142logger, cancellationToken).ConfigureAwait(false);
163logger, cancellationToken).ConfigureAwait(false);
183logger, cancellationToken).ConfigureAwait(false);
196logger, cancellationToken).ConfigureAwait(false);
220logger, cancellationToken).ConfigureAwait(false);
229logger, cancellationToken).ConfigureAwait(false);
238logger, cancellationToken).ConfigureAwait(false);
247LoginProvider.Microsoft => await _cli.UserLoginMicrosoftAsync(logger, cancellationToken).ConfigureAwait(false),
248LoginProvider.GitHub => await _cli.UserLoginGitHubAsync(logger, cancellationToken).ConfigureAwait(false),
255return await GetUserLoginStatusAsync(logger, cancellationToken).ConfigureAwait(false);
263return await CallCliAsJsonAsync<T>(cliCall, propertyName: null, logger, cancellationToken).ConfigureAwait(false);
272var exitCode = await cliCall(stdout, stderr, logger, cancellationToken).ConfigureAwait(false);
DevTunnelResourceBuilderExtensions.cs (7)
137var result = await commandValidator.ValidateAsync(tunnelResource, cliAnnotation, ct).ConfigureAwait(false);
151var tunnelStatus = await devTunnelClient.CreateTunnelAsync(tunnelResource.TunnelId, tunnelResource.Options, logger, ct).ConfigureAwait(false);
167await Task.WhenAll(tunnelResource.Ports.Select(p => p.TargetEndpoint.GetValueAsync(ct).AsTask())).ConfigureAwait(false);
179var existingPorts = await devTunnelClient.GetPortListAsync(tunnelResource.TunnelId, logger, ct).ConfigureAwait(false);
185await Task.WhenAll(unmodeledPorts.Select(p => devTunnelClient.DeletePortAsync(tunnelResource.TunnelId, p.PortNumber, logger, ct))).ConfigureAwait(false);
209.ConfigureAwait(false);
787var version = await devTunnelClient.GetVersionAsync(logger: null, context.CancellationToken).ConfigureAwait(false);
Aspire.Hosting.DevTunnels.Tests (2)
Aspire.Hosting.Docker (20)
Aspire.Hosting.DotnetTool.Tests (2)
Aspire.Hosting.Foundry (12)
Aspire.Hosting.Foundry.Tests (2)
Aspire.Hosting.GitHub.Models (3)
Aspire.Hosting.GitHub.Models.Tests (2)
Aspire.Hosting.JavaScript.Tests (2)
Aspire.Hosting.Kafka.Tests (2)
Aspire.Hosting.Kubernetes (11)
KubernetesResource.cs (10)
304var value = await ProcessValueAsync(environmentContext, executionContext, arg).ConfigureAwait(false);
330var value = await ProcessValueAsync(environmentContext, executionContext, environmentVariable.Value).ConfigureAwait(false);
393: await context.CreateKubernetesResourceAsync(ep.Resource, executionContext, default).ConfigureAwait(false);
423: await context.CreateKubernetesResourceAsync(epExpr.Endpoint.Resource, executionContext, default).ConfigureAwait(false);
440return await BuildHelmConditional(context, executionContext, expr, conditionParam, embedded).ConfigureAwait(false);
450return await ProcessValueAsync(context, executionContext, branch, embedded).ConfigureAwait(false);
455return (await ProcessValueAsync(context, executionContext, expr.ValueProviders[0], true).ConfigureAwait(false)).ToString() ?? string.Empty;
463var val = await ProcessValueAsync(context, executionContext, vp, true).ConfigureAwait(false);
485var whenTrueResult = await ProcessValueAsync(context, executionContext, expr.WhenTrue!, embedded).ConfigureAwait(false);
486var whenFalseResult = await ProcessValueAsync(context, executionContext, expr.WhenFalse!, embedded).ConfigureAwait(false);
Aspire.Hosting.Maui (4)
Aspire.Hosting.MySql (3)
Aspire.Hosting.MySql.Tests (2)
Aspire.Hosting.Nats (1)
Aspire.Hosting.OpenAI (7)
Aspire.Hosting.OpenAI.Tests (2)
Aspire.Hosting.PostgreSQL (3)
Aspire.Hosting.PostgreSQL.Tests (2)
Aspire.Hosting.Qdrant (1)
Aspire.Hosting.RabbitMQ (1)
Aspire.Hosting.RabbitMQ.Tests (2)
Aspire.Hosting.RemoteHost (12)
Ats\CapabilityDispatcher.cs (6)
309result = await InvokeMethodAsync(methodToInvoke, invokeTarget, methodArgs, capability.RunSyncOnBackgroundThread).ConfigureAwait(false);
311result = await UnwrapAsyncResultAsync(result, methodToInvoke.ReturnType).ConfigureAwait(false);
371result = await InvokeMethodAsync(methodToInvoke, target: null, methodArgs, capability.RunSyncOnBackgroundThread).ConfigureAwait(false);
373result = await UnwrapAsyncResultAsync(result, methodToInvoke.ReturnType).ConfigureAwait(false);
424return await registration.Handler(args, _handles).ConfigureAwait(false);
464return await Task.Run(() => InvokeMethodCore(method, target, methodArgs)).ConfigureAwait(false);
Aspire.Hosting.SqlServer (3)
Aspire.Hosting.Testing (9)
Aspire.Hosting.Tests (5)
Aspire.Hosting.Valkey.Tests (2)
Aspire.Hosting.Yarp (1)
Aspire.Milvus.Client (1)
Aspire.NATS.Net (1)
Aspire.Playground.Tests (2)
Aspire.Qdrant.Client (1)
Aspire.Seq (1)
Aspire.Templates.Tests (8)
aspire-managed (12)
NuGet\Commands\SearchCommand.cs (7)
99return await ExecuteSearchAsync(query, prerelease, take, skip, sources, configPath, workingDir, format, verbose).ConfigureAwait(false);
141return await SearchSourceAsync(source, query, searchFilter, skip, take, logger).ConfigureAwait(false);
150var searchResults = await Task.WhenAll(searchTasks).ConfigureAwait(false);
243var searchResource = await repository.GetResourceAsync<PackageSearchResource>().ConfigureAwait(false);
256CancellationToken.None).ConfigureAwait(false);
261var versions = await result.GetVersionsAsync().ConfigureAwait(false);
272Deprecated = await result.GetDeprecationMetadataAsync().ConfigureAwait(false) is not null
Binding.Tcp.IntegrationTests (1)
ConfigurationSchemaGenerator (1)
csc (7)
src\Compilers\Shared\BuildServerConnection.cs (6)
125cancellationToken).ConfigureAwait(false);
192using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
199return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
307await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
317response = await responseTask.ConfigureAwait(false);
358await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
dotnet-openapi (1)
dotnet-svcutil-lib (243)
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);
169using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Generating Program.cs ...").ConfigureAwait(false))
179using (await SafeLogger.WriteStartOperationAsync(logger, $"Generating {paramsFilePath} params file ...").ConfigureAwait(false))
194var restoreResult = await this.MSBuildProj.RestoreAsync(logger, cancellationToken).ConfigureAwait(false);
202var buildResult = await this.MSBuildProj.BuildAsync(logger, cancellationToken).ConfigureAwait(false);
CommandProcessorOptions.cs (14)
290using (SafeLogger safeLogger = await SafeLogger.WriteStartOperationAsync(this.Logger, "Validating options ...").ConfigureAwait(false))
333using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {ProjectFileKey} option ...").ConfigureAwait(false))
378this.Project = await MSBuildProj.FromPathAsync(projectFile, this.Logger, cancellationToken).ConfigureAwait(false);
386using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {OutputDirKey} option ...").ConfigureAwait(false))
423using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {OutputFileKey} option ...").ConfigureAwait(false))
473using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {UpdateServiceReferenceKey} option ...").ConfigureAwait(false))
576using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {BootstrapPathKey} option ...").ConfigureAwait(false))
623using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {nameof(this.References)}, count: {this.References.Count}. Reference resolution enabled: {resolveReferences}").ConfigureAwait(false))
627var references = await this.Project.ResolveProjectReferencesAsync(ProjectDependency.IgnorableDependencies, logger, cancellationToken).ConfigureAwait(false);
652using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {nameof(this.NamespaceMappings)}, count: {this.NamespaceMappings.Count}").ConfigureAwait(false))
702using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {TargetFrameworkKey} option ...").ConfigureAwait(false))
715using (var proj = await MSBuildProj.DotNetNewAsync(projectFullPath, this.Logger, cancellationToken).ConfigureAwait(false))
735using (var safeLogger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing inputs, count: {this.Inputs.Count} ...").ConfigureAwait(false))
821using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, "Processing reference assemblies ...").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\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\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))
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);
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);
698using (await SafeLogger.WriteStartOperationAsync(logger, $"Saving project file: \"{this.FullPath}\"").ConfigureAwait(false))
727await ProcessRunner.TryRunAsync("dotnet", restoreParams + " --no-dependencies", this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false);
728var result = await ProcessRunner.TryRunAsync("dotnet", restoreParams, this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false);
740await this.RestoreAsync(logger, cancellationToken).ConfigureAwait(false);
742return await BuildAsync(logger, cancellationToken).ConfigureAwait(false);
750return await ProcessRunner.RunAsync("dotnet", buildParams, this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false);
766using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving project references ...").ConfigureAwait(false))
770await this.RestoreAsync(logger, cancellationToken).ConfigureAwait(false);
772var packageReferences = await ResolvePackageReferencesAsync(logger, cancellationToken).ConfigureAwait(false);
773var assemblyReferences = await ResolveAssemblyReferencesAsync(logger, cancellationToken).ConfigureAwait(false);
796using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving package references ...").ConfigureAwait(false))
858}, cancellationToken).ConfigureAwait(false);
874using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving assembly references for {this.TargetFramework} target framework ...").ConfigureAwait(false))
876await ResolveProperyValuesAsync(new string[] { "OutputPath", "TargetPath" }, logger, cancellationToken).ConfigureAwait(false);
886await ResolveDepsFilePathFromBuildConfigAsync(outputPath, logger, cancellationToken).ConfigureAwait(false);
939}, cancellationToken).ConfigureAwait(false);
981propertyTable = await _propertyResolver.EvaluateProjectPropertiesAsync(this.FullPath, this.TargetFramework, propertyNames, this.GlobalProperties, logger, cancellationToken).ConfigureAwait(false);
999using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving deps.json file ...").ConfigureAwait(false))
1005var 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\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))
dotnet-svcutil-lib.Tests (1)
GenerateDocumentationAndConfigFiles (82)
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\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);
GenerateRulesMissingDocumentation (2)
IdeBenchmarks (4)
IdeCoreBenchmarks (1)
IdentitySample.PasskeyConformance (1)
IIS.Common.TestLib (2)
ILLink.CodeFixProvider (12)
Infrastructure.Tests (3)
InMemory.FunctionalTests (9)
InteropClient (2)
InteropWebsite (1)
Metrics (33)
Program.cs (8)
62(ImmutableArray<(string, CodeAnalysisMetricData)> metricDatas, ErrorCode exitCode) = await GetMetricDatasAsync(projectsOrSolutions, quiet, cancellationToken).ConfigureAwait(false);
69errorCode = await writeOutputAsync().ConfigureAwait(false);
306var project = await workspace.OpenProjectAsync(projectFile, cancellationToken: CancellationToken.None).ConfigureAwait(false);
319var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
320var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false);
332var solution = await workspace.OpenSolutionAsync(solutionFile, cancellationToken: CancellationToken.None).ConfigureAwait(false);
352var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
353var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false);
Metrics.Legacy (33)
src\RoslynAnalyzers\Tools\Metrics\Program.cs (8)
62(ImmutableArray<(string, CodeAnalysisMetricData)> metricDatas, ErrorCode exitCode) = await GetMetricDatasAsync(projectsOrSolutions, quiet, cancellationToken).ConfigureAwait(false);
69errorCode = await writeOutputAsync().ConfigureAwait(false);
306var project = await workspace.OpenProjectAsync(projectFile, cancellationToken: CancellationToken.None).ConfigureAwait(false);
319var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
320var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false);
332var solution = await workspace.OpenSolutionAsync(solutionFile, cancellationToken: CancellationToken.None).ConfigureAwait(false);
352var compilation = await project.GetCompilationAsync(CancellationToken.None).ConfigureAwait(false);
353var metricData = await CodeAnalysisMetricData.ComputeAsync(compilation!.Assembly, new CodeMetricsAnalysisContext(compilation, CancellationToken.None)).ConfigureAwait(false);
Microsoft.Analyzers.Extra (18)
Microsoft.Analyzers.Extra.Tests (25)
Microsoft.Analyzers.Local.Tests (24)
Microsoft.AspNetCore.Analyzers (1)
Microsoft.AspNetCore.App.Analyzers (4)
Microsoft.AspNetCore.App.Analyzers.Test (3)
Microsoft.AspNetCore.App.CodeFixes (15)
Microsoft.AspNetCore.Authorization (11)
Microsoft.AspNetCore.Components (1)
Microsoft.AspNetCore.Components.Analyzers (1)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
Microsoft.AspNetCore.Components.WebView.Maui (2)
Microsoft.AspNetCore.Components.WebView.WindowsForms (2)
Microsoft.AspNetCore.Components.WebView.Wpf (2)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (26)
Microsoft.AspNetCore.Http.Connections.Client (21)
Microsoft.AspNetCore.Identity (13)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (12)
Microsoft.AspNetCore.InternalTesting (24)
Microsoft.AspNetCore.Mvc.Api.Analyzers (8)
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)
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
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);
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Microsoft.AspNetCore.SignalR.Core (1)
Microsoft.AspNetCore.SignalR.Specification.Tests (2)
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.Build.Tasks.CodeAnalysis (7)
src\Compilers\Shared\BuildServerConnection.cs (6)
125cancellationToken).ConfigureAwait(false);
192using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
199return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
307await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
317response = await responseTask.ConfigureAwait(false);
358await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (7)
src\Compilers\Shared\BuildServerConnection.cs (6)
125cancellationToken).ConfigureAwait(false);
192using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
199return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
307await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
317response = await responseTask.ConfigureAwait(false);
358await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis (43)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
414(_lazyAnalyzerActions, _lazyUnsuppressedAnalyzers) = await GetAnalyzerActionsAsync(Analyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false);
415_lazyAnalyzerGateMap = await CreateAnalyzerGateMapAsync(UnsuppressedAnalyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false);
418_lazyGeneratedCodeAnalysisFlagsMap = await CreateGeneratedCodeAnalysisFlagsMapAsync(UnsuppressedAnalyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false);
1540workerTasks[i] = Task.Run(async () => await ProcessCompilationEventsCoreAsync(analysisScope, prePopulatedEventQueue, cancellationToken).ConfigureAwait(false));
1572completedEvent = await ProcessCompilationEventsCoreAsync(analysisScope, prePopulatedEventQueue, cancellationToken).ConfigureAwait(false);
2257var isConcurrent = await analyzerManager.IsConcurrentAnalyzerAsync(analyzer, analyzerExecutor, cancellationToken).ConfigureAwait(false);
2282var 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);
Microsoft.CodeAnalysis.Analyzers (114)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (7)
74IBinaryOperation binaryOperation => await ConvertToEqualsAsync(document, semanticModel, binaryOperation, cancellationToken).ConfigureAwait(false),
75IInvocationOperation invocationOperation => await EnsureEqualsCorrectAsync(document, semanticModel, invocationOperation, cancellationToken).ConfigureAwait(false),
99.ConfigureAwait(false),
105.ConfigureAwait(false),
125var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
194var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
260var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
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\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);
Microsoft.CodeAnalysis.AnalyzerUtilities (25)
Microsoft.CodeAnalysis.BannedApiAnalyzers (87)
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\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);
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);
Microsoft.CodeAnalysis.CodeStyle.Fixes (225)
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\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.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\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (6)
126? await RenameThenAddAsyncTokenAsync(keepVoid, document, node, methodSymbol, knownTypes, cancellationToken).ConfigureAwait(false)
127: await FixRelatedSignaturesAsync(keepVoid, document, methodSymbol, knownTypes, node, cancellationToken).ConfigureAwait(false);
174var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
182return await FixRelatedSignaturesAsync(keepVoid, newDocument, newMethod, knownTypes, newNode, cancellationToken).ConfigureAwait(false);
200var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
211var partialDefinitionDocumentEditor = await solutionEditor.GetDocumentEditorAsync(partialDefinitionDocument.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (10)
63return await RenameThenRemoveAsyncTokenAsync(document, node, methodSymbol, cancellationToken).ConfigureAwait(false);
67return await RemoveAsyncTokenAsync(document, methodSymbol, node, cancellationToken).ConfigureAwait(false);
81var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
83var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
88return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, cancellationToken).ConfigureAwait(false);
97var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
114newDocument, annotation, cancellationToken).ConfigureAwait(false);
131methodSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false);
144document.Project.Solution, [.. referencedSymbol.Locations], cancellationToken).ConfigureAwait(false);
162currentSolution, group, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (13)
287var preprocessedDocument = await PreprocessDocumentAsync(document, diagnostics, cancellationToken).ConfigureAwait(false);
288var newRoot = await GetNewRootAsync(preprocessedDocument, formattingOptions, diagnostics, cancellationToken).ConfigureAwait(false);
336diagnosticId, preference, cancellationToken).ConfigureAwait(false);
638!(await IsLocalDeclarationWithNoReferencesAsync(localDeclarationStatement, document, cancellationToken).ConfigureAwait(false)))
759ReplaceDiscardDeclarationsWithAssignmentsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false);
767AdjustLocalDeclarationsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false);
789var newMemberDecl = await processMemberDeclarationAsync(memberDecl, newDocument, options, cancellationToken).ConfigureAwait(false);
811return await service.ReplaceAsync(document, memberDeclaration, cancellationToken).ConfigureAwait(false);
860if (await TryRemoveUnusedLocalAsync(declStatement, originalDeclStatement).ConfigureAwait(false))
871var (canUse, mayChangeSemantics) = await moveDeclarationService.CanMoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false);
874document = await moveDeclarationService.MoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false);
900if (await IsLocalDeclarationWithNoReferencesAsync(newDecl, document, cancellationToken).ConfigureAwait(false))
923var referencedSymbols = await SymbolFinder.FindReferencesAsync(local, document.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (16)
107return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false);
119diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false);
132var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
135field, currentSolution, cancellationToken).ConfigureAwait(false)).ToImmutableArray();
166currentSolution, linkedFiles, fieldLocations, property, cancellationToken).ConfigureAwait(false);
173compilation = await fieldDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
235var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
252newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
253newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
290cancellationToken).ConfigureAwait(false);
332var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
420var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
465document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false);
470document, codeCleanupOptions, cancellationToken).ConfigureAwait(false);
543var semanticModel = await lazySemanticModel.GetValueAsync(cancellationToken).ConfigureAwait(false);
596var semanticModel = await lazySemanticModel.GetValueAsync(cancellationToken).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\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);
Microsoft.CodeAnalysis.Collections.Package (4)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (71)
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (5)
103document, compilationUnit, placement, simplifierOptions, cancellationToken).ConfigureAwait(false);
147document, compilationUnit, allUsingDirectives, cancellationToken).ConfigureAwait(false);
163return await Simplifier.ReduceAsync(newDocument, Simplifier.Annotation, optionSet: null, cancellationToken).ConfigureAwait(false);
179await Task.WhenAll(expandUsingDirectiveTasks.Values).ConfigureAwait(false);
189var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (23)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (10)
127if (!await TryExecuteCommandAsync().ConfigureAwait(true))
153document, eventNameTask, initialCaretPoint.Position, cancellationToken).ConfigureAwait(true);
167var disposable = await waitContext.SuppressAutoCancelAsync().ConfigureAwait(true);
189var eventHandlerMethodName = await eventNameTask.WithCancellation(cancellationToken).ConfigureAwait(false);
195document, eventHandlerMethodName, position, cancellationToken).ConfigureAwait(false);
200documentWithNameAndAnnotationsAdded, cancellationToken).ConfigureAwait(false);
210documentWithNameAndAnnotationsAdded.WithSyntaxRoot(updatedRoot), Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false);
212simplifiedDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
219var newText = await formattedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
260var newText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
InlineRename\CSharpEditorInlineRenameService.cs (8)
50await TryGetSurroundingNodeSpanAsync<MemberDeclarationSyntax>(renameDefinition.Document, renameDefinition.SourceSpan, cancellationToken).ConfigureAwait(false) ??
51await TryGetSurroundingNodeSpanAsync<StatementSyntax>(renameDefinition.Document, renameDefinition.SourceSpan, cancellationToken).ConfigureAwait(false);
60renameDefinition.Document, semanticModel, textSpan.Start, cancellationToken).ConfigureAwait(true);
72var documentText = await renameDefinition.Document.GetTextAsync(cancellationToken).ConfigureAwait(false);
83await TryGetSurroundingNodeSpanAsync<MemberDeclarationSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false) ??
84await TryGetSurroundingNodeSpanAsync<BaseMethodDeclarationSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false) ??
85await TryGetSurroundingNodeSpanAsync<StatementSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false);
87var documentText = await renameLocation.Document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (26)
Intents\IntentTestsBase.cs (4)
34var results = await GetIntentsAsync(workspace, intentName, currentDocumentText, options, intentData).ConfigureAwait(false);
61var results = await GetIntentsAsync(workspace, intentName, currentDocumentText, options, intentData).ConfigureAwait(false);
118var changes = await textDiffService.GetTextChangesAsync(currentDocument!, priorDocument, CancellationToken.None).ConfigureAwait(false);
129var results = await intentSource.ComputeIntentsAsync(intentContext, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Microsoft.CodeAnalysis.CSharp.Features (299)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (19)
48var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
50var variableDeclarator = await context.TryGetRelevantNodeAsync<VariableDeclaratorSyntax>().ConfigureAwait(false);
82var references = await GetReferenceLocationsAsync(document, variableDeclarator, cancellationToken).ConfigureAwait(false);
139var expressionToInline = await CreateExpressionToInlineAsync(document, declarator, cancellationToken).ConfigureAwait(false);
143document = await document.ReplaceNodeAsync(declarator, declarator.WithAdditionalAnnotations(DefinitionAnnotation), cancellationToken).ConfigureAwait(false);
145declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false);
148var allReferences = await GetReferenceLocationsAsync(document, declarator, cancellationToken).ConfigureAwait(false);
154cancellationToken).ConfigureAwait(false);
156declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false);
158allReferences = await FindReferenceAnnotatedNodesAsync(document, cancellationToken).ConfigureAwait(false);
171document = await document.ReplaceNodeAsync(scope, newScope, cancellationToken).ConfigureAwait(false);
173declarator = await FindDeclaratorAsync(document, cancellationToken).ConfigureAwait(false);
181newScope, RemoveDeclaratorFromScope(declarator, newScope), cancellationToken).ConfigureAwait(false);
185var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
190var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
212}, cancellationToken).ConfigureAwait(false);
317=> await FindNodeWithAnnotationAsync<VariableDeclaratorSyntax>(document, DefinitionAnnotation, cancellationToken).ConfigureAwait(false);
322var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
331var root = await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (4)
112var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
167IndexerKindName => await GetIndexerDescriptionAsync(document, item, displayOptions, cancellationToken).ConfigureAwait(false),
168OperatorKindName => await GetOperatorDescriptionAsync(document, item, displayOptions, cancellationToken).ConfigureAwait(false),
169ConversionKindName => await GetConversionDescriptionAsync(document, item, displayOptions, cancellationToken).ConfigureAwait(false),
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (4)
134var conversion = await TryRehydrateAsync(document, item, cancellationToken).ConfigureAwait(false);
139item, document, [conversion], displayOptions, cancellationToken).ConfigureAwait(false);
147var symbols = await SymbolCompletionItem.GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false);
162var symbols = await SymbolCompletionItem.GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false);
Completion\CompletionProviders\SymbolCompletionProvider.cs (5)
91return !await IsTriggeredInArgumentListAsync(context, position, options, cancellationToken).ConfigureAwait(false);
105if (await IsTriggeredInArgumentListAsync(completionContext, position, options, cancellationToken).ConfigureAwait(false) is false)
126await IsTriggerInArgumentListAsync(completionContext.Document, position - 1, cancellationToken).ConfigureAwait(false) == true)
149var result = await IsTriggerOnDotAsync(document, caretPosition - 1, cancellationToken).ConfigureAwait(false);
155result = await IsTriggerInArgumentListAsync(document, caretPosition - 1, cancellationToken).ConfigureAwait(false);
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (4)
52document, rootWithGlobalStatements, namespaceDeclaration, cleanupOptions, cancellationToken).ConfigureAwait(false);
56document = await ConvertFileScopedNamespaceAsync(document, cleanupOptions, cancellationToken).ConfigureAwait(false);
65? await ConvertNamespaceTransform.ConvertFileScopedNamespaceAsync(document, fileScopedNamespace, (CSharpSyntaxFormattingOptions)cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false)
87documentWithImportsAdded, n => n.HasAnnotation(annotation), cancellationToken).ConfigureAwait(false);
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (5)
37await GetQuickinfoForPragmaWarningAsync(document, token, cancellationToken).ConfigureAwait(false) ??
38await GetQuickInfoForSuppressMessageAttributeAsync(document, token, cancellationToken).ConfigureAwait(false);
88document, errorCode, errorCodeNode.Span, cancellationToken).ConfigureAwait(false);
127document, errorCode, suppressMessageCheckIdArgument.Span, cancellationToken).ConfigureAwait(false);
140document.Project, cancellationToken).ConfigureAwait(false);
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (4)
44document, position, triggerReason, IsTriggerToken, IsArgumentListToken, cancellationToken).ConfigureAwait(false);
62document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false);
104document, position, textSpan, cancellationToken).ConfigureAwait(false);
112document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (7)
40document, position, triggerReason, IsTriggerToken, IsArgumentListToken, cancellationToken).ConfigureAwait(false);
62document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false);
74return await GetItemsWorkerForDelegateOrFunctionPointerAsync(document, position, invocationExpression, within, cancellationToken).ConfigureAwait(false);
101methods, document, invocationExpression, semanticModel, symbolInfo, currentSymbol, cancellationToken).ConfigureAwait(false);
105document, position, textSpan, cancellationToken).ConfigureAwait(false);
151document, position, textSpan, cancellationToken).ConfigureAwait(false);
162document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (6)
37document, position, triggerReason, IsTriggerToken, IsArgumentListToken, cancellationToken).ConfigureAwait(false);
56document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false);
69return await GetItemsWorkerForDelegateAsync(document, position, objectCreationExpression, type, cancellationToken).ConfigureAwait(false);
97document, position, textSpan, cancellationToken).ConfigureAwait(false);
121document, position, textSpan, cancellationToken).ConfigureAwait(false);
129document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
SignatureHelp\WithElementSignatureHelpProvider.cs (4)
36document, position, triggerReason, IsTriggerToken, IsArgumentListToken, cancellationToken).ConfigureAwait(false);
55document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false);
95document, position, textSpan, cancellationToken).ConfigureAwait(false);
103document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (5)
103document, compilationUnit, placement, simplifierOptions, cancellationToken).ConfigureAwait(false);
147document, compilationUnit, allUsingDirectives, cancellationToken).ConfigureAwait(false);
166return await Simplifier.ReduceAsync(newDocument, Simplifier.Annotation, simplifierOptions, cancellationToken).ConfigureAwait(false);
179await Task.WhenAll(expandUsingDirectiveTasks.Values).ConfigureAwait(false);
189var newType = await Simplifier.ExpandAsync(usingDirective.NamespaceOrType, document, cancellationToken: cancellationToken).ConfigureAwait(false);
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (9)
86var codeActions = await computationTask.ConfigureAwait(false);
99document, span, ExpressionBodyPreference.WhenPossible, cancellationToken).ConfigureAwait(false);
107document, span, ExpressionBodyPreference.Never, cancellationToken).ConfigureAwait(false);
122document, span, ExpressionBodyPreference.Never, cancellationToken).ConfigureAwait(false);
125document, span, ExpressionBodyPreference.WhenOnSingleLine, cancellationToken).ConfigureAwait(false);
137document, span, ExpressionBodyPreference.WhenPossible, cancellationToken).ConfigureAwait(false);
154document, span, ExpressionBodyPreference.WhenPossible, cancellationToken).ConfigureAwait(false);
157document, span, ExpressionBodyPreference.Never, cancellationToken).ConfigureAwait(false);
165var lambdaNode = await document.TryGetRelevantNodeAsync<LambdaExpressionSyntax>(span, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Workspaces (17)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
Microsoft.CodeAnalysis.EditorFeatures (316)
BraceMatching\BraceHighlightingViewTaggerProvider.cs (3)
69_braceMatcherService, document, position, options, cancellationToken).ConfigureAwait(false);
100var rightOfPosition = await service.GetMatchingBracesAsync(document, position, options, cancellationToken).ConfigureAwait(false);
136var leftOfPosition = await service.GetMatchingBracesAsync(document, position - 1, options, cancellationToken).ConfigureAwait(false);
CodeActions\CodeActionEditHandlerService.cs (9)
58oldSolution, cancellationToken: cancellationToken).ConfigureAwait(false);
144workspace, originalSolution, progressTracker, cancellationToken).ConfigureAwait(true);
170workspace, originalSolution, operations, progressTracker, cancellationToken).ConfigureAwait(true);
283applied &= await operation.TryApplyAsync(workspace, originalSolution, progressTracker, cancellationToken).ConfigureAwait(true);
301this._threadingContext, workspace, navigationOperation.DocumentId, navigationOperation.Position, cancellationToken).ConfigureAwait(false);
310this._threadingContext, workspace, renameOperation.DocumentId, renameOperation.Position, cancellationToken).ConfigureAwait(true))
332this._threadingContext, workspace, documentId, navigationToken.Value.SpanStart, cancellationToken).ConfigureAwait(false);
357this._threadingContext, editorWorkspace, documentId, resolvedRenameToken.Span, cancellationToken).ConfigureAwait(false))
360var openRoot = await openDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
CodeDefinitionWindow\DefinitionContextTracker.cs (9)
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);
175document.Project.Solution, includeHiddenLocations: false, cancellationToken).ConfigureAwait(false);
176var result = await symbolNavigationService.GetExternalNavigationSymbolLocationAsync(definitionItem, cancellationToken).ConfigureAwait(false);
186var declarationFile = await _metadataAsSourceFileService.GetGeneratedFileAsync(workspace, document.Project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
202? await findDefinitionService.GetNavigableItemsAsync(document, position, cancellationToken).ConfigureAwait(false)
DocumentationComments\CopilotGenerateDocumentationCommentProvider.cs (6)
39_suggestionManager ??= await suggestionServiceBase.TryRegisterProviderAsync(this, textView, "AmbientAIDocumentationComments", cancellationToken).ConfigureAwait(false);
51SuggestionServiceNames.IntelliCodeLineCompletions, cancellationToken).ConfigureAwait(false);
56var sessionStarted = await suggestion.StartSuggestionSessionAsync(cancellationToken).ConfigureAwait(false);
103SuggestionServiceNames.IntelliCodeLineCompletions, cancellationToken).ConfigureAwait(false);
110snippetProposal, copilotService, oldSnapshot, snippet.IndentText, cancellationToken).ConfigureAwait(false);
222var (documentationCommentDictionary, isQuotaExceeded) = await copilotService.GetDocumentationCommentAsync(proposal, cancellationToken).ConfigureAwait(false);
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (3)
55someReferencingProject, analyzerReference, options.EditorConfigOptions, cancellationToken).ConfigureAwait(false);
66var csharpDescriptors = await service.GetDiagnosticDescriptorsAsync(solution, someReferencingProject.Id, analyzerReference, LanguageNames.CSharp, cancellationToken).ConfigureAwait(false);
67var vbDescriptors = await service.GetDiagnosticDescriptorsAsync(solution, someReferencingProject.Id, analyzerReference, LanguageNames.VisualBasic, cancellationToken).ConfigureAwait(false);
ExtractMethod\ExtractMethodCommandHandler.cs (7)
138var document = await textBuffer.CurrentSnapshot.GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(waitContext).ConfigureAwait(false);
144var result = await ExtractMethodService.ExtractMethodAsync(document, span, localFunction: false, options, cancellationToken).ConfigureAwait(false);
151var localFunctionResult = await ExtractMethodService.ExtractMethodAsync(document, span, localFunction: true, options, cancellationToken).ConfigureAwait(false);
171result = await NotifyUserIfNecessaryAsync(document, result, cancellationToken).ConfigureAwait(false);
175var (formattedDocument, methodNameAtInvocation) = await result.GetDocumentAsync(cancellationToken).ConfigureAwait(false);
176var changes = await formattedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
204var disposable = await waitContext.SuppressAutoCancelAsync().ConfigureAwait(true);
GoToDefinition\GoToDefinitionHelpers.cs (4)
25symbol, solution, threadingContext, streamingPresenter, cancellationToken, thirdPartyNavigationAllowed).ConfigureAwait(false);
27threadingContext, new NavigationOptions(PreferProvisionalTab: true, ActivateTab: true), cancellationToken).ConfigureAwait(false);
42symbol, solution, thirdPartyNavigationAllowed, cancellationToken).ConfigureAwait(false);
45threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameSession.cs (11)
307await AllRenameLocationsTask.JoinAsync(cancellationToken).ConfigureAwait(false);
310var inlineRenameLocations = await RenameInfo.FindRenameLocationsAsync(currentOptions, cancellationToken).ConfigureAwait(false);
538var result = await AllRenameLocationsTask.JoinAsync(cancellationToken).ConfigureAwait(false);
541return await result.GetReplacementsAsync(replacementText, options, cancellationToken).ConfigureAwait(false);
561var replacementInfo = await _conflictResolutionTask.JoinAsync(CancellationToken.None).ConfigureAwait(false);
569var computedMergeResult = await ComputeMergeResultAsync(replacementInfo, cancellationToken).ConfigureAwait(false);
579var mergeResult = await diffMergingSession.MergeDiffsAsync(cancellationToken).ConfigureAwait(false);
803var info = await _conflictResolutionTask.JoinAsync(cancellationToken).ConfigureAwait(true);
834var documentChanges = await CalculateFinalDocumentChangesAsync(newSolution, cancellationToken).ConfigureAwait(false);
877: (documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false)));
883result.Add((documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false)));
IntelliSense\AsyncCompletion\CompletionSource.cs (6)
268options with { ExpandedCompletionBehavior = ExpandedCompletionMode.NonExpandedItemsOnly }, cancellationToken).ConfigureAwait(false);
290options with { ExpandedCompletionBehavior = ExpandedCompletionMode.NonExpandedItemsOnly }, cancellationToken).ConfigureAwait(false);
339var (expandedContext, expandedCompletionList) = await task.ConfigureAwait(false);
359var (context, completionList) = await GetCompletionContextWorkerAsync(session, document, initialTrigger, initialTriggerLocation, options, cancellationToken).ConfigureAwait(false);
395document, triggerLocation, options, document.Project.Solution.Options, roslynTrigger, _roles, cancellationToken).ConfigureAwait(false);
478var description = await service.GetDescriptionAsync(document, itemData.RoslynItem, completionOptions, displayOptions, cancellationToken).ConfigureAwait(false);
Navigation\AbstractDefinitionLocationService.cs (15)
64document, semanticModel, position, cancellationToken).ConfigureAwait(false);
69document, controlFlowTarget.Value, cancellationToken).ConfigureAwait(false);
78document, semanticModel, position, cancellationToken).ConfigureAwait(false);
85project, position, symbol, originalDocument: document, cancellationToken).ConfigureAwait(false);
90symbol, position, document, cancellationToken).ConfigureAwait(false);
94symbol, solution, isThirdPartyNavigationAllowed, cancellationToken).ConfigureAwait(false);
105_threadingContext, solution.Workspace, title, allDefinitions, cancellationToken).ConfigureAwait(false);
118var interceptorSymbol = await semanticFacts.GetInterceptorSymbolAsync(document, span.Start, cancellationToken).ConfigureAwait(false);
120interceptorSymbol, solution, thirdPartyNavigationAllowed: false, cancellationToken).ConfigureAwait(false);
163impl, solution, thirdPartyNavigationAllowed: false, cancellationToken).ConfigureAwait(false));
169_threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
211return await documentSpans[0].GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false);
219solution, includeHiddenLocations: true, cancellationToken).ConfigureAwait(false);
226documentSpan, classifiedSpans: null, classificationOptions, cancellationToken).ConfigureAwait(false);
274return await documentSpan.GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false);
Navigation\IDocumentNavigationServiceExtensions.cs (14)
24return await location.NavigateToAsync(options, cancellationToken).ConfigureAwait(false);
33var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, allowInvalidSpan, cancellationToken).ConfigureAwait(false);
34return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
40var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, cancellationToken).ConfigureAwait(false);
41return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
47var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, cancellationToken).ConfigureAwait(false);
48return await location.TryNavigateToAsync(threadingContext, NavigationOptions.Default, cancellationToken).ConfigureAwait(false);
54var location = await service.GetLocationForPositionAsync(workspace, documentId, position, virtualSpace, allowInvalidPosition, cancellationToken).ConfigureAwait(false);
55return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
68workspace, documentId, position, cancellationToken).ConfigureAwait(false);
69return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
85var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
94workspace, documentId, clampedSpan, allowInvalidSpan: true, cancellationToken).ConfigureAwait(false);
96return location != null && await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
Peek\PeekableItemSource.cs (5)
84var navigableItems = await service.GetNavigableItemsAsync(document, triggerPoint.Position, cancellationToken).ConfigureAwait(false);
98cancellationToken).ConfigureAwait(false);
110var mappingResult = await symbolMappingService.MapSymbolAsync(document, symbol, cancellationToken).ConfigureAwait(false);
115mappingResult.Symbol, mappingResult.Project, _peekResultFactory, cancellationToken).ConfigureAwait(false));
133workspace, document.Id, item.SourceSpan.Start, cancellationToken).ConfigureAwait(false))
Suggestions\SuggestedActions\EditorSuggestedAction.cs (8)
67return await CodeAction.GetOperationsAsync(this.OriginalSolution, progressTracker, cancellationToken).ConfigureAwait(false);
75return await actionWithOptions.GetOperationsAsync(this.OriginalSolution, options, progressTracker, cancellationToken).ConfigureAwait(false);
82return await CodeAction.GetPreviewOperationsAsync(this.OriginalSolution, cancellationToken).ConfigureAwait(false);
141operations = await GetOperationsAsync(actionWithOptions, options, progressTracker, cancellationToken).ConfigureAwait(true);
145operations = await GetOperationsAsync(progressTracker, cancellationToken).ConfigureAwait(true);
170cancellationToken).ConfigureAwait(false);
214var operations = await GetPreviewOperationsAsync(cancellationToken).ConfigureAwait(true);
218this.OriginalSolution.Workspace, operations, cancellationToken).ConfigureAwait(true);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
RefactoringHelpers\RefactoringHelpersTestBase.cs (5)
35var resultNode = await GetNodeForSelectionAsync(text, selection, predicate, allowEmptyNodes).ConfigureAwait(false);
44var resultNode = await GetNodeForSelectionAsync(text, selection, Functions<TNode>.True).ConfigureAwait(false);
53var resultNode = await GetNodeForSelectionAsync(text, selection, Functions<TNode>.True).ConfigureAwait(false);
67var resultNode = await GetNodeForSelectionAsync(text, selection, predicate, allowEmptyNodes).ConfigureAwait(false);
107var relevantNodes = await document.GetRelevantNodesAsync<TNode>(selection, allowEmptyNodes, CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.Extensions.Package (4)
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (3)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (22)
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (20)
60if (!await service.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false))
63return await GetAvailablePromptTitlesCoreAsync(document, cancellationToken).ConfigureAwait(false);
71if (!await service.IsCodeAnalysisOptionEnabledAsync().ConfigureAwait(false))
74if (await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false))
82if (await ShouldSkipAnalysisAsync(document, cancellationToken).ConfigureAwait(false))
88if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false))
92var diagnostics = await AnalyzeDocumentCoreAsync(document, span, promptTitle, cancellationToken).ConfigureAwait(false);
137if (await ShouldSkipAnalysisAsync(document, cancellationToken).ConfigureAwait(false))
157var cachedDiagnostics = await GetCachedDiagnosticsCoreAsync(document, promptTitle, cancellationToken).ConfigureAwait(false);
164return await GetDiagnosticsIntersectWithSpanAsync(document, diagnostics, span.Value, cancellationToken).ConfigureAwait(false);
179if (await service.IsRefineOptionEnabledAsync().ConfigureAwait(false))
185return await GetOnTheFlyDocsPromptCoreAsync(onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false);
189if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false))
192return await GetOnTheFlyDocsResponseCoreAsync(prompt, cancellationToken).ConfigureAwait(false);
197if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false))
200return await IsFileExcludedCoreAsync(filePath, cancellationToken).ConfigureAwait(false);
205if (!await IsAvailableAsync(cancellationToken).ConfigureAwait(false))
208return await GetDocumentationCommentCoreAsync(proposal, cancellationToken).ConfigureAwait(false);
213return await IsAvailableAsync(cancellationToken).ConfigureAwait(false)
222return await ImplementNotImplementedExceptionsCoreAsync(document, methodOrProperties, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.ExternalAccess.FSharp (33)
Microsoft.CodeAnalysis.ExternalAccess.HotReload (2)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (5)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (18)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (5)
Microsoft.CodeAnalysis.Features (1493)
AddImport\AbstractAddImportFeatureService.cs (13)
70var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
86packageSources, cancellationToken).ConfigureAwait(false);
110options, packageSources, cancellationToken).ConfigureAwait(false);
117document, node, options.CleanupDocument, options.CleanupOptions, cancellationToken).ConfigureAwait(false);
154var exactReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: true, cancellationToken).ConfigureAwait(false);
164var fuzzyReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: false, cancellationToken).ConfigureAwait(false);
213await finder.FindInAllSymbolsInStartingProjectAsync(exact, cancellationToken).ConfigureAwait(false));
245projectToAssembly, project, exact, cancellationToken).ConfigureAwait(false);
302assembly, referenceProject, reference, exact, cancellationToken).ConfigureAwait(false);
506packageSources, cancellationToken).ConfigureAwait(false);
519var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
535packageSources, cancellationToken).ConfigureAwait(false);
562var fixesForDiagnostics = await getFixesForDiagnosticsTask.ConfigureAwait(false);
AddImport\References\Reference.cs (6)
94var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
114node, document, cancellationToken).ConfigureAwait(false);
117node, SearchResult.NameParts, document, options.AddImportOptions, cancellationToken).ConfigureAwait(false);
119var cleanedDocument = await CleanDocumentAsync(newDocument, cleanupDocument, options, cancellationToken).ConfigureAwait(false);
122originalDocument, cancellationToken).ConfigureAwait(false);
133: await CodeAction.CleanupSyntaxAsync(newDocument, options, cancellationToken).ConfigureAwait(false);
AddImport\References\SymbolReference.cs (6)
60contextNode, document, cancellationToken).ConfigureAwait(false);
64options.AddImportOptions, cancellationToken).ConfigureAwait(false);
67updatedDocument, cleanupDocument, options, cancellationToken).ConfigureAwait(false);
70document, cancellationToken).ConfigureAwait(false);
78var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
110document, node, cleanupDocument, options, hasExistingImport, cancellationToken).ConfigureAwait(false);
AddImport\SymbolReferenceFinder.cs (14)
136await Task.WhenAll(tasks).ConfigureAwait(false);
142var taskResult = await task.ConfigureAwait(false);
193var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Type, cancellationToken).ConfigureAwait(false);
199name + AttributeSuffix, nameNode, SymbolFilter.Type, cancellationToken).ConfigureAwait(false);
271var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Namespace, cancellationToken).ConfigureAwait(false);
317symbol.Name, simpleName, SymbolFilter.Type, cancellationToken).ConfigureAwait(false);
371name, nameNode, SymbolFilter.Member, cancellationToken).ConfigureAwait(false);
431searchScope, nameof(IList.Add), objectCreationType, predicate: null, cancellationToken).ConfigureAwait(false);
454searchScope, nameof(Enumerable.Select), type, predicate: null, cancellationToken).ConfigureAwait(false);
477cancellationToken).ConfigureAwait(false);
499cancellationToken).ConfigureAwait(false);
521cancellationToken).ConfigureAwait(false);
547searchScope, "Deconstruct", type, static m => m.ReturnsVoid, cancellationToken).ConfigureAwait(false);
561name, nameNode: null, filter: SymbolFilter.Member, cancellationToken).ConfigureAwait(false);
ChangeSignature\AbstractChangeSignatureService.cs (14)
96var context = await GetChangeSignatureContextAsync(document, span.Start, restrictToDeclarations: true, cancellationToken).ConfigureAwait(false);
107document, position, restrictToDeclarations, cancellationToken).ConfigureAwait(false);
110symbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, document.Project.Solution, cancellationToken).ConfigureAwait(false) ?? symbol;
170var syntax = await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
185var semanticDocument = await SemanticDocument.CreateAsync(declarationDocument, cancellationToken).ConfigureAwait(false);
194ChangeSignatureAnalysisSucceededContext changeSignatureAnalyzedSucceedContext => await GetChangeSignatureResultAsync(changeSignatureAnalyzedSucceedContext, options, cancellationToken).ConfigureAwait(false),
206var (updatedSolution, confirmationMessage) = await CreateUpdatedSolutionAsync(context, options, cancellationToken).ConfigureAwait(false);
260declaredSymbol, context.Solution, cancellationToken).ConfigureAwait(false);
381var root = await doc.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
388var semanticDocument = await SemanticDocument.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
426var docWithImports = await ImportAdder.AddImportsFromSymbolAnnotationAsync(updatedDoc, cleanupOptions.AddImportOptions, cancellationToken).ConfigureAwait(false);
427var reducedDoc = await Simplifier.ReduceAsync(docWithImports, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
428var formattedDoc = await Formatter.FormatAsync(reducedDoc, SyntaxAnnotation.ElasticAnnotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
433cancellationToken).ConfigureAwait(false);
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\Service\CodeFixService.cs (17)
108priority, DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
116var copilotDiagnostics = await GetCopilotDiagnosticsAsync(document, range, priority, cancellationToken).ConfigureAwait(false);
145var collection = await errorFixTask.ConfigureAwait(false) ??
146await otherFixTask.ConfigureAwait(false);
200priority, DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
205var copilotDiagnostics = await GetCopilotDiagnosticsAsync(document, range, priority, cancellationToken).ConfigureAwait(false);
255return await document.GetCachedCopilotDiagnosticsAsync(range, cancellationToken).ConfigureAwait(false);
304DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
346document, textSpan, diagnosticId, severity, cancellationToken).ConfigureAwait(false);
353new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false);
518if (!await MatchesPriorityAsync(fixer).ConfigureAwait(false))
562cancellationToken).ConfigureAwait(false);
619document.Project, codeFixProvider.FixableDiagnosticIds, cancellationToken).ConfigureAwait(false))
761var fixes = await provider.GetFixesAsync(document, diagnosticsSpan, dxs, cancellationToken).ConfigureAwait(false);
764cancellationToken).ConfigureAwait(false);
786.ToDiagnosticsAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
796defaultValue: [], cancellationToken).ConfigureAwait(false);
CodeFixes\Service\CodeFixService.FixAllDiagnosticProvider.cs (8)
47document.Project, [document.Id], _diagnosticIds, AnalyzerFilter.All, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false));
49return await diagnostics.ToDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false);
57priority: null, DiagnosticKind.All, cancellationToken).ConfigureAwait(false));
59return await diagnostics.ToDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false);
67project, documentIds: default, _diagnosticIds, AnalyzerFilter.All, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false));
68return await diagnostics.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
76project, _diagnosticIds, AnalyzerFilter.All, cancellationToken).ConfigureAwait(false));
78return await diagnostics.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (13)
34var documentsAndDiagnosticsToFixMap = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false);
35return await GetFixAsync(documentsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false);
39var projectsAndDiagnosticsToFixMap = await fixAllContext.GetProjectDiagnosticsToFixAsync().ConfigureAwait(false);
40return await GetFixAsync(projectsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false);
57var diagnosticsAndCodeActions = await GetDiagnosticsAndCodeActionsAsync(documentsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false);
66diagnosticsAndCodeActions, fixAllState, progressTracker, cancellationToken).ConfigureAwait(false);
107cancellationToken).ConfigureAwait(false);
167result, fixAllState, progressTracker, cancellationToken).ConfigureAwait(false);
215solution, batchOfFixes, progressTracker, cancellationToken).ConfigureAwait(false);
232oldSolution, diagnosticsAndCodeActions, progressTracker, cancellationToken).ConfigureAwait(false);
240diagnosticsAndCodeActions, cancellationToken).ConfigureAwait(false);
336var newText = await merger.GetFinalMergedTextAsync(cancellationToken).ConfigureAwait(false);
353oldSolution, progressTracker, cancellationToken: cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (8)
152var codeFixes = await GetSuppressionsAsync(document, span, diagnostics, skipSuppressMessage: true, skipUnsuppress: true, cancellationToken: cancellationToken).ConfigureAwait(false);
159var suppressionTargetInfo = await GetSuppressionTargetInfoAsync(document, span, cancellationToken).ConfigureAwait(false);
166document, document.Project, diagnostics, suppressionTargetInfo, skipSuppressMessage, skipUnsuppress, cancellationToken).ConfigureAwait(false);
177var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
182cancellationToken).ConfigureAwait(false);
198var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
243var codeAction = await RemoveSuppressionCodeAction.CreateAsync(suppressionTargetInfo, documentOpt, project, diagnostic, this, cancellationToken).ConfigureAwait(false);
268var root = await syntaxTree.GetRootAsync(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);
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (7)
27var codeAction = await GetFixAllCodeActionAsync(fixAllContext).ConfigureAwait(false);
34return await codeAction.GetChangedSolutionInternalAsync(fixAllContext.State.Solution, fixAllContext.Progress, fixAllContext.CancellationToken).ConfigureAwait(false);
40var codeAction = await GetFixAllCodeActionAsync(fixAllContext).ConfigureAwait(false);
47codeAction, showPreviewChangesDialog, fixAllContext.Progress, fixAllContext.State, fixAllContext.CancellationToken).ConfigureAwait(false);
64fixAllState.Solution, progressTracker, cancellationToken).ConfigureAwait(false);
72fixAllState.Solution, progressTracker, cancellationToken).ConfigureAwait(false);
178action = await fixAllContext.State.FixAllProvider.GetCodeActionAsync(fixAllContext).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (16)
53var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
67symbol, solution, progress, documents: null, s_nonParallelSearch, progress.CancellationToken).ConfigureAwait(false);
69return await onResults(progress).ConfigureAwait(false);
76return await onCapped(progress).ConfigureAwait(false);
87return await solution.GetRequiredProject(projectId).GetDependentVersionAsync(cancellationToken).ConfigureAwait(false);
99maxSearchResults, cancellationToken).ConfigureAwait(false);
111var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
120var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true);
207var result = await Task.WhenAll(referenceTasks).ConfigureAwait(false);
210}, onCapped: null, searchCap: 0, cancellationToken: cancellationToken).ConfigureAwait(false);
234var results = await SpanMappingHelper.TryGetMappedSpanResultAsync(document, [span], cancellationToken).ConfigureAwait(false);
260var referenceExcerpt = await DocumentExcerptHelper.TryExcerptAsync(document, span, ExcerptMode.SingleLine, classificationOptions, cancellationToken).ConfigureAwait(false);
261var tooltipExcerpt = await DocumentExcerptHelper.TryExcerptAsync(document, span, ExcerptMode.Tooltip, classificationOptions, cancellationToken).ConfigureAwait(false);
364var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
380var result = await Task.WhenAll(descriptorTasks).ConfigureAwait(false);
391var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (7)
60addImportOptions, packageSources, cancellationToken).ConfigureAwait(false);
124newDocument, insertSpans, formattingOptions, cancellationToken).ConfigureAwait(false);
132cleanedDocument, organizeImportsOptions, cancellationToken).ConfigureAwait(false);
145newDocument = await CleanUpNewLinesAsync(newDocument, insertSpan, formattingOptions, cancellationToken).ConfigureAwait(false);
202document.Project.Solution, progressTracker, cancellationToken).ConfigureAwait(false);
214newSolution = await codeAction.GetRequiredChangedSolutionAsync(progressTracker, cancellationToken).ConfigureAwait(false);
222document, newDocument, TextDifferenceTypes.Line, cancellationToken).ConfigureAwait(false);
CodeRefactorings\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.MoveTypeEditor.cs (10)
64var documentWithMovedType = await AddNewDocumentWithSingleTypeDeclarationAsync(newDocumentId).ConfigureAwait(false);
73var solutionWithBothDocumentsUpdated = await RemoveTypeFromSourceDocumentAsync(sourceDocument).ConfigureAwait(false);
75return await RemoveUnnecessaryImportsAsync(solutionWithBothDocumentsUpdated, sourceDocument.Id, documentWithMovedType.Id).ConfigureAwait(false);
87documentWithMovedType = await removeUnnecessaryImports.RemoveUnnecessaryImportsAsync(documentWithMovedType, CancellationToken).ConfigureAwait(false);
102CancellationToken).ConfigureAwait(false);
120var documentEditor = await DocumentEditor.CreateAsync(document, CancellationToken).ConfigureAwait(false);
156modifiedRoot = await AddFinalNewLineIfDesiredAsync(document, modifiedRoot).ConfigureAwait(false);
166newDocument, FileName, document, this.CancellationToken).ConfigureAwait(false);
232var documentEditor = await DocumentEditor.CreateAsync(sourceDocument, CancellationToken).ConfigureAwait(false);
244updatedDocument = await AddFileBannerHelpers.CopyBannerAsync(updatedDocument, sourceDocument.FilePath, sourceDocument, this.CancellationToken).ConfigureAwait(false);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (35)
122var applicableContainers = await GetValidContainersFromAllLinkedDocumentsAsync(document, container, cancellationToken).ConfigureAwait(false);
137var originalNamespaceDeclarations = await GetTopLevelNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
162var namespaces = await GetTopLevelNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
166solution = await ChangeNamespaceAsync(document, namespaceToRename, targetNamespace, cancellationToken).ConfigureAwait(false);
203var containersFromAllDocuments = await GetValidContainersFromAllLinkedDocumentsAsync(document, container, cancellationToken).ConfigureAwait(false);
213var annotatedSolution = await AnnotateContainersAsync(solution, containersFromAllDocuments, cancellationToken).ConfigureAwait(false);
230solutionAfterNamespaceChange, documentId, declaredNamespace, targetNamespace, cancellationToken).ConfigureAwait(false);
235var solutionAfterFirstMerge = await MergeDiffAsync(solution, solutionAfterNamespaceChange, cancellationToken).ConfigureAwait(false);
258cancellationToken).ConfigureAwait(false);
264cancellationToken).ConfigureAwait(false);
266return await MergeDiffAsync(solutionAfterFirstMerge, solutionAfterImportsRemoved, cancellationToken).ConfigureAwait(false);
286var container = await TryGetApplicableContainerFromSpanAsync(document, span, cancellationToken).ConfigureAwait(false);
317var documentEditor = await solutionEditor.GetDocumentEditorAsync(id, cancellationToken).ConfigureAwait(false);
441var declaredSymbols = await GetDeclaredSymbolsInContainerAsync(document, container, cancellationToken).ConfigureAwait(false);
443var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
452=> FindReferenceLocationsForSymbolAsync(document, declaredSymbol, cancellationToken))).ConfigureAwait(false);
470document, refLocationsInCurrentDocument, oldNamespace, newNamespace, cancellationToken).ConfigureAwait(false);
496cancellationToken).ConfigureAwait(false);
500cancellationToken).ConfigureAwait(false);
511var referencedSymbols = await FindReferencesAsync(symbol, document, cancellationToken).ConfigureAwait(false);
529var referencedMethodSymbols = await FindReferencesAsync(methodSymbol, document, cancellationToken).ConfigureAwait(false);
587document, this, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false);
612cancellationToken).ConfigureAwait(false);
635return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false);
688document, changeNamespaceService, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false);
698cancellationToken).ConfigureAwait(false);
702documentWithAdditionalImports, Formatter.Annotation, documentOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
704return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false);
711var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
718cancellationToken).ConfigureAwait(false);
737var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
826cancellationToken).ConfigureAwait(false);
830cancellationToken).ConfigureAwait(false);
846token).ConfigureAwait(false);
893var mergeResult = await diffMergingSession.MergeDiffsAsync(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\CompletionService_GetCompletions.cs (7)
72var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
87var additionalAugmentingProviders = await GetAugmentingProvidersAsync(document, triggeredProviders, caretPosition, trigger, options, cancellationToken).ConfigureAwait(false);
97document, caretPosition, trigger, options, completionListSpan, triggeredProviders, sharedContext, cancellationToken).ConfigureAwait(false);
116document, caretPosition, trigger, options, completionListSpan, augmentingProviders, sharedContext, cancellationToken).ConfigureAwait(false);
164cancellationToken).ConfigureAwait(false);
243provider, document, caretPosition, trigger, options, completionListSpan, sharedContext, cancellationToken).ConfigureAwait(false);
248cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractAwaitCompletionProvider.cs (6)
88var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
168return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false);
178var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
187return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false);
196document.Project.Solution, semanticModel, declaration, cancellationToken).ConfigureAwait(false);
200document, 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\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\AbstractMemberInsertingCompletionProvider.cs (11)
50var (newDocument, newSpan) = await DetermineNewDocumentAsync(document, item, cancellationToken).ConfigureAwait(false);
53var changes = await newDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
103var memberContainingDocument = await GenerateMemberAndUsingsAsync(document, completionItem, line, cancellationToken).ConfigureAwait(false);
114var result = await RemoveDestinationNodeAsync(memberContainingDocument, memberContainingDocumentCleanupOptions, cancellationToken).ConfigureAwait(false);
132var symbols = await SymbolCompletionItem.GetSymbolsAsync(completionItem, document, cancellationToken).ConfigureAwait(false);
147document, completionItem, semanticModel.Compilation, member, containingType, cancellationToken).ConfigureAwait(false);
152IMethodSymbol method => await codeGenService.AddMethodAsync(context, containingType, method, cancellationToken).ConfigureAwait(false),
153IPropertySymbol property => await codeGenService.AddPropertyAsync(context, containingType, property, cancellationToken).ConfigureAwait(false),
154IEventSymbol @event => await codeGenService.AddEventAsync(context, containingType, @event, cancellationToken).ConfigureAwait(false),
223document = await Simplifier.ReduceAsync(document, Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false);
224document = await Formatter.FormatAsync(document, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (8)
36var shouldProvideSymbols = await ShouldProvideAvailableSymbolsInCurrentContextAsync(completionContext, context, position, options, cancellationToken).ConfigureAwait(false);
59var shouldPreselectInferredTypes = await ShouldPreselectInferredTypesAsync(completionContext, position, options, cancellationToken).ConfigureAwait(false);
233var description = await TryGetDescriptionAsync(document.Id).ConfigureAwait(false);
244description = await TryGetDescriptionAsync(relatedId).ConfigureAwait(false);
254var context = await Utilities.CreateSyntaxContextWithExistingSpeculativeModelAsync(relatedDocument, position, cancellationToken).ConfigureAwait(false) as TSyntaxContext;
256var symbols = await TryGetSymbolsForContextAsync(completionContext: null, context, options, cancellationToken).ConfigureAwait(false);
274return await SymbolCompletionItem.GetDescriptionAsync(item, bestSymbols.SelectAsArray(t => t.Symbol), document, context.SemanticModel, displayOptions, cancellationToken).ConfigureAwait(false);
289var result = await IsTriggerOnDotAsync(document, characterPosition, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractSymbolCompletionProvider.cs (9)
344var isSemanticTriggerCharacter = await IsSemanticTriggerCharacterAsync(document, position - 1, cancellationToken).ConfigureAwait(false);
355var syntaxContext = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false) as TSyntaxContext;
358var regularItems = await GetItemsAsync(completionContext, syntaxContext, document, position, options, cancellationToken).ConfigureAwait(false);
380var itemsForCurrentDocument = await GetSymbolsAsync(completionContext, syntaxContext, position, options, cancellationToken).ConfigureAwait(false);
389var contextAndSymbolLists = await GetPerContextSymbolsAsync(completionContext, document, options, documentIdToIndex.Keys, cancellationToken).ConfigureAwait(false);
451relatedDocument, cancellationToken).ConfigureAwait(false) as TSyntaxContext;
455completionContext, syntaxContext, options, cancellationToken).ConfigureAwait(false);
461cancellationToken).ConfigureAwait(false);
473: await GetSymbolsAsync(completionContext, syntaxContext, syntaxContext.Position, options, cancellationToken).ConfigureAwait(false);
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.cs (6)
36var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
68var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
89namespaceInScope, targetTypesSymbols, forceCacheCreation, hideAdvancedMembers, cancellationToken).ConfigureAwait(false);
111forceCacheCreation, hideAdvancedMembers, isStatic, cancellationToken).ConfigureAwait(false);
113var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
241var checksum = await SymbolTreeInfo.GetSourceSymbolsChecksumAsync(project, cancellationToken).ConfigureAwait(false);
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (6)
26var (strippedDocument, position) = await GetDocumentWithoutInvokingTextAsync(document, SnippetCompletionItem.GetInvocationPosition(item), cancellationToken).ConfigureAwait(false);
35var snippetChange = await snippetProvider.GetSnippetChangeAsync(strippedDocument, position, cancellationToken).ConfigureAwait(false);
44var allTextChanges = await allChangesDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
49var lspSnippet = await RoslynLSPSnippetConverter.GenerateLSPSnippetAsync(allChangesDocument, snippetChange.FinalCaretPosition, snippetChange.Placeholders, change, item.Span.Start, cancellationToken).ConfigureAwait(false);
83var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
104return await Task.FromResult(CommonCompletionItem.GetDescription(item)).ConfigureAwait(false);
Completion\Providers\SymbolCompletionItem.cs (6)
146var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
158var linkedCompilation = await linkedDoc.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
194var symbols = await GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false);
195return await GetDescriptionForSymbolsAsync(item, document, symbols, options, cancellationToken).ConfigureAwait(false);
213return await CommonCompletionUtilities.CreateDescriptionAsync(services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
424return await CommonCompletionUtilities.CreateDescriptionAsync(document.Project.Solution.Services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (6)
46var (anonymousObject, anonymousType) = await TryGetAnonymousObjectAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
81var (anonymousObject, anonymousType) = await TryGetAnonymousObjectAsync(document, span, cancellationToken).ConfigureAwait(false);
105document, className, isRecord, properties, cancellationToken).ConfigureAwait(false);
146updatedDocument, formattingOptions, cancellationToken).ConfigureAwait(false);
297localNameOpt: SyntaxGeneratorExtensions.OtherName, cancellationToken).ConfigureAwait(false);
300readonlyProperties, cancellationToken).ConfigureAwait(false);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (20)
65document, textSpan, cancellationToken).ConfigureAwait(false);
224var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
238solution, result.Value.DocumentTextChanges, cancellationToken).ConfigureAwait(false);
241resultSolution, result.Value.RenamedToken, cancellationToken).ConfigureAwait(false);
246document, span, scope, isRecord, cancellationToken).ConfigureAwait(false);
266document, span, cancellationToken).ConfigureAwait(false);
295var parameterNamingRule = await document.GetApplicableNamingRuleAsync(SymbolKind.Parameter, Accessibility.NotApplicable, cancellationToken).ConfigureAwait(false);
300document, scope, isRecord, structName, capturedTypeParameters, tupleType, parameterNamingRule, cancellationToken).ConfigureAwait(false);
304document, tupleExprOrTypeNode, tupleType, scope, cancellationToken).ConfigureAwait(false);
319document, documentToEditorMap, cancellationToken).ConfigureAwait(false);
341var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
388container, cancellationToken).ConfigureAwait(false);
426document, tupleExprOrTypeNode, cancellationToken).ConfigureAwait(false),
428document.Project, tupleType, cancellationToken).ConfigureAwait(false),
430document.Project, tupleType, cancellationToken).ConfigureAwait(false),
604updatedDocument, formattingOptions, cancellationToken).ConfigureAwait(false);
623containerToUpdate, cancellationToken).ConfigureAwait(false);
628containerToUpdate, cancellationToken).ConfigureAwait(false);
825localNameOpt: SyntaxGeneratorExtensions.OtherName, cancellationToken).ConfigureAwait(false);
828ImmutableArray<ISymbol>.CastUp(fields), cancellationToken).ConfigureAwait(false);
Copilot\ICopilotChangeAnalysisService.cs (9)
60var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
75document, normalizedChanges, cancellationToken).ConfigureAwait(false);
91var oldText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
106newDocument, newSpans, cancellationToken).ConfigureAwait(false);
112newDocument, newSpans, cancellationToken).ConfigureAwait(false);
178newDocument, newSpans, diagnosticKind, cancellationToken).ConfigureAwait(false);
216newDocument, span, diagnosticKind, cancellationToken).ConfigureAwait(false);
240var codeFixCollections = await ComputeCodeFixCollectionsAsync().ConfigureAwait(false);
265.ConfigureAwait(false);
Copilot\IProposalAdjusterService.cs (9)
89var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
104cancellationToken).ConfigureAwait(false);
126var oldText = await originalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
139var adjustedDocument = await adjuster(originalDocument, forkedDocument, lineFormattingOptions, cancellationToken).ConfigureAwait(false);
155var allChanges = await forkedDocument.GetTextChangesAsync(originalDocument, cancellationToken).ConfigureAwait(false);
227var totalNewSpan = await GetSpanOfChangesAsync(originalDocument, forkedDocument, cancellationToken).ConfigureAwait(false);
234forkedDocument, totalNewSpan, cleanupDocument: false, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
253var totalNewSpan = await GetSpanOfChangesAsync(originalDocument, forkedDocument, cancellationToken).ConfigureAwait(false);
285var changes = await newDocument.GetTextChangesAsync(oldDocument, 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\Service\DiagnosticAnalyzerService.IncrementalMemberEditAnalyzer.cs (7)
70var changedMemberAndIdAndSpansAndDocument = await TryGetChangedMemberAsync(document, root, cancellationToken).ConfigureAwait(false);
75return await ComputeDocumentDiagnosticsCoreInProcessAsync(executor, cancellationToken).ConfigureAwait(false);
82var oldDocumentVersion = await GetDiagnosticVersionAsync(oldDocument.Project, cancellationToken).ConfigureAwait(false);
111return await ComputeDocumentDiagnosticsCoreInProcessAsync(executor, cancellationToken).ConfigureAwait(false);
115var oldMemberSpans = await GetOrCreateMemberSpansAsync(oldDocument, oldDocumentVersion, cancellationToken).ConfigureAwait(false);
202var changedMember = await documentDifferenceService.GetChangedMemberAsync(lastDocument, document, cancellationToken).ConfigureAwait(false);
235var memberSpans = await CreateMemberSpansAsync(document, version, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (8)
35var result = await ComputeDiagnosticsForAnalyzersAsync(analyzers).ConfigureAwait(false);
40result = await RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync(result).ConfigureAwait(false);
57var projectLoadedSuccessfully = await project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false);
100documentAnalysisScope: null, project, 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\DiagnosticAnalyzerService_CoreAnalyze.cs (9)
35var result = await AnalyzeAsync().ConfigureAwait(false);
41var analysisResult = await GetAnalysisResultAsync().ConfigureAwait(false);
42var additionalPragmaSuppressionDiagnostics = await GetPragmaSuppressionAnalyzerDiagnosticsAsync().ConfigureAwait(false);
62analyzers, skippedAnalyzersInfo, cancellationToken).ConfigureAwait(false);
106return await compilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false);
117return await compilationWithAnalyzers.GetAnalysisResultAsync(tree, documentAnalysisScope.Span, documentAnalysisScope.Analyzers, cancellationToken).ConfigureAwait(false);
121return await compilationWithAnalyzers.GetAnalysisResultAsync(documentAnalysisScope.AdditionalFile, documentAnalysisScope.Span, documentAnalysisScope.Analyzers, cancellationToken).ConfigureAwait(false);
126return await compilationWithAnalyzers.GetAnalysisResultAsync(model, documentAnalysisScope.Span, documentAnalysisScope.Analyzers, cancellationToken).ConfigureAwait(false);
172cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (10)
67syntaxAnalyzers = await FilterAnalyzersAsync(syntaxAnalyzers, AnalysisKind.Syntax, range).ConfigureAwait(false);
68semanticSpanAnalyzers = await FilterAnalyzersAsync(semanticSpanAnalyzers, AnalysisKind.Semantic, range).ConfigureAwait(false);
69semanticDocumentAnalyzers = await FilterAnalyzersAsync(semanticDocumentAnalyzers, AnalysisKind.Semantic, span: null).ConfigureAwait(false);
74cancellationToken).ConfigureAwait(false);
159if (!await MatchesPriorityAsync(analyzer).ConfigureAwait(false))
205await this.IsDeprioritizedAnalyzerAsync(project, analyzer, cancellationToken).ConfigureAwait(false))
262return await this.IsDeprioritizedAnalyzerAsync(project, analyzer, cancellationToken).ConfigureAwait(false);
293document.Project, allAnalyzers, hostAnalyzerInfo, this.CrashOnAnalyzerException, cancellationToken).ConfigureAwait(false);
323var version = await GetDiagnosticVersionAsync(document.Project, cancellationToken).ConfigureAwait(false);
328var diagnosticsMap = await computeTask.ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (12)
26var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
45var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
68var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
108var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
131var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
146cancellationToken).ConfigureAwait(false);
155var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
167project, diagnosticIds, analyzerFilter, cancellationToken).ConfigureAwait(false);
173var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
185project, diagnosticIds, cancellationToken).ConfigureAwait(false);
196var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
208document, range, diagnosticIdFilter, priority, diagnosticKind, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DocumentAnalysisExecutor.cs (6)
92: await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
94documentAnalyzer, textDocument, kind, _compilationWithAnalyzers?.Compilation, tree, cancellationToken).ConfigureAwait(false);
115var isEnabled = await textDocument.Project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false);
156var diags = await diagnostics.ToDiagnosticsAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
173analysisScope, analysisScope.TextDocument.Project, _compilationWithAnalyzers, _logPerformanceInfo, getTelemetryInfo: false, cancellationToken).ConfigureAwait(false);
370var diagnostic = await diagnosticData.ToDiagnosticAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (9)
41var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
60document, position, documentsToSearch, options, cancellationToken).ConfigureAwait(false);
76semanticModel, position, solution.Services, cancellationToken).ConfigureAwait(false);
82symbol, document, documentsToSearch, cancellationToken).ConfigureAwait(false);
131symbol, options, cancellationToken).ConfigureAwait(false);
191additionalReferences.AddRange(await GetAdditionalReferencesAsync(currentDocument, symbol, cancellationToken).ConfigureAwait(false));
197documentsToSearch, cancellationToken).ConfigureAwait(false);
296var span = await GetLocationSpanAsync(solution, location, cancellationToken).ConfigureAwait(false);
319var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
EditAndContinue\EditSession.cs (11)
133var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false);
626var (oldDocument, oldDocumentState) = await DebuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(newDocument, cancellationToken, reloadOutOfSyncDocument: true).ConfigureAwait(false);
1167var (mvid, mvidReadError) = await DebuggingSession.GetProjectModuleIdAsync(newProject, cancellationToken).ConfigureAwait(false);
1233await AnalyzeProjectDifferencesAsync(solution, projectDifferences, solutionActiveStatementSpanProvider, projectDiagnostics, projectSupportsEditAndContinue, cancellationToken).ConfigureAwait(false);
1299var moduleBlockingDiagnosticId = await ReportModuleDiagnosticsAsync(mvid, oldProject, newProject, changedDocumentAnalyses, projectDiagnostics, cancellationToken).ConfigureAwait(false);
1330var oldCompilation = await oldProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
1341var newCompilation = await newProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
1368var oldActiveStatementsMap = await BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false);
1379var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false);
1439var unsupportedChangesDiagnostic = await GetUnsupportedChangesDiagnosticAsync(emitResult, cancellationToken).ConfigureAwait(false);
1550Telemetry.LogRuntimeCapabilities(await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false));
EncapsulateField\AbstractEncapsulateFieldService.cs (19)
47var fields = await GetFieldsAsync(document, span, cancellationToken).ConfigureAwait(false);
60var fields = await GetFieldsAsync(document, span, cancellationToken).ConfigureAwait(false);
119var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
133solution, result.Value, cancellationToken).ConfigureAwait(false);
138document, fields, updateReferences, cancellationToken).ConfigureAwait(false);
157var nextSolution = await EncapsulateFieldAsync(document, currentField, updateReferences, cancellationToken).ConfigureAwait(false);
194updateReferences, solution, document, field, finalFieldName, generatedPropertyName, cancellationToken).ConfigureAwait(false);
198var rewrittenFieldDeclaration = await RewriteFieldNameAndAccessibilityAsync(finalFieldName, markFieldPrivate, document, declarationAnnotation, cancellationToken).ConfigureAwait(false);
202document = await Formatter.FormatAsync(document.WithSyntaxRoot(rewrittenFieldDeclaration), Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false);
222document, document.Project.Solution, field, generatedProperty, cancellationToken).ConfigureAwait(false);
224documentWithProperty = await Formatter.FormatAsync(documentWithProperty, Formatter.Annotation, formattingOptions, cancellationToken).ConfigureAwait(false);
225documentWithProperty = await Simplifier.ReduceAsync(documentWithProperty, simplifierOptions, cancellationToken).ConfigureAwait(false);
250cancellationToken).ConfigureAwait(false);
253var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
263cancellationToken).ConfigureAwait(false);
271cancellationToken).ConfigureAwait(false);
284solution, field, s_symbolRenameOptions, cancellationToken).ConfigureAwait(false);
290.ResolveConflictsAsync(field, finalName, cancellationToken).ConfigureAwait(false);
334context, destination, property, cancellationToken).ConfigureAwait(false);
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);
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);
ExtractMethod\MethodExtractor.cs (7)
73OriginalSelectionResult, analyzeResult, insertionPointNode, cancellationToken).ConfigureAwait(false);
75var triviaResult = await PreserveTriviaAsync(analyzedDocument.Root, cancellationToken).ConfigureAwait(false);
81var generatedCode = await generator.GenerateAsync(cancellationToken).ConfigureAwait(false);
83var afterTriviaRestored = await triviaResult.ApplyAsync(generatedCode, cancellationToken).ConfigureAwait(false);
99documentWithoutFinalFormatting, invocationNameToken, methodDefinition, cancellationToken).ConfigureAwait(false);
103documentWithoutFinalFormatting, invocationNameToken, cancellationToken).ConfigureAwait(false);
151var simplifiedDocument = await Simplifier.ReduceAsync(annotatedDocument, Simplifier.Annotation, this.Options.CodeCleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false);
FindUsages\AbstractFindUsagesService_FindImplementations.cs (10)
29document, position, cancellationToken).ConfigureAwait(false);
45var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
77var implementations = await FindSourceImplementationsAsync(solution, symbol, cancellationToken).ConfigureAwait(false);
102symbol, solution, cancellationToken).ConfigureAwait(false);
115solution, linkedSymbol, cancellationToken).ConfigureAwait(false);
144var implementations = await FindSourceAndMetadataImplementationsAsync(solution, symbol, cancellationToken).ConfigureAwait(false);
175symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
191implementation, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
201namedType, solution, transitive: true, cancellationToken: cancellationToken).ConfigureAwait(false));
206symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
FindUsages\DefinitionItemFactory.cs (6)
54solution, definition, locations, includeHiddenLocations, cancellationToken).ConfigureAwait(false);
74var sourceLocations = await GetSourceLocationsAsync(solution, definition, definition.Locations, includeHiddenLocations, cancellationToken).ConfigureAwait(false);
92var sourceLocations = await GetSourceLocationsAsync(solution, definition, locations, includeHiddenLocations, cancellationToken).ConfigureAwait(false);
250var isGeneratedCode = await document.IsGeneratedCodeAsync(cancellationToken).ConfigureAwait(false);
262return (ClassifiedSpansAndHighlightSpan?)await ClassifiedSpansAndHighlightSpanFactory.ClassifyAsync(documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
325documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
FullyQualify\AbstractFullyQualifyService.cs (9)
42var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
56return await GetFixDataInCurrentProcessAsync(document, span, cancellationToken).ConfigureAwait(false);
78var matchingTypes = await FindAsync(name, ignoreCase, SymbolFilter.Type).ConfigureAwait(false);
79var matchingAttributeTypes = inAttributeContext ? await FindAsync(name + nameof(Attribute), ignoreCase, SymbolFilter.Type).ConfigureAwait(false) : [];
80var matchingNamespaces = inAttributeContext ? [] : await FindAsync(name, ignoreCase, SymbolFilter.Namespace).ConfigureAwait(false);
116project, query, filter, cancellationToken).ConfigureAwait(false);
212var textChanges = await ProcessNodeAsync(document, simpleName, containerName, symbolResult.OriginalSymbol, cancellationToken).ConfigureAwait(false);
219var newRoot = await ReplaceNodeAsync(simpleName, containerName, originalSymbol.IsType, cancellationToken).ConfigureAwait(false);
224return await cleanedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (9)
103priorDocument, action, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
113priorDocument.Project.Solution, codeAction, progressTracker, cancellationToken).ConfigureAwait(false);
141var operations = await dialogAction.GetOperationsAsync(originalSolution, options, progressTracker, cancellationToken).ConfigureAwait(false);
146return await action.GetOperationsAsync(originalSolution, progressTracker, cancellationToken).ConfigureAwait(false);
168document, textSpan, addNullChecks: false, desiredAccessibility, cancellationToken).ConfigureAwait(false);
177var nonSelectionAction = await HandleNonSelectionAsync(document, textSpan, desiredAccessibility, cancellationToken).ConfigureAwait(false);
185document, textSpan, forRefactoring: true, cancellationToken).ConfigureAwait(false);
270var info = await GetSelectedMemberInfoAsync(document, textSpan, allowPartialSelection: true, cancellationToken).ConfigureAwait(false);
273var state = await State.TryGenerateAsync(this, document, textSpan, info.ContainingType, desiredAccessibility, info.SelectedMembers, cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (9)
53methods.Add(await CreateEqualsMethodAsync(cancellationToken).ConfigureAwait(false));
56var constructedTypeToImplement = await GetConstructedTypeToImplementAsync(cancellationToken).ConfigureAwait(false);
60methods.Add(await CreateIEquatableEqualsMethodAsync(constructedTypeToImplement, cancellationToken).ConfigureAwait(false));
65methods.Add(await CreateGetHashCodeMethodAsync(cancellationToken).ConfigureAwait(false));
87_typeDeclaration, newTypeDeclaration, cancellationToken).ConfigureAwait(false);
91newDocument, formattingOptions, cancellationToken).ConfigureAwait(false);
121newDocument = await ImportAdder.AddImportsFromSymbolAnnotationAsync(newDocument, addImportOptions, cancellationToken).ConfigureAwait(false);
127var compilation = await _document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
205_document, _containingType, _selectedMembers, constructedEquatableType, cancellationToken).ConfigureAwait(false);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (5)
61var actions = await GenerateEqualsAndGetHashCodeFromMembersAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
117hasEquals, hasGetHashCode, withDialog: true, globalOptions, cancellationToken).ConfigureAwait(false);
175var info = await GetSelectedMemberInfoAsync(document, textSpan, allowPartialSelection: false, cancellationToken).ConfigureAwait(false);
191hasEquals, hasGetHashCode, withDialog: false, globalOptions: null, cancellationToken).ConfigureAwait(false);
234var codeActions = await Task.WhenAll(tasks).ConfigureAwait(false);
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (4)
28var semanticInfo = await SymbolFinder.GetSemanticInfoAtPositionAsync(semanticModel, position, services, cancellationToken).ConfigureAwait(false);
51var mapping = await mappingService.MapSymbolAsync(document, symbol, cancellationToken).ConfigureAwait(false);
60var explicitlyDeclaredSymbol = await FindRelatedExplicitlyDeclaredSymbolAsync(project, symbol, cancellationToken).ConfigureAwait(false);
70semanticModel, position, syntaxFacts.IsBindableToken, cancellationToken, findInsideTrivia: true).ConfigureAwait(false);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (13)
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);
566var definition = await ToSlimDefinitionItemAsync(solution, targetSymbol, 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);
724cancellation).ConfigureAwait(false);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (7)
211document = await AddStringCheckAsync(document, parameter, functionDeclaration, (IMethodSymbol)parameter.ContainingSymbol, blockStatement, NullOrEmptySuffix, lazySimplifierOptions, cancellationToken).ConfigureAwait(false);
217(IMethodSymbol)parameter.ContainingSymbol, blockStatement, lazySimplifierOptions, cancellationToken).ConfigureAwait(false);
552document, parameter, blockStatement, options, cancellationToken).ConfigureAwait(false);
561cancellationToken).ConfigureAwait(false);
577cancellationToken).ConfigureAwait(false);
593cancellationToken).ConfigureAwait(false);
918var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (11)
83var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
89document, parameter, blockStatement, rules, parameterNameParts.BaseNameParts, cancellationToken).ConfigureAwait(false);
99method, blockStatement, rules, cancellationToken).ConfigureAwait(false);
414cancellationToken).ConfigureAwait(false);
431document, constructorDeclaration, blockStatement, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
440documentWithMemberAdded, currentParameter, currentFieldOrProperty, cancellationToken).ConfigureAwait(false);
448var compilation = await finalSolution.GetRequiredProject(documentWithMemberAdded.Project.Id).GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
453var propertySyntax = await declarationService.GetDeclarations(finalFieldOrProperty)[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
459var otherRoot = await propertySyntax.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
526var compilation = await documentWithMemberAdded.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
621var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (7)
54var expression = await document.TryGetRelevantNodeAsync<TExpressionSyntax>(textSpan, cancellationToken).ConfigureAwait(false);
95var actions = await GetActionsAsync(document, expression, methodSymbol, containingMethod, cancellationToken).ConfigureAwait(false);
159document, expression, cancellationToken).ConfigureAwait(false);
166var methodCallSites = await FindCallSitesAsync(document, methodSymbol, cancellationToken).ConfigureAwait(false);
264var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
271var newRoot = await rewriter.RewriteDocumentAsync(compilation, document, invocations, cancellationToken).ConfigureAwait(false);
276cancellationToken).ConfigureAwait(false);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (15)
50compilation, document, invocations, insertionIndex, cancellationToken).ConfigureAwait(false);
55compilation, document, insertionIndex, invocations, cancellationToken).ConfigureAwait(false);
233var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
234var expressionParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false);
269? await ExtractMethodAsync(validParameters, newMethodIdentifier, _generator, cancellationToken).ConfigureAwait(false)
270: await GenerateNewMethodOverloadAsync(insertionIndex, _generator, cancellationToken).ConfigureAwait(false);
274var parameterType = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false);
400var typeSymbol = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false);
402validParameters, newMethodIdentifier, typeSymbol, isTrampoline: true, cancellationToken).ConfigureAwait(false);
445validParameters: null, newMethodIdentifier: null, typeSymbol: null, isTrampoline: false, cancellationToken).ConfigureAwait(false);
496var expressionToParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false);
497var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
535var parameterType = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false);
640var matches = await FindMatchesAsync(cancellationToken).ConfigureAwait(false);
641var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (4)
58(TStatementSyntax?)await document.TryGetRelevantNodeAsync<TLocalDeclarationSyntax>(span, cancellationToken).ConfigureAwait(false) ??
59await document.TryGetRelevantNodeAsync<TExpressionStatementSyntax>(span, cancellationToken).ConfigureAwait(false);
200document, declarationStatement, statementsToSurround, usingStatement, surroundingStatements, declarationStatementIndex, cancellationToken).ConfigureAwait(false);
235document, expressionStatement, statementsToSurround, usingStatement, surroundingStatements, statementIndex, cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (7)
70var compilation = await sourceProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
94var infoKey = await GetUniqueDocumentKeyAsync(sourceProject, topLevelNamedType, signaturesOnly: !useDecompiler, cancellationToken).ConfigureAwait(false);
124var decompilationDocument = await decompiledSourceService.AddSourceToAsync(temporaryDocument, compilation, symbol, refInfo.metadataReference, refInfo.assemblyLocation, formattingOptions: null, cancellationToken).ConfigureAwait(false);
149temporaryDocument = await sourceFromMetadataService.AddSourceToAsync(temporaryDocument, compilation, symbol, formattingOptions: null, cancellationToken).ConfigureAwait(false);
200navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, temporaryDocument, cancellationToken).ConfigureAwait(false);
213navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, document, cancellationToken).ConfigureAwait(false);
394var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (17)
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);
129cancellationToken).ConfigureAwait(false);
141var movedSolution = await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, cancellationToken).ConfigureAwait(false);
201oldSolution, sourceDocId.ProjectId, selectedMembers, cancellationToken).ConfigureAwait(false);
203var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, oldSolution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false);
213cancellationToken).ConfigureAwait(false);
230return await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, cancellationToken).ConfigureAwait(false);
246var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
256cancellationToken).ConfigureAwait(false);
283var docEditor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
307cancellationToken: cancellationToken).ConfigureAwait(false);
368var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
379: await SymbolFinder.FindReferencesAsync(resolvedMember, solution, cancellationToken).ConfigureAwait(false);
383var symbolRefs = await Task.WhenAll(tasks).ConfigureAwait(false);
MoveToNamespace\AbstractMoveToNamespaceService.cs (14)
54var typeAnalysisResult = await AnalyzeTypeAtPositionAsync(document, span.Start, cancellationToken).ConfigureAwait(false);
77var moveToNamespaceAnalysisResult = await TryAnalyzeNamespaceAsync(document, node, position, cancellationToken).ConfigureAwait(false);
84moveToNamespaceAnalysisResult = await TryAnalyzeNamedTypeAsync(document, node, cancellationToken).ConfigureAwait(false);
100if (await changeNamespaceService.CanChangeNamespaceAsync(document, declarationSyntax, cancellationToken).ConfigureAwait(false))
103var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
152if (await changeNamespaceService.CanChangeNamespaceAsync(document, container, cancellationToken).ConfigureAwait(false))
154var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
220var memberSymbols = await GetMemberSymbolsAsync(document, container, cancellationToken).ConfigureAwait(false);
232cancellationToken).ConfigureAwait(false);
253cancellationToken).ConfigureAwait(false);
259var mergedSolution = await PropagateChangeToLinkedDocumentsAsync(modifiedDocument, formattingOptions, cancellationToken).ConfigureAwait(false);
272cancellationToken).ConfigureAwait(false);
278var formattedDocument = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, formattingOptions, cancellationToken).ConfigureAwait(false);
307var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
QuickInfo\CommonQuickInfoProvider.cs (7)
22var tokens = await GetTokensAsync(tree, context.Position, context.CancellationToken).ConfigureAwait(false);
26var info = await GetQuickInfoAsync(context, token).ConfigureAwait(false);
36var tokens = await GetTokensAsync(context.SemanticModel.SyntaxTree, context.Position, context.CancellationToken).ConfigureAwait(false);
40var info = await GetQuickInfoAsync(context, token).ConfigureAwait(false);
51var token = await tree.GetTouchingTokenAsync(position, cancellationToken, findInsideTrivia: true).ConfigureAwait(false);
77return await BuildQuickInfoAsync(context, token).ConfigureAwait(false);
90return await BuildQuickInfoAsync(context, token).ConfigureAwait(false);
QuickInfo\CommonSemanticQuickInfoProvider.cs (5)
28var (tokenInformation, supportedPlatforms) = await ComputeQuickInfoDataAsync(context, token).ConfigureAwait(false);
35var onTheFlyDocsInfo = await GetOnTheFlyDocsInfoAsync(context, cancellationToken).ConfigureAwait(false);
37services, semanticModel, token, tokenInformation, supportedPlatforms, context.Options, onTheFlyDocsInfo, cancellationToken).ConfigureAwait(false);
49context.Services, context.SemanticModel, token, tokenInformation, supportedPlatforms: null, context.Options, onTheFlyDocsInfo: null, context.CancellationToken).ConfigureAwait(false);
61return await ComputeFromLinkedDocumentsAsync(context, token, linkedDocumentIds).ConfigureAwait(false);
Rename\SymbolicRenameInfo.cs (5)
117var triggerToken = await GetTriggerTokenAsync(document, position, cancellationToken).ConfigureAwait(false);
121return await GetRenameInfoAsync(document, triggerToken, cancellationToken).ConfigureAwait(false);
128var token = await syntaxTree.GetTouchingWordAsync(position, syntaxFacts, cancellationToken, findInsideTrivia: true).ConfigureAwait(false);
163var symbol = await RenameUtilities.TryGetRenamableSymbolAsync(document, triggerToken.SpanStart, cancellationToken: cancellationToken).ConfigureAwait(false);
176semanticModel, triggerToken.SpanStart, document.Project.Solution.Services, cancellationToken: cancellationToken).ConfigureAwait(false);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (17)
42var methodDeclaration = await service.GetMethodDeclarationAsync(context).ConfigureAwait(false);
159var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
164getMethod, originalSolution, cancellationToken).ConfigureAwait(false);
168setMethod, originalSolution, cancellationToken).ConfigureAwait(false);
182updatedSolution = await UpdateReferencesAsync(updatedSolution, propertyName, nameChanged, getReferencesByDocument, setReferencesByDocument, cancellationToken).ConfigureAwait(false);
183updatedSolution = await ReplaceGetMethodsAndRemoveSetMethodsAsync(originalSolution, updatedSolution, propertyName, nameChanged, getMethodReferences, setMethodReferences, updateSetMethod: setMethod != null, cancellationToken).ConfigureAwait(false);
199cancellationToken).ConfigureAwait(false);
321var getDefinitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, getMethodReferences, cancellationToken).ConfigureAwait(false);
322var setDefinitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, setMethodReferences, cancellationToken).ConfigureAwait(false);
333propertyName, nameChanged, updatedSolution, documentId, getDefinitions, setDefinitions, updateSetMethod, cancellationToken).ConfigureAwait(false);
351var compilation = await updatedDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
356updatedSolution, compilation, documentId, originalGetDefinitions, updateSetMethod, cancellationToken).ConfigureAwait(false);
385var setMethodDeclaration = await GetMethodDeclarationAsync(setMethod, cancellationToken).ConfigureAwait(false);
414var getMethodDeclaration = await GetMethodDeclarationAsync(getMethod, cancellationToken).ConfigureAwait(false);
415var setMethodDeclaration = await GetMethodDeclarationAsync(setMethod, cancellationToken).ConfigureAwait(false);
442return await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
458var syntax = await definition.DeclaringSyntaxReferences[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (13)
45var propertyDeclaration = await service.GetPropertyDeclarationAsync(context).ConfigureAwait(false);
82var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
85var propertyReferences = await SymbolFinder.FindReferencesAsync(propertySymbol, originalSolution, cancellationToken).ConfigureAwait(false);
106desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false);
110desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false);
204desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false);
301var definitionsByDocumentId = await GetDefinitionsByDocumentIdAsync(originalSolution, references, cancellationToken).ConfigureAwait(false);
309desiredGetMethodName, desiredSetMethodName, cancellationToken).ConfigureAwait(false);
328var syntax = await definition.DeclaringSyntaxReferences[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
357updatedSolution, semanticModel.Compilation, documentId, originalDefinitions, cancellationToken).ConfigureAwait(false);
375cancellationToken).ConfigureAwait(false);
406var declaration = await GetPropertyDeclarationAsync(property, cancellationToken).ConfigureAwait(false);
423return await reference.GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
Snippets\SnippetFunctionService.cs (6)
49var simplifiedTypeName = await GetSimplifiedTypeNameAtSpanAsync(documentWithFullyQualifiedTypeName, updatedTextSpan, simplifierOptions, cancellationToken).ConfigureAwait(false);
59var typeSymbol = await GetEnumSymbolAsync(document, switchExpressionLocation, cancellationToken).ConfigureAwait(false);
73var simplifiedTypeName = await GetSimplifiedEnumNameAsync(document, fullyQualifiedEnumName, enumFields.First().Name, caseGenerationLocation, simplifierOptions, cancellationToken).ConfigureAwait(false);
134var (documentWithFullyQualified, fullyQualifiedTypeLocation) = await GetDocumentWithEnumCaseAsync(document, fullyQualifiedTypeName, firstEnumMemberName, caseGenerationLocation, cancellationToken).ConfigureAwait(false);
137var simplifiedEnum = await GetSimplifiedTypeNameAtSpanAsync(documentWithFullyQualified, fullyQualifiedTypeLocation, simplifierOptions, cancellationToken).ConfigureAwait(false);
156var simplifiedDocument = await Simplifier.ReduceAsync(documentWithAnnotations, simplifierOptions, cancellationToken).ConfigureAwait(false);
Snippets\SnippetProviders\AbstractSnippetProvider.cs (13)
77var textChanges = await GenerateSnippetTextChangesAsync(document, position, cancellationToken).ConfigureAwait(false);
80var snippetDocument = await GetDocumentWithSnippetAsync(document, textChanges, cancellationToken).ConfigureAwait(false);
84var snippetWithTriviaDocument = await GetDocumentWithSnippetAndTriviaAsync(snippetDocument, position, syntaxFacts, cancellationToken).ConfigureAwait(false);
87var formatAnnotatedSnippetDocument = await AddFormatAnnotationAsync(snippetWithTriviaDocument, position, cancellationToken).ConfigureAwait(false);
90var reformattedDocument = await CleanupDocumentAsync(formatAnnotatedSnippetDocument, cancellationToken).ConfigureAwait(false);
93var documentWithIndentation = await AddIndentationToDocumentAsync(reformattedDocument, cancellationToken).ConfigureAwait(false);
102var changes = await annotatedReformattedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
152document, FindSnippetAnnotation, addImportPlacementOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
154document = await Simplifier.ReduceAsync(document, FindSnippetAnnotation, simplifierOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
157document = await Formatter.FormatAsync(document, FindSnippetAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
160document = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
203var annotatedSnippetRoot = await AnnotateNodesToReformatAsync(document, position, cancellationToken).ConfigureAwait(false);
244return await AddIndentationToDocumentAsync(document, snippet, 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\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\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.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\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (6)
126? await RenameThenAddAsyncTokenAsync(keepVoid, document, node, methodSymbol, knownTypes, cancellationToken).ConfigureAwait(false)
127: await FixRelatedSignaturesAsync(keepVoid, document, methodSymbol, knownTypes, node, cancellationToken).ConfigureAwait(false);
174var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
182return await FixRelatedSignaturesAsync(keepVoid, newDocument, newMethod, knownTypes, newNode, cancellationToken).ConfigureAwait(false);
200var mainDocumentEditor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
211var partialDefinitionDocumentEditor = await solutionEditor.GetDocumentEditorAsync(partialDefinitionDocument.Id, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (10)
63return await RenameThenRemoveAsyncTokenAsync(document, node, methodSymbol, cancellationToken).ConfigureAwait(false);
67return await RemoveAsyncTokenAsync(document, methodSymbol, node, cancellationToken).ConfigureAwait(false);
81var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
83var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
88return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, cancellationToken).ConfigureAwait(false);
97var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
114newDocument, annotation, cancellationToken).ConfigureAwait(false);
136[methodSymbol], document.Project.Solution, cancellationToken).ConfigureAwait(false);
144document.Project.Solution, [.. referencedSymbol.Locations], cancellationToken).ConfigureAwait(false);
162currentSolution, group, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (13)
287var preprocessedDocument = await PreprocessDocumentAsync(document, diagnostics, cancellationToken).ConfigureAwait(false);
288var newRoot = await GetNewRootAsync(preprocessedDocument, formattingOptions, diagnostics, cancellationToken).ConfigureAwait(false);
336diagnosticId, preference, cancellationToken).ConfigureAwait(false);
638!(await IsLocalDeclarationWithNoReferencesAsync(localDeclarationStatement, document, cancellationToken).ConfigureAwait(false)))
759ReplaceDiscardDeclarationsWithAssignmentsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false);
767AdjustLocalDeclarationsAsync, currentRoot, document, options, cancellationToken).ConfigureAwait(false);
789var newMemberDecl = await processMemberDeclarationAsync(memberDecl, newDocument, options, cancellationToken).ConfigureAwait(false);
811return await service.ReplaceAsync(document, memberDeclaration, cancellationToken).ConfigureAwait(false);
860if (await TryRemoveUnusedLocalAsync(declStatement, originalDeclStatement).ConfigureAwait(false))
871var (canUse, mayChangeSemantics) = await moveDeclarationService.CanMoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false);
874document = await moveDeclarationService.MoveDeclarationNearReferenceAsync(document, declStatement, cancellationToken).ConfigureAwait(false);
900if (await IsLocalDeclarationWithNoReferencesAsync(newDecl, document, cancellationToken).ConfigureAwait(false))
923var referencedSymbols = await SymbolFinder.FindReferencesAsync(local, document.Project.Solution, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (15)
107return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false);
119diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false);
132var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
135field, currentSolution, cancellationToken).ConfigureAwait(false)).ToImmutableArray();
166currentSolution, linkedFiles, fieldLocations, property, cancellationToken).ConfigureAwait(false);
173compilation = await fieldDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
235var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
252newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
253newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
290cancellationToken).ConfigureAwait(false);
332var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
420var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
465document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false);
470document, codeCleanupOptions, cancellationToken).ConfigureAwait(false);
543var semanticModel = await lazySemanticModel.GetValueAsync(cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerUtilities.cs (7)
60cancellationToken).ConfigureAwait(false);
64var method = await TryGetBestMatchAsync(project, fullyQualifiedTypeName, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false);
66return await GetDefinitionAsync(method).ConfigureAwait(false);
80var method = await TryGetBestMatchAsync(project, fullyQualifiedTypeName, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false);
82return await GetDefinitionAsync(method).ConfigureAwait(false);
109var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
120var matchingMethod = await resolver.TryGetBestMatchAsync(project, type, methodNode, methodArguments, methodTypeArguments, 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);
411return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
423var element = await DownloadFileAsync(serverPath, cancellationToken).ConfigureAwait(false);
430cancellationToken).ConfigureAwait(false);
476var delayUntilUpdate = await TryProcessPatchXElementAsync(databaseFileInfo, patchElement, getDatabaseBytes, cancellationToken).ConfigureAwait(false);
491return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
601var (element, delay) = await TryDownloadFileAsync(client, cancellationToken).ConfigureAwait(false);
620using var stream = await fileDownloader.ReadFileAsync().ConfigureAwait(false);
702var 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);
ValueTracking\ValueTracker.cs (5)
25var (symbol, node) = await GetSelectedSymbolAsync(selection, document, cancellationToken).ConfigureAwait(false);
49await progressCollector.TryReportAsync(solution, location, symbol, cancellationToken).ConfigureAwait(false);
68await progressCollector.TryReportAsync(document.Project.Solution, node.GetLocation(), symbol, cancellationToken).ConfigureAwait(false);
81var symbol = await GetSymbolAsync(previousTrackedItem, solution, cancellationToken).ConfigureAwait(false);
98var previousSymbol = await GetSymbolAsync(previousTrackedItem.Parent, solution, cancellationToken).ConfigureAwait(false);
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\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\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.Features.UnitTests (6)
Microsoft.CodeAnalysis.InteractiveHost (34)
Microsoft.CodeAnalysis.LanguageServer (3)
Microsoft.CodeAnalysis.LanguageServer.Protocol (226)
Extensions\ProtocolConversions.cs (9)
148var insertionChar = await GetInsertionCharacterAsync(document, position, cancellationToken).ConfigureAwait(false);
392documentSpan.Document, documentSpan.SourceSpan, isStale: false, cancellationToken).ConfigureAwait(false);
433textChanges = await textDiffService.GetTextChangesAsync(oldDoc, newDoc, cancellationToken).ConfigureAwait(false);
442var mappedResults = await SpanMappingHelper.TryGetMappedSpanResultAsync(oldDocument, [.. textChanges.Select(tc => tc.Span)], cancellationToken).ConfigureAwait(false);
489var mappedTextChanges = await sourceGeneratedDocumentMappingService.GetMappedTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(false);
498var mappedText = await mappedDoc.GetTextAsync(cancellationToken).ConfigureAwait(false);
510var textChanges = await textDiffService.GetTextChangesAsync(oldDocument, newDocument, cancellationToken).ConfigureAwait(false);
549var result = await SpanMappingHelper.TryGetMappedSpanResultAsync(d, [textSpan], cancellationToken).ConfigureAwait(false);
579return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false);
Features\CodeCleanup\AbstractCodeCleanupService.cs (14)
52thirdPartyDiagnosticIdsAndTitles = await GetThirdPartyDiagnosticIdsAndTitlesAsync(document, cancellationToken).ConfigureAwait(false);
76document, enabledDiagnostics.Diagnostics, progressTracker, cancellationToken).ConfigureAwait(false);
81document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false);
89document, enabledDiagnostics.OrganizeUsings, cancellationToken).ConfigureAwait(false);
100document = await Formatter.FormatAsync(document, formattingOptions, cancellationToken).ConfigureAwait(false);
108document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false);
138document = await removeUsingsService.RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false);
150document = await organizeImportsService.OrganizeImportsAsync(document, organizeOptions, cancellationToken).ConfigureAwait(false);
168document, diagnosticSet.DiagnosticIds, diagnosticSet.IsAnyDiagnosticIdExplicitlyEnabled, progressTracker, cancellationToken).ConfigureAwait(false);
189document, diagnosticId, minimumSeverity, progressTracker, cancellationToken).ConfigureAwait(false);
200document, textSpan: null, diagnosticId, minimumSeverity, cancellationToken).ConfigureAwait(false);
209new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false);
228cancellationToken).ConfigureAwait(false);
255document, textSpan: null, diagnosticId, DiagnosticSeverity.Warning, progressTracker, cancellationToken).ConfigureAwait(false);
Features\Suggestions\UnifiedSuggestedActionsSource.cs (12)
51cancellationToken).ConfigureAwait(false);
55var organizedFixes = await OrganizeFixesAsync(document.Project, text, filteredFixes, cancellationToken).ConfigureAwait(false);
131var unifiedSuggestedAction = await GetUnifiedSuggestedActionAsync(project, fix.Action, fix).ConfigureAwait(false);
145var unifiedNestedAction = await GetUnifiedSuggestedActionAsync(project, nestedAction, fix).ConfigureAwait(false);
163await getFixAllSuggestedActionSetAsync(action).ConfigureAwait(false));
237document, firstDiagnostic.Location.SourceSpan, scope, cancellationToken).ConfigureAwait(false);
433cancellationToken).ConfigureAwait(false);
440var orderedRefactoring = await OrganizeRefactoringsAsync(document, selection, refactoring, cancellationToken).ConfigureAwait(false);
500var unifiedActionSet = await GetUnifiedSuggestedActionSetAsync(action, applicableToSpan, selection, cancellationToken).ConfigureAwait(false);
528var unifiedAction = await GetUnifiedSuggestedActionSetAsync(nestedAction, applicableToSpan, selection, cancellationToken).ConfigureAwait(false);
546refactoring.FixAllProviderInfo, cancellationToken).ConfigureAwait(false);
588var documentsAndSpans = await fixAllState.GetRefactorAllSpansAsync(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 (3)
62completionItem, cacheEntry.CompletionList, document, _globalOptions, capabilityHelper, cancellationToken).ConfigureAwait(false);
80completionItem, cacheEntry.CompletionList, document, globalOptions, capabilityHelper, cancellationToken).ConfigureAwait(false);
113cancellationToken).ConfigureAwait(false);
Handler\Completion\CompletionResultFactory.cs (15)
80lspCompletionItems.Add(await CreateLSPCompletionItemAsync(item, typedText, i).ConfigureAwait(false));
131cancellationToken).ConfigureAwait(false);
347cancellationToken).ConfigureAwait(false);
527var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, item, cancellationToken).ConfigureAwait(false);
543var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false);
545var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
566return await completionService.GetChangeAsync(document, completionItem, cancellationToken: cancellationToken).ConfigureAwait(false);
603document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false);
616roslynItem, document, completionService, cancellationToken).ConfigureAwait(false);
622document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: false, cancellationToken).ConfigureAwait(false);
652document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false);
671var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
673document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: true, cancellationToken).ConfigureAwait(false);
691var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false);
696var documentText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Definitions\AbstractGoToDefinitionHandler.cs (6)
47return await GetDefinitionsAsync(_globalOptions, _metadataAsSourceFileService, workspace, document, forSymbolType, linePosition, cancellationToken).ConfigureAwait(false);
53var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false);
59var definitions = await service.GetNavigableItemsAsync(document, position, forSymbolType, cancellationToken).ConfigureAwait(false);
71cancellationToken).ConfigureAwait(false);
79var symbol = await SymbolFinder.FindSymbolAtPositionAsync(semanticModel, position, document.Project.Solution.Services, includeType: true, cancellationToken).ConfigureAwait(false);
86var declarationFile = await metadataAsSourceFileService.GetGeneratedFileAsync(workspace, document.Project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Handler\Highlights\DocumentHighlightHandler.cs (5)
50return await GetHighlightsAsync(_globalOptions, _highlightingService, document, position, cancellationToken).ConfigureAwait(false);
56var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false);
59var keywordHighlights = await GetKeywordHighlightsAsync(highlightingService, document, text, position, cancellationToken).ConfigureAwait(false);
66var referenceHighlights = await GetReferenceHighlightsAsync(globalOptions, document, text, position, cancellationToken).ConfigureAwait(false);
99cancellationToken).ConfigureAwait(false);
Handler\Hover\HoverHandler.cs (6)
78.ConfigureAwait(false);
83document, position, options, supportsVSExtensions, supportsMarkdown, cancellationToken).ConfigureAwait(false);
97var info = await quickInfoService.GetQuickInfoAsync(document, position, options, cancellationToken).ConfigureAwait(false);
102? await CreateVsHoverAsync(document, info, options, cancellationToken).ConfigureAwait(false)
103: await CreateDefaultHoverAsync(document, info, supportsMarkdown, cancellationToken).ConfigureAwait(false);
119var content = await QuickInfoContentBuilder.BuildInteractiveContentAsync(info, context, cancellationToken).ConfigureAwait(false);
Handler\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\OnAutoInsert\OnAutoInsertHandler.cs (8)
66return await GetOnAutoInsertResponseAsync(_globalOptions, servicesForDocument, document, position, request.Character, request.Options, includeNewLineBraceFormatting, cancellationToken).ConfigureAwait(false);
82var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(lspFormattingOptions, document, cancellationToken).ConfigureAwait(false);
90document, linePosition, character, service, docCommentOptions, cancellationToken).ConfigureAwait(false);
110document, servicesForDocument, linePosition, indentationOptions, cancellationToken).ConfigureAwait(false);
120var rawStringResponse = await GetRawStringLiteralResponseAsync(document, linePosition, cancellationToken).ConfigureAwait(false);
171var serviceAndContext = await GetBraceCompletionContextAsync(servicesForDocument, position, document, cancellationToken).ConfigureAwait(false);
212var textChange = await GetCollapsedChangeAsync(textChanges, document, cancellationToken).ConfigureAwait(false);
285var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\References\FindUsagesLSPContext.cs (8)
122definition.Tags.GetFirstGlyph(), symbolUsageInfo: null, isWrittenTo: false, cancellationToken).ConfigureAwait(false);
174definitionGlyph: Glyph.None, reference.SymbolUsageInfo, reference.IsWrittenTo, cancellationToken).ConfigureAwait(false);
195var text = await ComputeTextAsync(definitionId, documentSpan, definitionText, isWrittenTo, cancellationToken).ConfigureAwait(false);
199var location = await ComputeLocationAsync(documentSpan, cancellationToken).ConfigureAwait(false);
255return await ProtocolConversions.DocumentSpanToLocationAsync(documentSpan.Value, cancellationToken).ConfigureAwait(false);
259var symbol = await SymbolFinder.FindSymbolAtPositionAsync(_document, _position, cancellationToken).ConfigureAwait(false);
276_workspace, _document.Project, symbol, signaturesOnly: true, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
314documentSpan.Value, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (187)
Completion\CompletionFeaturesTests.cs (20)
128var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
150var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
215var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
237var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
279var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
300var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
343var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
366results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
540var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
562var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
609var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
709var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
725var resolvedItem1 = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, itemFromNS1, CancellationToken.None).ConfigureAwait(false);
733var resolvedItem2 = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, itemFromNS2, CancellationToken.None).ConfigureAwait(false);
821results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
859var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
875results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
910var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
979var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false);
1052var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false);
Completion\CompletionResolveTests.cs (17)
65label: "A").ConfigureAwait(false);
71testLspServer, clientCompletionItem).ConfigureAwait(false);
89var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "A").ConfigureAwait(false);
95testLspServer, clientCompletionItem).ConfigureAwait(false);
115var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "M()").ConfigureAwait(false);
117testLspServer, clientCompletionItem).ConfigureAwait(false);
163label: "M()").ConfigureAwait(false);
166testLspServer, clientCompletionItem).ConfigureAwait(false);
199document, new TestCaretOutOfScopeCompletionService(testLspServer.TestWorkspace.Services.SolutionServices), selectedItem, snippetsSupported: true, insertNewPositionPlaceholder: true, CancellationToken.None).ConfigureAwait(false);
263label: "AMethod").ConfigureAwait(false);
266clientCompletionItem).ConfigureAwait(false);
325label: "AMethod").ConfigureAwait(false);
328clientCompletionItem).ConfigureAwait(false);
358var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "(byte)").ConfigureAwait(false);
361testLspServer, clientCompletionItem).ConfigureAwait(false);
381var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "svm").ConfigureAwait(false);
386testLspServer, clientCompletionItem).ConfigureAwait(false);
Completion\CompletionTests.cs (57)
96request: completionParams, document: document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters, sortText: "0000").ConfigureAwait(false);
102var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
149request: completionParams, document: document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false);
155var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
184request: completionParams, document: document, commitCharacters: null, sortText: "0000").ConfigureAwait(false);
186var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
219request: completionParams, document: document, commitCharacters: null, sortText: "0003").ConfigureAwait(false);
221var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
259request: completionParams, document: document, commitCharacters: null, sortText: "0003").ConfigureAwait(false);
261var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
289request: completionParams, document: document, commitCharacters: null, sortText: "0000").ConfigureAwait(false);
291var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
373completionParams, document, preselect: true, commitCharacters: ImmutableArray.Create(' ', '(', '[', '{', ';', '.'), sortText: "0000").ConfigureAwait(false);
375var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
405var results = (LSP.VSInternalCompletionList)await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
437labelDetails: new() { Description = "shortdate" }).ConfigureAwait(false);
439var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
468var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
504sortText: "00000000", labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
506var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
543sortText: "00000000", vsResolveTextEditOnCommit: true, labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
545var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
582sortText: "00000000", vsResolveTextEditOnCommit: true, labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
584var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
638sortText: "00000000", labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
640var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
674await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
680await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
688await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
698await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
733completionParams, document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false);
735var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
765var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
795var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
823var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
875var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
931var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
987var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1000results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1055var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1068results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1123var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1135results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1147results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1160results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1220var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1231results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1285var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1347var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1364results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1379results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1413var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1467var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1480results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1508var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1567var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1597var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
Diagnostics\PullDiagnosticTests.cs (14)
257var results = await RunGetDocumentPullDiagnosticsAsync(testLspServer, document.GetURI(), useVSDiagnostics).ConfigureAwait(false);
265results = await RunGetDocumentPullDiagnosticsAsync(testLspServer, document.GetURI(), useVSDiagnostics, results.Single().ResultId).ConfigureAwait(false);
537await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
589await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1525await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1731await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1813await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1832var csproj3DocumentText = await csproj3Document.GetTextAsync().ConfigureAwait(false);
1838results = await RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, previousResults: previousResultIds).ConfigureAwait(false);
1887await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1955await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
2018await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
2074await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
2118await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
UriTests.cs (5)
185var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = unencodedUri }, CancellationToken.None).ConfigureAwait(false);
200var (encodedWorkspace, _, encodedDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = encodedUri }, CancellationToken.None).ConfigureAwait(false);
233var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false);
246var (lowerCaseWorkspace, _, lowerCaseDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = lowerCaseUri }, CancellationToken.None).ConfigureAwait(false);
279var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false);
Workspaces\LspWorkspaceManagerTests.cs (34)
35var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
41(_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
48var (_, closedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
87var (_, firstDocumentWithChange) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false);
88var (_, secondDocumentUnchanged) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false);
122var (_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false);
127(_, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false);
160(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
193(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
227var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false);
274var (_, hostSolution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false);
300var (_, solution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false);
338var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
343var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
352var (_, changedFirstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
359var (_, unchangedSecondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
393var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
398var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
408var (_, secondDocumentChangedProject) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
414var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
443var (_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false);
463(_, documentServerOne) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerOne).ConfigureAwait(false);
466(_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false);
484var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
507var (workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
526(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
544(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
564var (workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
580(workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
603var (workspace, originalDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
616var (_, newDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
704var (_, removedSourceGeneratorDocument) = await GetLspWorkspaceAndDocumentAsync(sourceGeneratorDocumentUri, testLspServer).ConfigureAwait(false);
715var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
728var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(CreateTextDocumentIdentifier(uri), CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.UnitTests (42)
FileBasedProgramsWorkspaceTests.cs (42)
91var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
102(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
127var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
138(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
161var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
165(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
189var (_, looseDocumentOne) = await GetLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
198var (_, canonicalDocumentOne) = await GetLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
215var (_, canonicalDocumentTwo) = await GetLspWorkspaceAndDocumentAsync(looseFileUriTwo, testLspServer).ConfigureAwait(false);
239var (_, primordialDocument) = await GetRequiredLspWorkspaceAndDocumentAsync(nonFileUri, testLspServer).ConfigureAwait(false);
251var (miscWorkspace, canonicalDocument) = await GetRequiredLspWorkspaceAndDocumentAsync(nonFileUri, testLspServer).ConfigureAwait(false);
275var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(nonFileUri, testLspServer).ConfigureAwait(false);
280(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(nonFileUri, testLspServer).ConfigureAwait(false);
310var (miscFilesWorkspace, looseDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
321var (_, canonicalDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
331var (workspace, canonicalDocumentTwo) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
363var (miscFilesWorkspace, looseDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
371var (_, looseDocumentTwo) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
409var (miscFilesWorkspace, looseDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
420var (_, canonicalDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
441var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
452(_, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
462(_, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
471_ = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
490var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
499(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
507(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
527var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
536(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
544(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
564var (_, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
571(_, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
577(_, document) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUri, testLspServer).ConfigureAwait(false);
607var (miscFilesWorkspace, looseDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
618(miscFilesWorkspace, var canonicalDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
630var (_, fileBasedDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
644var (_, alsoFileBasedDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
649var (hostWorkspace, fullFileBasedDocumentOne) = await GetRequiredLspWorkspaceAndDocumentAsync(looseFileUriOne, testLspServer).ConfigureAwait(false);
669_ = await GetRequiredLspWorkspaceAndDocumentAsync(nonFileUri, testLspServer).ConfigureAwait(false);
673var (miscWorkspace, canonicalDocument) = await GetRequiredLspWorkspaceAndDocumentAsync(nonFileUri, testLspServer).ConfigureAwait(false);
744var (workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(appCsUri, testLspServer).ConfigureAwait(false);
756(workspace, document) = await GetRequiredLspWorkspaceAndDocumentAsync(utilCsUri, testLspServer).ConfigureAwait(false);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (87)
Microsoft.CodeAnalysis.PublicApiAnalyzers (25)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (17)
Microsoft.CodeAnalysis.Remote.ServiceHub (106)
Host\RemoteWorkspace.SolutionCreator.cs (21)
50var oldSolutionCompilationChecksums = await solution.CompilationState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
51var oldSolutionChecksums = await solution.CompilationState.SolutionState.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
65solution, oldSolutionChecksums, newSolutionChecksums, cancellationToken).ConfigureAwait(false);
73AssetPathKind.SolutionAnalyzerReferences, newSolutionChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false);
204.GetStateChecksumsAsync(cancellationToken).ConfigureAwait(false);
227solution, isConeSync, oldProjectIdToStateChecksums, newProjectIdToStateChecksums, cancellationToken).ConfigureAwait(false);
279newProjectChecksums, solution.Services, cancellationToken).ConfigureAwait(false);
333solution.GetRequiredProject(projectId), oldProjectChecksums, newProjectChecksums, cancellationToken).ConfigureAwait(false);
362assetPath: project.Id, newProjectChecksums.ProjectReferences, cancellationToken).ConfigureAwait(false));
369assetPath: project.Id, newProjectChecksums.MetadataReferences, cancellationToken).ConfigureAwait(false));
378assetPath: project.Id, newProjectChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false);
395cancellationToken).ConfigureAwait(false);
407cancellationToken).ConfigureAwait(false);
419cancellationToken).ConfigureAwait(false);
469return await UpdateDocumentsAsync(project, addDocuments, removeDocuments, oldDocumentIdToChecksums, newDocumentIdToChecksums, cancellationToken).ConfigureAwait(false);
490documentId, newDocumentChecksums.attributeChecksum, newDocumentChecksums.textChecksum, cancellationToken).ConfigureAwait(false);
530project = await UpdateDocumentAsync(document, oldDocumentChecksums, newDocumentChecksums, cancellationToken).ConfigureAwait(false);
545document = await UpdateDocumentInfoAsync(document, newDocumentChecksums.attributeChecksum, cancellationToken).ConfigureAwait(false);
615? await incrementalSolutionBuilt.CompilationState.GetChecksumAsync(cancellationToken).ConfigureAwait(false)
616: await incrementalSolutionBuilt.CompilationState.GetChecksumAsync(projectConeId, cancellationToken).ConfigureAwait(false);
622checksumFromRequest, _workspace.Services.SolutionServices, cancellationToken).ConfigureAwait(false);
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (9)
38project, cancellationToken).ConfigureAwait(false);
54project, diagnosticIds, cancellationToken).ConfigureAwait(false);
76includeLocalDocumentDiagnostics, cancellationToken).ConfigureAwait(false);
95project, diagnosticIds, analyzerFilter, cancellationToken).ConfigureAwait(false);
151var descriptors = await project.GetDiagnosticDescriptorsAsync(analyzerReference, cancellationToken).ConfigureAwait(false);
168solution, cancellationToken).ConfigureAwait(false);
190solution, projectId, analyzerReference, language, cancellationToken).ConfigureAwait(false);
206var map = await service.GetDiagnosticDescriptorsPerReferenceAsync(solution, projectId, cancellationToken).ConfigureAwait(false);
233document, range, diagnosticIdFilter, priority, diagnosticKind, cancellationToken).ConfigureAwait(false);
Services\Renamer\RemoteRenamerService.cs (6)
38solution, symbol, newName, options, cancellationToken).ConfigureAwait(false);
40return await result.DehydrateAsync(cancellationToken).ConfigureAwait(false);
59symbol, solution, options, cancellationToken).ConfigureAwait(false);
83symbol, solution, serializableLocations, cancellationToken).ConfigureAwait(false);
88locations, replacementText, cancellationToken).ConfigureAwait(false);
89return await result.DehydrateAsync(cancellationToken).ConfigureAwait(false);
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (6)
88documentKey, type, checksum, cancellationToken).ConfigureAwait(false);
141document, cancellationToken).ConfigureAwait(false);
144var matches = await storage.ChecksumMatchesAsync(documentKey, persistenceName, checksum, cancellationToken).ConfigureAwait(false);
174await storage.WriteStreamAsync(documentKey, persistenceName, stream, checksum, cancellationToken).ConfigureAwait(false);
233documentKey, type, checksum, cancellationToken).ConfigureAwait(false);
296using var stream = await storage.ReadStreamAsync(documentKey, persistenceName, checksum, cancellationToken).ConfigureAwait(false);
Services\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);
Microsoft.CodeAnalysis.Remote.Workspaces (17)
AbstractAssetProvider.cs (9)
56AssetPathKind.SolutionAnalyzerReferences, solutionChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false);
63var projects = await Task.WhenAll(projectsTasks).ConfigureAwait(false);
104await analyzerReferencesTask.ConfigureAwait(false),
112await documentInfosTask.ConfigureAwait(false),
113await projectReferencesTask.ConfigureAwait(false),
114await metadataReferencesTask.ConfigureAwait(false),
116await additionalDocumentInfosTask.ConfigureAwait(false),
117await analyzerConfigDocumentInfosTask.ConfigureAwait(false),
127documentInfos.Add(await CreateDocumentInfoAsync(documentId, attributeChecksum, textChecksum, cancellationToken).ConfigureAwait(false));
Microsoft.CodeAnalysis.ResxSourceGenerator (25)
Microsoft.CodeAnalysis.Scripting (4)
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)
Microsoft.CodeAnalysis.Threading.Package (8)
Microsoft.CodeAnalysis.Workspaces (560)
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);
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);
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);
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\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);
285var editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
294var model = await newDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
306return await this.GetCurrentSymbolAsync(currentSymbol, cancellationToken).ConfigureAwait(false);
367var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
381return await this.EditDeclarationAsync(currentSymbol, decl, editAction, cancellationToken).ConfigureAwait(false);
399var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
402var currentMember = await this.GetCurrentSymbolAsync(member, cancellationToken).ConfigureAwait(false);
414return await this.EditDeclarationAsync(currentSymbol, declaration, editAction, cancellationToken).ConfigureAwait(false);
455var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
465var editor = await solutionEditor.GetDocumentEditorAsync(docId, cancellationToken).ConfigureAwait(false);
480var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
497return await GetCurrentSymbolAsync(symbol, 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\FindReferences\DependentProjectsFinder.cs (6)
49var dependentProjects = await GetDependentProjectsWorkerAsync(solution, symbols, cancellationToken).ConfigureAwait(false);
86solution, (assembly, sourceProject), maxVisibility, cancellationToken).ConfigureAwait(false);
164solution, symbolOrigination, visibility, cancellationToken).ConfigureAwait(false);
220var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
281!await HasReferenceToAsync(symbolOrigination, project, cancellationToken).ConfigureAwait(false))
331project, symbolOrigination.assembly.Name, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (7)
96var disposable = await _progressTracker.AddSingleItemAsync(cancellationToken).ConfigureAwait(false);
102this, unifiedSymbols, includeImplementationsThroughDerivedTypes: true, cancellationToken).ConfigureAwait(false);
108await ReportGroupsSeriallyAsync(allSymbols, symbolToGroup, cancellationToken).ConfigureAwait(false);
112var projectsToSearch = await GetProjectsToSearchAsync(allSymbols, cancellationToken).ConfigureAwait(false);
153symbolSet.GetAllSymbols(), symbolToGroup, cancellationToken).ConfigureAwait(false);
187var linkedSymbols = await SymbolFinder.FindLinkedSymbolsAsync(symbol, _solution, cancellationToken).ConfigureAwait(false);
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);
130var sourceSymbol = await SymbolFinder.FindSourceDefinitionAsync(searchSymbol, solution, cancellationToken).ConfigureAwait(false);
190var mapped = await TryMapAndAddLinkedSymbolsAsync(symbol).ConfigureAwait(false);
200await TryMapAndAddLinkedSymbolsAsync(cascade).ConfigureAwait(false);
212foreach (var linked in await SymbolFinder.FindLinkedSymbolsAsync(symbol, solution, cancellationToken).ConfigureAwait(false))
246symbol, solution, projects, cancellationToken).ConfigureAwait(false);
253symbol, solution, projects, cancellationToken).ConfigureAwait(false);
283symbol, 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);
155var converted = await ConvertLocationsAsync(@this, values, symbol, group, cancellationToken).ConfigureAwait(false);
223relationship = await ComputeInheritanceRelationshipAsync(key.searchSymbol, key.candidate).ConfigureAwait(false);
242this, [searchSymbol], includeImplementationsThroughDerivedTypes: false, cancellationToken).ConfigureAwait(false);
252this, [candidate], includeImplementationsThroughDerivedTypes: false, 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_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_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_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);
Rename\ConflictEngine\ConflictResolver.cs (8)
58var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
71return await result.Value.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false);
77var heavyweightLocations = await lightweightRenameLocations.ToSymbolicLocationsAsync(symbol, cancellationToken).ConfigureAwait(false);
82heavyweightLocations, replacementText, cancellationToken).ConfigureAwait(false);
103renameLocations, renameSymbolDeclarationLocation, replacementText, cancellationToken).ConfigureAwait(false);
204cancellationToken).ConfigureAwait(false);
300cancellationToken).ConfigureAwait(false);
407var originalsourcesymbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.Session.cs (12)
93var (documentsIdsToBeCheckedForConflict, possibleNameConflicts) = await FindDocumentsAndPossibleNameConflictsAsync().ConfigureAwait(false);
140possibleNameConflicts).ConfigureAwait(false));
148conflictLocations).ConfigureAwait(false);
201conflictResolution.CurrentSolution, documentsByProject, _replacementTextValid, _renameAnnotations, _cancellationToken).ConfigureAwait(false));
203intermediateSolution, documentsByProject, _renameAnnotations, _cancellationToken).ConfigureAwait(false);
209var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false);
273documentIdErrorStateLookup.Add(documentId, await originalDoc.HasAnyErrorsAsync(_cancellationToken).ConfigureAwait(false));
318var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false);
392conflictResolution, renamedSymbolInNewSolution, conflictAnnotation, newReferencedSymbols).ConfigureAwait(false);
582var overridingSymbol = await SymbolFinder.FindSymbolAtPositionAsync(solution.GetRequiredDocument(newLocation.SourceTree), newLocation.SourceSpan.Start, cancellationToken: _cancellationToken).ConfigureAwait(false);
667var newSymbol = await SymbolFinder.FindSymbolAtPositionAsync(document, start, cancellationToken: _cancellationToken).ConfigureAwait(false);
777var originalSyntaxRoot = await semanticModel.SyntaxTree.GetRootAsync(_cancellationToken).ConfigureAwait(false);
Rename\Renamer.cs (7)
53var resolution = await RenameSymbolAsync(solution, symbol, newName, options, cancellationToken).ConfigureAwait(false);
117var renameAction = await RenameSymbolDocumentAction.TryCreateAsync(document, newDocumentName, cancellationToken).ConfigureAwait(false);
159var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
173return await result.Value.RehydrateAsync(solution, cancellationToken).ConfigureAwait(false);
181solution, symbol, newName, options, cancellationToken).ConfigureAwait(false);
200var renameLocations = await SymbolicRenameLocations.FindLocationsInCurrentProcessAsync(symbol, solution, options, cancellationToken).ConfigureAwait(false);
202renameLocations, newName, cancellationToken).ConfigureAwait(false);
Rename\RenameUtilities.cs (8)
257symbol.GetOverriddenMember(), solution, cancellationToken).ConfigureAwait(false);
260return await TryGetPropertyFromAccessorOrAnOverrideAsync(originalSourceSymbol, solution, cancellationToken).ConfigureAwait(false);
267symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
271var propertyAccessorOrAnOverride = await TryGetPropertyFromAccessorOrAnOverrideAsync(methodImplementor, solution, cancellationToken).ConfigureAwait(false);
342semanticModel, position, document.Project.Solution.Services, cancellationToken).ConfigureAwait(false);
359var definitionSymbol = await FindDefinitionSymbolAsync(symbol, document.Project.Solution, cancellationToken).ConfigureAwait(false);
376symbol, solution, cancellationToken).ConfigureAwait(false);
403var property = await TryGetPropertyFromAccessorOrAnOverrideAsync(bestSymbol, solution, cancellationToken).ConfigureAwait(false);
Rename\SymbolicRenameLocations.cs (7)
63symbol = await RenameUtilities.FindDefinitionSymbolAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
66var originalSymbolResult = await AddLocationsReferenceSymbolsAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
69var overloadsResult = options.RenameOverloads ? await GetOverloadsAsync(symbol, solution, cancellationToken).ConfigureAwait(false) :
79cancellationToken).ConfigureAwait(false);
119overloadsResult.Add(await AddLocationsReferenceSymbolsAsync(overloadedSymbol, solution, cancellationToken).ConfigureAwait(false));
131[symbol], solution, cancellationToken).ConfigureAwait(false);
136await ReferenceProcessing.GetRenamableDefinitionLocationsAsync(referencedSymbol.Definition, symbol, solution, cancellationToken).ConfigureAwait(false));
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (7)
94if (await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false) ||
95await IsPropertyAccessorOrAnOverrideAsync(originalSymbol, solution, cancellationToken).ConfigureAwait(false))
140symbol, solution, cancellationToken).ConfigureAwait(false);
164var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, false, cancellationToken).ConfigureAwait(false);
188var isRenamableAccessor = await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false);
253var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, true, cancellationToken).ConfigureAwait(false);
318isRenamableAccessor: await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false)));
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\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\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);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (27)
227return await Task.FromCanceled<Compilation>(cancellationToken).ConfigureAwait(false);
231return await GetCompilationSlowAsync(compilationState, cancellationToken).ConfigureAwait(false);
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);
547projectReference, this.ProjectState, includeCrossLanguage: true, cancellationToken).ConfigureAwait(false);
559projectReference, this.ProjectState, includeCrossLanguage: false, cancellationToken).ConfigureAwait(false);
572projectReference, this.ProjectState, includeCrossLanguage: true, cancellationToken).ConfigureAwait(false);
598cancellationToken).ConfigureAwait(false);
691compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
869if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
873compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
880if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
884compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
907if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
911compilationState, cancellationToken).ConfigureAwait(false);
1052var docVersion = await projectState.GetLatestDocumentVersionAsync(cancellationToken).ConfigureAwait(false);
1061var dependentProjectVersion = await compilationState.GetDependentVersionAsync(dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
1090var version = await projectState.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
1099dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (8)
57compilationState, compilationWithoutGeneratedFiles, generatorInfo.Documents, compilationWithStaleGeneratedTrees, cancellationToken).ConfigureAwait(false);
73cancellationToken).ConfigureAwait(false);
86var hasRequiredGenerators = await HasRequiredGeneratorsAsync(compilationState, cancellationToken).ConfigureAwait(false);
97var presence = await compilationState.GetProjectGeneratorPresenceAsync(ProjectState.Id, cancellationToken).ConfigureAwait(false);
111var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
125compilationState, projectId, cancellationToken).ConfigureAwait(false);
281if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
310generatorDriver = await generatorDriverCache.CreateAndRunGeneratorDriverAsync(this.ProjectState, compilationToRunGeneratorsOn, ShouldGeneratorRun, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild (39)
MSBuild\BuildHostProcessManager.cs (7)
59var (buildHost, _) = await GetBuildHostWithFallbackAsync(GetKindForProject(projectFilePath), projectFilePath, cancellationToken).ConfigureAwait(false);
75var buildHost = await GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath: null, cancellationToken).ConfigureAwait(false);
82if (!await buildHost.HasUsableMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false))
86return (await GetBuildHostAsync(BuildHostProcessKind.NetCore, projectOrSolutionFilePath, dotnetPath: null, cancellationToken).ConfigureAwait(false), BuildHostProcessKind.NetCore);
104buildHostProcess = await NoLock_GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath, cancellationToken).ConfigureAwait(false);
152var msbuildLocation = await buildHostProcess.BuildHost.FindBestMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false);
173return await NoLock_GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath, cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker.cs (4)
115var projectFileInfos = await LoadProjectInfosFromPathAsync(projectPath, _requestedProjectOptions, cancellationToken).ConfigureAwait(false);
144var projectFileInfos = await _projectFileInfoProvider.LoadProjectFileInfosAsync(projectPath, reportingOptions, cancellationToken).ConfigureAwait(false);
175var projectInfo = await CreateProjectInfoAsync(fileInfo, id, addDiscriminator, cancellationToken).ConfigureAwait(false);
277() => ResolveReferencesAsync(projectId, projectFileInfo, resolvedMetadataReferences, cancellationToken)).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (7)
210_ = await LoadProjectInfosFromPathAsync(projectReferencePath, _discoveredProjectOptions, cancellationToken).ConfigureAwait(false);
219await VerifyProjectOutputExistsAsync(projectReferencePath, builder, cancellationToken).ConfigureAwait(false))
225if (await TryLoadAndAddReferenceAsync(id, projectReferencePath, aliases, builder, cancellationToken).ConfigureAwait(false))
235if (await VerifyUnloadableProjectOutputExistsAsync(projectReferencePath, builder, cancellationToken).ConfigureAwait(false))
269var projectReferenceInfos = await LoadProjectInfosFromPathAsync(projectReferencePath, _discoveredProjectOptions, cancellationToken).ConfigureAwait(false);
342var outputFilePaths = await _projectFileInfoProvider.GetProjectOutputPathsAsync(projectPath, cancellationToken).ConfigureAwait(false);
349var projectFileInfos = await _projectFileInfoProvider.LoadProjectFileInfosAsync(projectPath, DiagnosticReportingOptions.IgnoreAll, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (15)
Build\ProjectBuildManager.cs (6)
101using var readStream = await SerializableBytes.CreateReadableStreamAsync(stream, cancellationToken).ConfigureAwait(false);
214var (project, _) = await LoadProjectAsync(path, cancellationToken).ConfigureAwait(false);
285return [await BuildProjectInstanceAsync(project, log, cancellationToken).ConfigureAwait(false)];
303var projectInstance = await BuildProjectInstanceAsync(project, log, cancellationToken).ConfigureAwait(false);
362var result = await BuildAsync(buildRequestData, cancellationToken).ConfigureAwait(false);
383return await BuildAsync(MSB.Execution.BuildManager.DefaultBuildManager, requestData, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
FindAllDeclarationsTests.cs (13)
95var declarations = await SymbolFinder.FindDeclarationsAsync(project, searchTerm, ignoreCase).ConfigureAwait(false);
255var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, searchTerm, ignoreCase).ConfigureAwait(false);
354var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, searchTerm, ignoreCase).ConfigureAwait(false);
399var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test")).ConfigureAwait(false);
407var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => true).ConfigureAwait(false);
415var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => false).ConfigureAwait(false);
460var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test")).ConfigureAwait(false);
468var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => true).ConfigureAwait(false);
476var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, str => false).ConfigureAwait(false);
521var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, "test").ConfigureAwait(false);
534var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, pattern).ConfigureAwait(false);
579var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, "test").ConfigureAwait(false);
592var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, pattern).ConfigureAwait(false);
Microsoft.CommonLanguageServerProtocol.Framework.Package (10)
Microsoft.DotNet.Arcade.Sdk (1)
Microsoft.DotNet.Build.Tasks.Feed (8)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Helix.Client (80)
Microsoft.DotNet.Helix.JobSender (2)
Microsoft.DotNet.Helix.Sdk (6)
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);
Microsoft.Extensions.AI (10)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Evaluation (4)
Microsoft.Extensions.AI.Evaluation.Console (5)
Microsoft.Extensions.AI.Evaluation.NLP (1)
Microsoft.Extensions.AI.Evaluation.Quality (2)
Microsoft.Extensions.AI.Evaluation.Reporting (6)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (15)
Microsoft.Extensions.AI.Evaluation.Safety (7)
Microsoft.Extensions.AI.Integration.Tests (5)
Microsoft.Extensions.AI.OpenAI (12)
Microsoft.Extensions.Caching.Abstractions (2)
Microsoft.Extensions.Caching.Hybrid (5)
Microsoft.Extensions.Caching.SqlServer (9)
Microsoft.Extensions.Caching.StackExchangeRedis (9)
Microsoft.Extensions.DataIngestion (8)
Microsoft.Extensions.DataIngestion.Abstractions (1)
Microsoft.Extensions.DataIngestion.Markdig (3)
Microsoft.Extensions.DataIngestion.MarkItDown (5)
Microsoft.Extensions.Diagnostics.HealthChecks (3)
Microsoft.Extensions.Diagnostics.Probes (1)
Microsoft.Extensions.Diagnostics.Testing (1)
Microsoft.Extensions.Diagnostics.Testing.Tests (1)
Microsoft.Extensions.Hosting (1)
Microsoft.Extensions.Hosting.WindowsServices (1)
Microsoft.Extensions.Http (3)
Microsoft.Extensions.Http.Diagnostics (3)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (48)
Microsoft.Extensions.Http.Diagnostics.Tests (5)
Microsoft.Extensions.Http.Polly (2)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Http.Resilience.PerformanceTests (1)
Microsoft.Extensions.Identity.Core (160)
UserManager.cs (111)
491var result = await CreateCoreAsync(user).ConfigureAwait(false);
506var validateUserResult = await ValidateUserAsync(user).ConfigureAwait(false);
518return await Store.CreateAsync(user, CancellationToken).ConfigureAwait(false);
538return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.Update, startTimeStamp).ConfigureAwait(false);
564var result = await Store.DeleteAsync(user, CancellationToken).ConfigureAwait(false);
602var user = await Store.FindByNameAsync(userName, CancellationToken).ConfigureAwait(false);
614user = await Store.FindByNameAsync(oldKey, CancellationToken).ConfigureAwait(false);
645var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false);
659return await CreateAsync(user).ConfigureAwait(false);
699var normalizedName = NormalizeName(await GetUserNameAsync(user).ConfigureAwait(false));
713return await Store.GetUserNameAsync(user, CancellationToken).ConfigureAwait(false);
732return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetUserName, startTimeStamp).ConfigureAwait(false);
749return await Store.GetUserIdAsync(user, CancellationToken).ConfigureAwait(false);
765var (result, userMissing) = await CheckPasswordCoreAsync(user, password).ConfigureAwait(false);
792var result = await VerifyPasswordAsync(passwordStore, user, password).ConfigureAwait(false);
797await UpdatePasswordHash(passwordStore, user, password, validatePassword: false).ConfigureAwait(false);
798await UpdateUserAndRecordMetricAsync(user, UserUpdateType.PasswordRehash, startTimeStamp).ConfigureAwait(false);
836var result = await AddPasswordCoreAsync(user, password).ConfigureAwait(false);
853var hash = await passwordStore.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false);
859var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false);
864return await UpdateUserAsync(user).ConfigureAwait(false);
883var result = await ChangePasswordCoreAsync(user, currentPassword, newPassword).ConfigureAwait(false);
900if (await VerifyPasswordAsync(passwordStore, user, currentPassword).ConfigureAwait(false) != PasswordVerificationResult.Failed)
902var updateResult = await UpdatePasswordHash(passwordStore, user, newPassword).ConfigureAwait(false);
907return await UpdateUserAsync(user).ConfigureAwait(false);
930await UpdatePasswordHash(passwordStore, user, null, validatePassword: false).ConfigureAwait(false);
931return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemovePassword, startTimeStamp).ConfigureAwait(false);
952var hash = await store.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false);
972var stamp = await securityStore.GetSecurityStampAsync(user, CancellationToken).ConfigureAwait(false);
1002return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.UpdateSecurityStamp, startTimeStamp).ConfigureAwait(false);
1043if (!await VerifyUserTokenAsync(user, Options.Tokens.PasswordResetTokenProvider, ResetPasswordTokenPurpose, token).ConfigureAwait(false))
1050var result = await UpdatePasswordHash(user, newPassword, validatePassword: true).ConfigureAwait(false);
1056return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetPassword, startTimeStamp).ConfigureAwait(false);
1100return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveLogin, startTimeStamp).ConfigureAwait(false);
1123var result = await AddLoginCoreAsync(user, login).ConfigureAwait(false);
1141var existingUser = await FindByLoginAsync(login.LoginProvider, login.ProviderKey).ConfigureAwait(false);
1148return await UpdateUserAsync(user).ConfigureAwait(false);
1163return await loginStore.GetLoginsAsync(user, CancellationToken).ConfigureAwait(false);
1200return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.AddClaims, startTimeStamp).ConfigureAwait(false);
1231return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ReplaceClaim, startTimeStamp).ConfigureAwait(false);
1274return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveClaims, startTimeStamp).ConfigureAwait(false);
1295return await claimStore.GetClaimsAsync(user, CancellationToken).ConfigureAwait(false);
1312var result = await AddToRoleCoreAsync(user, role).ConfigureAwait(false);
1330if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1335return await UpdateUserAsync(user).ConfigureAwait(false);
1352var result = await AddToRolesCoreAsync(user, roles).ConfigureAwait(false);
1373if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1379return await UpdateUserAsync(user).ConfigureAwait(false);
1400if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1408return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveFromRoles, startTimeStamp).ConfigureAwait(false);
1443var result = await RemoveFromRolesCoreAsync(user, roles).ConfigureAwait(false);
1464if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1470return await UpdateUserAsync(user).ConfigureAwait(false);
1483return await userRoleStore.GetRolesAsync(user, CancellationToken).ConfigureAwait(false);
1500return await userRoleStore.IsInRoleAsync(user, NormalizeName(role), CancellationToken).ConfigureAwait(false);
1513return await store.GetEmailAsync(user, CancellationToken).ConfigureAwait(false);
1537return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetEmail, startTimeStamp).ConfigureAwait(false);
1562var user = await store.FindByEmailAsync(email, CancellationToken).ConfigureAwait(false);
1574user = await store.FindByEmailAsync(oldKey, CancellationToken).ConfigureAwait(false);
1595var email = await GetEmailAsync(user).ConfigureAwait(false);
1627var result = await ConfirmEmailCoreAsync(user, token).ConfigureAwait(false);
1644if (!await VerifyUserTokenAsync(user, Options.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token).ConfigureAwait(false))
1649return await UpdateUserAsync(user).ConfigureAwait(false);
1666return await store.GetEmailConfirmedAsync(user, CancellationToken).ConfigureAwait(false);
1698return await ChangeEmailCoreAsync(user, newEmail, token, startTimeStamp).ConfigureAwait(false);
1713if (!await VerifyUserTokenAsync(user, Options.Tokens.ChangeEmailTokenProvider, GetChangeEmailTokenPurpose(newEmail), token).ConfigureAwait(false))
1721return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ChangeEmail, startTimestamp).ConfigureAwait(false);
1734return await store.GetPhoneNumberAsync(user, CancellationToken).ConfigureAwait(false);
1758return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetPhoneNumber, startTimestamp).ConfigureAwait(false);
1783var result = await ChangePhoneNumberCoreAsync(user, phoneNumber, token).ConfigureAwait(false);
1800if (!await VerifyChangePhoneNumberTokenAsync(user, token, phoneNumber).ConfigureAwait(false))
1808return await UpdateUserAsync(user).ConfigureAwait(false);
1885var result = await provider.ValidateAsync(purpose, token, this, user).ConfigureAwait(false);
1962if (await f.Value.CanGenerateTwoFactorTokenAsync(this, user).ConfigureAwait(false))
1992var result = await provider.ValidateAsync("TwoFactor", token, this, user).ConfigureAwait(false);
2052return await store.GetTwoFactorEnabledAsync(user, CancellationToken).ConfigureAwait(false);
2075return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetTwoFactorEnabled, startTimestamp).ConfigureAwait(false);
2098if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false))
2102var lockoutTime = await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false);
2125return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetLockoutEnabled, startTimestamp).ConfigureAwait(false);
2146return await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false);
2162return await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false);
2176var result = await SetLockoutEndDateCoreAsync(user, lockoutEnd).ConfigureAwait(false);
2193if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false))
2199return await UpdateUserAsync(user).ConfigureAwait(false);
2219var count = await store.IncrementAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false);
2222return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.IncrementAccessFailed, startTimestamp).ConfigureAwait(false);
2228return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.IncrementAccessFailed, startTimestamp).ConfigureAwait(false);
2247var result = await ResetAccessFailedCountCoreAsync(user).ConfigureAwait(false);
2264if (await GetAccessFailedCountAsync(user).ConfigureAwait(false) == 0)
2269return await UpdateUserAsync(user).ConfigureAwait(false);
2283return await store.GetAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false);
2358return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetAuthenticationToken, startTimestamp).ConfigureAwait(false);
2386return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveAuthenticationToken, startTimestamp).ConfigureAwait(false);
2423return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetAuthenticatorKey, startTimestamp).ConfigureAwait(false);
2461var update = await UpdateUserAndRecordMetricAsync(user, UserUpdateType.GenerateNewTwoFactorRecoveryCodes, startTimestamp).ConfigureAwait(false);
2563var result = await RedeemTwoFactorRecoveryCodeCoreAsync(user, code).ConfigureAwait(false);
2580var success = await store.RedeemCodeAsync(user, code, CancellationToken).ConfigureAwait(false);
2583return await UpdateUserAsync(user).ConfigureAwait(false);
2613var result = await AddOrUpdatePasskeyCoreAsync(user, passkey).ConfigureAwait(false);
2632return await UpdateUserAsync(user).ConfigureAwait(false);
2699var result = await RemovePasskeyCoreAsync(user, credentialId).ConfigureAwait(false);
2718return await UpdateUserAsync(user).ConfigureAwait(false);
2798return Encoding.Unicode.GetBytes(await GetSecurityStampAsync(user).ConfigureAwait(false));
2825var validate = await ValidatePasswordAsync(user, newPassword).ConfigureAwait(false);
2908var stamp = await GetSecurityStampAsync(user).ConfigureAwait(false);
2917var result = await v.ValidateAsync(this, user).ConfigureAwait(false);
2948var result = await v.ValidateAsync(this, user, password).ConfigureAwait(false);
2980var result = await ValidateUserAsync(user).ConfigureAwait(false);
2987return await Store.UpdateAsync(user, CancellationToken).ConfigureAwait(false);
2992var result = await UpdateUserAsync(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)
Microsoft.Extensions.ML (1)
Microsoft.Extensions.ServiceDiscovery (2)
Microsoft.Extensions.ServiceDiscovery.Dns (2)
Microsoft.Extensions.ServiceDiscovery.Yarp (2)
Microsoft.Gen.BuildMetadata.Unit.Tests (14)
Microsoft.Gen.ComplianceReports.Unit.Tests (15)
Microsoft.Gen.ContextualOptions.Unit.Tests (19)
Microsoft.Gen.Logging.Unit.Tests (16)
Microsoft.Gen.MetadataExtractor.Unit.Tests (15)
Microsoft.Gen.Metrics.Unit.Tests (15)
Microsoft.Gen.MetricsReports.Unit.Tests (15)
Microsoft.Interop.ComInterfaceGenerator (13)
Microsoft.Interop.LibraryImportGenerator (27)
Microsoft.Maui (3)
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);
Microsoft.Maui.Essentials (3)
Microsoft.Maui.Maps (2)
Microsoft.ML.AutoML.Tests (2)
Microsoft.ML.Core (2)
Microsoft.ML.InternalCodeAnalyzer (2)
Microsoft.ML.Samples (5)
Microsoft.ML.Samples.GPU (5)
Microsoft.ML.SamplesUtils (1)
Microsoft.ML.Tokenizers (5)
Microsoft.VisualStudio.Extensibility.Testing.Xunit (18)
src\VisualStudio\IntegrationTest\Harness\XUnitShared\Harness\IdeTestAssemblyRunner.cs (9)
58var summary = await RunTestCollectionForUnspecifiedVersionAsync(completedTestCaseIds, nonIdeTestCases, cancellationTokenSource).ConfigureAwait(true);
76var summary = await RunTestCollectionForVersionAsync(visualStudioInstanceFactory, currentAttempt, currentInstance, completedTestCaseIds, messageBus, testCollection, currentTests, cancellationTokenSource).ConfigureAwait(true);
113var summary = await RunTestCollectionForVersionAsync(visualStudioInstanceFactory, currentAttempt: 0, ideInstanceTestCase.VisualStudioInstanceKey, completedTestCaseIds, messageBus, testCollection, new[] { ideInstanceTestCase }, cancellationTokenSource).ConfigureAwait(true);
200using (await WpfTestSharedData.Instance.TestSerializationGate.DisposableWaitAsync(CancellationToken.None).ConfigureAwait(true))
204return await invoker().ConfigureAwait(true);
217return await task.ConfigureAwait(false);
243var runSummary = await runner.RunAsync().ConfigureAwait(true);
276using (var visualStudioContext = await visualStudioInstanceFactory.GetNewOrUsedInstanceAsync(GetVersion(visualStudioInstanceKey.Version), visualStudioInstanceKey.RootSuffix, environmentVariables, GetExtensionFiles(testCases), ImmutableHashSet.Create<string>()).ConfigureAwait(true))
309return await RunTestCollectionForUnspecifiedVersionAsync(completedTestCaseIds, testCases, cancellationTokenSource).ConfigureAwait(true);
Microsoft.VisualStudio.LanguageServices (287)
CallHierarchy\CallHierarchyProvider.cs (4)
63var finders = await CreateFindersAsync(symbol, project, cancellationToken).ConfigureAwait(false);
65symbol, project.Solution, this.ThreadingContext, _streamingPresenter.Value, cancellationToken).ConfigureAwait(false);
115var @overrides = await SymbolFinder.FindOverridesAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false);
126var implementedInterfaceMembers = await SymbolFinder.FindImplementedInterfaceMembersAsync(symbol, project.Solution, cancellationToken: cancellationToken).ConfigureAwait(false);
CodeCleanup\AbstractCodeCleanUpFixer.cs (8)
63context).ConfigureAwait(false);
101context).ConfigureAwait(false);
129var newDocument = await FixDocumentAsync(document, context.EnabledFixIds, progress, cancellationToken).ConfigureAwait(true);
132context).ConfigureAwait(false);
163var newDoc = await FixDocumentAsync(document, context.EnabledFixIds, progress, cancellationToken).ConfigureAwait(true);
185var solution = await applyFixAsync(progress, cancellationToken).ConfigureAwait(true);
224var fixedDocument = await FixDocumentAsync(document, enabledFixIds, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
253document, enabledDiagnostics, progressTracker, cancellationToken).ConfigureAwait(false);
CodeLens\CodeLensCallbackListener.cs (10)
98cancellationToken).ConfigureAwait(false);
115var maxSearchResults = await GetMaxResultCapAsync(cancellationToken).ConfigureAwait(false);
116return await service.GetReferenceCountAsync(solution, document.Id, node, maxSearchResults, cancellationToken).ConfigureAwait(false);
130cancellationToken).ConfigureAwait(false);
137var references = await service.FindReferenceLocationsAsync(solution, document.Id, node, cancellationToken).ConfigureAwait(false);
144return (projectVersion.ToString(), await service.MapReferenceLocationsAsync(solution, references.Value, _globalOptionService.GetClassificationOptions(document.Project.Language), cancellationToken).ConfigureAwait(false));
158cancellationToken).ConfigureAwait(false);
166solution, projectGuid, filePath, span, sourceGeneratorDocumentId, cancellationToken).ConfigureAwait(false);
173return await service.FindReferenceMethodsAsync(solution, document.Id, node, cancellationToken).ConfigureAwait(false);
181solution, projectGuid, filePath, sourceGeneratorDocumentId, cancellationToken).ConfigureAwait(false);
CodeLens\VisualStudioCodeLensReferencesService.cs (8)
42var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
53return await CodeLensReferencesServiceFactory.Instance.GetReferenceCountAsync(solution, documentId, syntaxNode, maxSearchResults, cancellationToken).ConfigureAwait(false);
67var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
79return await CodeLensReferencesServiceFactory.Instance.FindReferenceLocationsAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false);
99var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
110return await CodeLensReferencesServiceFactory.Instance.FindReferenceMethodsAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false);
124var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
135return await CodeLensReferencesServiceFactory.Instance.GetFullyQualifiedNameAsync(solution, documentId, syntaxNode, cancellationToken).ConfigureAwait(false);
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (6)
397cancellationToken).ConfigureAwait(false);
410var mappedDocumentSpan = await AbstractDocumentSpanEntry.TryMapAndGetFirstAsync(documentSpan, sourceText, cancellationToken).ConfigureAwait(false);
441var (excerptResult, lineText) = await ExcerptAsync(sourceText, documentSpan, classifiedSpans, cancellationToken).ConfigureAwait(false);
443var mappedDocumentSpan = await AbstractDocumentSpanEntry.TryMapAndGetFirstAsync(documentSpan, sourceText, cancellationToken).ConfigureAwait(false);
480var result = await DocumentExcerptHelper.TryExcerptAsync(document, sourceSpan, ExcerptMode.SingleLine, options.Value, cancellationToken).ConfigureAwait(false);
490documentSpan, classifiedSpans, options.Value, cancellationToken).ConfigureAwait(false);
Implementation\AbstractVsTextViewFilter.cs (7)
50return await GetDataTipTextImplAsync(pSpan).ConfigureAwait(true);
64return await GetDataTipTextImplAsync(subjectBuffer, pSpan).ConfigureAwait(true);
113document, spanOpt.Value.Start, includeKind: false, cancellationToken).ConfigureAwait(true);
155waitContext.UserCancellationToken).ConfigureAwait(true);
192document, position, options, cancellationToken).ConfigureAwait(true);
227document, matchingSpan.Value.Start, options, cancellationToken).ConfigureAwait(true);
247document, matchingSpan.Value.End, options, cancellationToken).ConfigureAwait(true);
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (5)
114var debugLocationInfo = await _languageDebugInfo.GetLocationInfoAsync(document, point, cancellationToken).ConfigureAwait(true);
158document, point.Position, context.UserCancellationToken).ConfigureAwait(true);
208solution, pszName, cancellationToken).ConfigureAwait(true);
257pBuffer, iLine, iCol, pCodeSpan, waitContext.UserCancellationToken).ConfigureAwait(true);
334document, new TextSpan(point.Position, length), 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);
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);
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (16)
67var errorList = await serviceProvider.GetServiceAsync<SVsErrorList, IErrorList>(throwOnFailure: false, cancellationToken).ConfigureAwait(false);
82var diagnosticsToFix = await GetDiagnosticsToFixAsync(selectedEntriesOnly: false, isAddSuppression: true).ConfigureAwait(true);
104showPreviewChangesDialog: true).ConfigureAwait(true);
122showPreviewChangesDialog: true).ConfigureAwait(true);
158? await _suppressionStateService.GetSelectedItemsAsync(isAddSuppression, cancellationToken).ConfigureAwait(true)
163}, GetFixTitle(isAddSuppression), GetWaitDialogMessage(isAddSuppression)).ConfigureAwait(true);
179var diagnosticsToFix = await GetDiagnosticsToFixAsync(selectedEntriesOnly, isAddSuppression).ConfigureAwait(true);
225diagnosticsToFix, shouldFixInProject, filterStaleDiagnostics, cancellationToken).ConfigureAwait(false);
230: await GetProjectDiagnosticsToFixAsync(diagnosticsToFix, shouldFixInProject, filterStaleDiagnostics, cancellationToken).ConfigureAwait(false);
278cancellationToken).ConfigureAwait(false);
303cancellationToken).ConfigureAwait(false);
346cancellationToken).ConfigureAwait(false);
488.ConfigureAwait(false)).Where(IsDocumentDiagnostic);
529var diagnostics = await documentDiagnosticsToFix.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
567.ConfigureAwait(false));
582var projectDiagnostics = await projectDiagnosticsToFix.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTrackedTreeItemViewModel.cs (4)
111documentSpan, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
149var children = await CalculateChildrenAsync(ThreadingContext.DisposalToken).ConfigureAwait(false);
188this.ThreadingContext, Workspace, DocumentId, _trackedItem.Span, options, context.UserCancellationToken).ConfigureAwait(false);
194_solution, _trackedItem, cancellationToken).ConfigureAwait(false);
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);
Workspace\VisualStudioDocumentNavigationService.cs (16)
64documentId, vsTextSpan, cancellationToken).ConfigureAwait(false);
96documentId, vsTextSpan, cancellationToken).ConfigureAwait(false);
102if (!await this.CanNavigateToSpanAsync(workspace, documentId, textSpan, allowInvalidSpan, cancellationToken).ConfigureAwait(false))
110cancellationToken).ConfigureAwait(false);
116if (!await this.CanNavigateToPositionAsync(workspace, documentId, position, virtualSpace, allowInvalidPosition, cancellationToken).ConfigureAwait(false))
124cancellationToken).ConfigureAwait(false);
164workspace, documentId, getTextSpanForMappingAsync, getVsTextSpan, getVsTextSpanForMapping, cancellationToken).ConfigureAwait(true);
174return await callback(cancellationToken).ConfigureAwait(true);
204await getTextSpanForMappingAsync(document).ConfigureAwait(false),
205cancellationToken).ConfigureAwait(false);
226workspace, document, mappedSpan, cancellationToken).ConfigureAwait(false);
234await getTextSpanForMappingAsync(generatedDocument).ConfigureAwait(false));
272_threadingContext, documentId, cancellationToken).ConfigureAwait(false);
280text.Container.GetTextBuffer(), vsTextSpan, cancellationToken).ConfigureAwait(false);
317var results = await SpanMappingHelper.TryGetMappedSpanResultAsync(generatedDocument, [textSpan], cancellationToken).ConfigureAwait(false);
419_threadingContext, documentId, cancellationToken).ConfigureAwait(false);
Workspace\VisualStudioSymbolNavigationService.cs (11)
68solution.Workspace, targetDocument.Id, sourceLocation.SourceSpan.Start, cancellationToken).ConfigureAwait(false);
88assemblyName, docCommentId, cancellationToken).ConfigureAwait(false);
103var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
121return await GetNavigableLocationForMetadataAsync(project, symbol, cancellationToken).ConfigureAwait(false);
129var result = await _metadataAsSourceFileService.GetGeneratedFileAsync(_workspace, project, symbol, signaturesOnly: false, options: masOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
174cancellationToken).ConfigureAwait(false);
186project.Solution, includeHiddenLocations: true, cancellationToken).ConfigureAwait(false);
189var result = await TryGetNavigationAPIRequiredArgumentsAsync(definitionItem, rqName, cancellationToken).ConfigureAwait(true);
208return await GetExternalNavigationLocationForSpecificSymbolAsync(definitionItem, rqName1, cancellationToken).ConfigureAwait(false) ??
209await GetExternalNavigationLocationForSpecificSymbolAsync(definitionItem, rqName2, cancellationToken).ConfigureAwait(false);
219definitionItem, rqName, cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CodeLens (3)
Microsoft.VisualStudio.LanguageServices.CSharp (27)
Microsoft.VisualStudio.LanguageServices.DevKit (4)
Microsoft.VisualStudio.LanguageServices.Implementation (28)
Microsoft.VisualStudio.LanguageServices.LiveShare (8)
Microsoft.VisualStudio.LanguageServices.Xaml (6)
Pipelines.AppHost (12)
Pipelines.Library (6)
Replay (13)
src\Compilers\Shared\BuildServerConnection.cs (6)
125cancellationToken).ConfigureAwait(false);
192using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
199return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
307await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
317response = await responseTask.ConfigureAwait(false);
358await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Roslyn.Compilers.Extension (8)
Roslyn.Diagnostics.Analyzers (115)
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\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);
Roslyn.Diagnostics.CSharp.Analyzers (20)
Roslyn.VisualStudio.DiagnosticsWindow (6)
Roslyn.VisualStudio.Next.UnitTests (26)
Remote\SerializationValidator.cs (10)
26=> await validator.GetValueAsync<T>(checksum).ConfigureAwait(false);
92var data = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
114scope.SolutionChecksum, this.Services.SolutionServices, CancellationToken.None).ConfigureAwait(false);
127(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false);
131var projectObject = await GetValueAsync<ProjectStateChecksums>(projectChecksum).ConfigureAwait(false);
141(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false);
186(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false);
199var syncObject = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
201var recoveredValue = await GetValueAsync<T>(checksum).ConfigureAwait(false);
341var otherObject = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
RunTests (3)
SimplePipelines.AppHost (3)
Sockets.BindTests (3)
Sockets.FunctionalTests (3)
System.Data.Common (6)
System.IO.Compression (29)
System\IO\Compression\ZipArchiveEntry.Async.cs (20)
30return await OpenInReadModeAsync(checkOpenable: true, cancellationToken).ConfigureAwait(false);
36return await OpenInUpdateModeAsync(loadExistingContent: true, cancellationToken).ConfigureAwait(false);
73return await OpenInReadModeAsync(checkOpenable: true, cancellationToken).ConfigureAwait(false);
86return await OpenInReadModeAsync(checkOpenable: true, cancellationToken).ConfigureAwait(false);
88return await OpenInUpdateModeAsync(loadExistingContent: false, cancellationToken).ConfigureAwait(false);
91return await OpenInUpdateModeAsync(loadExistingContent: true, cancellationToken).ConfigureAwait(false);
104if (!await ZipLocalFileHeader.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false))
124Stream decompressor = await OpenInReadModeAsync(false, cancellationToken).ConfigureAwait(false);
201Debug.Assert(await GetIsOpenableAsync(false, true, cancellationToken).ConfigureAwait(false));
207(_lhUnknownExtraFields, _lhTrailingExtraFieldData) = await ZipLocalFileHeader.GetExtraFieldsAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false);
215Debug.Assert(await GetIsOpenableAsync(false, true, cancellationToken).ConfigureAwait(false));
221_archive.ArchiveStream.Seek(await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false), SeekOrigin.Begin);
234(bool result, _) = await IsOpenableAsync(needToUncompress, needToLoadIntoMemory, cancellationToken).ConfigureAwait(false);
241(bool openable, string? message) = await IsOpenableAsync(needToUncompress, needToLoadIntoMemory, cancellationToken).ConfigureAwait(false);
253await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false));
271_storedUncompressedData = await GetUncompressedDataAsync(cancellationToken).ConfigureAwait(false);
302if (!await ZipLocalFileHeader.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false))
309long offsetOfCompressedData = await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false);
386await WriteLocalFileHeaderAsync(isEmptyFile: _uncompressedSize == 0, forceWrite: true, cancellationToken).ConfigureAwait(false);
404await WriteLocalFileHeaderAsync(isEmptyFile: _uncompressedSize == 0, forceWrite: forceWrite, cancellationToken).ConfigureAwait(false);
System.IO.Compression.ZipFile (8)
System\IO\Compression\ZipFile.Create.Async.cs (4)
168return await ZipArchive.CreateAsync(fs, mode, leaveOpen: false, entryNameEncoding: entryNameEncoding, cancellationToken).ConfigureAwait(false);
445ZipArchive archive = await OpenAsync(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding, cancellationToken).ConfigureAwait(false);
459ZipArchive archive = await ZipArchive.CreateAsync(destination, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding, cancellationToken).ConfigureAwait(false);
484await ZipFileExtensions.DoCreateEntryFromFileAsync(archive, fullPath, entryName, compressionLevel, cancellationToken).ConfigureAwait(false);
System.Memory.Data (1)
System.Net.Http (32)
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.Json (3)
System.Net.Mail (20)
System.Net.NameResolution (4)
System.Net.NetworkInformation (1)
System.Net.Ping (3)
System.Net.Quic (1)
System.Net.Requests (7)
System.Net.Security (1)
System.Net.Sockets (5)
System.Net.WebClient (2)
System.Net.WebSockets (2)
System.Net.WebSockets.Client (1)
System.Private.CoreLib (4)
System.Private.DataContractSerialization (3)
System.Private.Xml (380)
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\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\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.Private.Xml.Linq (28)
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.Security.Cryptography.Cose (2)
System.ServiceModel.Federation (1)
System.ServiceModel.NetFramingBase (1)
System.ServiceModel.Primitives (2)
System.Text.Json (1)
System.Text.RegularExpressions.Generator (8)
System.Threading.RateLimiting (1)
System.Threading.Tasks.Dataflow (2)
System.Windows.Forms (4)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (2)
System.Windows.Forms.Analyzers.CSharp.Tests (1)
System.Windows.Forms.Analyzers.Tests (5)
System.Windows.Forms.Tests (16)
Test.Utilities (17)
Text.Analyzers (87)
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\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);
vbc (7)
src\Compilers\Shared\BuildServerConnection.cs (6)
125cancellationToken).ConfigureAwait(false);
192using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
199return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
307await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
317response = await responseTask.ConfigureAwait(false);
358await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
VBCSCompiler (23)
src\Compilers\Shared\BuildServerConnection.cs (6)
125cancellationToken).ConfigureAwait(false);
192using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
199return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
307await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
317response = await responseTask.ConfigureAwait(false);
358await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
VBCSCompiler.UnitTests (1)