7231 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 (19)
Interaction\ExtensionInteractionService.cs (8)
68var value = await task.ConfigureAwait(false);
93var result = await Backchannel.PromptForStringAsync(promptText.RemoveSpectreFormatting(), defaultValue, validator, required, _cancellationToken).ConfigureAwait(false);
102return await tcs.Task.ConfigureAwait(false);
106return await _consoleInteractionService.PromptForStringAsync(promptText, defaultValue, validator, isSecret, required, cancellationToken).ConfigureAwait(false);
120var result = await Backchannel.ConfirmAsync(promptText.RemoveSpectreFormatting(), defaultValue, _cancellationToken).ConfigureAwait(false);
130return await tcs.Task.ConfigureAwait(false);
149var result = await Backchannel.PromptForSelectionAsync(promptText.RemoveSpectreFormatting(), choices, choiceFormatter, _cancellationToken).ConfigureAwait(false);
159return await tcs.Task.ConfigureAwait(false);
Aspire.Azure.Messaging.WebPubSub (1)
Aspire.Azure.Search.Documents (1)
Aspire.Cli.Tests (1)
Aspire.Components.Common.TestUtilities (1)
Aspire.Confluent.Kafka (2)
Aspire.Dashboard (51)
Telemetry\DashboardTelemetryService.cs (14)
69await _telemetrySender.TryStartTelemetrySessionAsync().ConfigureAwait(false);
115var response = await PostRequestAsync<StartOperationRequest, StartOperationResponse>(client, TelemetryEndpoints.TelemetryStartOperation, new StartOperationRequest(eventName, scopeSettings)).ConfigureAwait(false);
136await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryEndOperation, new EndOperationRequest(Id: (string)propertyGetter(operationId), Result: result, ErrorMessage: errorMessage)).ConfigureAwait(false);
161var response = await PostRequestAsync<StartOperationRequest, StartOperationResponse>(client, TelemetryEndpoints.TelemetryStartUserTask, new StartOperationRequest(eventName, scopeSettings)).ConfigureAwait(false);
182await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryEndUserTask, new EndOperationRequest(Id: (string)propertyGetter(operationId), Result: result, ErrorMessage: errorMessage)).ConfigureAwait(false);
208var response = await PostRequestAsync<PostOperationRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostOperation, request).ConfigureAwait(false);
236var response = await PostRequestAsync<PostOperationRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostUserTask, request).ConfigureAwait(false);
264var response = await PostRequestAsync<PostFaultRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostFault, request).ConfigureAwait(false);
293var response = await PostRequestAsync<PostAssetRequest, TelemetryEventCorrelation>(client, TelemetryEndpoints.TelemetryPostAsset, request).ConfigureAwait(false);
314await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostProperty, request).ConfigureAwait(false);
332await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostRecurringProperty, request).ConfigureAwait(false);
350await client.PostAsJsonAsync(TelemetryEndpoints.TelemetryPostCommandLineFlags, request).ConfigureAwait(false);
356var httpResponseMessage = await client.PostAsJsonAsync(endpoint, request).ConfigureAwait(false);
358var response = await httpResponseMessage.Content.ReadFromJsonAsync<TResponse>().ConfigureAwait(false);
Aspire.Dashboard.Components.Tests (2)
Aspire.Dashboard.Tests (3)
Aspire.EndToEnd.Tests (6)
Aspire.Hosting (144)
ApplicationModel\ExpressionResolver.cs (9)
26await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false),
27await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)),
29await EvalEndpointAsync(endpointReference, EndpointProperty.Host).ConfigureAwait(false),
30await EvalEndpointAsync(endpointReference, EndpointProperty.Port).ConfigureAwait(false)),
132ConnectionStringReference cs => await ResolveConnectionStringReferenceAsync(cs).ConfigureAwait(false),
134ReferenceExpression ex => await EvalExpressionAsync(ex).ConfigureAwait(false),
135EndpointReference endpointReference when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(endpointReference, EndpointProperty.Url).ConfigureAwait(false), false),
136EndpointReferenceExpression ep when sourceIsContainer => new ResolvedValue(await EvalEndpointAsync(ep.Endpoint, ep.Property).ConfigureAwait(false), false),
137IValueProvider vp => await EvalValueProvider(vp).ConfigureAwait(false),
ApplicationModel\ResourceExtensions.cs (5)
303(DistributedApplicationOperation.Run, IValueProvider provider) => await GetValue(key: null, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false),
304(DistributedApplicationOperation.Run, IResourceBuilder<IResource> rb) when rb.Resource is IValueProvider provider => await GetValue(key: null, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false),
362(DistributedApplicationOperation.Run, IValueProvider provider) => await GetValue(key, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false),
363(DistributedApplicationOperation.Run, IResourceBuilder<IResource> rb) when rb.Resource is IValueProvider provider => await GetValue(key, provider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false),
416IValueProvider valueProvider => (await GetValue(key: null, valueProvider, logger, resource.IsContainer(), containerHostName, cancellationToken).ConfigureAwait(false))?.Value,
ApplicationModel\ResourceNotificationService.cs (7)
152await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && re.Snapshot.HealthStatus == HealthStatus.Healthy, cancellationToken).ConfigureAwait(false);
157resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && re.Snapshot.ResourceReadyEvent is not null, cancellationToken: cancellationToken).ConfigureAwait(false);
190cancellationToken).ConfigureAwait(false);
221var resourceEvent = await WaitForResourceCoreAsync(resourceName, re => ShouldYield(waitBehavior, re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false);
267var resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && IsKnownTerminalState(re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false);
322var resourceEvent = await WaitForResourceCoreAsync(dependency.Name, re => re.ResourceId == resourceId && IsContinuableState(waitBehavior, re.Snapshot), cancellationToken: cancellationToken).ConfigureAwait(false);
433var resourceEvent = await WaitForResourceCoreAsync(resourceName, predicate, cancellationToken).ConfigureAwait(false);
Dcp\DcpExecutor.cs (20)
137_dcpInfo = await _dcpDependencyCheckService.GetDcpInfoAsync(cancellationToken: cancellationToken).ConfigureAwait(false);
768var dcpSvc = await _kubernetesService.GetAsync<Service>(sar.Service.Metadata.Name, cancellationToken: cancellationToken).ConfigureAwait(false);
793await _kubernetesService.CreateAsync(cn, cancellationToken).ConfigureAwait(false);
1210await _kubernetesService.CreateAsync(containerExe, cancellationToken).ConfigureAwait(false);
1239(var appHostArgs, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false);
1253(spec.Env, var failedToApplyConfiguration) = await BuildEnvVarsAsync(resourceLogger, er.ModelResource, cancellationToken).ConfigureAwait(false);
1263await _kubernetesService.CreateAsync(exe, cancellationToken).ConfigureAwait(false);
1496spec.CreateFiles = await BuildCreateFilesAsync(modelContainerResource, cancellationToken).ConfigureAwait(false);
1498(spec.RunArgs, var failedToApplyRunArgs) = await BuildRunArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false);
1500(var args, var failedToApplyArgs) = await BuildArgsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false);
1504(spec.Env, var failedToApplyConfiguration) = await BuildEnvVarsAsync(resourceLogger, modelContainerResource, cancellationToken).ConfigureAwait(false);
1521await _kubernetesService.CreateAsync(dcpContainerResource, cancellationToken).ConfigureAwait(false);
1711await _kubernetesService.CreateAsync(res, cancellationToken).ConfigureAwait(false);
1754await _kubernetesService.PatchAsync(c, patch, attemptCancellationToken).ConfigureAwait(false);
1755var cu = await _kubernetesService.GetAsync<Container>(c.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
1769await _kubernetesService.PatchAsync(e, patch, attemptCancellationToken).ConfigureAwait(false);
1770var eu = await _kubernetesService.GetAsync<Executable>(e.Metadata.Name, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
1867var r = await _kubernetesService.DeleteAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
1888var r = await _kubernetesService.GetAsync<T>(resourceName, cancellationToken: attemptCancellationToken).ConfigureAwait(false);
1951cancellationToken).ConfigureAwait(false);
Dcp\ResourceLogSource.cs (4)
37var startupStderrStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStartupStdErr, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
38var startupStdoutStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStartupStdOut, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
46var stdoutStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStdOut, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
47var stderrStream = await kubernetesService.GetLogStreamAsync(resource, Logs.StreamTypeStdErr, cancellationToken, follow: follow, timestamps: true).ConfigureAwait(false);
InteractionService.cs (8)
42return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false);
51return await PromptMessageBoxCoreAsync(title, message, options, cancellationToken).ConfigureAwait(false);
68var completion = await newState.CompletionTcs.Task.ConfigureAwait(false);
77return await PromptInputAsync(title, message, new InteractionInput { Name = inputLabel, InputType = InputType.Text, Label = inputLabel, Required = true, Placeholder = placeHolder }, options, cancellationToken).ConfigureAwait(false);
82var result = await PromptInputsAsync(title, message, [input], options, cancellationToken).ConfigureAwait(false);
107var completion = await newState.CompletionTcs.Task.ConfigureAwait(false);
127var completion = await newState.CompletionTcs.Task.ConfigureAwait(false);
202if (!await RunValidationAsync(interactionState, result, cancellationToken).ConfigureAwait(false))
Aspire.Hosting.Azure (57)
AzureDeployingContext.cs (16)
30var userSecrets = await userSecretsManager.LoadUserSecretsAsync(cancellationToken).ConfigureAwait(false);
31var provisioningContext = await provisioningContextProvider.CreateProvisioningContextAsync(userSecrets, cancellationToken).ConfigureAwait(false);
38if (!await TryProvisionAzureBicepResources(bicepResources, provisioningContext, cancellationToken).ConfigureAwait(false))
44if (!await TryDeployContainerImages(model, cancellationToken).ConfigureAwait(false))
50if (!await TryDeployComputeResources(model, provisioningContext, cancellationToken).ConfigureAwait(false))
65var deployingStep = await activityReporter.CreateStepAsync("Deploying Azure resources", cancellationToken).ConfigureAwait(false);
76var resourceTask = await deployingStep.CreateTaskAsync($"Provisioning {resource.Name}", cancellationToken).ConfigureAwait(false);
93await deployingStep.FailAsync(errorMessage, cancellationToken).ConfigureAwait(false);
145var computeStep = await activityReporter.CreateStepAsync("Deploying compute resources", cancellationToken).ConfigureAwait(false);
169var resourceTask = await parentStep.CreateTaskAsync($"Deploying {computeResource.Name}", cancellationToken).ConfigureAwait(false);
231var acrStep = await activityReporter.CreateStepAsync($"Pushing images to {registryName}", cancellationToken).ConfigureAwait(false);
250var loginTask = await parentStep.CreateTaskAsync($"Logging in to container registry", cancellationToken).ConfigureAwait(false);
263var result = await pendingResult.WaitAsync(cancellationToken).ConfigureAwait(false);
267await loginTask.FailAsync($"Login to ACR {registryName} failed with exit code {result.ExitCode}", cancellationToken: cancellationToken).ConfigureAwait(false);
285var pushTask = await parentStep.CreateTaskAsync($"Pushing {resource.Name}", cancellationToken).ConfigureAwait(false);
322await pendingResult.WaitAsync(cancellationToken).ConfigureAwait(false);
Aspire.Hosting.Azure.AIFoundry (2)
Aspire.Hosting.Azure.AppContainers (1)
Aspire.Hosting.Azure.AppService (1)
Aspire.Hosting.Azure.CosmosDB (3)
Aspire.Hosting.Azure.KeyVault (1)
Aspire.Hosting.Azure.Storage (2)
Aspire.Hosting.Docker (7)
Aspire.Hosting.GitHub.Models (3)
Aspire.Hosting.GitHub.Models.Tests (2)
Aspire.Hosting.Kafka.Tests (2)
Aspire.Hosting.Kubernetes (7)
Aspire.Hosting.MySql (3)
Aspire.Hosting.MySql.Tests (2)
Aspire.Hosting.Nats (1)
Aspire.Hosting.NodeJs.Tests (2)
Aspire.Hosting.OpenAI (6)
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.SqlServer (3)
Aspire.Hosting.Testing (9)
Aspire.Hosting.Tests (3)
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)
Binding.Tcp.IntegrationTests (1)
ConfigurationSchemaGenerator (1)
csc (7)
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false);
184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
309response = await responseTask.ConfigureAwait(false);
350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
dotnet-openapi (1)
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);
168using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Generating Program.cs ...").ConfigureAwait(false))
178using (await SafeLogger.WriteStartOperationAsync(logger, $"Generating {paramsFilePath} params file ...").ConfigureAwait(false))
193var restoreResult = await this.MSBuildProj.RestoreAsync(logger, cancellationToken).ConfigureAwait(false);
201var buildResult = await this.MSBuildProj.BuildAsync(logger, cancellationToken).ConfigureAwait(false);
CommandProcessorOptions.cs (14)
289using (SafeLogger safeLogger = await SafeLogger.WriteStartOperationAsync(this.Logger, "Validating options ...").ConfigureAwait(false))
332using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {ProjectFileKey} option ...").ConfigureAwait(false))
372this.Project = await MSBuildProj.FromPathAsync(projectFile, this.Logger, cancellationToken).ConfigureAwait(false);
380using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {OutputDirKey} option ...").ConfigureAwait(false))
417using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {OutputFileKey} option ...").ConfigureAwait(false))
467using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {UpdateServiceReferenceKey} option ...").ConfigureAwait(false))
570using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {BootstrapPathKey} option ...").ConfigureAwait(false))
617using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {nameof(this.References)}, count: {this.References.Count}. Reference resolution enabled: {resolveReferences}").ConfigureAwait(false))
621var references = await this.Project.ResolveProjectReferencesAsync(ProjectDependency.IgnorableDependencies, logger, cancellationToken).ConfigureAwait(false);
646using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing {nameof(this.NamespaceMappings)}, count: {this.NamespaceMappings.Count}").ConfigureAwait(false))
696using (SafeLogger logger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Resolving {TargetFrameworkKey} option ...").ConfigureAwait(false))
709using (var proj = await MSBuildProj.DotNetNewAsync(projectFullPath, this.Logger, cancellationToken).ConfigureAwait(false))
729using (var safeLogger = await SafeLogger.WriteStartOperationAsync(this.Logger, $"Processing inputs, count: {this.Inputs.Count} ...").ConfigureAwait(false))
804using (var logger = await SafeLogger.WriteStartOperationAsync(this.Logger, "Processing reference assemblies ...").ConfigureAwait(false))
FrameworkFork\Microsoft.Xml\Xml\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);
693using (await SafeLogger.WriteStartOperationAsync(logger, $"Saving project file: \"{this.FullPath}\"").ConfigureAwait(false))
722await ProcessRunner.TryRunAsync("dotnet", restoreParams + " --no-dependencies", this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false);
723var result = await ProcessRunner.TryRunAsync("dotnet", restoreParams, this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false);
735await this.RestoreAsync(logger, cancellationToken).ConfigureAwait(false);
737return await BuildAsync(logger, cancellationToken).ConfigureAwait(false);
745return await ProcessRunner.RunAsync("dotnet", buildParams, this.DirectoryPath, logger, cancellationToken).ConfigureAwait(false);
761using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving project references ...").ConfigureAwait(false))
765await this.RestoreAsync(logger, cancellationToken).ConfigureAwait(false);
767var packageReferences = await ResolvePackageReferencesAsync(logger, cancellationToken).ConfigureAwait(false);
768var assemblyReferences = await ResolveAssemblyReferencesAsync(logger, cancellationToken).ConfigureAwait(false);
791using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving package references ...").ConfigureAwait(false))
853}, cancellationToken).ConfigureAwait(false);
869using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving assembly references for {this.TargetFramework} target framework ...").ConfigureAwait(false))
871await ResolveProperyValuesAsync(new string[] { "OutputPath", "TargetPath" }, logger, cancellationToken).ConfigureAwait(false);
881await ResolveDepsFilePathFromBuildConfigAsync(outputPath, logger, cancellationToken).ConfigureAwait(false);
934}, cancellationToken).ConfigureAwait(false);
976propertyTable = await _propertyResolver.EvaluateProjectPropertiesAsync(this.FullPath, this.TargetFramework, propertyNames, this.GlobalProperties, logger, cancellationToken).ConfigureAwait(false);
994using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving deps.json file ...").ConfigureAwait(false))
1000var binFolder = await PathHelper.TryFindFolderAsync("bin", outputPath, logger, cancellationToken).ConfigureAwait(false);
Shared\ProjectPropertyResolver.cs (9)
27using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Resolving {propertyNames.Count()} project properties ...").ConfigureAwait(false))
33var sdkVersion = await GetSdkVersionAsync(workingDirectory, logger, cancellationToken).ConfigureAwait(false);
34var sdkPath = await GetSdkPathAsync(workingDirectory, logger, cancellationToken).ConfigureAwait(false);
49Assembly msbuildAssembly = await LoadMSBuildAssembliesAsync(sdkPath, logger, cancellationToken).ConfigureAwait(false);
121using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving dotnet sdk version ...").ConfigureAwait(false))
123var procResult = await ProcessRunner.TryRunAsync("dotnet", "--version", workingDirectory, logger, cancellationToken).ConfigureAwait(false);
141using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Resolving .NETCore SDK path ...").ConfigureAwait(false))
156var sdkVersion = await GetSdkVersionAsync(workingDirectory, logger, cancellationToken).ConfigureAwait(false);
176using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, "Loading MSBuild assemblies ...").ConfigureAwait(false))
Shared\Utilities\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 (79)
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 (6)
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 (21)
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)
117cancellationToken).ConfigureAwait(false);
184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
309response = await responseTask.ConfigureAwait(false);
350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (7)
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false);
184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
309response = await responseTask.ConfigureAwait(false);
350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis (43)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
409(_lazyAnalyzerActions, _lazyUnsuppressedAnalyzers) = await GetAnalyzerActionsAsync(Analyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false);
410_lazyAnalyzerGateMap = await CreateAnalyzerGateMapAsync(UnsuppressedAnalyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false);
413_lazyGeneratedCodeAnalysisFlagsMap = await CreateGeneratedCodeAnalysisFlagsMapAsync(UnsuppressedAnalyzers, AnalyzerManager, analyzerExecutor, analysisScope, _severityFilter, cancellationToken).ConfigureAwait(false);
1523workerTasks[i] = Task.Run(async () => await ProcessCompilationEventsCoreAsync(analysisScope, prePopulatedEventQueue, cancellationToken).ConfigureAwait(false));
1555completedEvent = await ProcessCompilationEventsCoreAsync(analysisScope, prePopulatedEventQueue, cancellationToken).ConfigureAwait(false);
2235var isConcurrent = await analyzerManager.IsConcurrentAnalyzerAsync(analyzer, analyzerExecutor, cancellationToken).ConfigureAwait(false);
2260var generatedCodeAnalysisFlags = await analyzerManager.GetGeneratedCodeAnalysisFlagsAsync(analyzer, analyzerExecutor, cancellationToken).ConfigureAwait(false);
DiagnosticAnalyzer\AnalyzerManager.cs (6)
79return await analyzerExecutionContext.GetCompilationAnalysisScopeAsync(sessionScope, analyzerExecutor, cancellationToken).ConfigureAwait(false);
103return await GetSymbolAnalysisScopeCoreAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, symbolStartActions, analyzerExecutor, analyzerExecutionContext, cancellationToken).ConfigureAwait(false);
118return await analyzerExecutionContext.GetSymbolAnalysisScopeAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, symbolStartActions, analyzerExecutor, cancellationToken).ConfigureAwait(false);
127return await GetSymbolAnalysisScopeCoreAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, symbolStartActions, analyzerExecutor, analyzerExecutionContext, cancellationToken).ConfigureAwait(false);
150return await task.ConfigureAwait(false);
201var symbolScope = await GetSymbolAnalysisScopeAsync(symbol, isGeneratedCodeSymbol, filterTree, filterSpan, analyzer, filteredSymbolStartActions, analyzerExecutor, cancellationToken).ConfigureAwait(false);
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (25)
245return await GetAnalyzerDiagnosticsCoreAsync(Analyzers, cancellationToken).ConfigureAwait(false);
257return await GetAnalyzerDiagnosticsCoreAsync(analyzers, cancellationToken).ConfigureAwait(false);
265return await GetAnalysisResultCoreAsync(Analyzers, cancellationToken).ConfigureAwait(false);
277return await GetAnalysisResultCoreAsync(analyzers, cancellationToken).ConfigureAwait(false);
294var diagnostics = await getAllDiagnosticsWithoutStateTrackingAsync(Analyzers, cancellationToken: cancellationToken).ConfigureAwait(false);
309using var driver = await CreateAndInitializeDriverAsync(compilation, _analysisOptions, analysisScope, _suppressors, categorizeDiagnostics: false, cancellationToken).ConfigureAwait(false);
314var analyzerDiags = await driver.GetDiagnosticsAsync(compilation, cancellationToken).ConfigureAwait(false);
326return await GetAnalyzerCompilationDiagnosticsCoreAsync(Analyzers, cancellationToken).ConfigureAwait(false);
339return await GetAnalyzerCompilationDiagnosticsCoreAsync(analyzers, cancellationToken).ConfigureAwait(false);
399return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, Analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false);
415return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, Analyzers, filterSpan, cancellationToken).ConfigureAwait(false);
432return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false);
450return await GetAnalyzerSyntaxDiagnosticsCoreAsync(tree, analyzers, filterSpan, cancellationToken).ConfigureAwait(false);
524return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), Analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false);
540return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), analyzers, filterSpan: null, cancellationToken).ConfigureAwait(false);
556return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), Analyzers, filterSpan, cancellationToken).ConfigureAwait(false);
574return await GetAnalysisResultCoreAsync(new SourceOrAdditionalFile(file), analyzers, filterSpan, cancellationToken).ConfigureAwait(false);
602return await GetAnalyzerSemanticDiagnosticsCoreAsync(model, filterSpan, Analyzers, cancellationToken).ConfigureAwait(false);
618return await GetAnalyzerSemanticDiagnosticsCoreAsync(model, filterSpan, analyzers, cancellationToken).ConfigureAwait(false);
729using var driver = await CreateAndInitializeDriverAsync(compilation, _analysisOptions, analysisScope, _suppressors, categorizeDiagnostics: true, cancellationToken).ConfigureAwait(false);
736driver, compilation, analysisScope, cancellationToken).ConfigureAwait(false);
843var actionCounts = await driver.GetAnalyzerActionCountsAsync(analyzer, compilation.Options, analysisScope, cancellationToken).ConfigureAwait(false);
1282var actionCounts = await GetAnalyzerActionCountsAsync(analyzer, cancellationToken).ConfigureAwait(false);
1299using var driver = await CreateAndInitializeDriverAsync(_compilation, _analysisOptions, analysisScope, _suppressors, categorizeDiagnostics: true, cancellationToken).ConfigureAwait(false);
1301return await driver.GetAnalyzerActionCountsAsync(analyzer, _compilation.Options, analysisScope, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Analyzers (111)
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 (84)
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 (220)
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)
65return await RenameThenRemoveAsyncTokenAsync(document, node, methodSymbol, cancellationToken).ConfigureAwait(false);
69return await RemoveAsyncTokenAsync(document, methodSymbol, node, cancellationToken).ConfigureAwait(false);
83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
85var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
90return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, cancellationToken).ConfigureAwait(false);
99var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
116newDocument, annotation, cancellationToken).ConfigureAwait(false);
133methodSymbol, document.Project.Solution, cancellationToken).ConfigureAwait(false);
146document.Project.Solution, [.. referencedSymbol.Locations], cancellationToken).ConfigureAwait(false);
164currentSolution, group, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\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)
109return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false);
121diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false);
134var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
137field, currentSolution, cancellationToken).ConfigureAwait(false)).ToImmutableArray();
159cancellationToken).ConfigureAwait(false);
184currentSolution, linkedFiles, fieldLocations, property, cancellationToken).ConfigureAwait(false);
191compilation = await fieldDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
253var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
270newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
271newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
300var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
388var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
433document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false);
438document, codeCleanupOptions, cancellationToken).ConfigureAwait(false);
525var semanticModel = await lazySemanticModel.GetValueAsync(cancellationToken).ConfigureAwait(false);
src\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 (22)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (10)
127if (!await TryExecuteCommandAsync().ConfigureAwait(true))
156document, eventNameTask, initialCaretPoint.Position, cancellationToken).ConfigureAwait(true);
170var disposable = await waitContext.SuppressAutoCancelAsync().ConfigureAwait(true);
192var eventHandlerMethodName = await eventNameTask.WithCancellation(cancellationToken).ConfigureAwait(false);
198document, eventHandlerMethodName, position, cancellationToken).ConfigureAwait(false);
203documentWithNameAndAnnotationsAdded, cancellationToken).ConfigureAwait(false);
213documentWithNameAndAnnotationsAdded.WithSyntaxRoot(updatedRoot), Simplifier.Annotation, cleanupOptions.SimplifierOptions, cancellationToken).ConfigureAwait(false);
215simplifiedDocument, Formatter.Annotation, cleanupOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
222var newText = await formattedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
263var newText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
InlineRename\CSharpEditorInlineRenameService.cs (8)
49await TryGetSurroundingNodeSpanAsync<MemberDeclarationSyntax>(renameDefinition.Document, renameDefinition.SourceSpan, cancellationToken).ConfigureAwait(false) ??
50await TryGetSurroundingNodeSpanAsync<StatementSyntax>(renameDefinition.Document, renameDefinition.SourceSpan, cancellationToken).ConfigureAwait(false);
59renameDefinition.Document, semanticModel, textSpan.Start, cancellationToken).ConfigureAwait(true);
71var documentText = await renameDefinition.Document.GetTextAsync(cancellationToken).ConfigureAwait(false);
82await TryGetSurroundingNodeSpanAsync<MemberDeclarationSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false) ??
83await TryGetSurroundingNodeSpanAsync<BaseMethodDeclarationSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false) ??
84await TryGetSurroundingNodeSpanAsync<StatementSyntax>(renameLocation.Document, renameLocation.TextSpan, cancellationToken).ConfigureAwait(false);
86var documentText = await renameLocation.Document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (25)
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 (285)
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);
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (6)
71document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false);
83return await GetItemsWorkerForDelegateOrFunctionPointerAsync(document, position, invocationExpression, within, cancellationToken).ConfigureAwait(false);
110methods, document, invocationExpression, semanticModel, symbolInfo, currentSymbol, cancellationToken).ConfigureAwait(false);
114document, position, textSpan, cancellationToken).ConfigureAwait(false);
160document, position, textSpan, cancellationToken).ConfigureAwait(false);
171document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (5)
65document, position, triggerInfo.TriggerReason, cancellationToken).ConfigureAwait(false);
78return await GetItemsWorkerForDelegateAsync(document, position, objectCreationExpression, type, cancellationToken).ConfigureAwait(false);
106document, position, textSpan, cancellationToken).ConfigureAwait(false);
130document, position, textSpan, cancellationToken).ConfigureAwait(false);
138document, position, SignatureHelpTriggerReason.InvokeSignatureHelpCommand, cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\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 (307)
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 (8)
125if (!await _codeDefinitionWindowService.IsWindowOpenAsync(cancellationToken).ConfigureAwait(false))
133var locations = await GetContextFromPointAsync(document, lastPoint, cancellationToken).ConfigureAwait(true);
146var navigableItems = await GetNavigableItemsAsync(document, position, cancellationToken).ConfigureAwait(false);
153if (await navigationService.CanNavigateToSpanAsync(workspace, item.Document.Id, item.SourceSpan, cancellationToken).ConfigureAwait(false))
169document, position, cancellationToken: cancellationToken).ConfigureAwait(false);
175var result = await symbolNavigationService.GetExternalNavigationSymbolLocationAsync(definitionItem, cancellationToken).ConfigureAwait(false);
185var declarationFile = await _metadataAsSourceFileService.GetGeneratedFileAsync(workspace, document.Project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
201? await findDefinitionService.GetNavigableItemsAsync(document, position, cancellationToken).ConfigureAwait(false)
DocumentationComments\CopilotGenerateDocumentationCommentProvider.cs (4)
45_suggestionManager ??= await suggestionServiceBase.TryRegisterProviderAsync(this, textView, "AmbientAIDocumentationComments", cancellationToken).ConfigureAwait(false);
70var intelliCodeLineCompletionsDisposable = await _suggestionManager.DisableProviderAsync(SuggestionServiceNames.IntelliCodeLineCompletions, cancellationToken).ConfigureAwait(false);
76snippetProposal, _copilotService, oldSnapshot, snippet.IndentText, cancellationToken).ConfigureAwait(false);
188var (documentationCommentDictionary, isQuotaExceeded) = await copilotService.GetDocumentationCommentAsync(proposal, cancellationToken).ConfigureAwait(false);
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 (14)
64document, semanticModel, position, cancellationToken).ConfigureAwait(false);
69document, controlFlowTarget.Value, cancellationToken).ConfigureAwait(false);
78document, semanticModel, position, cancellationToken).ConfigureAwait(false);
85project, position, symbol, originalDocument: document, cancellationToken).ConfigureAwait(false);
90symbol, position, document, cancellationToken).ConfigureAwait(false);
94symbol, solution, isThirdPartyNavigationAllowed, cancellationToken).ConfigureAwait(false);
105_threadingContext, solution.Workspace, title, allDefinitions, cancellationToken).ConfigureAwait(false);
118var interceptorSymbol = await semanticFacts.GetInterceptorSymbolAsync(document, span.Start, cancellationToken).ConfigureAwait(false);
120interceptorSymbol, solution, thirdPartyNavigationAllowed: false, cancellationToken).ConfigureAwait(false);
163impl, solution, thirdPartyNavigationAllowed: false, cancellationToken).ConfigureAwait(false));
169_threadingContext, solution.Workspace, title, definitions, cancellationToken).ConfigureAwait(false);
211return await documentSpans[0].GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false);
225documentSpan, classifiedSpans: null, classificationOptions, cancellationToken).ConfigureAwait(false);
273return await documentSpan.GetNavigableLocationAsync(cancellationToken).ConfigureAwait(false);
Navigation\IDocumentNavigationServiceExtensions.cs (14)
24return await location.NavigateToAsync(options, cancellationToken).ConfigureAwait(false);
33var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, allowInvalidSpan, cancellationToken).ConfigureAwait(false);
34return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
40var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, cancellationToken).ConfigureAwait(false);
41return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
47var location = await service.GetLocationForSpanAsync(workspace, documentId, textSpan, cancellationToken).ConfigureAwait(false);
48return await location.TryNavigateToAsync(threadingContext, NavigationOptions.Default, cancellationToken).ConfigureAwait(false);
54var location = await service.GetLocationForPositionAsync(workspace, documentId, position, virtualSpace, allowInvalidPosition, cancellationToken).ConfigureAwait(false);
55return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
68workspace, documentId, position, cancellationToken).ConfigureAwait(false);
69return await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
85var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
94workspace, documentId, clampedSpan, allowInvalidSpan: true, cancellationToken).ConfigureAwait(false);
96return location != null && await location.TryNavigateToAsync(threadingContext, options, cancellationToken).ConfigureAwait(false);
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\SuggestedAction.cs (8)
82return await CodeAction.GetOperationsAsync(this.OriginalSolution, progressTracker, cancellationToken).ConfigureAwait(false);
90return await actionWithOptions.GetOperationsAsync(this.OriginalSolution, options, progressTracker, cancellationToken).ConfigureAwait(false);
97return await CodeAction.GetPreviewOperationsAsync(this.OriginalSolution, cancellationToken).ConfigureAwait(false);
156operations = await GetOperationsAsync(actionWithOptions, options, progressTracker, cancellationToken).ConfigureAwait(true);
160operations = await GetOperationsAsync(progressTracker, cancellationToken).ConfigureAwait(true);
185cancellationToken).ConfigureAwait(false);
229var operations = await GetPreviewOperationsAsync(cancellationToken).ConfigureAwait(true);
232return await EditHandler.GetPreviewsAsync(Workspace, operations, cancellationToken).ConfigureAwait(true);
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 (4)
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 (32)
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (5)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (16)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (5)
Microsoft.CodeAnalysis.Features (1473)
AddImport\AbstractAddImportFeatureService.cs (13)
69var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
85packageSources, cancellationToken).ConfigureAwait(false);
109options, packageSources, cancellationToken).ConfigureAwait(false);
116document, node, options.CleanupDocument, options.CleanupOptions, cancellationToken).ConfigureAwait(false);
153var exactReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: true, cancellationToken).ConfigureAwait(false);
163var fuzzyReferences = await FindResultsAsync(projectToAssembly, referenceToCompilation, project, maxResults, finder, exact: false, cancellationToken).ConfigureAwait(false);
212await finder.FindInAllSymbolsInStartingProjectAsync(exact, cancellationToken).ConfigureAwait(false));
244projectToAssembly, project, exact, cancellationToken).ConfigureAwait(false);
301assembly, referenceProject, reference, exact, cancellationToken).ConfigureAwait(false);
530packageSources, cancellationToken).ConfigureAwait(false);
543var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
559packageSources, cancellationToken).ConfigureAwait(false);
586var fixesForDiagnostics = await getFixesForDiagnosticsTask.ConfigureAwait(false);
AddImport\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)
138await Task.WhenAll(tasks).ConfigureAwait(false);
144var taskResult = await task.ConfigureAwait(false);
195var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Type, cancellationToken).ConfigureAwait(false);
201name + AttributeSuffix, nameNode, SymbolFilter.Type, cancellationToken).ConfigureAwait(false);
273var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Namespace, cancellationToken).ConfigureAwait(false);
319symbol.Name, simpleName, SymbolFilter.Type, cancellationToken).ConfigureAwait(false);
368var symbols = await searchScope.FindDeclarationsAsync(name, nameNode, SymbolFilter.Member, cancellationToken).ConfigureAwait(false);
421nameof(IList.Add), nameNode: null, filter: SymbolFilter.Member, cancellationToken).ConfigureAwait(false);
455searchScope, nameof(Enumerable.Select), type, predicate: null, cancellationToken).ConfigureAwait(false);
480cancellationToken).ConfigureAwait(false);
505cancellationToken).ConfigureAwait(false);
530cancellationToken).ConfigureAwait(false);
557searchScope, "Deconstruct", type, static m => m.ReturnsVoid, cancellationToken).ConfigureAwait(false);
568name, nameNode: null, filter: SymbolFilter.Member, cancellationToken).ConfigureAwait(false);
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 (15)
111priorityProvider, DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
119var copilotDiagnostics = await GetCopilotDiagnosticsAsync(document, range, priorityProvider.Priority, cancellationToken).ConfigureAwait(false);
148var collection = await errorFixTask.ConfigureAwait(false) ??
149await otherFixTask.ConfigureAwait(false);
203priorityProvider, DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
208var copilotDiagnostics = await GetCopilotDiagnosticsAsync(document, range, priorityProvider.Priority, cancellationToken).ConfigureAwait(false);
258return await document.GetCachedCopilotDiagnosticsAsync(range, cancellationToken).ConfigureAwait(false);
301DiagnosticKind.All, cancellationToken).ConfigureAwait(false);
348document, textSpan, diagnosticId, severity, cancellationToken).ConfigureAwait(false);
357new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false);
566cancellationToken).ConfigureAwait(false);
730var fixes = await provider.GetFixesAsync(document, diagnosticsSpan, dxs, cancellationToken).ConfigureAwait(false);
733cancellationToken).ConfigureAwait(false);
755.ToDiagnosticsAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
766defaultValue: [], cancellationToken).ConfigureAwait(false);
CodeFixes\Service\CodeFixService.FixAllDiagnosticProvider.cs (8)
47document.Project, [document.Id], _diagnosticIds, shouldIncludeAnalyzer: null, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false));
49return await diagnostics.ToDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false);
60DiagnosticKind.All, cancellationToken).ConfigureAwait(false));
62return await diagnostics.ToDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false);
70project, documentIds: default, _diagnosticIds, shouldIncludeAnalyzer: null, includeLocalDocumentDiagnostics: true, cancellationToken).ConfigureAwait(false));
71return await diagnostics.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
79project, _diagnosticIds, shouldIncludeAnalyzer: null, cancellationToken).ConfigureAwait(false));
81return await diagnostics.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (13)
34var documentsAndDiagnosticsToFixMap = await fixAllContext.GetDocumentDiagnosticsToFixAsync().ConfigureAwait(false);
35return await GetFixAsync(documentsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false);
39var projectsAndDiagnosticsToFixMap = await fixAllContext.GetProjectDiagnosticsToFixAsync().ConfigureAwait(false);
40return await GetFixAsync(projectsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false);
57var diagnosticsAndCodeActions = await GetDiagnosticsAndCodeActionsAsync(documentsAndDiagnosticsToFixMap, fixAllContext).ConfigureAwait(false);
66diagnosticsAndCodeActions, fixAllState, progressTracker, cancellationToken).ConfigureAwait(false);
107cancellationToken).ConfigureAwait(false);
167result, fixAllState, progressTracker, cancellationToken).ConfigureAwait(false);
215solution, batchOfFixes, progressTracker, cancellationToken).ConfigureAwait(false);
232oldSolution, diagnosticsAndCodeActions, progressTracker, cancellationToken).ConfigureAwait(false);
240diagnosticsAndCodeActions, cancellationToken).ConfigureAwait(false);
336var newText = await merger.GetFinalMergedTextAsync(cancellationToken).ConfigureAwait(false);
353oldSolution, progressTracker, cancellationToken: cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (8)
152var codeFixes = await GetSuppressionsAsync(document, span, diagnostics, skipSuppressMessage: true, skipUnsuppress: true, cancellationToken: cancellationToken).ConfigureAwait(false);
159var suppressionTargetInfo = await GetSuppressionTargetInfoAsync(document, span, cancellationToken).ConfigureAwait(false);
166document, document.Project, diagnostics, suppressionTargetInfo, skipSuppressMessage, skipUnsuppress, cancellationToken).ConfigureAwait(false);
177var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
182cancellationToken).ConfigureAwait(false);
198var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
243var codeAction = await RemoveSuppressionCodeAction.CreateAsync(suppressionTargetInfo, documentOpt, project, diagnostic, this, cancellationToken).ConfigureAwait(false);
270var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.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.GetFixAsync(fixAllContext).ConfigureAwait(false);
CodeLens\CodeLensReferencesService.cs (16)
54var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
68symbol, solution, progress, documents: null, s_nonParallelSearch, progress.CancellationToken).ConfigureAwait(false);
70return await onResults(progress).ConfigureAwait(false);
77return await onCapped(progress).ConfigureAwait(false);
88return await solution.GetRequiredProject(projectId).GetDependentVersionAsync(cancellationToken).ConfigureAwait(false);
100maxSearchResults, cancellationToken).ConfigureAwait(false);
112var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
121var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true);
208var result = await Task.WhenAll(referenceTasks).ConfigureAwait(false);
211}, onCapped: null, searchCap: 0, cancellationToken: cancellationToken).ConfigureAwait(false);
227var results = await SpanMappingHelper.TryGetMappedSpanResultAsync(document, [span], cancellationToken).ConfigureAwait(false);
277var referenceExcerpt = await excerpter.TryExcerptAsync(document, span, ExcerptMode.SingleLine, classificationOptions, cancellationToken).ConfigureAwait(false);
278var tooltipExcerpt = await excerpter.TryExcerptAsync(document, span, ExcerptMode.Tooltip, classificationOptions, cancellationToken).ConfigureAwait(false);
381var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
397var result = await Task.WhenAll(descriptorTasks).ConfigureAwait(false);
408var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
CodeRefactorings\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 (36)
122var applicableContainers = await GetValidContainersFromAllLinkedDocumentsAsync(document, container, cancellationToken).ConfigureAwait(false);
137var originalNamespaceDeclarations = await GetTopLevelNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
162var namespaces = await GetTopLevelNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
166solution = await ChangeNamespaceAsync(document, namespaceToRename, targetNamespace, cancellationToken).ConfigureAwait(false);
203var containersFromAllDocuments = await GetValidContainersFromAllLinkedDocumentsAsync(document, container, cancellationToken).ConfigureAwait(false);
213var annotatedSolution = await AnnotateContainersAsync(solution, containersFromAllDocuments, cancellationToken).ConfigureAwait(false);
230solutionAfterNamespaceChange, documentId, declaredNamespace, targetNamespace, cancellationToken).ConfigureAwait(false);
235var solutionAfterFirstMerge = await MergeDiffAsync(solution, solutionAfterNamespaceChange, cancellationToken).ConfigureAwait(false);
258cancellationToken).ConfigureAwait(false);
264cancellationToken).ConfigureAwait(false);
266return await MergeDiffAsync(solutionAfterFirstMerge, solutionAfterImportsRemoved, cancellationToken).ConfigureAwait(false);
286var container = await TryGetApplicableContainerFromSpanAsync(document, span, cancellationToken).ConfigureAwait(false);
317var documentEditor = await solutionEditor.GetDocumentEditorAsync(id, cancellationToken).ConfigureAwait(false);
441var declaredSymbols = await GetDeclaredSymbolsInContainerAsync(document, container, cancellationToken).ConfigureAwait(false);
443var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
452=> FindReferenceLocationsForSymbolAsync(document, declaredSymbol, cancellationToken))).ConfigureAwait(false);
470document, refLocationsInCurrentDocument, oldNamespace, newNamespace, cancellationToken).ConfigureAwait(false);
496cancellationToken).ConfigureAwait(false);
500cancellationToken).ConfigureAwait(false);
511var referencedSymbols = await FindReferencesAsync(symbol, document, cancellationToken).ConfigureAwait(false);
529var referencedMethodSymbols = await FindReferencesAsync(methodSymbol, document, cancellationToken).ConfigureAwait(false);
587document, this, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false);
612cancellationToken).ConfigureAwait(false);
635return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false);
688document, changeNamespaceService, addImportService, refLocations, newNamespaceParts, cancellationToken).ConfigureAwait(false);
698cancellationToken).ConfigureAwait(false);
702documentWithAdditionalImports, Formatter.Annotation, documentOptions.FormattingOptions, cancellationToken).ConfigureAwait(false);
704return await SimplifyTypeNamesAsync(formattedDocument, documentOptions, cancellationToken).ConfigureAwait(false);
711var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
718cancellationToken).ConfigureAwait(false);
737var editor = await DocumentEditor.CreateAsync(document, cancellationToken).ConfigureAwait(false);
826cancellationToken).ConfigureAwait(false);
830cancellationToken).ConfigureAwait(false);
846token).ConfigureAwait(false);
881var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
893var mergeResult = await diffMergingSession.MergeDiffsAsync(cancellationToken).ConfigureAwait(false);
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)
71var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
86var additionalAugmentingProviders = await GetAugmentingProvidersAsync(document, triggeredProviders, caretPosition, trigger, options, cancellationToken).ConfigureAwait(false);
96document, caretPosition, trigger, options, completionListSpan, triggeredProviders, sharedContext, cancellationToken).ConfigureAwait(false);
115document, caretPosition, trigger, options, completionListSpan, augmentingProviders, sharedContext, cancellationToken).ConfigureAwait(false);
163cancellationToken).ConfigureAwait(false);
242provider, document, caretPosition, trigger, options, completionListSpan, sharedContext, cancellationToken).ConfigureAwait(false);
247cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractAwaitCompletionProvider.cs (5)
88var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
168return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false);
178var root = await syntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
187return await base.GetChangeAsync(document, item, commitKey, cancellationToken).ConfigureAwait(false);
199document, leftTokenPosition, "System.Threading.Tasks", cancellationToken).ConfigureAwait(false);
Completion\Providers\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)
35var shouldProvideSymbols = await ShouldProvideAvailableSymbolsInCurrentContextAsync(completionContext, context, position, options, cancellationToken).ConfigureAwait(false);
58var shouldPreselectInferredTypes = await ShouldPreselectInferredTypesAsync(completionContext, position, options, cancellationToken).ConfigureAwait(false);
209var description = await TryGetDescriptionAsync(document.Id).ConfigureAwait(false);
220description = await TryGetDescriptionAsync(relatedId).ConfigureAwait(false);
230var context = await Utilities.CreateSyntaxContextWithExistingSpeculativeModelAsync(relatedDocument, position, cancellationToken).ConfigureAwait(false) as TSyntaxContext;
232var symbols = await TryGetSymbolsForContextAsync(completionContext: null, context, options, cancellationToken).ConfigureAwait(false);
250return await SymbolCompletionItem.GetDescriptionAsync(item, bestSymbols.SelectAsArray(t => t.Symbol), document, context.SemanticModel, displayOptions, cancellationToken).ConfigureAwait(false);
265var result = await IsTriggerOnDotAsync(document, characterPosition, cancellationToken).ConfigureAwait(false);
Completion\Providers\AbstractSymbolCompletionProvider.cs (9)
315var isSemanticTriggerCharacter = await IsSemanticTriggerCharacterAsync(document, position - 1, cancellationToken).ConfigureAwait(false);
326var syntaxContext = await completionContext.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false) as TSyntaxContext;
329var regularItems = await GetItemsAsync(completionContext, syntaxContext, document, position, options, cancellationToken).ConfigureAwait(false);
351var itemsForCurrentDocument = await GetSymbolsAsync(completionContext, syntaxContext, position, options, cancellationToken).ConfigureAwait(false);
360var contextAndSymbolLists = await GetPerContextSymbolsAsync(completionContext, document, options, documentIdToIndex.Keys, cancellationToken).ConfigureAwait(false);
422relatedDocument, cancellationToken).ConfigureAwait(false) as TSyntaxContext;
426completionContext, syntaxContext, options, cancellationToken).ConfigureAwait(false);
432cancellationToken).ConfigureAwait(false);
444: await GetSymbolsAsync(completionContext, syntaxContext, syntaxContext.Position, options, cancellationToken).ConfigureAwait(false);
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (6)
26var (strippedDocument, position) = await GetDocumentWithoutInvokingTextAsync(document, SnippetCompletionItem.GetInvocationPosition(item), cancellationToken).ConfigureAwait(false);
35var snippetChange = await snippetProvider.GetSnippetChangeAsync(strippedDocument, position, cancellationToken).ConfigureAwait(false);
44var allTextChanges = await allChangesDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
49var lspSnippet = await RoslynLSPSnippetConverter.GenerateLSPSnippetAsync(allChangesDocument, snippetChange.FinalCaretPosition, snippetChange.Placeholders, change, item.Span.Start, cancellationToken).ConfigureAwait(false);
83var syntaxContext = await context.GetSyntaxContextWithExistingSpeculativeModelAsync(document, cancellationToken).ConfigureAwait(false);
104return await Task.FromResult(CommonCompletionItem.GetDescription(item)).ConfigureAwait(false);
Completion\Providers\SymbolCompletionItem.cs (6)
138var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
150var linkedCompilation = await linkedDoc.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
186var symbols = await GetSymbolsAsync(item, document, cancellationToken).ConfigureAwait(false);
187return await GetDescriptionForSymbolsAsync(item, document, symbols, options, cancellationToken).ConfigureAwait(false);
205return await CommonCompletionUtilities.CreateDescriptionAsync(services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
396return await CommonCompletionUtilities.CreateDescriptionAsync(document.Project.Solution.Services, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
ConvertAnonymousType\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 (6)
46var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
58document, normalizedChanges, cancellationToken).ConfigureAwait(false);
69var oldText = await originalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
79originalDocument, forkedDocument, normalizedChanges.First(), totalNewSpan, cancellationToken).ConfigureAwait(false);
101forkedDocument, totalNewSpan, cleanupDocument: false, CodeAnalysisProgress.None, cancellationToken).ConfigureAwait(false);
103var allChanges = await withImportsDocument.GetTextChangesAsync(forkedDocument, cancellationToken).ConfigureAwait(false);
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 (8)
70var changedMemberAndIdAndSpansAndDocument = await TryGetChangedMemberAsync(document, root, cancellationToken).ConfigureAwait(false);
75return await ComputeDocumentDiagnosticsCoreInProcessAsync(executor, cancellationToken).ConfigureAwait(false);
82var oldDocumentVersion = await GetDiagnosticVersionAsync(oldDocument.Project, cancellationToken).ConfigureAwait(false);
111return await ComputeDocumentDiagnosticsCoreInProcessAsync(executor, cancellationToken).ConfigureAwait(false);
115var oldMemberSpans = await GetOrCreateMemberSpansAsync(oldDocument, oldDocumentVersion, cancellationToken).ConfigureAwait(false);
184var diagnostics = await executor.ComputeDiagnosticsInProcessAsync(analyzer, cancellationToken).ConfigureAwait(false);
202var changedMember = await documentDifferenceService.GetChangedMemberAsync(lastDocument, document, cancellationToken).ConfigureAwait(false);
235var memberSpans = await CreateMemberSpansAsync(document, version, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (8)
35var result = await ComputeDiagnosticsForAnalyzersAsync(analyzers).ConfigureAwait(false);
40result = await RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync(result).ConfigureAwait(false);
57var projectLoadedSuccessfully = await project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false);
101documentAnalysisScope: null, project, compilationWithAnalyzers, logPerformanceInfo: false, getTelemetryInfo: true, cancellationToken).ConfigureAwait(false);
110return await MergeProjectDiagnosticAnalyzerDiagnosticsAsync(ideAnalyzers, result).ConfigureAwait(false);
133? await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false)
135var syntaxDiagnostics = await DocumentAnalysisExecutor.ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(documentAnalyzer, textDocument, AnalysisKind.Syntax, compilation, tree, cancellationToken).ConfigureAwait(false);
136var semanticDiagnostics = await DocumentAnalysisExecutor.ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(documentAnalyzer, textDocument, AnalysisKind.Semantic, compilation, tree, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (9)
26var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
48var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
68var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
89var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
104return await GetDeprioritizationCandidatesInProcessAsync(project, analyzers, cancellationToken).ConfigureAwait(false);
117var client = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
140cancellationToken).ConfigureAwait(false);
157var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
178incrementalAnalysis, logPerformanceInfo, cancellationToken).ConfigureAwait(false);
Diagnostics\Service\DocumentAnalysisExecutor.cs (15)
89: await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
91documentAnalyzer, textDocument, kind, _compilationWithAnalyzers?.HostCompilation, tree, cancellationToken).ConfigureAwait(false);
112var isEnabled = await textDocument.Project.HasSuccessfullyLoadedAsync(cancellationToken).ConfigureAwait(false);
126AnalysisKind.Syntax => await GetSyntaxDiagnosticsInProcessAsync().ConfigureAwait(false),
127AnalysisKind.Semantic => await GetSemanticDiagnosticsInProcessAsync().ConfigureAwait(false),
132diagnostics = await RemapDiagnosticLocationsIfRequiredAsync(diagnostics).ConfigureAwait(false);
145var diags = await diagnostics.ToDiagnosticsAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
162analysisScope, analysisScope.TextDocument.Project, _compilationWithAnalyzers, _logPerformanceInfo, getTelemetryInfo: false, cancellationToken).ConfigureAwait(false);
182var analysisResult = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false);
207return await GetCompilerAnalyzerDiagnosticsInProcessAsync(AnalysisScope.Span).ConfigureAwait(false);
215var syntaxDiagnostics = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false);
242var adjustedSpan = await GetAdjustedSpanForCompilerAnalyzerAsync(document).ConfigureAwait(false);
243return await GetCompilerAnalyzerDiagnosticsInProcessAsync(adjustedSpan).ConfigureAwait(false);
251var semanticDiagnostics = await GetAnalysisResultInProcessAsync(analysisScope).ConfigureAwait(false);
363var diagnostic = await diagnosticData.ToDiagnosticAsync(textDocument.Project, cancellationToken).ConfigureAwait(false);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (9)
41var client = await RemoteHostClient.TryGetClientAsync(document.Project, cancellationToken).ConfigureAwait(false);
60document, position, documentsToSearch, options, cancellationToken).ConfigureAwait(false);
76semanticModel, position, solution.Services, cancellationToken).ConfigureAwait(false);
82symbol, document, documentsToSearch, cancellationToken).ConfigureAwait(false);
131symbol, options, cancellationToken).ConfigureAwait(false);
186additionalReferences.AddRange(await GetAdditionalReferencesAsync(currentDocument, symbol, cancellationToken).ConfigureAwait(false));
192documentsToSearch, cancellationToken).ConfigureAwait(false);
291var span = await GetLocationSpanAsync(solution, location, cancellationToken).ConfigureAwait(false);
314var root = await tree.GetRootAsync(cancellationToken).ConfigureAwait(false);
EditAndContinue\EditSession.cs (11)
134var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false);
621var (oldDocument, oldDocumentState) = await DebuggingSession.LastCommittedSolution.GetDocumentAndStateAsync(newDocument, cancellationToken, reloadOutOfSyncDocument: true).ConfigureAwait(false);
1031var (mvid, mvidReadError) = await DebuggingSession.GetProjectModuleIdAsync(newProject, cancellationToken).ConfigureAwait(false);
1097await AnalyzeProjectDifferencesAsync(solution, projectDifferences, solutionActiveStatementSpanProvider, projectDiagnostics, cancellationToken).ConfigureAwait(false);
1154var moduleBlockingDiagnosticId = await ReportModuleDiagnosticsAsync(mvid, oldProject, newProject, changedDocumentAnalyses, projectDiagnostics, cancellationToken).ConfigureAwait(false);
1185var oldCompilation = await oldProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
1196var newCompilation = await newProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
1223var oldActiveStatementsMap = await BaseActiveStatements.GetValueAsync(cancellationToken).ConfigureAwait(false);
1234var capabilities = await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false);
1294var unsupportedChangesDiagnostic = await GetUnsupportedChangesDiagnosticAsync(emitResult, cancellationToken).ConfigureAwait(false);
1391Telemetry.LogRuntimeCapabilities(await Capabilities.GetValueAsync(cancellationToken).ConfigureAwait(false));
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\AbstractFindUsagesService_FindReferences.cs (6)
31document.Project.Solution, definitionTrackingContext.GetDefinitions(), cancellationToken).ConfigureAwait(false);
54context, document, position, classificationOptions, cancellationToken).ConfigureAwait(false);
76var thirdParty = await provider.GetThirdPartyDefinitionItemAsync(solution, definition, cancellationToken).ConfigureAwait(false);
90document, position, cancellationToken).ConfigureAwait(false);
133var client = await RemoteHostClient.TryGetClientAsync(solution.Services, cancellationToken).ConfigureAwait(false);
187cancellationToken).ConfigureAwait(false);
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 (11)
107var mappingResult = await mappingService.MapSymbolAsync(document, member, cancellationToken).ConfigureAwait(false);
142result.AddRange(await GetGlobalImportsItemsAsync(document, spanToSearch, frozenPartialSemantics, cancellationToken).ConfigureAwait(false));
306cancellationToken).ConfigureAwait(false);
351var allImplementingSymbols = await GetImplementingSymbolsForTypeMemberAsync(solution, memberSymbol, cancellationToken).ConfigureAwait(false);
372var allOverridingSymbols = await SymbolFinder.FindOverridesArrayAsync(memberSymbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
562var symbolInSource = await SymbolFinder.FindSourceDefinitionAsync(targetSymbol, solution, cancellationToken).ConfigureAwait(false);
637cancellationToken: cancellationToken).ConfigureAwait(false);
647builder.AddRange(await SymbolFinder.FindOverridesArrayAsync(implementationSymbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false));
689cancellationToken: cancellationToken).ConfigureAwait(false);
694cancellationToken: cancellationToken).ConfigureAwait(false);
703cancellationToken: cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (7)
211document = await AddStringCheckAsync(document, parameter, functionDeclaration, (IMethodSymbol)parameter.ContainingSymbol, blockStatement, NullOrEmptySuffix, lazySimplifierOptions, cancellationToken).ConfigureAwait(false);
217(IMethodSymbol)parameter.ContainingSymbol, blockStatement, lazySimplifierOptions, cancellationToken).ConfigureAwait(false);
552document, parameter, blockStatement, options, cancellationToken).ConfigureAwait(false);
561cancellationToken).ConfigureAwait(false);
577cancellationToken).ConfigureAwait(false);
593cancellationToken).ConfigureAwait(false);
918var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (11)
83var rules = await document.GetNamingRulesAsync(cancellationToken).ConfigureAwait(false);
89document, parameter, blockStatement, rules, parameterNameParts.BaseNameParts, cancellationToken).ConfigureAwait(false);
99method, blockStatement, rules, cancellationToken).ConfigureAwait(false);
414cancellationToken).ConfigureAwait(false);
431document, constructorDeclaration, blockStatement, parameter, fieldOrProperty, cancellationToken).ConfigureAwait(false);
440documentWithMemberAdded, currentParameter, currentFieldOrProperty, cancellationToken).ConfigureAwait(false);
448var compilation = await finalSolution.GetRequiredProject(documentWithMemberAdded.Project.Id).GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
453var propertySyntax = await declarationService.GetDeclarations(finalFieldOrProperty)[0].GetSyntaxAsync(cancellationToken).ConfigureAwait(false);
459var otherRoot = await propertySyntax.SyntaxTree.GetRootAsync(cancellationToken).ConfigureAwait(false);
526var compilation = await documentWithMemberAdded.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
621var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
InlineHints\AbstractInlineHintsService.cs (2)
25: await inlineParameterService.GetInlineHintsAsync(document, textSpan, options.ParameterOptions, options.DisplayOptions, displayAllOverride, cancellationToken).ConfigureAwait(false);
29: await inlineTypeService.GetInlineHintsAsync(document, textSpan, options.TypeOptions, options.DisplayOptions, displayAllOverride, cancellationToken).ConfigureAwait(false);
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (7)
54var expression = await document.TryGetRelevantNodeAsync<TExpressionSyntax>(textSpan, cancellationToken).ConfigureAwait(false);
95var actions = await GetActionsAsync(document, expression, methodSymbol, containingMethod, cancellationToken).ConfigureAwait(false);
149document, expression, cancellationToken).ConfigureAwait(false);
156var methodCallSites = await FindCallSitesAsync(document, methodSymbol, cancellationToken).ConfigureAwait(false);
254var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
261var newRoot = await rewriter.RewriteDocumentAsync(compilation, document, invocations, cancellationToken).ConfigureAwait(false);
266cancellationToken).ConfigureAwait(false);
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (15)
50compilation, document, invocations, insertionIndex, cancellationToken).ConfigureAwait(false);
55compilation, document, insertionIndex, invocations, cancellationToken).ConfigureAwait(false);
225var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
226var expressionParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false);
261? await ExtractMethodAsync(validParameters, newMethodIdentifier, _generator, cancellationToken).ConfigureAwait(false)
262: await GenerateNewMethodOverloadAsync(insertionIndex, _generator, cancellationToken).ConfigureAwait(false);
266var parameterType = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false);
392var typeSymbol = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false);
394validParameters, newMethodIdentifier, typeSymbol, isTrampoline: true, cancellationToken).ConfigureAwait(false);
437validParameters: null, newMethodIdentifier: null, typeSymbol: null, isTrampoline: false, cancellationToken).ConfigureAwait(false);
488var expressionToParameterMap = await MapExpressionToParametersAsync(cancellationToken).ConfigureAwait(false);
489var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
527var parameterType = await GetTypeOfExpressionAsync(cancellationToken).ConfigureAwait(false);
632var matches = await FindMatchesAsync(cancellationToken).ConfigureAwait(false);
633var parameterName = await GetNewParameterNameAsync(cancellationToken).ConfigureAwait(false);
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (4)
58(TStatementSyntax?)await document.TryGetRelevantNodeAsync<TLocalDeclarationSyntax>(span, cancellationToken).ConfigureAwait(false) ??
59await document.TryGetRelevantNodeAsync<TExpressionStatementSyntax>(span, cancellationToken).ConfigureAwait(false);
200document, declarationStatement, statementsToSurround, usingStatement, surroundingStatements, declarationStatementIndex, cancellationToken).ConfigureAwait(false);
235document, expressionStatement, statementsToSurround, usingStatement, surroundingStatements, statementIndex, cancellationToken).ConfigureAwait(false);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (7)
70var compilation = await sourceProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
94var infoKey = await GetUniqueDocumentKeyAsync(sourceProject, topLevelNamedType, signaturesOnly: !useDecompiler, cancellationToken).ConfigureAwait(false);
123var decompilationDocument = await decompiledSourceService.AddSourceToAsync(temporaryDocument, compilation, symbol, refInfo.metadataReference, refInfo.assemblyLocation, formattingOptions: null, cancellationToken).ConfigureAwait(false);
148temporaryDocument = await sourceFromMetadataService.AddSourceToAsync(temporaryDocument, compilation, symbol, formattingOptions: null, cancellationToken).ConfigureAwait(false);
199navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, temporaryDocument, cancellationToken).ConfigureAwait(false);
212navigateLocation = await MetadataAsSourceHelpers.GetLocationInGeneratedSourceAsync(symbolId, document, cancellationToken).ConfigureAwait(false);
377var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (15)
77cancellationToken).ConfigureAwait(false);
110cancellationToken).ConfigureAwait(false);
118var memberReferenceLocations = await FindMemberReferencesAsync(newDoc.Project.Solution, newDoc.Project.Id, moveOptions.SelectedMembers, cancellationToken).ConfigureAwait(false);
120var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, newDoc.Project.Solution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false);
133var movedSolution = await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, cancellationToken).ConfigureAwait(false);
193oldSolution, sourceDocId.ProjectId, selectedMembers, cancellationToken).ConfigureAwait(false);
195var solutionWithFixedReferences = await RefactorReferencesAsync(projectToLocations, oldSolution, newType, typeArgIndices, cancellationToken).ConfigureAwait(false);
213return await MembersPuller.PullMembersUpAsync(sourceDoc, pullMembersUpOptions, cancellationToken).ConfigureAwait(false);
229var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
239cancellationToken).ConfigureAwait(false);
266var docEditor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
290cancellationToken: cancellationToken).ConfigureAwait(false);
351var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
362: await SymbolFinder.FindReferencesAsync(resolvedMember, solution, cancellationToken).ConfigureAwait(false);
366var symbolRefs = await Task.WhenAll(tasks).ConfigureAwait(false);
MoveToNamespace\AbstractMoveToNamespaceService.cs (14)
54var typeAnalysisResult = await AnalyzeTypeAtPositionAsync(document, span.Start, cancellationToken).ConfigureAwait(false);
77var moveToNamespaceAnalysisResult = await TryAnalyzeNamespaceAsync(document, node, position, cancellationToken).ConfigureAwait(false);
84moveToNamespaceAnalysisResult = await TryAnalyzeNamedTypeAsync(document, node, cancellationToken).ConfigureAwait(false);
100if (await changeNamespaceService.CanChangeNamespaceAsync(document, declarationSyntax, cancellationToken).ConfigureAwait(false))
103var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
152if (await changeNamespaceService.CanChangeNamespaceAsync(document, container, cancellationToken).ConfigureAwait(false))
154var namespaces = await GetNamespacesAsync(document, cancellationToken).ConfigureAwait(false);
220var memberSymbols = await GetMemberSymbolsAsync(document, container, cancellationToken).ConfigureAwait(false);
232cancellationToken).ConfigureAwait(false);
253cancellationToken).ConfigureAwait(false);
259var mergedSolution = await PropagateChangeToLinkedDocumentsAsync(modifiedDocument, formattingOptions, cancellationToken).ConfigureAwait(false);
272cancellationToken).ConfigureAwait(false);
278var formattedDocument = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, formattingOptions, cancellationToken).ConfigureAwait(false);
307var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
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)
75var textChanges = await GenerateSnippetTextChangesAsync(document, position, cancellationToken).ConfigureAwait(false);
78var snippetDocument = await GetDocumentWithSnippetAsync(document, textChanges, cancellationToken).ConfigureAwait(false);
82var snippetWithTriviaDocument = await GetDocumentWithSnippetAndTriviaAsync(snippetDocument, position, syntaxFacts, cancellationToken).ConfigureAwait(false);
85var formatAnnotatedSnippetDocument = await AddFormatAnnotationAsync(snippetWithTriviaDocument, position, cancellationToken).ConfigureAwait(false);
88var reformattedDocument = await CleanupDocumentAsync(formatAnnotatedSnippetDocument, cancellationToken).ConfigureAwait(false);
91var documentWithIndentation = await AddIndentationToDocumentAsync(reformattedDocument, cancellationToken).ConfigureAwait(false);
100var changes = await annotatedReformattedDocument.GetTextChangesAsync(document, cancellationToken).ConfigureAwait(false);
149document, FindSnippetAnnotation, addImportPlacementOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
151document = await Simplifier.ReduceAsync(document, FindSnippetAnnotation, simplifierOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
154document = await Formatter.FormatAsync(document, FindSnippetAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
157document = await Formatter.FormatAsync(document, SyntaxAnnotation.ElasticAnnotation, syntaxFormattingOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
200var annotatedSnippetRoot = await AnnotateNodesToReformatAsync(document, position, cancellationToken).ConfigureAwait(false);
235return await AddIndentationToDocumentAsync(document, snippet, cancellationToken).ConfigureAwait(false);
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)
65return await RenameThenRemoveAsyncTokenAsync(document, node, methodSymbol, cancellationToken).ConfigureAwait(false);
69return await RemoveAsyncTokenAsync(document, methodSymbol, node, cancellationToken).ConfigureAwait(false);
83var newSolution = await Renamer.RenameSymbolAsync(solution, methodSymbol, new SymbolRenameOptions(), newName, cancellationToken).ConfigureAwait(false);
85var newRoot = await newDocument.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false);
90return await RemoveAsyncTokenAsync(newDocument, newMethod, newNode, cancellationToken).ConfigureAwait(false);
99var compilation = await document.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
116newDocument, annotation, cancellationToken).ConfigureAwait(false);
138[methodSymbol], document.Project.Solution, cancellationToken).ConfigureAwait(false);
146document.Project.Solution, [.. referencedSymbol.Locations], cancellationToken).ConfigureAwait(false);
164currentSolution, group, cancellationToken).ConfigureAwait(false);
src\Analyzers\Core\CodeFixes\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 (14)
109return await ProcessResultWorkerAsync(originalSolution, currentSolution, diagnostic, cancellationToken).ConfigureAwait(false);
121diagnostic, originalSolution, currentSolution, cancellationToken).ConfigureAwait(false);
134var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
137field, currentSolution, cancellationToken).ConfigureAwait(false)).ToImmutableArray();
159cancellationToken).ConfigureAwait(false);
184currentSolution, linkedFiles, fieldLocations, property, cancellationToken).ConfigureAwait(false);
191compilation = await fieldDocument.Project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
253var finalFieldRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
270newFieldTreeRoot = await FormatAsync(updatedFieldDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
271newPropertyTreeRoot = await FormatAsync(updatedPropertyDocument, updatedProperty, cancellationToken).ConfigureAwait(false);
300var editor = await solutionEditor.GetDocumentEditorAsync(document.Id, cancellationToken).ConfigureAwait(false);
388var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
433document, SpecializedFormattingAnnotation, options, formattingRules, cancellationToken).ConfigureAwait(false);
438document, codeCleanupOptions, cancellationToken).ConfigureAwait(false);
StackTraceExplorer\StackTraceExplorerUtilities.cs (5)
60cancellationToken).ConfigureAwait(false);
64var method = await TryGetBestMatchAsync(project, fullyQualifiedTypeName, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false);
82var method = await TryGetBestMatchAsync(project, fullyQualifiedTypeName, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false);
112var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
123var matchingMethod = await resolver.TryGetBestMatchAsync(project, type, methodNode, methodArguments, methodTypeArguments, cancellationToken).ConfigureAwait(false);
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (15)
121var delayUntilNextUpdate = await UpdateDatabaseInBackgroundWorkerAsync(cancellationToken).ConfigureAwait(false);
188return await PatchLocalDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
193return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
229var (_, delay) = await DownloadFullDatabaseWorkerAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
242var element = await DownloadFileAsync(serverPath, cancellationToken).ConfigureAwait(false);
243var result = await ProcessFullDatabaseXElementAsync(databaseFileInfo, element, cancellationToken).ConfigureAwait(false);
255var (succeeded, contentBytes) = await TryParseDatabaseElementAsync(element, cancellationToken).ConfigureAwait(false);
410return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
422var element = await DownloadFileAsync(serverPath, cancellationToken).ConfigureAwait(false);
428cancellationToken).ConfigureAwait(false);
472var delayUntilUpdate = await TryProcessPatchXElementAsync(databaseFileInfo, patchElement, getDatabaseBytes, cancellationToken).ConfigureAwait(false);
487return await DownloadFullDatabaseAsync(databaseFileInfo, cancellationToken).ConfigureAwait(false);
596var (element, delay) = await TryDownloadFileAsync(client, cancellationToken).ConfigureAwait(false);
615using var stream = await fileDownloader.ReadFileAsync().ConfigureAwait(false);
697var contentBytes = await Updater.ConvertContentAttributeAsync(contentsAttribute, cancellationToken).ConfigureAwait(false);
SyncNamespaces\AbstractSyncNamespacesService.cs (9)
42var diagnosticsByProject = await GetDiagnosticsByProjectAsync(projects, diagnosticAnalyzers, IsHostAnalyzer, cancellationToken).ConfigureAwait(false);
51solution, CodeFixProvider, diagnosticsByProject, progressTracker, cancellationToken).ConfigureAwait(false);
55return await ApplyCodeFixAsync(fixAllProvider, fixAllContext, cancellationToken).ConfigureAwait(false);
68var diagnostics = await GetDiagnosticsAsync(project, diagnosticAnalyzers, isHostAnalyzer, cancellationToken).ConfigureAwait(false);
81var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
92return await analyzerCompilation.GetAnalyzerDiagnosticsAsync(cancellationToken).ConfigureAwait(false);
141var fixAllAction = await fixAllProvider.GetFixAsync(fixAllContext).ConfigureAwait(false);
145fixAllContext.Solution, fixAllContext.Progress, cancellationToken).ConfigureAwait(false);
170var projectDiagnostics = await GetProjectDiagnosticsAsync(document.Project, cancellationToken).ConfigureAwait(false);
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 (6)
Microsoft.CodeAnalysis.LanguageServer.Protocol (211)
Extensions\ProtocolConversions.cs (7)
148var insertionChar = await GetInsertionCharacterAsync(document, position, cancellationToken).ConfigureAwait(false);
378documentSpan.Document, documentSpan.SourceSpan, isStale: false, cancellationToken).ConfigureAwait(false);
411textChanges = await textDiffService.GetTextChangesAsync(oldDoc, newDoc, cancellationToken).ConfigureAwait(false);
420var mappedResults = await SpanMappingHelper.TryGetMappedSpanResultAsync(oldDocument, [.. textChanges.Select(tc => tc.Span)], cancellationToken).ConfigureAwait(false);
476? await SpanMappingHelper.TryGetMappedSpanResultAsync(d, [textSpan], cancellationToken).ConfigureAwait(false)
479return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false);
483return await ConvertTextSpanToLocationAsync(document, textSpan, isStale, cancellationToken).ConfigureAwait(false);
Features\CodeCleanup\AbstractCodeCleanupService.cs (14)
40thirdPartyDiagnosticIdsAndTitles = await GetThirdPartyDiagnosticIdsAndTitlesAsync(document, cancellationToken).ConfigureAwait(false);
64document, enabledDiagnostics.Diagnostics, progressTracker, cancellationToken).ConfigureAwait(false);
69document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false);
77document, enabledDiagnostics.OrganizeUsings, cancellationToken).ConfigureAwait(false);
88document = await Formatter.FormatAsync(document, formattingOptions, cancellationToken).ConfigureAwait(false);
96document, thirdPartyDiagnosticIdsAndTitles, progressTracker, cancellationToken).ConfigureAwait(false);
126document = await removeUsingsService.RemoveUnnecessaryImportsAsync(document, cancellationToken).ConfigureAwait(false);
138document = await organizeImportsService.OrganizeImportsAsync(document, organizeOptions, cancellationToken).ConfigureAwait(false);
156document, diagnosticSet.DiagnosticIds, diagnosticSet.IsAnyDiagnosticIdExplicitlyEnabled, progressTracker, cancellationToken).ConfigureAwait(false);
177document, diagnosticId, minimumSeverity, progressTracker, cancellationToken).ConfigureAwait(false);
191document, textSpan, diagnosticId, minimumSeverity, cancellationToken).ConfigureAwait(false);
200new FixAllContext(fixCollection.FixAllState!, progressTracker, cancellationToken)).ConfigureAwait(false);
218cancellationToken).ConfigureAwait(false);
245document, diagnosticId, DiagnosticSeverity.Warning, progressTracker, cancellationToken).ConfigureAwait(false);
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (12)
52cancellationToken).ConfigureAwait(false);
56var organizedFixes = await OrganizeFixesAsync(workspace, originalSolution, text, filteredFixes, cancellationToken).ConfigureAwait(false);
138var unifiedSuggestedAction = await GetUnifiedSuggestedActionAsync(originalSolution, fix.Action, fix).ConfigureAwait(false);
152var unifiedNestedAction = await GetUnifiedSuggestedActionAsync(originalSolution, nestedAction, fix).ConfigureAwait(false);
171await getFixAllSuggestedActionSetAsync(action).ConfigureAwait(false));
246document, firstDiagnostic.Location.SourceSpan, scope, cancellationToken).ConfigureAwait(false);
447cancellationToken).ConfigureAwait(false);
454var orderedRefactoring = await OrganizeRefactoringsAsync(workspace, document, selection, refactoring, cancellationToken).ConfigureAwait(false);
517var unifiedActionSet = await GetUnifiedSuggestedActionSetAsync(action, applicableToSpan, selection, cancellationToken).ConfigureAwait(false);
546var unifiedAction = await GetUnifiedSuggestedActionSetAsync(nestedAction, applicableToSpan, selection, cancellationToken).ConfigureAwait(false);
566workspace, cancellationToken).ConfigureAwait(false);
614var documentsAndSpans = await fixAllState.GetFixAllSpansAsync(cancellationToken).ConfigureAwait(false);
Handler\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\CompletionResultFactory.cs (15)
80lspCompletionItems.Add(await CreateLSPCompletionItemAsync(item, typedText, i).ConfigureAwait(false));
131cancellationToken).ConfigureAwait(false);
349cancellationToken).ConfigureAwait(false);
529var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, item, cancellationToken).ConfigureAwait(false);
545var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false);
547var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
568return await completionService.GetChangeAsync(document, completionItem, cancellationToken: cancellationToken).ConfigureAwait(false);
605document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false);
618roslynItem, document, completionService, cancellationToken).ConfigureAwait(false);
624document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: false, cancellationToken).ConfigureAwait(false);
654document, roslynItem, completionOptions, symbolDescriptionOptions, cancellationToken).ConfigureAwait(false);
673var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
675document, completionService, roslynItem, capabilityHelper.SupportSnippets, insertNewPositionPlaceholder: true, cancellationToken).ConfigureAwait(false);
693var completionChange = await GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(completionService, document, selectedItem, cancellationToken).ConfigureAwait(false);
698var documentText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Definitions\AbstractGoToDefinitionHandler.cs (5)
53var position = await document.GetPositionFromLinePositionAsync(linePosition, cancellationToken).ConfigureAwait(false);
59var definitions = await service.GetNavigableItemsAsync(document, position, forSymbolType, cancellationToken).ConfigureAwait(false);
71cancellationToken).ConfigureAwait(false);
79var symbol = await SymbolFinder.FindSymbolAtPositionAsync(semanticModel, position, document.Project.Solution.Services, includeType: true, cancellationToken).ConfigureAwait(false);
86var declarationFile = await metadataAsSourceFileService.GetGeneratedFileAsync(workspace, document.Project, symbol, signaturesOnly: false, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Handler\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 (5)
76var formattingOptions = await ProtocolConversions.GetFormattingOptionsAsync(lspFormattingOptions, document, cancellationToken).ConfigureAwait(false);
84document, linePosition, character, service, docCommentOptions, cancellationToken).ConfigureAwait(false);
103document, servicesForDocument, linePosition, indentationOptions, cancellationToken).ConfigureAwait(false);
154var serviceAndContext = await GetBraceCompletionContextAsync(servicesForDocument, position, document, cancellationToken).ConfigureAwait(false);
195var textChange = await GetCollapsedChangeAsync(textChanges, document, cancellationToken).ConfigureAwait(false);
Handler\References\FindUsagesLSPContext.cs (8)
119definition.Tags.GetFirstGlyph(), symbolUsageInfo: null, isWrittenTo: false, cancellationToken).ConfigureAwait(false);
170definitionGlyph: Glyph.None, reference.SymbolUsageInfo, reference.IsWrittenTo, cancellationToken).ConfigureAwait(false);
191var text = await ComputeTextAsync(definitionId, documentSpan, definitionText, isWrittenTo, cancellationToken).ConfigureAwait(false);
195var location = await ComputeLocationAsync(documentSpan, cancellationToken).ConfigureAwait(false);
251return await ProtocolConversions.DocumentSpanToLocationAsync(documentSpan.Value, cancellationToken).ConfigureAwait(false);
255var symbol = await SymbolFinder.FindSymbolAtPositionAsync(_document, _position, cancellationToken).ConfigureAwait(false);
272_workspace, _document.Project, symbol, signaturesOnly: true, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
310documentSpan.Value, classifiedSpans: null, options, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (189)
Completion\CompletionFeaturesTests.cs (20)
128var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
150var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
215var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
237var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
279var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
300var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
343var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
366results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
540var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
562var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, actualItem, CancellationToken.None).ConfigureAwait(false);
609var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
709var completionResult = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
725var resolvedItem1 = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, itemFromNS1, CancellationToken.None).ConfigureAwait(false);
733var resolvedItem2 = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, itemFromNS2, CancellationToken.None).ConfigureAwait(false);
821results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
859var results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
875results = await testLspServer.ExecuteRequestAsync<LSP.CompletionParams, LSP.CompletionList>(LSP.Methods.TextDocumentCompletionName, completionParams, CancellationToken.None).ConfigureAwait(false);
910var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
979var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false);
1052var resolvedItem = await testLspServer.ExecuteRequestAsync<LSP.CompletionItem, LSP.CompletionItem>(LSP.Methods.TextDocumentCompletionResolveName, item, CancellationToken.None).ConfigureAwait(false);
Completion\CompletionResolveTests.cs (17)
65label: "A").ConfigureAwait(false);
71testLspServer, clientCompletionItem).ConfigureAwait(false);
89var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "A").ConfigureAwait(false);
95testLspServer, clientCompletionItem).ConfigureAwait(false);
115var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "M()").ConfigureAwait(false);
117testLspServer, clientCompletionItem).ConfigureAwait(false);
163label: "M()").ConfigureAwait(false);
166testLspServer, clientCompletionItem).ConfigureAwait(false);
199document, new TestCaretOutOfScopeCompletionService(testLspServer.TestWorkspace.Services.SolutionServices), selectedItem, snippetsSupported: true, insertNewPositionPlaceholder: true, CancellationToken.None).ConfigureAwait(false);
263label: "AMethod").ConfigureAwait(false);
266clientCompletionItem).ConfigureAwait(false);
325label: "AMethod").ConfigureAwait(false);
328clientCompletionItem).ConfigureAwait(false);
358var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "(byte)").ConfigureAwait(false);
361testLspServer, clientCompletionItem).ConfigureAwait(false);
381var clientCompletionItem = await GetCompletionItemToResolveAsync<LSP.VSInternalCompletionItem>(testLspServer, label: "svm").ConfigureAwait(false);
386testLspServer, clientCompletionItem).ConfigureAwait(false);
Completion\CompletionTests.cs (57)
96request: completionParams, document: document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false);
102var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
149request: completionParams, document: document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false);
155var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
184request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false);
186var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
219request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false);
221var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
259request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false);
261var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
289request: completionParams, document: document, commitCharacters: null).ConfigureAwait(false);
291var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
373completionParams, document, preselect: true, commitCharacters: ImmutableArray.Create(' ', '(', '[', '{', ';', '.')).ConfigureAwait(false);
375var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
405var results = (LSP.VSInternalCompletionList)await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
437labelDetails: new() { Description = "shortdate" }).ConfigureAwait(false);
439var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
468var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
504sortText: "0000", labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
506var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
543sortText: "0000", vsResolveTextEditOnCommit: true, labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
545var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
582sortText: "0000", vsResolveTextEditOnCommit: true, labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
584var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
638sortText: "0000", labelDetails: new() { Description = "startofstringonly" }).ConfigureAwait(false);
640var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
674await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
680await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
688await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
698await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
733completionParams, document, commitCharacters: CompletionRules.Default.DefaultCommitCharacters).ConfigureAwait(false);
735var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
765var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
795var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
823var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
875var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
931var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
987var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1000results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1055var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1068results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1123var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1135results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1147results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1160results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1220var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1231results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1285var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1347var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1364results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1379results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1413var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1467var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1480results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1508var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1567var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
1597var results = await RunGetCompletionsAsync(testLspServer, completionParams).ConfigureAwait(false);
Diagnostics\PullDiagnosticTests.cs (14)
244var results = await RunGetDocumentPullDiagnosticsAsync(testLspServer, document.GetURI(), useVSDiagnostics).ConfigureAwait(false);
252results = await RunGetDocumentPullDiagnosticsAsync(testLspServer, document.GetURI(), useVSDiagnostics, results.Single().ResultId).ConfigureAwait(false);
524await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
576await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1455await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1661await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1743await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1762var csproj3DocumentText = await csproj3Document.GetTextAsync().ConfigureAwait(false);
1768results = await RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, previousResults: previousResultIds).ConfigureAwait(false);
1817await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1885await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
1948await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
2004await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
2048await using var testLspServer = await CreateTestWorkspaceFromXmlAsync(workspaceXml, mutatingLspWorkspace, BackgroundAnalysisScope.FullSolution, useVSDiagnostics).ConfigureAwait(false);
UriTests.cs (5)
185var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = unencodedUri }, CancellationToken.None).ConfigureAwait(false);
200var (encodedWorkspace, _, encodedDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = encodedUri }, CancellationToken.None).ConfigureAwait(false);
233var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false);
246var (lowerCaseWorkspace, _, lowerCaseDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = lowerCaseUri }, CancellationToken.None).ConfigureAwait(false);
279var (workspace, _, lspDocument) = await testLspServer.GetManager().GetLspDocumentInfoAsync(new LSP.TextDocumentIdentifier { DocumentUri = upperCaseUri }, CancellationToken.None).ConfigureAwait(false);
Workspaces\LspWorkspaceManagerTests.cs (34)
35var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
41(_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
48var (_, closedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
87var (_, firstDocumentWithChange) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false);
88var (_, secondDocumentUnchanged) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false);
122var (_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(firstDocumentUri, testLspServer).ConfigureAwait(false);
127(_, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondDocumentUri, testLspServer).ConfigureAwait(false);
160(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
193(_, openedDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
227var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(newDocumentUri, testLspServer).ConfigureAwait(false);
274var (_, hostSolution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false);
300var (_, solution) = await GetLspHostWorkspaceAndSolutionAsync(testLspServer).ConfigureAwait(false);
338var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
343var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
352var (_, changedFirstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
359var (_, unchangedSecondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
393var (firstWorkspace, firstDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
398var (secondWorkspace, secondDocument) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
408var (_, secondDocumentChangedProject) = await GetLspWorkspaceAndDocumentAsync(secondWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
414var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(firstWorkspaceDocumentUri, testLspServer).ConfigureAwait(false);
443var (_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false);
463(_, documentServerOne) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerOne).ConfigureAwait(false);
466(_, documentServerTwo) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServerTwo).ConfigureAwait(false);
484var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
507var (workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
526(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
544(workspace1, document1) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
564var (workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
580(workspace, document) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
603var (workspace, originalDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
616var (_, newDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
704var (_, removedSourceGeneratorDocument) = await GetLspWorkspaceAndDocumentAsync(sourceGeneratorDocumentUri, testLspServer).ConfigureAwait(false);
715var (_, lspDocument) = await GetLspWorkspaceAndDocumentAsync(documentUri, testLspServer).ConfigureAwait(false);
728var (workspace, _, document) = await testLspServer.GetManager().GetLspDocumentInfoAsync(CreateTextDocumentIdentifier(uri), CancellationToken.None).ConfigureAwait(false);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (84)
Microsoft.CodeAnalysis.PublicApiAnalyzers (25)
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (17)
Microsoft.CodeAnalysis.Remote.ServiceHub (111)
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\DiagnosticComputer.cs (9)
130var (compilationWithAnalyzers, projectAnalyzerToIdMap, hostAnalyzerToIdMap) = await GetOrCreateCompilationWithAnalyzersAsync(cancellationToken).ConfigureAwait(false);
165logPerformanceInfo, getTelemetryInfo, cancellationToken).ConfigureAwait(false);
184documentAnalysisScope, _project, _analyzerInfoCache, cancellationToken).ConfigureAwait(false);
208_project, projectAnalyzers, hostAnalyzers, skippedAnalyzersInfo, cancellationToken).ConfigureAwait(false));
326var cacheEntry = await GetOrCreateCacheEntryAsync().ConfigureAwait(false);
334return await CreateCompilationWithAnalyzersCacheEntryAsync(cancellationToken).ConfigureAwait(false);
346var entry = await CreateCompilationWithAnalyzersCacheEntryAsync(cancellationToken).ConfigureAwait(false);
417? await CreateCompilationWithAnalyzerAsync(projectAnalyzerBuilder.ToImmutable(), hostAnalyzerBuilder.ToImmutable(), cancellationToken).ConfigureAwait(false)
440var compilation = await _project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (7)
49cancellationToken).ConfigureAwait(false);
107var descriptors = await project.GetDiagnosticDescriptorsAsync(analyzerReference, cancellationToken).ConfigureAwait(false);
132solution, projectId, analyzerReference, language, cancellationToken).ConfigureAwait(false);
147var map = await service.GetDiagnosticDescriptorsPerReferenceAsync(solution, cancellationToken).ConfigureAwait(false);
167var map = await service.GetDiagnosticDescriptorsPerReferenceAsync(project, cancellationToken).ConfigureAwait(false);
189project, allProjectAnalyzers.FilterAnalyzers(analyzerIds), cancellationToken).ConfigureAwait(false);
222incrementalAnalysis, logPerformanceInfo, cancellationToken).ConfigureAwait(false);
Services\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 (16)
AbstractAssetProvider.cs (9)
56AssetPathKind.SolutionAnalyzerReferences, solutionChecksums.AnalyzerReferences, cancellationToken).ConfigureAwait(false);
63var projects = await Task.WhenAll(projectsTasks).ConfigureAwait(false);
104await analyzerReferencesTask.ConfigureAwait(false),
112await documentInfosTask.ConfigureAwait(false),
113await projectReferencesTask.ConfigureAwait(false),
114await metadataReferencesTask.ConfigureAwait(false),
116await additionalDocumentInfosTask.ConfigureAwait(false),
117await analyzerConfigDocumentInfosTask.ConfigureAwait(false),
127documentInfos.Add(await CreateDocumentInfoAsync(documentId, attributeChecksum, textChecksum, cancellationToken).ConfigureAwait(false));
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 (557)
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);
Diagnostics\CompilationWithAnalyzersPair.cs (8)
66? await ProjectCompilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false)
69? await HostCompilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false)
78? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(tree, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false)
81? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(tree, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false)
90? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(file, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false)
93? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(file, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false)
102? await ProjectCompilationWithAnalyzers!.GetAnalysisResultAsync(model, filterSpan, projectAnalyzers, cancellationToken).ConfigureAwait(false)
105? await HostCompilationWithAnalyzers!.GetAnalysisResultAsync(model, filterSpan, hostAnalyzers, cancellationToken).ConfigureAwait(false)
Diagnostics\Extensions.cs (13)
34result.Add(await diagnostic.ToDiagnosticAsync(project, cancellationToken).ConfigureAwait(false));
122treeToAnalyze = await document.GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
334var result = await GetAnalysisResultAsync(compilationWithAnalyzers, documentAnalysisScope, cancellationToken).ConfigureAwait(false);
336documentAnalysisScope, project, analyzerInfoCache, cancellationToken).ConfigureAwait(false);
347return await compilationWithAnalyzers.GetAnalysisResultAsync(cancellationToken).ConfigureAwait(false);
359return await compilationWithAnalyzers.GetAnalysisResultAsync(tree, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false);
363return await compilationWithAnalyzers.GetAnalysisResultAsync(documentAnalysisScope.AdditionalFile, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false);
368return await compilationWithAnalyzers.GetAnalysisResultAsync(model, documentAnalysisScope.Span, documentAnalysisScope.ProjectAnalyzers, documentAnalysisScope.HostAnalyzers, cancellationToken).ConfigureAwait(false);
414cancellationToken).ConfigureAwait(false);
499var projectChecksum = await project.State.GetChecksumAsync(cancellationToken).ConfigureAwait(false);
510solution.GetProject(projectRef.ProjectId), cancellationToken).ConfigureAwait(false));
520var remoteHostClient = await RemoteHostClient.TryGetClientAsync(project, cancellationToken).ConfigureAwait(false);
531return await result.Value.ToDiagnosticsAsync(project, cancellationToken).ConfigureAwait(false);
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);
286var editor = await DocumentEditor.CreateAsync(doc, cancellationToken).ConfigureAwait(false);
295var model = await newDoc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
307return await this.GetCurrentSymbolAsync(currentSymbol, cancellationToken).ConfigureAwait(false);
369var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
383return await this.EditDeclarationAsync(currentSymbol, decl, editAction, cancellationToken).ConfigureAwait(false);
401var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
404var currentMember = await this.GetCurrentSymbolAsync(member, cancellationToken).ConfigureAwait(false);
416return await this.EditDeclarationAsync(currentSymbol, declaration, editAction, cancellationToken).ConfigureAwait(false);
458var currentSymbol = await this.GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
468var editor = await solutionEditor.GetDocumentEditorAsync(docId, cancellationToken).ConfigureAwait(false);
483var model = await doc.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
500return await GetCurrentSymbolAsync(symbol, cancellationToken).ConfigureAwait(false);
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);
154solution, symbolOrigination, visibility, cancellationToken).ConfigureAwait(false);
210var compilation = await project.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
271!await HasReferenceToAsync(symbolOrigination, project, cancellationToken).ConfigureAwait(false))
321project, symbolOrigination.assembly.Name, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (7)
96var disposable = await _progressTracker.AddSingleItemAsync(cancellationToken).ConfigureAwait(false);
102this, unifiedSymbols, includeImplementationsThroughDerivedTypes: true, cancellationToken).ConfigureAwait(false);
108await ReportGroupsSeriallyAsync(allSymbols, symbolToGroup, cancellationToken).ConfigureAwait(false);
112var projectsToSearch = await GetProjectsToSearchAsync(allSymbols, cancellationToken).ConfigureAwait(false);
153symbolSet.GetAllSymbols(), symbolToGroup, cancellationToken).ConfigureAwait(false);
187var linkedSymbols = await SymbolFinder.FindLinkedSymbolsAsync(symbol, _solution, cancellationToken).ConfigureAwait(false);
353symbol, project, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (9)
81var initialSymbols = await DetermineInitialSearchSymbolsAsync(engine, searchSymbols, cancellationToken).ConfigureAwait(false);
85engine, initialSymbols, includeImplementationsThroughDerivedTypes, cancellationToken).ConfigureAwait(false);
135var sourceSymbol = await SymbolFinder.FindSourceDefinitionAsync(searchSymbol, solution, cancellationToken).ConfigureAwait(false);
195var mapped = await TryMapAndAddLinkedSymbolsAsync(symbol).ConfigureAwait(false);
205await TryMapAndAddLinkedSymbolsAsync(cascade).ConfigureAwait(false);
217foreach (var linked in await SymbolFinder.FindLinkedSymbolsAsync(symbol, solution, cancellationToken).ConfigureAwait(false))
251symbol, solution, projects, cancellationToken).ConfigureAwait(false);
258symbol, solution, projects, cancellationToken).ConfigureAwait(false);
288symbol, solution, projects, includeImplementationsThroughDerivedTypes, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (6)
51var symbolSet = await SymbolSet.DetermineInitialSearchSymbolsAsync(this, unifiedSymbols, cancellationToken).ConfigureAwait(false);
55[.. symbolSet], symbolToGroup, cancellationToken).ConfigureAwait(false);
157var converted = await ConvertLocationsAsync(@this, values, symbol, group, cancellationToken).ConfigureAwait(false);
225relationship = await ComputeInheritanceRelationshipAsync(key.searchSymbol, key.candidate).ConfigureAwait(false);
244this, [searchSymbol], includeImplementationsThroughDerivedTypes: false, cancellationToken).ConfigureAwait(false);
254this, [candidate], includeImplementationsThroughDerivedTypes: false, cancellationToken).ConfigureAwait(false);
FindSymbols\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);
298cancellationToken).ConfigureAwait(false);
405var originalsourcesymbol = await SymbolFinder.FindSourceDefinitionAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
Rename\ConflictEngine\ConflictResolver.Session.cs (12)
93var (documentsIdsToBeCheckedForConflict, possibleNameConflicts) = await FindDocumentsAndPossibleNameConflictsAsync().ConfigureAwait(false);
140possibleNameConflicts).ConfigureAwait(false));
148conflictLocations).ConfigureAwait(false);
201conflictResolution.CurrentSolution, documentsByProject, _replacementTextValid, _renameAnnotations, _cancellationToken).ConfigureAwait(false));
203intermediateSolution, documentsByProject, _renameAnnotations, _cancellationToken).ConfigureAwait(false);
209var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false);
273documentIdErrorStateLookup.Add(documentId, await originalDoc.HasAnyErrorsAsync(_cancellationToken).ConfigureAwait(false));
318var renamedSymbolInNewSolution = await GetRenamedSymbolInCurrentSolutionAsync(conflictResolution).ConfigureAwait(false);
392conflictResolution, renamedSymbolInNewSolution, conflictAnnotation, newReferencedSymbols).ConfigureAwait(false);
582var overridingSymbol = await SymbolFinder.FindSymbolAtPositionAsync(solution.GetRequiredDocument(newLocation.SourceTree), newLocation.SourceSpan.Start, cancellationToken: _cancellationToken).ConfigureAwait(false);
665var newSymbol = await SymbolFinder.FindSymbolAtPositionAsync(document, start, cancellationToken: _cancellationToken).ConfigureAwait(false);
775var originalSyntaxRoot = await semanticModel.SyntaxTree.GetRootAsync(_cancellationToken).ConfigureAwait(false);
Rename\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)
219symbol.GetOverriddenMember(), solution, cancellationToken).ConfigureAwait(false);
222return await TryGetPropertyFromAccessorOrAnOverrideAsync(originalSourceSymbol, solution, cancellationToken).ConfigureAwait(false);
229symbol, solution, cancellationToken: cancellationToken).ConfigureAwait(false);
233var propertyAccessorOrAnOverride = await TryGetPropertyFromAccessorOrAnOverrideAsync(methodImplementor, solution, cancellationToken).ConfigureAwait(false);
302var symbol = await SymbolFinder.FindSymbolAtPositionAsync(document, position, cancellationToken: cancellationToken).ConfigureAwait(false);
306var definitionSymbol = await FindDefinitionSymbolAsync(symbol, document.Project.Solution, cancellationToken).ConfigureAwait(false);
323symbol, solution, cancellationToken).ConfigureAwait(false);
350var property = await TryGetPropertyFromAccessorOrAnOverrideAsync(bestSymbol, solution, cancellationToken).ConfigureAwait(false);
Rename\SymbolicRenameLocations.cs (7)
63symbol = await RenameUtilities.FindDefinitionSymbolAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
66var originalSymbolResult = await AddLocationsReferenceSymbolsAsync(symbol, solution, cancellationToken).ConfigureAwait(false);
69var overloadsResult = options.RenameOverloads ? await GetOverloadsAsync(symbol, solution, cancellationToken).ConfigureAwait(false) :
79cancellationToken).ConfigureAwait(false);
119overloadsResult.Add(await AddLocationsReferenceSymbolsAsync(overloadedSymbol, solution, cancellationToken).ConfigureAwait(false));
131[symbol], solution, cancellationToken).ConfigureAwait(false);
136await ReferenceProcessing.GetRenamableDefinitionLocationsAsync(referencedSymbol.Definition, symbol, solution, cancellationToken).ConfigureAwait(false));
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (7)
94if (await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false) ||
95await IsPropertyAccessorOrAnOverrideAsync(originalSymbol, solution, cancellationToken).ConfigureAwait(false))
140symbol, solution, cancellationToken).ConfigureAwait(false);
164var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, false, cancellationToken).ConfigureAwait(false);
188var isRenamableAccessor = await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false);
253var shouldIncludeSymbol = await ShouldIncludeSymbolAsync(referencedSymbol, originalSymbol, solution, true, cancellationToken).ConfigureAwait(false);
318isRenamableAccessor: await IsPropertyAccessorOrAnOverrideAsync(referencedSymbol, solution, cancellationToken).ConfigureAwait(false)));
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 (25)
238var finalState = await GetOrBuildFinalStateAsync(compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
267return await BuildFinalStateAsync().ConfigureAwait(false);
304var collapsedInProgressState = await CollapseInProgressStateAsync(expandedInProgressState).ConfigureAwait(false);
305return await FinalizeCompilationAsync(collapsedInProgressState).ConfigureAwait(false);
366var hasSourceGenerators = await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false);
376await ApplyFirstTransformationAsync(currentState, hasSourceGenerators).ConfigureAwait(false);
423compilationWithoutGeneratedDocuments = await translationAction.TransformCompilationAsync(compilationWithoutGeneratedDocuments, cancellationToken).ConfigureAwait(false);
432staleCompilationWithGeneratedDocuments = await translationAction.TransformCompilationAsync(staleCompilationWithGeneratedDocuments, cancellationToken).ConfigureAwait(false);
455return await FinalizeCompilationWorkerAsync(inProgressState).ConfigureAwait(false);
517projectReference.ProjectId, cancellationToken).ConfigureAwait(false);
538projectReference, this.ProjectState, includeCrossLanguage: true, cancellationToken).ConfigureAwait(false);
550projectReference, this.ProjectState, includeCrossLanguage: false, cancellationToken).ConfigureAwait(false);
563projectReference, this.ProjectState, includeCrossLanguage: true, cancellationToken).ConfigureAwait(false);
589cancellationToken).ConfigureAwait(false);
682compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
860if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
864compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
871if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
875compilationState, cancellationToken: cancellationToken).ConfigureAwait(false);
898if (!await compilationState.HasSourceGeneratorsAsync(this.ProjectState.Id, cancellationToken).ConfigureAwait(false))
902compilationState, cancellationToken).ConfigureAwait(false);
1043var docVersion = await projectState.GetLatestDocumentVersionAsync(cancellationToken).ConfigureAwait(false);
1052var dependentProjectVersion = await compilationState.GetDependentVersionAsync(dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
1081var version = await projectState.GetSemanticVersionAsync(cancellationToken).ConfigureAwait(false);
1090dependentProjectReference.ProjectId, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild (38)
MSBuild\BuildHostProcessManager.cs (7)
52var (buildHost, _) = await GetBuildHostWithFallbackAsync(GetKindForProject(projectFilePath), projectFilePath, cancellationToken).ConfigureAwait(false);
68var buildHost = await GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath: null, cancellationToken).ConfigureAwait(false);
75if (!await buildHost.HasUsableMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false))
79return (await GetBuildHostAsync(BuildHostProcessKind.NetCore, projectOrSolutionFilePath, dotnetPath: null, cancellationToken).ConfigureAwait(false), BuildHostProcessKind.NetCore);
97buildHostProcess = await NoLock_GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath, cancellationToken).ConfigureAwait(false);
136var msbuildLocation = await buildHostProcess.BuildHost.FindBestMSBuildAsync(projectOrSolutionFilePath, cancellationToken).ConfigureAwait(false);
157return await NoLock_GetBuildHostAsync(buildHostKind, projectOrSolutionFilePath, dotnetPath, cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker.cs (10)
108result = await doFunc().ConfigureAwait(false);
146var projectFileInfos = await LoadProjectInfosFromPathAsync(absoluteProjectPath, _requestedProjectOptions, cancellationToken).ConfigureAwait(false);
172var (buildHost, actualBuildHostKind) = await _buildHostProcessManager.GetBuildHostWithFallbackAsync(preferredBuildHostKind, projectPath, cancellationToken).ConfigureAwait(false);
178).ConfigureAwait(false);
181var diagnosticItems = await projectFile.GetDiagnosticLogItemsAsync(cancellationToken).ConfigureAwait(false);
194).ConfigureAwait(false);
206diagnosticItems = await projectFile.GetDiagnosticLogItemsAsync(cancellationToken).ConfigureAwait(false);
223var projectFileInfos = await LoadProjectFileInfosAsync(projectPath, reportingOptions, cancellationToken).ConfigureAwait(false);
254var projectInfo = await CreateProjectInfoAsync(fileInfo, id, addDiscriminator, cancellationToken).ConfigureAwait(false);
359var resolvedReferences = await ResolveReferencesAsync(projectId, projectFileInfo, commandLineArgs, cancellationToken).ConfigureAwait(false);
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (8)
219await VerifyUnloadableProjectOutputExistsAsync(projectReferencePath, builder, cancellationToken).ConfigureAwait(false))
227await VerifyProjectOutputExistsAsync(projectReferencePath, builder, cancellationToken).ConfigureAwait(false))
233if (await TryLoadAndAddReferenceAsync(id, projectReferencePath, aliases, builder, cancellationToken).ConfigureAwait(false))
241_ = await LoadProjectInfosFromPathAsync(projectReferencePath, _discoveredProjectOptions, cancellationToken).ConfigureAwait(false);
270var projectReferenceInfos = await LoadProjectInfosFromPathAsync(projectReferencePath, _discoveredProjectOptions, cancellationToken).ConfigureAwait(false);
343var buildHost = await _buildHostProcessManager.GetBuildHostWithFallbackAsync(projectPath, cancellationToken).ConfigureAwait(false);
344var outputFilePath = await buildHost.TryGetProjectOutputPathAsync(projectPath, cancellationToken).ConfigureAwait(false);
353var projectFileInfos = await LoadProjectFileInfosAsync(projectPath, DiagnosticReportingOptions.IgnoreAll, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (17)
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 (3)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.AzureAIInference (4)
Microsoft.Extensions.AI.Evaluation (3)
Microsoft.Extensions.AI.Evaluation.Console (3)
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 (11)
Microsoft.Extensions.Caching.Abstractions (2)
Microsoft.Extensions.Caching.Hybrid (5)
Microsoft.Extensions.Caching.SqlServer (9)
Microsoft.Extensions.Caching.StackExchangeRedis (9)
Microsoft.Extensions.Diagnostics.HealthChecks (3)
Microsoft.Extensions.Diagnostics.Probes (1)
Microsoft.Extensions.Hosting.WindowsServices (1)
Microsoft.Extensions.Http (3)
Microsoft.Extensions.Http.Diagnostics (8)
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)
489var result = await CreateCoreAsync(user).ConfigureAwait(false);
504var validateUserResult = await ValidateUserAsync(user).ConfigureAwait(false);
516return await Store.CreateAsync(user, CancellationToken).ConfigureAwait(false);
536return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.Update, startTimeStamp).ConfigureAwait(false);
562var result = await Store.DeleteAsync(user, CancellationToken).ConfigureAwait(false);
600var user = await Store.FindByNameAsync(userName, CancellationToken).ConfigureAwait(false);
612user = await Store.FindByNameAsync(oldKey, CancellationToken).ConfigureAwait(false);
643var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false);
657return await CreateAsync(user).ConfigureAwait(false);
697var normalizedName = NormalizeName(await GetUserNameAsync(user).ConfigureAwait(false));
711return await Store.GetUserNameAsync(user, CancellationToken).ConfigureAwait(false);
730return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetUserName, startTimeStamp).ConfigureAwait(false);
747return await Store.GetUserIdAsync(user, CancellationToken).ConfigureAwait(false);
763var (result, userMissing) = await CheckPasswordCoreAsync(user, password).ConfigureAwait(false);
790var result = await VerifyPasswordAsync(passwordStore, user, password).ConfigureAwait(false);
795await UpdatePasswordHash(passwordStore, user, password, validatePassword: false).ConfigureAwait(false);
796await UpdateUserAndRecordMetricAsync(user, UserUpdateType.PasswordRehash, startTimeStamp).ConfigureAwait(false);
834var result = await AddPasswordCoreAsync(user, password).ConfigureAwait(false);
851var hash = await passwordStore.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false);
857var result = await UpdatePasswordHash(passwordStore, user, password).ConfigureAwait(false);
862return await UpdateUserAsync(user).ConfigureAwait(false);
881var result = await ChangePasswordCoreAsync(user, currentPassword, newPassword).ConfigureAwait(false);
898if (await VerifyPasswordAsync(passwordStore, user, currentPassword).ConfigureAwait(false) != PasswordVerificationResult.Failed)
900var updateResult = await UpdatePasswordHash(passwordStore, user, newPassword).ConfigureAwait(false);
905return await UpdateUserAsync(user).ConfigureAwait(false);
928await UpdatePasswordHash(passwordStore, user, null, validatePassword: false).ConfigureAwait(false);
929return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemovePassword, startTimeStamp).ConfigureAwait(false);
950var hash = await store.GetPasswordHashAsync(user, CancellationToken).ConfigureAwait(false);
970var stamp = await securityStore.GetSecurityStampAsync(user, CancellationToken).ConfigureAwait(false);
1000return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.UpdateSecurityStamp, startTimeStamp).ConfigureAwait(false);
1041if (!await VerifyUserTokenAsync(user, Options.Tokens.PasswordResetTokenProvider, ResetPasswordTokenPurpose, token).ConfigureAwait(false))
1048var result = await UpdatePasswordHash(user, newPassword, validatePassword: true).ConfigureAwait(false);
1054return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetPassword, startTimeStamp).ConfigureAwait(false);
1098return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveLogin, startTimeStamp).ConfigureAwait(false);
1121var result = await AddLoginCoreAsync(user, login).ConfigureAwait(false);
1139var existingUser = await FindByLoginAsync(login.LoginProvider, login.ProviderKey).ConfigureAwait(false);
1146return await UpdateUserAsync(user).ConfigureAwait(false);
1161return await loginStore.GetLoginsAsync(user, CancellationToken).ConfigureAwait(false);
1198return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.AddClaims, startTimeStamp).ConfigureAwait(false);
1229return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ReplaceClaim, startTimeStamp).ConfigureAwait(false);
1272return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveClaims, startTimeStamp).ConfigureAwait(false);
1293return await claimStore.GetClaimsAsync(user, CancellationToken).ConfigureAwait(false);
1310var result = await AddToRoleCoreAsync(user, role).ConfigureAwait(false);
1328if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1333return await UpdateUserAsync(user).ConfigureAwait(false);
1350var result = await AddToRolesCoreAsync(user, roles).ConfigureAwait(false);
1371if (await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1377return await UpdateUserAsync(user).ConfigureAwait(false);
1398if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1406return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveFromRoles, startTimeStamp).ConfigureAwait(false);
1441var result = await RemoveFromRolesCoreAsync(user, roles).ConfigureAwait(false);
1462if (!await userRoleStore.IsInRoleAsync(user, normalizedRole, CancellationToken).ConfigureAwait(false))
1468return await UpdateUserAsync(user).ConfigureAwait(false);
1481return await userRoleStore.GetRolesAsync(user, CancellationToken).ConfigureAwait(false);
1498return await userRoleStore.IsInRoleAsync(user, NormalizeName(role), CancellationToken).ConfigureAwait(false);
1511return await store.GetEmailAsync(user, CancellationToken).ConfigureAwait(false);
1535return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetEmail, startTimeStamp).ConfigureAwait(false);
1560var user = await store.FindByEmailAsync(email, CancellationToken).ConfigureAwait(false);
1572user = await store.FindByEmailAsync(oldKey, CancellationToken).ConfigureAwait(false);
1593var email = await GetEmailAsync(user).ConfigureAwait(false);
1625var result = await ConfirmEmailCoreAsync(user, token).ConfigureAwait(false);
1642if (!await VerifyUserTokenAsync(user, Options.Tokens.EmailConfirmationTokenProvider, ConfirmEmailTokenPurpose, token).ConfigureAwait(false))
1647return await UpdateUserAsync(user).ConfigureAwait(false);
1664return await store.GetEmailConfirmedAsync(user, CancellationToken).ConfigureAwait(false);
1696return await ChangeEmailCoreAsync(user, newEmail, token, startTimeStamp).ConfigureAwait(false);
1711if (!await VerifyUserTokenAsync(user, Options.Tokens.ChangeEmailTokenProvider, GetChangeEmailTokenPurpose(newEmail), token).ConfigureAwait(false))
1719return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ChangeEmail, startTimestamp).ConfigureAwait(false);
1732return await store.GetPhoneNumberAsync(user, CancellationToken).ConfigureAwait(false);
1756return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetPhoneNumber, startTimestamp).ConfigureAwait(false);
1781var result = await ChangePhoneNumberCoreAsync(user, phoneNumber, token).ConfigureAwait(false);
1798if (!await VerifyChangePhoneNumberTokenAsync(user, token, phoneNumber).ConfigureAwait(false))
1806return await UpdateUserAsync(user).ConfigureAwait(false);
1883var result = await provider.ValidateAsync(purpose, token, this, user).ConfigureAwait(false);
1960if (await f.Value.CanGenerateTwoFactorTokenAsync(this, user).ConfigureAwait(false))
1990var result = await provider.ValidateAsync("TwoFactor", token, this, user).ConfigureAwait(false);
2050return await store.GetTwoFactorEnabledAsync(user, CancellationToken).ConfigureAwait(false);
2073return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetTwoFactorEnabled, startTimestamp).ConfigureAwait(false);
2096if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false))
2100var lockoutTime = await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false);
2123return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetLockoutEnabled, startTimestamp).ConfigureAwait(false);
2144return await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false);
2160return await store.GetLockoutEndDateAsync(user, CancellationToken).ConfigureAwait(false);
2174var result = await SetLockoutEndDateCoreAsync(user, lockoutEnd).ConfigureAwait(false);
2191if (!await store.GetLockoutEnabledAsync(user, CancellationToken).ConfigureAwait(false))
2197return await UpdateUserAsync(user).ConfigureAwait(false);
2217var count = await store.IncrementAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false);
2220return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.IncrementAccessFailed, startTimestamp).ConfigureAwait(false);
2226return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.IncrementAccessFailed, startTimestamp).ConfigureAwait(false);
2245var result = await ResetAccessFailedCountCoreAsync(user).ConfigureAwait(false);
2262if (await GetAccessFailedCountAsync(user).ConfigureAwait(false) == 0)
2267return await UpdateUserAsync(user).ConfigureAwait(false);
2281return await store.GetAccessFailedCountAsync(user, CancellationToken).ConfigureAwait(false);
2356return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.SetAuthenticationToken, startTimestamp).ConfigureAwait(false);
2384return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.RemoveAuthenticationToken, startTimestamp).ConfigureAwait(false);
2421return await UpdateUserAndRecordMetricAsync(user, UserUpdateType.ResetAuthenticatorKey, startTimestamp).ConfigureAwait(false);
2459var update = await UpdateUserAndRecordMetricAsync(user, UserUpdateType.GenerateNewTwoFactorRecoveryCodes, startTimestamp).ConfigureAwait(false);
2561var result = await RedeemTwoFactorRecoveryCodeCoreAsync(user, code).ConfigureAwait(false);
2578var success = await store.RedeemCodeAsync(user, code, CancellationToken).ConfigureAwait(false);
2581return await UpdateUserAsync(user).ConfigureAwait(false);
2611var result = await AddOrUpdatePasskeyCoreAsync(user, passkey).ConfigureAwait(false);
2630return await UpdateUserAsync(user).ConfigureAwait(false);
2697var result = await RemovePasskeyCoreAsync(user, credentialId).ConfigureAwait(false);
2716return await UpdateUserAsync(user).ConfigureAwait(false);
2783return Encoding.Unicode.GetBytes(await GetSecurityStampAsync(user).ConfigureAwait(false));
2810var validate = await ValidatePasswordAsync(user, newPassword).ConfigureAwait(false);
2893var stamp = await GetSecurityStampAsync(user).ConfigureAwait(false);
2902var result = await v.ValidateAsync(this, user).ConfigureAwait(false);
2933var result = await v.ValidateAsync(this, user, password).ConfigureAwait(false);
2965var result = await ValidateUserAsync(user).ConfigureAwait(false);
2972return await Store.UpdateAsync(user, CancellationToken).ConfigureAwait(false);
2977var result = await UpdateUserAsync(user).ConfigureAwait(false);
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.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 (7)
Microsoft.VisualStudio.LanguageServices (285)
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);
482var result = await excerptService.TryExcerptAsync(document, sourceSpan, ExcerptMode.SingleLine, options.Value, cancellationToken).ConfigureAwait(false);
492documentSpan, 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)
111var debugLocationInfo = await _languageDebugInfo.GetLocationInfoAsync(document, point, cancellationToken).ConfigureAwait(true);
153document, point.Position, context.UserCancellationToken).ConfigureAwait(true);
203solution, pszName, cancellationToken).ConfigureAwait(true);
252pBuffer, iLine, iCol, pCodeSpan, waitContext.UserCancellationToken).ConfigureAwait(true);
328document, new TextSpan(point.Position, length), cancellationToken).ConfigureAwait(true);
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 (10)
68solution.Workspace, targetDocument.Id, sourceLocation.SourceSpan.Start, cancellationToken).ConfigureAwait(false);
88assemblyName, docCommentId, cancellationToken).ConfigureAwait(false);
103var compilation = await project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
121return await GetNavigableLocationForMetadataAsync(project, symbol, cancellationToken).ConfigureAwait(false);
129var result = await _metadataAsSourceFileService.GetGeneratedFileAsync(_workspace, project, symbol, signaturesOnly: false, options: masOptions, cancellationToken: cancellationToken).ConfigureAwait(false);
174cancellationToken).ConfigureAwait(false);
188var result = await TryGetNavigationAPIRequiredArgumentsAsync(definitionItem, rqName, cancellationToken).ConfigureAwait(true);
207return await GetExternalNavigationLocationForSpecificSymbolAsync(definitionItem, rqName1, cancellationToken).ConfigureAwait(false) ??
208await GetExternalNavigationLocationForSpecificSymbolAsync(definitionItem, rqName2, cancellationToken).ConfigureAwait(false);
218definitionItem, rqName, cancellationToken).ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CodeLens (3)
Microsoft.VisualStudio.LanguageServices.CSharp (28)
Microsoft.VisualStudio.LanguageServices.DevKit (4)
Microsoft.VisualStudio.LanguageServices.Implementation (29)
Microsoft.VisualStudio.LanguageServices.LiveShare (8)
Microsoft.VisualStudio.LanguageServices.Xaml (31)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (8)
69var position = await document.GetPositionFromLinePositionAsync(ProtocolConversions.PositionToLinePosition(request.Position), cancellationToken).ConfigureAwait(false);
70var definitions = await xamlGoToDefinitionService.GetDefinitionsAsync(document, position, cancellationToken).ConfigureAwait(false);
78foreach (var location in await this.GetLocationsAsync(definition, document, solution, cancellationToken).ConfigureAwait(false))
97locations.AddIfNotNull(await GetSourceDefinitionLocationAsync(sourceDefinition, solution, cancellationToken).ConfigureAwait(false));
101locations.AddRange(await GetSymbolDefinitionLocationsAsync(symbolDefinition, document, solution, _metadataAsSourceFileService, _globalOptions, cancellationToken).ConfigureAwait(false));
125cancellationToken).ConfigureAwait(false);
168navigableDocument, item.SourceSpan, item.IsStale, cancellationToken).ConfigureAwait(false);
181var declarationFile = await metadataAsSourceFileService.GetGeneratedFileAsync(workspace, project, symbol, signaturesOnly: true, options: options, cancellationToken: cancellationToken).ConfigureAwait(false);
Replay (12)
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false);
184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
309response = await responseTask.ConfigureAwait(false);
350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
Roslyn.Compilers.Extension (8)
Roslyn.Diagnostics.Analyzers (112)
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 (25)
Remote\SerializationValidator.cs (10)
26=> await validator.GetValueAsync<T>(checksum).ConfigureAwait(false);
92var data = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
114scope.SolutionChecksum, this.Services.SolutionServices, CancellationToken.None).ConfigureAwait(false);
127(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false);
131var projectObject = await GetValueAsync<ProjectStateChecksums>(projectChecksum).ConfigureAwait(false);
141(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false);
186(v, k, s) => new SolutionAsset(v.Checksum, v)).ConfigureAwait(false);
199var syncObject = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
201var recoveredValue = await GetValueAsync<T>(checksum).ConfigureAwait(false);
341var otherObject = await GetRequiredAssetAsync(checksum).ConfigureAwait(false);
RunTests (3)
Sockets.BindTests (3)
Sockets.FunctionalTests (3)
System.Data.Common (6)
System.IO.Compression (25)
System\IO\Compression\ZipArchiveEntry.Async.cs (16)
30return await OpenInReadModeAsync(checkOpenable: true, cancellationToken).ConfigureAwait(false);
36return await OpenInUpdateModeAsync(cancellationToken).ConfigureAwait(false);
48if (!await ZipLocalFileHeader.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false))
68Stream decompressor = await OpenInReadModeAsync(false, cancellationToken).ConfigureAwait(false);
151Debug.Assert(await GetIsOpenableAsync(false, true, cancellationToken).ConfigureAwait(false));
157(_lhUnknownExtraFields, _lhTrailingExtraFieldData) = await ZipLocalFileHeader.GetExtraFieldsAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false);
165Debug.Assert(await GetIsOpenableAsync(false, true, cancellationToken).ConfigureAwait(false));
171_archive.ArchiveStream.Seek(await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false), SeekOrigin.Begin);
184(bool result, _) = await IsOpenableAsync(needToUncompress, needToLoadIntoMemory, cancellationToken).ConfigureAwait(false);
191(bool openable, string? message) = await IsOpenableAsync(needToUncompress, needToLoadIntoMemory, cancellationToken).ConfigureAwait(false);
203await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false));
218Stream uncompressedData = await GetUncompressedDataAsync(cancellationToken).ConfigureAwait(false);
244if (!await ZipLocalFileHeader.TrySkipBlockAsync(_archive.ArchiveStream, cancellationToken).ConfigureAwait(false))
251long offsetOfCompressedData = await GetOffsetOfCompressedDataAsync(cancellationToken).ConfigureAwait(false);
315await WriteLocalFileHeaderAsync(isEmptyFile: _uncompressedSize == 0, forceWrite: true, cancellationToken).ConfigureAwait(false);
333await WriteLocalFileHeaderAsync(isEmptyFile: _uncompressedSize == 0, forceWrite: forceWrite, cancellationToken).ConfigureAwait(false);
System.IO.Compression.ZipFile (8)
System\IO\Compression\ZipFile.Create.Async.cs (4)
165return await ZipArchive.CreateAsync(fs, mode, leaveOpen: false, entryNameEncoding: entryNameEncoding, cancellationToken).ConfigureAwait(false);
437ZipArchive archive = await OpenAsync(destinationArchiveFileName, ZipArchiveMode.Create, entryNameEncoding, cancellationToken).ConfigureAwait(false);
451ZipArchive archive = await ZipArchive.CreateAsync(destination, ZipArchiveMode.Create, leaveOpen: true, entryNameEncoding, cancellationToken).ConfigureAwait(false);
476await ZipFileExtensions.DoCreateEntryFromFileAsync(archive, fullPath, entryName, compressionLevel, cancellationToken).ConfigureAwait(false);
System.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 (1)
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 (26)
System\Xml\Linq\XContainer.cs (15)
861while (await cr.ReadContentFromAsync(this, r).ConfigureAwait(false) && await r.ReadAsync().ConfigureAwait(false));
878while (await cr.ReadContentFromContainerAsync(this, r).ConfigureAwait(false) && await r.ReadAsync().ConfigureAwait(false));
967await r.GetValueAsync().ConfigureAwait(false)));
985_currentContainer.AddStringSkipNotify(await r.GetValueAsync().ConfigureAwait(false));
988_currentContainer.AddNodeSkipNotify(new XCData(await r.GetValueAsync().ConfigureAwait(false)));
991_currentContainer.AddNodeSkipNotify(new XComment(await r.GetValueAsync().ConfigureAwait(false)));
994_currentContainer.AddNodeSkipNotify(new XProcessingInstruction(r.Name, await r.GetValueAsync().ConfigureAwait(false)));
997_currentContainer.AddNodeSkipNotify(new XDocumentType(r.LocalName, r.GetAttribute("PUBLIC"), r.GetAttribute("SYSTEM"), await r.GetValueAsync().ConfigureAwait(false)));
1149await r.GetValueAsync().ConfigureAwait(false));
1194newNode = new XText(await r.GetValueAsync().ConfigureAwait(false));
1198_currentContainer.AddStringSkipNotify(await r.GetValueAsync().ConfigureAwait(false));
1202newNode = new XCData(await r.GetValueAsync().ConfigureAwait(false));
1205newNode = new XComment(await r.GetValueAsync().ConfigureAwait(false));
1208newNode = new XProcessingInstruction(r.Name, await r.GetValueAsync().ConfigureAwait(false));
1211newNode = new XDocumentType(r.LocalName, r.GetAttribute("PUBLIC"), r.GetAttribute("SYSTEM"), await r.GetValueAsync().ConfigureAwait(false));
System.Security.Cryptography.Cose (2)
System.ServiceModel.Federation (1)
System.ServiceModel.NetFramingBase (1)
System.ServiceModel.Primitives (2)
System.Text.Json (1)
System.Text.RegularExpressions.Generator (5)
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 (84)
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)
117cancellationToken).ConfigureAwait(false);
184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
309response = await responseTask.ConfigureAwait(false);
350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
VBCSCompiler (23)
src\Compilers\Shared\BuildServerConnection.cs (6)
117cancellationToken).ConfigureAwait(false);
184using var pipe = await tryConnectToServerAsync(pipeName, timeoutOverride, logger, tryCreateServerFunc, cancellationToken).ConfigureAwait(false);
191return await tryRunRequestAsync(pipe, buildRequest, logger, cancellationToken).ConfigureAwait(false);
299await Task.WhenAny(responseTask, monitorTask).ConfigureAwait(false);
309response = await responseTask.ConfigureAwait(false);
350await pipeStream.ReadAsync(buffer, 0, 0, cancellationToken).ConfigureAwait(false);
VBCSCompiler.UnitTests (1)