16 types derived from Task
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\ControllerActionInvokerTest.cs (1)
1946public class TaskOfTDerivedType<T> : Task<T>
Microsoft.AspNetCore.SignalR.Tests (1)
NativeAotTests.cs (1)
373public class TaskOfTDerivedType<T> : Task<T>
System.Private.CoreLib (14)
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
634private sealed class ReadWriteTask : Task<int>, ITaskCompletionAction
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
280Task<TResult>, IAsyncStateMachineBox
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
69private sealed class TaskNode : Task<bool>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (1)
1225private sealed class FromAsyncTrimPromise<TInstance> : Task<TResult> where TInstance : class
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (4)
2853private protected sealed class CancellationPromise<TResult> : Task<TResult>, ITaskCompletionAction 6380private sealed class WhenAllPromise<T> : Task<T[]>, ITaskCompletionAction 6611private sealed class TwoTaskWhenAnyPromise<TTask> : Task<TTask>, ITaskCompletionAction where TTask : Task 7373internal sealed class UnwrapPromise<TResult> : Task<TResult>, ITaskCompletionAction
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (2)
56internal sealed class ContinuationResultTaskFromTask<TResult> : Task<TResult> 148internal sealed class ContinuationResultTaskFromResultTask<TAntecedentResult, TResult> : Task<TResult>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (3)
1547private sealed class CompleteOnCountdownPromise : Task<Task[]>, ITaskCompletionAction 1617private sealed class CompleteOnCountdownPromise<T> : Task<Task<T>[]>, ITaskCompletionAction 2264internal sealed class CompleteOnInvokePromise<TTask> : Task<TTask>, ITaskCompletionAction where TTask : Task
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (1)
640private sealed class ValueTaskSourceAsTask : Task<TResult>
32 instantiations of Task
Microsoft.ML.Data (1)
Commands\CrossValidationCommand.cs (1)
461tasks[i] = new Task<FoldResult>(() =>
Microsoft.ML.TestFramework (2)
TestCommandBase.cs (2)
1000t[0] = new Task<int>(() => MainForTest(firsttrainArgs)); 1001t[1] = new Task<int>(() => MainForTest(secondTrainArgs));
System.Private.CoreLib (27)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilder.cs (1)
87return m_task = new Task<VoidTaskResult>();
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (2)
443return m_task = new Task<TResult>(); 517Task<TResult> task = (taskField ??= new Task<TResult>());
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncValueTaskMethodBuilder.cs (1)
74Task<VoidTaskResult>? task = m_task ??= new Task<VoidTaskResult>(); // base task used rather than box to minimize size when used as manual promise
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncValueTaskMethodBuilderT.cs (2)
20internal static readonly Task<TResult> s_syncSuccessSentinel = new Task<TResult>(default(TResult)!); 81Task<TResult>? task = m_task ??= new Task<TResult>(); // base task used rather than box to minimize size when used as manual promise
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
635var t = new Task<bool>(s =>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (2)
323Task<TResult> f = new Task<TResult>(function, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); 343Task<TResult> f = new Task<TResult>(function, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (6)
648Task<TResult> promise = new Task<TResult>((object?)null, creationOptions); 765Task<TResult> promise = new Task<TResult>(state, creationOptions); 882Task<TResult> promise = new Task<TResult>(state, creationOptions); 1007Task<TResult> promise = new Task<TResult>(state, creationOptions); 1140Task<TResult> promise = new Task<TResult>(state, creationOptions); 1325return new Task<TResult>(true, default, tco, ct);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (8)
1467internal static readonly Task<VoidTaskResult> s_cachedCompleted = new Task<VoidTaskResult>(false, default, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default); 5435return new Task<TResult>(result); 5459var task = new Task<TResult>(); 5483return new Task<TResult>(true, default, TaskCreationOptions.None, cancellationToken); 5507var task = new Task<TResult>(); 6249return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default); 6283new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) : 6360return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCache.cs (1)
28new Task<TResult>(false, result, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (2)
37public TaskCompletionSource() => _task = new Task<TResult>(); 67_task = new Task<TResult>(state, creationOptions);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (1)
621var task = new Task<TResult>();
System.Threading.Tasks.Dataflow (1)
Internal\Common.cs (1)
376var t = new Task<TResult>(CachedGenericDelegates<TResult>.DefaultTResultFunc, cancellationToken);
VBCSCompiler (1)
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
172var task = new Task<BuildResponse>(func, cancellationToken, TaskCreationOptions.LongRunning);
12511 references to Task
AnalyzerRunner (8)
CodeRefactoringRunner.cs (1)
75private async Task<Document> RefactorDocumentAsync(Document document, CancellationToken cancellationToken)
DiagnosticAnalyzerRunner.cs (6)
178private static async Task<DocumentAnalyzerPerformance> TestDocumentPerformanceAsync(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Project project, DocumentId documentId, Options analyzerOptionsInternal, CancellationToken cancellationToken) 314private static async Task<ImmutableDictionary<ProjectId, AnalysisResult>> GetAnalysisResultAsync( 324var projectDiagnosticTasks = new List<KeyValuePair<ProjectId, Task<AnalysisResult>>>(); 339var resultTask = GetProjectAnalysisResultAsync(languageAnalyzers, project, options, cancellationToken); 345projectDiagnosticTasks.Add(new KeyValuePair<ProjectId, Task<AnalysisResult>>(project.Id, resultTask)); 379private static async Task<AnalysisResult> GetProjectAnalysisResultAsync(
Program.cs (1)
204private static async Task<Statistic> GetSolutionStatisticsAsync(Document document, CancellationToken cancellationToken)
ApiExplorerWebSite (10)
Controllers\ApiExplorerResponseTypeWithApiConventionController.cs (5)
17public Task<ActionResult<Product>> GetTaskOfActionResultOfProduct(int id) => null; 33public Task<IActionResult> PostTaskOfProduct(Product p) => null; 36public Task<IActionResult> Put(string id, Product product) => null; 39public Task<IActionResult> DeleteProductAsync(object id) => null; 43public Task<IActionResult> PostItem(Product p) => null;
Controllers\ApiExplorerResponseTypeWithoutAttributeController.cs (5)
56public Task<object> GetTaskOfObject() 62public Task<IActionResult> GetTaskOfIActionResult() 68public Task<ObjectResult> GetTaskOfDerivedActionResult() 74public Task<Product> GetTaskOfProduct() 80public Task<int> GetTaskOfInt()
aspire (98)
Backchannel\AppHostBackchannel.cs (6)
16Task<long> PingAsync(long timestamp, CancellationToken cancellationToken); 18Task<(string BaseUrlWithLoginToken, string? CodespacesUrlWithLoginToken)> GetDashboardUrlsAsync(CancellationToken cancellationToken); 22Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 30public async Task<long> PingAsync(long timestamp, CancellationToken cancellationToken) 64public async Task<(string BaseUrlWithLoginToken, string? CodespacesUrlWithLoginToken)> GetDashboardUrlsAsync(CancellationToken cancellationToken) 168public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Commands\AddCommand.cs (6)
61protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 195private async Task<(string FriendlyName, NuGetPackage Package)> GetPackageByInteractiveFlow(IEnumerable<(string FriendlyName, NuGetPackage Package)> possiblePackages, string? preferredVersion, CancellationToken cancellationToken) 249Task<(string FriendlyName, NuGetPackage Package)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package)> packages, CancellationToken cancellationToken); 250Task<(string FriendlyName, NuGetPackage Package)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package)> packages, CancellationToken cancellationToken); 255public virtual async Task<(string FriendlyName, NuGetPackage Package)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package)> packages, CancellationToken cancellationToken) 266public virtual async Task<(string FriendlyName, NuGetPackage Package)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package)> packages, CancellationToken cancellationToken)
Commands\BaseCommand.cs (1)
15protected abstract Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken);
Commands\ConfigCommand.cs (5)
42protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 66protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 120protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 169protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 212protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\NewCommand.cs (10)
72private async Task<ITemplate> GetProjectTemplateAsync(ParseResult parseResult, CancellationToken cancellationToken) 88protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 100Task<NuGetPackage> PromptForTemplatesVersionAsync(IEnumerable<NuGetPackage> candidatePackages, CancellationToken cancellationToken); 101Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken); 102Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken); 103Task<string> PromptForOutputPath(string v, CancellationToken cancellationToken); 108public virtual async Task<NuGetPackage> PromptForTemplatesVersionAsync(IEnumerable<NuGetPackage> candidatePackages, CancellationToken cancellationToken) 118public virtual async Task<string> PromptForOutputPath(string path, CancellationToken cancellationToken) 127public virtual async Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 138public virtual async Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken)
Commands\PublishCommand.cs (2)
15Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken); 20public virtual async Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\PublishCommandBase.cs (4)
67protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 132var pendingRun = _runner.RunAsync( 218public static async Task<bool> ProcessPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, CancellationToken cancellationToken) 231public static async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, CancellationToken cancellationToken)
Commands\RunCommand.cs (2)
57protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 129var pendingRun = _runner.RunAsync(
Commands\TemplateCommand.cs (3)
11private readonly Func<ParseResult, CancellationToken, Task<int>> _executeCallback; 13public TemplateCommand(ITemplate template, Func<ParseResult, CancellationToken, Task<int>> executeCallback) : base(template.Name, template.Description) 22protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Configuration\ConfigurationService.cs (2)
43public async Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 110public async Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default)
Configuration\IConfigurationService.cs (2)
9Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default); 10Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default);
DotNetCliRunner.cs (21)
21Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 22Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 23Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 24Task<int> CheckHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 25Task<int> TrustHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 26Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 27Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 28Task<int> BuildAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 29Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 30Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 46public async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 129public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 183public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 209public async Task<int> CheckHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 223public async Task<int> TrustHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 237public async Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 348public async Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 377public virtual async Task<int> ExecuteAsync(string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 570public async Task<int> BuildAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 583public async Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 627public async Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
Interaction\ConsoleInteractionService.cs (5)
22public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) 36public async Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, CancellationToken cancellationToken = default) 55public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 146public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
Interaction\IInteractionService.cs (5)
11Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action); 13Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, CancellationToken cancellationToken = default); 14public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default); 15Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull;
NuGet\NuGetPackageCache.cs (5)
14Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, string? source, CancellationToken cancellationToken); 15Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, string? source, CancellationToken cancellationToken); 23public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, string? source, CancellationToken cancellationToken) 35public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, string? source, CancellationToken cancellationToken) 40internal async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, string? source, CancellationToken cancellationToken)
Program.cs (1)
159public static async Task<int> Main(string[] args)
Projects\ProjectLocator.cs (4)
16Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken = default); 22private async Task<List<FileInfo>> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, CancellationToken cancellationToken) 76private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(CancellationToken cancellationToken) 119public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken = default)
Templating\CallbackTemplate.cs (2)
9internal class CallbackTemplate(string name, string description, Func<string, string> pathDeriverCallback, Action<TemplateCommand> applyOptionsCallback, Func<CallbackTemplate, ParseResult, CancellationToken, Task<int>> applyTemplateCallback) : ITemplate 22public Task<int> ApplyTemplateAsync(ParseResult parseResult, CancellationToken cancellationToken)
Templating\DotNetTemplateFactory.cs (8)
77private async Task<string[]> PromptForExtraAspireStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 87private async Task<string[]> PromptForExtraAspireXUnitOptionsAsync(ParseResult result, CancellationToken cancellationToken) 189private async Task<int> ApplyTemplateWithNoExtraArgsAsync(CallbackTemplate template, ParseResult parseResult, CancellationToken cancellationToken) 194private async Task<int> ApplyTemplateAsync(CallbackTemplate template, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 284private async Task<string> GetProjectNameAsync(ParseResult parseResult, CancellationToken cancellationToken) 295private async Task<string> GetOutputPathAsync(ParseResult parseResult, Func<string, string> pathDeriver, string projectName, CancellationToken cancellationToken) 305private async Task<string> GetProjectTemplatesVersionAsync(ParseResult parseResult, bool prerelease, string? source, CancellationToken cancellationToken)
Templating\ITemplate.cs (1)
15Task<int> ApplyTemplateAsync(ParseResult parseResult, CancellationToken cancellationToken);
Utils\AppHostHelper.cs (3)
16internal static async Task<(bool IsCompatibleAppHost, bool SupportsBackchannel, string? AspireHostingVersion)> CheckAppHostCompatibilityAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, CancellationToken cancellationToken) 52internal static async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, CancellationToken cancellationToken) 66internal static async Task<int> BuildAppHostAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
Aspire.Azure.AI.OpenAI.Tests (2)
AspireAzureOpenAIClientBuilderChatClientExtensionsTests.cs (1)
220static Task<ChatResponse> TestMiddleware(IEnumerable<ChatMessage> list, ChatOptions? options, IChatClient client, CancellationToken token)
AspireAzureOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (1)
221private Task<GeneratedEmbeddings<Embedding<float>>> TestMiddleware(IEnumerable<string> inputs, EmbeddingGenerationOptions? options, IEmbeddingGenerator<string, Embedding<float>> nextAsync, CancellationToken cancellationToken)
Aspire.Azure.Messaging.WebPubSub (1)
AspireWebPubSubExtensions.cs (1)
165public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.Azure.Search.Documents (1)
AzureSearchIndexHealthCheck.cs (1)
21public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.Cli.Tests (40)
Commands\AddCommandTests.cs (2)
596public override Task<(string FriendlyName, NuGetPackage Package)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package)> packages, CancellationToken cancellationToken) 605public override Task<(string FriendlyName, NuGetPackage Package)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package)> packages, CancellationToken cancellationToken)
Commands\DeployCommandTests.cs (1)
266public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\NewCommandTests.cs (4)
590public override Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken) 599public override Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 608public override Task<string> PromptForOutputPath(string path, CancellationToken cancellationToken) 617public override Task<NuGetPackage> PromptForTemplatesVersionAsync(IEnumerable<NuGetPackage> candidatePackages, CancellationToken cancellationToken)
Commands\PublishCommandTests.cs (1)
240public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\RunCommandTests.cs (5)
85public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 132public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 140public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 202var pendingRun = result.InvokeAsync(cts.Token); 259var pendingRun = result.InvokeAsync(cts.Token);
DotNet\DotNetCliRunnerTests.cs (1)
66public override Task<int> ExecuteAsync(string[] args, IDictionary<string, string>? env, DirectoryInfo workingDirectory, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
Projects\ProjectLocatorTests.cs (2)
322public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 328public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default)
TestServices\TestAppHostBackchannel.cs (6)
12public Func<long, Task<long>>? PingAsyncCallback { get; set; } 18public Func<CancellationToken, Task<(string, string?)>>? GetDashboardUrlsAsyncCallback { get; set; } 30public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 32public Task<long> PingAsync(long timestamp, CancellationToken cancellationToken) 53public Task<(string BaseUrlWithLoginToken, string? CodespacesUrlWithLoginToken)> GetDashboardUrlsAsync(CancellationToken cancellationToken) 228public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
TestServices\TestConsoleInteractionService.cs (5)
14public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) 24public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, CancellationToken cancellationToken = default) 29public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 69public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
TestServices\TestDotNetCliRunner.cs (11)
19public Func<FileInfo, bool, bool, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostBackchannel>?, DotNetCliRunnerInvocationOptions, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 23public Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 30public Task<int> BuildAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 37public Task<int> CheckHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 44public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 53public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 60public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 67public Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 74public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 81public Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 88public Task<int> TrustHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
TestServices\TestProjectLocator.cs (2)
10public Func<FileInfo?, CancellationToken, Task<FileInfo?>>? UseOrFindAppHostProjectFileAsyncCallback { get; set; } 12public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken)
Aspire.Components.Common.TestUtilities (1)
ActivityNotifier.cs (1)
18public async Task<List<Activity>> TakeAsync(int count, TimeSpan timeout)
Aspire.Confluent.Kafka (2)
src\Vendoring\OpenTelemetry.Instrumentation.ConfluentKafka\InstrumentedProducer.cs (2)
40public async Task<DeliveryResult<TKey, TValue>> ProduceAsync( 87public async Task<DeliveryResult<TKey, TValue>> ProduceAsync(
Aspire.Dashboard (41)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\opentelemetry\proto\collector\logs\v1\LogsServiceGrpc.cs (1)
99public virtual global::System.Threading.Tasks.Task<global::OpenTelemetry.Proto.Collector.Logs.V1.ExportLogsServiceResponse> Export(global::OpenTelemetry.Proto.Collector.Logs.V1.ExportLogsServiceRequest request, grpc::ServerCallContext context)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\opentelemetry\proto\collector\metrics\v1\MetricsServiceGrpc.cs (1)
99public virtual global::System.Threading.Tasks.Task<global::OpenTelemetry.Proto.Collector.Metrics.V1.ExportMetricsServiceResponse> Export(global::OpenTelemetry.Proto.Collector.Metrics.V1.ExportMetricsServiceRequest request, grpc::ServerCallContext context)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\opentelemetry\proto\collector\trace\v1\TraceServiceGrpc.cs (1)
99public virtual global::System.Threading.Tasks.Task<global::OpenTelemetry.Proto.Collector.Trace.V1.ExportTraceServiceResponse> Export(global::OpenTelemetry.Proto.Collector.Trace.V1.ExportTraceServiceRequest request, grpc::ServerCallContext context)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\ResourceServiceGrpc.cs (2)
124public virtual global::System.Threading.Tasks.Task<global::Aspire.ResourceService.Proto.V1.ApplicationInformationResponse> GetApplicationInformation(global::Aspire.ResourceService.Proto.V1.ApplicationInformationRequest request, grpc::ServerCallContext context) 142public virtual global::System.Threading.Tasks.Task<global::Aspire.ResourceService.Proto.V1.ResourceCommandResponse> ExecuteResourceCommand(global::Aspire.ResourceService.Proto.V1.ResourceCommandRequest request, grpc::ServerCallContext context)
Authentication\AspirePolicyEvaluator.cs (2)
38public virtual async Task<AuthenticateResult> AuthenticateAsync(AuthorizationPolicy policy, HttpContext context) 105public virtual async Task<PolicyAuthorizationResult> AuthorizeAsync(AuthorizationPolicy policy, AuthenticateResult authenticationResult, HttpContext context, object? resource)
Authentication\Connection\ConnectionTypeAuthenticationHandler.cs (1)
16protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Authentication\FrontendCompositeAuthenticationHandler.cs (1)
19protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
Authentication\OtlpApiKey\OtlpApiKeyAuthenticationHandler.cs (1)
22protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Authentication\OtlpCompositeAuthenticationHandler.cs (1)
22protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
Authentication\UnsecuredAuthenticationHandler.cs (1)
17protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Components\Controls\UserProfile.razor.cs (1)
27public required Task<AuthenticationState> AuthenticationState { get; set; }
Components\Interactions\InteractionsProvider.cs (2)
84Func<IDialogService, Task<IDialogReference>> openDialog; 419public async Task<IDialogReference> ShowMessageBoxAsync(IDialogService dialogService, MessageBoxContent content, DialogParameters parameters)
Components\Pages\IPageWithSessionAndUrlState.cs (1)
93public static async Task<bool> InitializeViewModelAsync<TViewModel, TSerializableViewModel>(this IPageWithSessionAndUrlState<TViewModel, TSerializableViewModel> page) where TSerializableViewModel : class
Components\Pages\Login.razor.cs (1)
40public Task<AuthenticationState>? AuthenticationState { get; set; }
Model\BrowserStorage\BrowserStorageBase.cs (1)
20public async Task<StorageResult<TValue>> GetAsync<TValue>(string key)
Model\BrowserStorage\IBrowserStorage.cs (1)
8Task<StorageResult<TValue>> GetAsync<TValue>(string key);
Model\BrowserStorage\ILocalStorage.cs (1)
11Task<StorageResult<TValue>> GetUnprotectedAsync<TValue>(string key);
Model\BrowserStorage\LocalBrowserStorage.cs (1)
25public async Task<StorageResult<TValue>> GetUnprotectedAsync<TValue>(string key)
Model\MetricsHelpers.cs (1)
17public static async Task<bool> WaitForSpanToBeAvailableAsync(
Model\ThemeManager.cs (2)
15Task<ThemeSettings> GetThemeSettingsAsync(CancellationToken cancellationToken); 23public async Task<ThemeSettings> GetThemeSettingsAsync(CancellationToken cancellationToken)
Model\ValidateTokenMiddleware.cs (1)
81public static async Task<bool> TryAuthenticateAsync(string incomingBrowserToken, HttpContext httpContext, IOptionsMonitor<DashboardOptions> dashboardOptions)
Otlp\Grpc\OtlpGrpcLogsService.cs (1)
23public override Task<ExportLogsServiceResponse> Export(ExportLogsServiceRequest request, ServerCallContext context)
Otlp\Grpc\OtlpGrpcMetricsService.cs (1)
23public override Task<ExportMetricsServiceResponse> Export(ExportMetricsServiceRequest request, ServerCallContext context)
Otlp\Grpc\OtlpGrpcTraceService.cs (1)
23public override Task<ExportTraceServiceResponse> Export(ExportTraceServiceRequest request, ServerCallContext context)
Otlp\Http\OtlpHttpEndpointsBuilder.cs (1)
173private static async Task<T> ReadOtlpData<T>(
ResourceService\DashboardClient.cs (2)
501public async Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) 667public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
ResourceService\IDashboardClient.cs (2)
41Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken); 61Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken);
Telemetry\DashboardTelemetrySender.cs (2)
90public async Task<bool> TryStartTelemetrySessionAsync() 131private async Task<bool> TryStartTelemetrySessionCoreAsync()
Telemetry\DashboardTelemetryService.cs (1)
356private static async Task<TResponse> PostRequestAsync<TRequest, TResponse>(HttpClient client, string endpoint, TRequest request)
Telemetry\IDashboardTelemetrySender.cs (1)
8public Task<bool> TryStartTelemetrySessionAsync();
Utils\CallbackThrottler.cs (1)
34private async Task<bool> TryQueueAsync(CancellationToken cancellationToken)
Utils\CancellationSeries.cs (1)
31public async Task<CancellationToken> NextAsync()
Utils\DashboardUIHelpers.cs (1)
73public static async Task<Message> DisplayMaxLimitMessageAsync(IMessageService messageService, string title, string message, Action onClose)
Utils\GlobalizationHelpers.cs (1)
136internal static async Task<RequestCulture?> ResolveSetCultureToAcceptedCultureAsync(string acceptLanguage, List<CultureInfo> availableCultures)
Aspire.Dashboard.Components.Tests (18)
Controls\ApplicationNameTests.cs (2)
80public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException(); 85public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) => throw new NotImplementedException();
Shared\TestDashboardClient.cs (2)
42public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) 72public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
Shared\TestLocalStorage.cs (2)
13public Task<StorageResult<T>> GetAsync<T>(string key) 18public Task<StorageResult<T>> GetUnprotectedAsync<T>(string key)
Shared\TestSessionStorage.cs (1)
13public Task<StorageResult<T>> GetAsync<T>(string key)
Shared\TestThemeResolver.cs (1)
12public Task<ThemeSettings> GetThemeSettingsAsync(CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
tests\Shared\TestDashboardTelemetrySender.cs (1)
15public Task<bool> TryStartTelemetrySessionAsync()
Aspire.Dashboard.Tests (32)
ChannelExtensionsTests.cs (1)
140var read2Task = resultChannel.Reader.ReadAsync().DefaultTimeout();
Integration\DashboardClientAuthTests.cs (3)
68private static async Task<ResourceServiceServer> CreateResourceServiceServerAsync(ILoggerFactory loggerFactory, bool useHttps, Action<TestCalls>? configureCalls = null) 109private static async Task<DashboardClient> CreateDashboardClientAsync( 162public override Task<ApplicationInformationResponse> GetApplicationInformation(
Integration\MockOpenIdAuthority.cs (1)
24public static async Task<Authority> CreateAsync()
Integration\Playwright\Infrastructure\MockDashboardClient.cs (2)
36public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException(); 40public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
Integration\Playwright\Infrastructure\PlaywrightTestsBase.cs (1)
36private async Task<IPage> CreateNewPageAsync()
Integration\StartupTests.cs (1)
799private static async Task<string> CreateBrowserTokenConfigFileAsync(DirectoryInfo fileConfigDirectory, string browserToken)
Middleware\ValidateTokenMiddlewareTests.cs (1)
66private static async Task<IHost> SetUpHostAsync(FrontendAuthMode authMode, string expectedToken)
Model\DashboardClientTests.cs (1)
135var subscribeTask = client.SubscribeResourcesAsync(CancellationToken.None);
OtlpApiKeyAuthenticationHandlerTests.cs (1)
76private static async Task<OtlpApiKeyAuthenticationHandler> CreateAuthHandlerAsync(string primaryApiKey, string? secondaryApiKey, string? otlpApiKeyHeader)
ResourceOutgoingPeerResolverTests.cs (3)
222private sealed class MockDashboardClient(Task<ResourceViewModelSubscription> subscribeResult) : IDashboardClient 228public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException(); 233public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) => subscribeResult;
Telemetry\DashboardTelemetrySenderTests.cs (3)
151private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _value; 153public TestHttpMessageHandler(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> value) 158protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Telemetry\DashboardTelemetryServiceTests.cs (1)
161private static async Task<DashboardTelemetryService> CreateTelemetryServiceAsync(IDashboardTelemetrySender? dashboardTelemetrySender = null, ILoggerFactory? loggerFactory = null)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
16public static async Task<IBrowser> CreateBrowserAsync(BrowserTypeLaunchOptions? options = null)
tests\Shared\Playwright\WrapperForIPage.cs (2)
31public Task<IResponse?> ReloadAsync(PageReloadOptions? options = null) 37public Task<IResponse?> GotoAsync(string url, PageGotoOptions? options = null)
tests\Shared\TestDashboardTelemetrySender.cs (1)
15public Task<bool> TryStartTelemetrySessionAsync()
Aspire.EndToEnd.Tests (12)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
16public static async Task<IBrowser> CreateBrowserAsync(BrowserTypeLaunchOptions? options = null)
tests\Shared\Playwright\WrapperForIPage.cs (2)
31public Task<IResponse?> ReloadAsync(PageReloadOptions? options = null) 37public Task<IResponse?> GotoAsync(string url, PageGotoOptions? options = null)
tests\Shared\TemplatesTesting\AspireProject.cs (3)
76public static async Task<AspireProject> CreateNewTemplateProjectAsync( 320public async Task<CommandResult> BuildAsync(string[]? extraBuildArgs = default, CancellationToken token = default, string? workingDirectory = null) 341public async Task<WrapperForIPage> OpenDashboardPageAsync(IBrowserContext context, int timeoutSecs = DashboardAvailabilityTimeoutSecs)
tests\Shared\TemplatesTesting\ProjectInfo.cs (2)
20public Task<HttpResponseMessage> HttpGetAsync(string bindingName, string path, CancellationToken cancellationToken = default) 31public Task<string> HttpGetStringAsync(string bindingName, string path, CancellationToken cancellationToken = default)
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
100public static async Task<CommandResult> InstallTemplatesAsync(string packagePath, string customHiveDirectory, string dotnet)
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
14public static async Task<WrapperForIPage> NewPageWithLoggingAsync(this IBrowserContext context, ITestOutputHelper testOutput)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
80public virtual async Task<CommandResult> ExecuteAsync(params string[] args) 106private async Task<CommandResult> ExecuteAsyncInternal(string executable, string args, CancellationToken token)
Aspire.Hosting (86)
ApplicationModel\CommandOptions.cs (1)
7/// Optional configuration for resource commands added with <see cref="ResourceBuilderExtensions.WithCommand{T}(Aspire.Hosting.ApplicationModel.IResourceBuilder{T}, string, string, Func{Aspire.Hosting.ApplicationModel.ExecuteCommandContext, Task{Aspire.Hosting.ApplicationModel.ExecuteCommandResult}}, Aspire.Hosting.ApplicationModel.CommandOptions?)"/>.
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
240public required Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> Callback { get; init; }
ApplicationModel\ExpressionResolver.cs (4)
25async Task<string?> EvalEndpointAsync(EndpointReference endpointReference, EndpointProperty property) 81async Task<ResolvedValue> EvalExpressionAsync(ReferenceExpression expr) 104async Task<ResolvedValue> EvalValueProvider(IValueProvider vp) 155async Task<ResolvedValue> ResolveConnectionStringReferenceAsync(ConnectionStringReference cs)
ApplicationModel\HttpCommandOptions.cs (1)
36public Func<HttpCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; }
ApplicationModel\InteractionService.cs (7)
44public async Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 64public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 73private async Task<InteractionResult<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken) 103public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 119public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 141public async Task<InteractionResult<IReadOnlyList<InteractionInput>>> PromptInputsAsync(string title, string? message, IEnumerable<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 169public async Task<InteractionResult<bool>> PromptMessageBarAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
ApplicationModel\ResourceCommandAnnotation.cs (2)
21Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 66public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; }
ApplicationModel\ResourceCommandService.cs (4)
32public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, string commandName, CancellationToken cancellationToken = default) 49public async Task<ExecuteCommandResult> ExecuteCommandAsync(IResource resource, string commandName, CancellationToken cancellationToken = default) 59var tasks = new List<Task<ExecuteCommandResult>>(); 94internal async Task<ExecuteCommandResult> ExecuteCommandCoreAsync(string resourceId, IResource resource, string commandName, CancellationToken cancellationToken)
ApplicationModel\ResourceExtensions.cs (1)
427private static async Task<ResolvedValue?> GetValue(string? key, IValueProvider valueProvider, ILogger logger, bool isContainer, string? containerHostName, CancellationToken cancellationToken)
ApplicationModel\ResourceNotificationService.cs (7)
117/// <returns>A <see cref="Task{String}"/> representing the wait operation and which of the target states the resource reached.</returns> 120public async Task<string> WaitForResourceAsync(string resourceName, IEnumerable<string> targetStates, CancellationToken cancellationToken = default) 242public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, CancellationToken cancellationToken = default) 275public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, WaitBehavior waitBehavior, CancellationToken cancellationToken = default) 405/// <returns>A <see cref="Task{ResourceEvent}"/> representing the wait operation and which of the target states the resource reached.</returns> 408public async Task<ResourceEvent> WaitForResourceAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default) 417private async Task<ResourceEvent> WaitForResourceCoreAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default)
artifacts\obj\Aspire.Hosting\Debug\net8.0\Dashboard\proto\ResourceServiceGrpc.cs (2)
124public virtual global::System.Threading.Tasks.Task<global::Aspire.ResourceService.Proto.V1.ApplicationInformationResponse> GetApplicationInformation(global::Aspire.ResourceService.Proto.V1.ApplicationInformationRequest request, grpc::ServerCallContext context) 142public virtual global::System.Threading.Tasks.Task<global::Aspire.ResourceService.Proto.V1.ResourceCommandResponse> ExecuteResourceCommand(global::Aspire.ResourceService.Proto.V1.ResourceCommandRequest request, grpc::ServerCallContext context)
Backchannel\AppHostRpcTarget.cs (4)
86public Task<long> PingAsync(long timestamp, CancellationToken cancellationToken) 93public Task<DashboardUrlsState> GetDashboardUrlsAsync() 98public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 150public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
ContainerResourceBuilderExtensions.cs (1)
820public static IResourceBuilder<T> WithContainerFiles<T>(this IResourceBuilder<T> builder, string destinationPath, Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> callback, int? defaultOwner = null, int? defaultGroup = null, UnixFileMode? umask = null) where T : ContainerResource
Dashboard\DashboardService.cs (2)
36public override Task<ApplicationInformationResponse> GetApplicationInformation( 320public override async Task<ResourceCommandResponse> ExecuteResourceCommand(ResourceCommandRequest request, ServerCallContext context)
Dashboard\DashboardServiceAuth.cs (1)
35protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Dashboard\DashboardServiceData.cs (1)
95internal async Task<(ExecuteCommandResultType result, string? errorMessage)> ExecuteCommandAsync(string resourceId, string type, CancellationToken cancellationToken)
Dashboard\DashboardServiceHost.cs (1)
185public async Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dcp\DcpDependencyCheck.cs (2)
31public async Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default) 51Task<ProcessResult> task;
Dcp\DcpExecutor.cs (4)
1669private async Task<(List<(string Value, bool IsSensitive)>, bool)> BuildArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken) 1697private async Task<List<ContainerCreateFileSystem>> BuildCreateFilesAsync(IResource modelResource, CancellationToken cancellationToken) 1727private async Task<(List<EnvVar>, bool)> BuildEnvVarsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken) 1754private async Task<(List<string>, bool)> BuildRunArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
Dcp\DcpKubernetesClient.cs (3)
35public async Task<HttpOperationResponse<Stream>> ReadSubResourceAsStreamAsync( 90public async Task<ApiServerExecution> GetExecutionDocumentAsync(CancellationToken cancellationToken = default) 114public async Task<ApiServerExecution> PatchExecutionDocumentAsync(
Dcp\HostDashboardEndpointProvider.cs (1)
17public async Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dcp\IDashboardEndpointProvider.cs (1)
8Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default);
Dcp\IDcpDependencyCheckService.cs (1)
10Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default);
Dcp\KubernetesService.cs (16)
37Task<T> GetAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 39Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) 41Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) 43Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) 45Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 64Task<Stream> GetLogStreamAsync<T>( 94public Task<T> GetAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 125public Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) 158public Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) 193public Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) 223public Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) 272var responseTask = string.IsNullOrEmpty(namespaceParameter) 299public Task<Stream> GetLogStreamAsync<T>( 445private Task<TResult> ExecuteWithRetry<TResult>( 460private async Task<TResult> ExecuteWithRetry<TResult>( 463Func<DcpKubernetesClient, Task<TResult>> operation,
Dcp\Process\ProcessUtil.cs (1)
20public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Health\ResourceHealthCheckService.cs (1)
348internal async Task<bool> DelayAsync(ResourceEvent? currentEvent, TimeSpan delay, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (1)
88var waitForNonWaitingStateTask = _notificationService.WaitForResourceAsync(
Publishing\DeployingContext.cs (1)
62internal async Task<bool> WriteModelAsync(DistributedApplicationModel model)
Publishing\DockerContainerRuntime.cs (1)
11private async Task<int> RunDockerBuildAsync(string contextPath, string dockerfilePath, string imageName, CancellationToken cancellationToken)
Publishing\NullPublishingActivityProgressReporter.cs (2)
24public Task<PublishingStep> CreateStepAsync(string title, CancellationToken cancellationToken) 31public Task<PublishingTask> CreateTaskAsync(PublishingStep step, string statusText, CancellationToken cancellationToken)
Publishing\PodmanContainerRuntime.cs (1)
11private async Task<int> RunPodmanBuildAsync(string contextPath, string dockerfilePath, string imageName, CancellationToken cancellationToken)
Publishing\PublishingActivityProgressReporter.cs (4)
124Task<PublishingStep> CreateStepAsync(string title, CancellationToken cancellationToken); 134Task<PublishingTask> CreateTaskAsync(PublishingStep step, string statusText, CancellationToken cancellationToken); 180public async Task<PublishingStep> CreateStepAsync(string title, CancellationToken cancellationToken) 203public async Task<PublishingTask> CreateTaskAsync(PublishingStep step, string statusText, CancellationToken cancellationToken)
Publishing\PublishingContext.cs (1)
62internal async Task<bool> WriteModelAsync(DistributedApplicationModel model)
Publishing\ResourceContainerImageBuilder.cs (1)
208private async Task<PublishingTask?> CreateTaskAsync(
ResourceBuilderExtensions.cs (2)
1441Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 1502Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand,
Utils\PeriodicRestartAsyncEnumerable.cs (2)
20public static async IAsyncEnumerable<T> CreateAsync<T>(Func<T?, CancellationToken, Task<IAsyncEnumerable<T>>> enumerableFactory, TimeSpan restartInterval, [EnumeratorCancellation] CancellationToken cancellationToken) where T : struct 76public static async IAsyncEnumerable<T> CreateAsync<T>(Func<T?, CancellationToken, Task<IAsyncEnumerable<T>>> enumerableFactory, TimeSpan restartInterval, [EnumeratorCancellation] CancellationToken cancellationToken) where T : class?
Aspire.Hosting.Azure (24)
AzureResourcePreparer.cs (1)
362private async Task<HashSet<IAzureResource>> GetAzureReferences(IResource resource, CancellationToken cancellationToken)
IAzureKeyVaultResource.cs (1)
26Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; }
Provisioning\Internal\BicepCompiler.cs (2)
15public async Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 55private static async Task<bool> ExecuteCommand(ProcessSpec processSpec)
Provisioning\Internal\DefaultArmClientProvider.cs (1)
23public async Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default)
Provisioning\Internal\DefaultProvisioningContextProvider.cs (1)
29public async Task<ProvisioningContext> CreateProvisioningContextAsync(JsonObject userSecrets, CancellationToken cancellationToken = default)
Provisioning\Internal\DefaultResourceGroupResource.cs (1)
27public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync(
Provisioning\Internal\DefaultSubscriptionResource.cs (2)
27public async Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) 33public async Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default)
Provisioning\Internal\DefaultUserPrincipalProvider.cs (1)
14public async Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default)
Provisioning\Internal\DefaultUserSecretsManager.cs (1)
30public async Task<JsonObject> LoadUserSecretsAsync(CancellationToken cancellationToken = default)
Provisioning\Internal\IProvisioningServices.cs (8)
44Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default); 55Task<JsonObject> LoadUserSecretsAsync(CancellationToken cancellationToken = default); 71Task<ProvisioningContext> CreateProvisioningContextAsync(JsonObject userSecrets, CancellationToken cancellationToken = default); 82Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default); 119Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default); 124Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default); 156Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 187Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default);
Provisioning\Provisioners\AzureProvisioner.cs (3)
118async Task<bool> WaitForRoleAssignments((IResource Resource, IAzureResource AzureResource) resource) 175var provisioningContextLazy = new Lazy<Task<ProvisioningContext>>(() => provisioningContextProvider.CreateProvisioningContextAsync(userSecrets, cancellationToken)); 199private async Task ProcessResourceAsync(IConfiguration configuration, Lazy<Task<ProvisioningContext>> provisioningContextLazy, (IResource Resource, IAzureResource AzureResource) resource, CancellationToken cancellationToken)
Provisioning\Provisioners\BicepProvisioner.cs (1)
22public async Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
20public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Aspire.Hosting.Azure.AppContainers (1)
ContainerAppEnvironmentContext.cs (1)
33public async Task<AzureBicepResource> CreateContainerAppAsync(IResource resource, AzureProvisioningOptions provisioningOptions, CancellationToken cancellationToken)
Aspire.Hosting.Azure.AppService (1)
AzureAppServiceEnvironmentContext.cs (1)
33public async Task<AzureBicepResource> CreateAppServiceAsync(IResource resource, AzureProvisioningOptions provisioningOptions, CancellationToken cancellationToken)
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
41internal Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; } 43Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? IAzureKeyVaultResource.SecretResolver
Aspire.Hosting.Azure.Tests (15)
AzureAppServiceTests.cs (1)
255private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureBicepProvisionerTests.cs (1)
193public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default)
AzureContainerAppsTests.cs (1)
1457private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureFunctionsTests.cs (1)
418private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureManifestUtils.cs (3)
14public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource, bool skipPreparer = false) => 17public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource) => 20private static async Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource, bool skipPreparer)
ProvisioningTestHelpers.cs (7)
113public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 141public Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) 147public Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default) 179public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 273public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 288public Task<JsonObject> LoadUserSecretsAsync(CancellationToken cancellationToken = default) 302public Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default)
RoleAssignmentTests.cs (1)
203private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
Aspire.Hosting.Docker (1)
DockerComposeEnvironmentContext.cs (1)
12public async Task<DockerComposeServiceResource> CreateDockerComposeServiceResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
Aspire.Hosting.Garnet.Tests (1)
AddGarnetTests.cs (1)
285private static async Task<string> GetCommandLineArgs(IResourceBuilder<GarnetResource> builder)
Aspire.Hosting.Kafka.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Kubernetes (2)
KubernetesEnvironmentContext.cs (1)
15public async Task<KubernetesResource> CreateKubernetesResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
KubernetesServiceResourceExtensions.cs (1)
13internal static async Task<object> ProcessValueAsync(this KubernetesResource resource, KubernetesEnvironmentContext context, DistributedApplicationExecutionContext executionContext, object value)
Aspire.Hosting.MySql.Tests (11)
MySqlFunctionalTests.cs (2)
556async Task<string?[]> RunContainersAsync() 595static async Task<string?> GetContainerIdAsync(ResourceNotificationService rns, string resourceName, CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Nats (2)
src\Components\Aspire.NATS.Net\NatsHealthCheck.cs (2)
11public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 24private static async Task<HealthCheckResult> TryConnect(INatsConnection natsConnection)
Aspire.Hosting.NodeJs.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.PostgreSQL.Tests (11)
PostgresFunctionalTests.cs (2)
547async Task<string?[]> RunContainersAsync() 576static async Task<string?> GetContainerIdAsync(ResourceNotificationService rns, string resourceName, CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Qdrant (1)
src\Components\Aspire.Qdrant.Client\QdrantHealthCheck.cs (1)
18public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.Hosting.RabbitMQ (1)
RabbitMQBuilderExtensions.cs (1)
64static Task<IConnection> CreateConnection(string connectionString)
Aspire.Hosting.RabbitMQ.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
658private static async Task<string> GetCommandLineArgs(IResourceBuilder<RedisResource> builder)
Aspire.Hosting.Testing (16)
DistributedApplicationEntryPointInvoker.cs (2)
18public static Func<string[], CancellationToken, Task<DistributedApplication>>? ResolveEntryPoint( 72public async Task<DistributedApplication> InvokeAsync(CancellationToken cancellationToken)
DistributedApplicationFactory.cs (3)
46internal async Task<DistributedApplicationBuilder> ResolveBuilderAsync(CancellationToken cancellationToken = default) 57internal async Task<DistributedApplication> ResolveApplicationAsync(CancellationToken cancellationToken = default) 421private async Task InvokeEntryPoint(Func<string[], CancellationToken, Task<DistributedApplication>> factory)
DistributedApplicationTestingBuilder.cs (11)
30public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(CancellationToken cancellationToken = default) 43public static Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, CancellationToken cancellationToken = default) 58public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(string[] args, CancellationToken cancellationToken = default) 72public static Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, string[] args, CancellationToken cancellationToken = default) 88public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(string[] args, Action<DistributedApplicationOptions, HostApplicationBuilderSettings> configureBuilder, CancellationToken cancellationToken = default) 102public static async Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, string[] args, Action<DistributedApplicationOptions, HostApplicationBuilderSettings> configureBuilder, CancellationToken cancellationToken = default) 160public async Task<IDistributedApplicationTestingBuilder> CreateBuilderAsync(CancellationToken cancellationToken) 185public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 225public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 366public Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 455Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken = default);
Aspire.Hosting.Testing.Tests (3)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (3)
8public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(ResourceLoggerService service, int targetLogCount, IResource resource) 14public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 31public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerator<IReadOnlyList<LogLine>> watchEnumerator, int targetLogCount)
Aspire.Hosting.Tests (55)
Dashboard\DashboardLifecycleHookTests.cs (1)
266public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardResourceTests.cs (2)
548public Task<LogMessage> FirstLogTask => _tcs.Task; 586public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dcp\DcpExecutorTests.cs (4)
595var moveNextTask = watchLogsEnumerator.MoveNextAsync().AsTask(); 690var watchLogsTask1 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs1, targetLogCount: 7); 712var watchLogsTask2 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs2, targetLogCount: 7); 732private static async Task<LogStreamPipes> GetStreamPipesAsync(Channel<(string Type, Pipe Pipe)> logStreamPipesChannel)
Dcp\TestDcpDependencyCheckService.cs (1)
9public Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default)
Dcp\TestKubernetesService.cs (6)
38public Task<T> GetAsync<T>(string name, string? namespaceParameter = null, CancellationToken _ = default) where T : CustomResource 59public Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) where T : CustomResource 104public async Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) where T : CustomResource 124public Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) where T : CustomResource 165public Task<Stream> GetLogStreamAsync<T>( 180public Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) where T : CustomResource
ExpressionResolverTests.cs (1)
28async Task<ResolvedValue> ResolveAsync() => await ExpressionResolver.ResolveAsync(testData.SourceIsContainer, testData.ValueProvider, string.Empty, CancellationToken.None);
Helpers\DashboardServiceDataExtensions.cs (1)
11public static async Task<ResourceSnapshot> WaitForResourceAsync(this DashboardServiceData dashboardServiceData, string resourceName, Func<ResourceSnapshot, bool> predicate, CancellationToken cancellationToken = default)
Helpers\KubernetesHelper.cs (2)
13public static async Task<T> GetResourceByNameAsync<T>(IKubernetesService kubernetes, string resourceName, string resourceNameSuffix, Func<T, bool> ready, CancellationToken cancellationToken = default) where T : CustomResource 28public static async Task<T> GetResourceByNameMatchAsync<T>(IKubernetesService kubernetes, string resourceNamePattern, Func<T, bool> ready, CancellationToken cancellationToken = default) where T : CustomResource
InteractionServiceTests.cs (6)
22var resultTask = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 47var resultTask = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation", cancellationToken: cts.Token); 71var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 72var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 114var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 118var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation");
ProjectResourceTests.cs (1)
33async static Task<(string ProjectFilePath, string LaunchSettingsFilePath)> PrepareProjectWithMalformedLaunchSettingsAsync()
ResourceLoggerServiceTests.cs (5)
25var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 66var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(service, 2, testResource); 106var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 162var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 1); 227var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator, 4);
ResourceNotificationTests.cs (6)
51async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 69var enumerableTask = GetValuesAsync(cts.Token); 104async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellation) 122var enumerableTask = GetValuesAsync(cts.Token); 224var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"]); 239var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"], default);
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
tests\Shared\ConsoleLogging\ConsoleLoggingTestHelpers.cs (3)
8public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(ResourceLoggerService service, int targetLogCount, IResource resource) 14public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerable<IReadOnlyList<LogLine>> watchEnumerable, int targetLogCount) 31public static Task<IReadOnlyList<LogLine>> WatchForLogsAsync(IAsyncEnumerator<IReadOnlyList<LogLine>> watchEnumerator, int targetLogCount)
Utils\DockerfileUtils.cs (1)
38public static async Task<(string ContextPath, string DockerfilePath)> CreateTemporaryDockerfileAsync(string dockerfileName = "Dockerfile", bool createDockerfile = true, bool includeSecrets = false)
Utils\Grpc\TestAsyncStreamReader.cs (1)
35public async Task<bool> MoveNext(CancellationToken cancellationToken)
Utils\Grpc\TestServerStreamWriter.cs (1)
33public async Task<T> ReadNextAsync()
Utils\ManifestUtils.cs (3)
13public static async Task<JsonNode> GetManifest(IResource resource, string? manifestDirectory = null) 20public static async Task<JsonNode?> GetManifestOrNull(IResource resource, string? manifestDirectory = null) 39public static async Task<JsonNode[]> GetManifests(IResource[] resources)
WithHttpCommandTests.cs (1)
248protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Aspire.Hosting.Valkey.Tests (10)
AddValkeyTests.cs (1)
344private static async Task<string> GetCommandLineArgs(IResourceBuilder<ValkeyResource> builder)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Milvus.Client (1)
MilvusHealthCheck.cs (1)
20public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.NATS.Net (2)
NatsHealthCheck.cs (2)
11public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 24private static async Task<HealthCheckResult> TryConnect(INatsConnection natsConnection)
Aspire.OpenAI.Tests (2)
AspireOpenAIClientBuilderChatClientExtensionsTests.cs (1)
268private static Task<ChatResponse> TestMiddleware(IEnumerable<ChatMessage> list, ChatOptions? options, IChatClient client, CancellationToken token)
AspireOpenAIClientBuilderEmbeddingGeneratorExtensionsTests.cs (1)
268private Task<GeneratedEmbeddings<Embedding<float>>> TestMiddleware(IEnumerable<string> inputs, EmbeddingGenerationOptions? options, IEmbeddingGenerator<string, Embedding<float>> nextAsync, CancellationToken cancellationToken)
Aspire.Playground.Tests (11)
Infrastructure\DistributedApplicationExtensions.cs (1)
210public static async Task<bool> TryApplyEfMigrationsAsync(this DistributedApplication app, ProjectResource project)
Infrastructure\DistributedApplicationTestFactory.cs (1)
18public static async Task<IDistributedApplicationTestingBuilder> CreateAsync(Type appHostProgramType, ITestOutputHelper? testOutput)
tests\Shared\AsyncTestHelpers.cs (9)
96public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 106public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 111public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 121public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 126public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 203public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Qdrant.Client (1)
QdrantHealthCheck.cs (1)
18public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
170public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.RabbitMQ.Client.Tests (1)
RabbitMQContainerFixture.cs (1)
35public static async Task<RabbitMqContainer> CreateContainerAsync()
Aspire.RabbitMQ.Client.v7.Tests (1)
tests\Aspire.RabbitMQ.Client.Tests\RabbitMQContainerFixture.cs (1)
35public static async Task<RabbitMqContainer> CreateContainerAsync()
Aspire.Seq (1)
SeqHealthCheck.cs (1)
19public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext _, CancellationToken cancellationToken = new CancellationToken())
Aspire.StackExchange.Redis.Tests (1)
RedisContainerFixture.cs (1)
35public static async Task<RedisContainer> CreateContainerAsync()
Aspire.Templates.Tests (20)
StarterTemplateRunTestsBase.cs (1)
122static async Task<List<string[]>> GetAndValidateCellTexts(ILocator tableLoc)
TemplateTestsBase.cs (7)
35var t = Task.Run(async () => await PlaywrightProvider.CreateBrowserAsync()); 47public async Task<string> CreateAndAddTestTemplateProjectAsync( 146public static Task<IBrowserContext> CreateNewBrowserContextAsync() 151protected Task<ResourceRow[]> CheckDashboardHasResourcesAsync(WrapperForIPage dashboardPageWrapper, IEnumerable<ResourceRow> expectedResources, string logPath, int timeoutSecs = 120) 154protected static async Task<ResourceRow[]> CheckDashboardHasResourcesAsync(WrapperForIPage dashboardPageWrapper, 173private static async Task<ResourceRow[]> CheckDashboardHasResourcesActualAsync(WrapperForIPage dashboardPageWrapper, IEnumerable<ResourceRow> expectedResources, ITestOutputHelper testOutput, int timeoutSecs = 120) 317public static async Task<CommandResult?> AssertTestProjectRunAsync(string testProjectDirectory, string testType, ITestOutputHelper testOutput, string config = "Debug", int testRunTimeoutSecs = 3 * 60)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
16public static async Task<IBrowser> CreateBrowserAsync(BrowserTypeLaunchOptions? options = null)
tests\Shared\Playwright\WrapperForIPage.cs (2)
31public Task<IResponse?> ReloadAsync(PageReloadOptions? options = null) 37public Task<IResponse?> GotoAsync(string url, PageGotoOptions? options = null)
tests\Shared\TemplatesTesting\AspireProject.cs (3)
76public static async Task<AspireProject> CreateNewTemplateProjectAsync( 320public async Task<CommandResult> BuildAsync(string[]? extraBuildArgs = default, CancellationToken token = default, string? workingDirectory = null) 341public async Task<WrapperForIPage> OpenDashboardPageAsync(IBrowserContext context, int timeoutSecs = DashboardAvailabilityTimeoutSecs)
tests\Shared\TemplatesTesting\ProjectInfo.cs (2)
20public Task<HttpResponseMessage> HttpGetAsync(string bindingName, string path, CancellationToken cancellationToken = default) 31public Task<string> HttpGetStringAsync(string bindingName, string path, CancellationToken cancellationToken = default)
tests\Shared\TemplatesTesting\TemplateCustomHive.cs (1)
100public static async Task<CommandResult> InstallTemplatesAsync(string packagePath, string customHiveDirectory, string dotnet)
tests\Shared\TemplatesTesting\TestExtensions.cs (1)
14public static async Task<WrapperForIPage> NewPageWithLoggingAsync(this IBrowserContext context, ITestOutputHelper testOutput)
tests\Shared\TemplatesTesting\ToolCommand.cs (2)
80public virtual async Task<CommandResult> ExecuteAsync(params string[] args) 106private async Task<CommandResult> ExecuteAsyncInternal(string executable, string args, CancellationToken token)
AuthSamples.FunctionalTests (5)
CustomPolicyProviderTests.cs (1)
121internal static async Task<HttpResponseMessage> SignIn(HttpClient client, string userName, string dob)
DynamicSchemeTests.cs (1)
80private async Task<HttpResponseMessage> AddScheme(string name, string message)
HttpClientExtensions.cs (2)
16public static Task<HttpResponseMessage> SendAsync( 28public static Task<HttpResponseMessage> SendAsync(
TestAssert.cs (1)
73public static async Task<IHtmlDocument> IsHtmlDocumentAsync(HttpResponseMessage response)
AzureFunctionsEndToEnd.Functions (1)
MyAzureBlobTrigger.cs (1)
11public async Task<string> RunAsync([BlobTrigger("blobs/{name}", Connection = "blob")] string triggerString, FunctionContext context)
BasicTestApp (22)
AuthTest\ServerAuthenticationStateProvider.cs (1)
22public override async Task<AuthenticationState> GetAuthenticationStateAsync()
InteropTest\ByteArrayInterop.cs (2)
17public static Task<byte[]> RoundTripByteArrayAsync(byte[] byteArray) 29public static Task<ByteArrayWrapper> RoundTripByteArrayWrapperObjectAsync(ByteArrayWrapper byteArrayWrapper)
InteropTest\DotNetStreamReferenceInterop.cs (2)
25public static Task<DotNetStreamReference> GetDotNetStreamReferenceAsync() 44public static Task<DotNetStreamReferenceWrapper> GetDotNetStreamWrapperReferenceAsync()
InteropTest\JavaScriptInterop.cs (14)
302public static Task<decimal[]> ReturnArrayAsync() 308public static Task<object[]> EchoOneParameterAsync(ComplexParameter parameter1) 314public static Task<object[]> EchoTwoParametersAsync( 322public static Task<object[]> EchoThreeParametersAsync( 331public static Task<object[]> EchoFourParametersAsync( 341public static Task<object[]> EchoFiveParametersAsync( 352public static Task<object[]> EchoSixParametersAsync(ComplexParameter parameter1, 363public static Task<object[]> EchoSevenParametersAsync( 376public static Task<object[]> EchoEightParametersAsync( 399public static async Task<Dictionary<string, DotNetObjectReference<TestDTO>>> ReturnDotNetObjectByRefAsync() 421public static async Task<IJSObjectReference> RoundTripJSObjectReferenceAsync(IJSObjectReference jSObjectReference) 442public static async Task<string> InvokeDisposedJSObjectReferenceExceptionAsync(IJSObjectReference jsObjectReference) 471public async Task<InstanceMethodOutput> InstanceMethodAsync(InstanceMethodInput input) 517public async Task<TValue> UpdateAsync(TValue newValue)
InteropTest\JSStreamReferenceInterop.cs (3)
12public static async Task<string> JSToDotNetStreamParameterAsync(IJSStreamReference jsStreamReference) 19public static async Task<string> JSToDotNetStreamWrapperObjectParameterAsync(JSStreamReferenceWrapper jsStreamReferenceWrapper) 36private static async Task<string> ValidateStreamValuesAsync(Stream stream)
BasicWebSite (20)
BasicAuthenticationHandler.cs (1)
17protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Controllers\ActionResultOfTController.cs (1)
23public async Task<ActionResult<IEnumerable<Product>>> GetProductsAsync()
Controllers\AsyncActionsController.cs (8)
25public async Task<IActionResult> ActionWithSuffixAsync() 31public Task<IActionResult> ActionReturningViewAsync() 52public async Task<Message> TaskOfObjectAction(string message) 58public async Task<Message> TaskOfObjectExceptionAction(string message) 64public async Task<IActionResult> TaskOfIActionResultAction(string message) 70public async Task<IActionResult> TaskOfIActionResultExceptionAction(string message) 76public async Task<ContentResult> TaskOfContentResultAction(string message) 82public async Task<ContentResult> TaskOfContentResultExceptionAction(string message)
Controllers\ContentNegotiation\NoContentController.cs (2)
10public Task<string> ReturnTaskOfString_NullValue() 15public Task<object> ReturnTaskOfObject_NullValue()
Controllers\ContentNegotiation\NoContentDoNotTreatNullValueAsNoContentController.cs (2)
24public Task<string> ReturnTaskOfString_NullValue() 29public Task<object> ReturnTaskOfObject_NullValue()
Controllers\ContentNegotiation\TextPlainController.cs (3)
10public Task<string> ReturnTaskOfString() 15public Task<object> ReturnTaskOfObject_StringValue() 20public Task<object> ReturnTaskOfObject_ObjectValue()
Services\WeatherForecastService.cs (1)
19public async Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
StartupRequestLimitSize.cs (1)
93public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
StartupWhereReadingRequestBodyThrows.cs (1)
52public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
BasketService (14)
artifacts\obj\BasketService\Debug\net8.0\Protos\BasketGrpc.cs (4)
106public virtual global::System.Threading.Tasks.Task<global::GrpcBasket.CustomerBasketResponse> GetBasketById(global::GrpcBasket.BasketRequest request, grpc::ServerCallContext context) 112public virtual global::System.Threading.Tasks.Task<global::GrpcBasket.CustomerBasketResponse> UpdateBasket(global::GrpcBasket.CustomerBasketRequest request, grpc::ServerCallContext context) 118public virtual global::System.Threading.Tasks.Task<global::GrpcBasket.CheckoutCustomerBasketResponse> CheckoutBasket(global::GrpcBasket.CheckoutCustomerBasketRequest request, grpc::ServerCallContext context) 124public virtual global::System.Threading.Tasks.Task<global::GrpcBasket.DeleteCustomerBasketResponse> DeleteBasket(global::GrpcBasket.DeleteCustomerBasketRequest request, grpc::ServerCallContext context)
BasketService.cs (4)
16public override async Task<CustomerBasketResponse> GetBasketById(BasketRequest request, ServerCallContext context) 31public override async Task<CustomerBasketResponse?> UpdateBasket(CustomerBasketRequest request, ServerCallContext context) 44public override async Task<CheckoutCustomerBasketResponse> CheckoutBasket(CheckoutCustomerBasketRequest request, ServerCallContext context) 98public override async Task<DeleteCustomerBasketResponse> DeleteBasket(DeleteCustomerBasketRequest request, ServerCallContext context)
Repositories\IBasketRepository.cs (3)
7Task<CustomerBasket?> GetBasketAsync(string customerId); 9Task<CustomerBasket?> UpdateBasketAsync(CustomerBasket basket); 10Task<bool> DeleteBasketAsync(string id);
Repositories\RedisBasketRepository.cs (3)
17public async Task<bool> DeleteBasketAsync(string id) 30public async Task<CustomerBasket?> GetBasketAsync(string customerId) 42public async Task<CustomerBasket?> UpdateBasketAsync(CustomerBasket basket)
Binding.Http.IntegrationTests (3)
HttpBindingTestHelpers.cs (3)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 31public Func<HttpResponseMessage, CancellationToken, Task<HttpResponseMessage>> OnSentAsync { get; set; } 45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Binding.ReliableSession.IntegrationTests (10)
NetHttpBindingTests.cs (3)
233var resultTask = serviceProxy.GetNextNumberAsync(); 313var resultTask1 = serviceProxy.GetNextNumberAsync(); 316Task<int> resultTask2;
NetTcpBindingTests.cs (1)
134public Task<string> DuplexEchoAsync(string echo)
src\System.Private.ServiceModel\tests\Scenarios\Binding\Http\HttpBindingTestHelpers.cs (3)
30public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendingAsync { get; set; } 31public Func<HttpResponseMessage, CancellationToken, Task<HttpResponseMessage>> OnSentAsync { get; set; } 45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
WSHttpBindingTests.cs (3)
233var resultTask = serviceProxy.GetNextNumberAsync(); 313var resultTask1 = serviceProxy.GetNextNumberAsync(); 316Task<int> resultTask2;
BlazorServerApp (1)
Data\WeatherForecastService.cs (1)
13public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
BlazorUnitedApp (1)
Data\WeatherForecastService.cs (1)
13public Task<WeatherForecast[]> GetForecastAsync(DateOnly startDate)
CatalogDb (3)
CatalogDbInitializerHealthCheck.cs (1)
7public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Model.cs (2)
21public Task<List<CatalogItem>> GetCatalogItemsCompiledAsync(int? catalogBrandId, int? before, int? after, int pageSize) 97private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> asyncEnumerable)
CatalogModel (2)
Model.cs (2)
24public Task<List<CatalogItem>> GetCatalogItemsCompiledAsync(int? catalogBrandId, int? before, int? after, int pageSize) 100private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> asyncEnumerable)
CdkSample.ApiService (9)
Program.cs (9)
53static async Task<string> TestAppConfig(ConfigurationClient cc) 60static async Task<IEnumerable<Entry>> TestRedisAsync(IConnectionMultiplexer connection) 81static async Task<bool> TestSecretAsync(SecretClient secretClient) 87static async Task<List<string>> TestBlobStorageAsync(BlobServiceClient bsc) 107static async Task<ServiceBusReceivedMessage> TestServiceBusAsync(ServiceBusClient sbc) 116static async Task<List<Entry>> TestSqlServerAsync(SqlContext context) 128static async Task<List<Entry>> TestNpgsqlAsync(NpgsqlContext context) 140static async Task<List<Entry>> TestCosmosAsync(CosmosContext context) 152static async Task<SearchResourceCounter> TestSearchAsync(SearchIndexClient search)
ClaimsTransformation (3)
ClaimsTransformer.cs (1)
14public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
Controllers\AccountController.cs (2)
29public async Task<IActionResult> Login(string userName, string password, string returnUrl = null) 57public async Task<IActionResult> Logout()
Client.ClientBase.IntegrationTests (1)
ClientBaseTests.4.0.0.cs (1)
607Task<string> task = proxy.EchoAsync("Hello");
Client.ExpectedExceptions.IntegrationTests (7)
ExpectedExceptionTests.4.0.0.cs (3)
243Task<string>[] tasks = new Task<string>[operationCount]; 307Task<string> t = serviceProxy.EchoWithTimeoutAsync(testMessage, serverDelayTimeSpan);
ExpectedExceptionTests.4.1.0.cs (4)
253Task<Guid> task = serviceProxy.FaultPing(guid); 305Task<Guid> task = serviceProxy.FaultPing(guid); 497Task<string>[] tasks = new Task<string>[operationCount];
Client.TypedClient.IntegrationTests (3)
TypedProxyDuplexTests.4.1.0.cs (2)
39Task<Guid> task = serviceProxy.Ping(guid); 74Task<Guid> task = serviceProxy.Ping(guid);
TypedProxyTests.4.0.0.cs (1)
552Task<string> task = serviceProxy.EchoAsync("Hello");
ClientSample (10)
HubSample.cs (2)
28public static async Task<int> ExecuteAsync(string baseUrl) 126private static async Task<bool> ConnectAsync(HubConnection connection, CancellationToken token)
LoggingMessageHandler.cs (1)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
RawSample.cs (1)
31public static async Task<int> ExecuteAsync(string baseUrl)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
StreamingSample.cs (1)
25public static async Task<int> ExecuteAsync(string baseUrl)
Tcp\TcpConnection.cs (2)
80var sendTask = DoSend(); 183private async Task<Exception> DoSend()
UploadSample.cs (2)
28public static async Task<int> ExecuteAsync(string baseUrl) 45var invokeTask = connection.InvokeAsync<string>("UploadWord", channel.Reader);
Contract.Service.IntegrationTests (6)
ServiceContractTests.4.1.0.cs (6)
697Task<string> t1 = serviceProxy1.EchoWithTimeoutAsync("first", delayOperation); 698Task<string> t2 = serviceProxy2.EchoWithTimeoutAsync("second", delayOperation); 787Task<string> t1 = serviceProxy1.EchoWithTimeoutAsync(expectedEcho1, delayOperation); 788Task<string> t2 = serviceProxy2.EchoWithTimeoutAsync(expectedEcho2, delayOperation); 877Task<string> t1 = serviceProxy1.EchoWithTimeoutAsync(expectedEcho1, delayOperation); 878Task<string> t2 = serviceProxy2.EchoWithTimeoutAsync(expectedEcho2, delayOperation);
Contract.XmlSerializer.IntegrationTests (1)
XmlSerializerFormatTest.4.0.0.cs (1)
90Task<string> response = serviceProxy.EchoXmlSerializerFormatAsync("message");
Cookies (2)
Controllers\AccountController.cs (2)
28public async Task<IActionResult> Login(string userName, string password, string returnUrl = null) 61public async Task<IActionResult> Logout()
CookieSessionSample (2)
MemoryCacheTicketStore.cs (2)
20public async Task<string> StoreAsync(AuthenticationTicket ticket) 43public Task<AuthenticationTicket> RetrieveAsync(string key)
CosmosEndToEnd.ApiService (1)
Program.cs (1)
24static async Task<object> AddAndGetStatus<T>(Container container, T newEntry)
csc (12)
src\Compilers\Core\CommandLine\BuildProtocol.cs (2)
122public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 318public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildClient.cs (3)
25internal delegate Task<BuildResponse> CompileOnServerFunc(BuildRequest buildRequest, string pipeName, CancellationToken cancellationToken); 171public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> originalArguments, BuildPaths buildPaths, TextWriter? textWriter = null) 232var buildResponseTask = _compileOnServerFunc(
src\Compilers\Shared\BuildServerConnection.cs (7)
88internal static async Task<bool> RunServerShutdownRequestAsync( 157internal static Task<BuildResponse> RunServerBuildRequestAsync( 171internal static async Task<BuildResponse> RunServerBuildRequestAsync( 200static Task<NamedPipeClientStream?> tryConnectToServerAsync( 277static async Task<BuildResponse> tryRunRequestAsync( 300var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 371internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
CustomAuthorizationFailureResponse (1)
Authentication\SampleAuthenticationHandler.cs (1)
20protected override Task<AuthenticateResult> HandleAuthenticateAsync()
CustomPolicyProvider (5)
Authorization\MinimumAgePolicyProvider.cs (3)
31public Task<AuthorizationPolicy> GetDefaultPolicyAsync() => FallbackPolicyProvider.GetDefaultPolicyAsync(); 33public Task<AuthorizationPolicy> GetFallbackPolicyAsync() => FallbackPolicyProvider.GetFallbackPolicyAsync(); 39public Task<AuthorizationPolicy> GetPolicyAsync(string policyName)
Controllers\AccountController.cs (2)
21public async Task<IActionResult> Signin(string userName, string birthDate = null, string returnUrl = null) 44public async Task<IActionResult> Signout()
Diagnostics.EFCore.FunctionalTests (1)
DatabaseErrorPageMiddlewareTest.cs (1)
517private static async Task<IHost> SetupServer<TContext, TMiddleware>(SqlTestStore database, ILoggerProvider logProvider = null)
dotnet-dev-certs (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-getdocument (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-openapi (18)
Commands\AddCommand.cs (1)
23protected override Task<int> ExecuteCoreAsync()
Commands\AddFileCommand.cs (1)
32protected override async Task<int> ExecuteCoreAsync()
Commands\AddProjectCommand.cs (1)
28protected override async Task<int> ExecuteCoreAsync()
Commands\AddURLCommand.cs (1)
32protected override async Task<int> ExecuteCoreAsync()
Commands\BaseCommand.cs (6)
63protected abstract Task<int> ExecuteCoreAsync(); 67private async Task<int> ExecuteAsync() 262internal async Task<string> DownloadGivenOption(string url, CommandOption fileOption) 297private static async Task<IHttpResponseMessageWrapper> RetryRequest( 298Func<Task<IHttpResponseMessageWrapper>> retryBlock, 444private async Task<IDictionary<string, string>> LoadPackageVersionsFromURLAsync()
Commands\RefreshCommand.cs (1)
27protected override async Task<int> ExecuteCoreAsync()
Commands\RemoveCommand.cs (1)
27protected override Task<int> ExecuteCoreAsync()
HttpClientWrapper.cs (3)
29public async Task<IHttpResponseMessageWrapper> GetResponseAsync(string url) 36public Task<Stream> GetStreamAsync(string url) 51public Task<Stream> Stream => _response.Content.ReadAsStreamAsync();
IHttpClientWrapper.cs (1)
12Task<IHttpResponseMessageWrapper> GetResponseAsync(string url);
IHttpResponseMessageWrapper.cs (1)
14Task<Stream> Stream { get; }
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-sql-cache (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-svcutil.xmlserializer.IntegrationTests (1)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.4.0.0.cs (1)
90Task<string> response = serviceProxy.EchoXmlSerializerFormatAsync("message");
dotnet-svcutil-lib (323)
AppInsightsTelemetryClient.cs (1)
73public static async Task<AppInsightsTelemetryClient> GetInstanceAsync(CancellationToken cancellationToken)
Bootstrapper\SvcutilBootstrapper.cs (2)
52internal async Task<ProcessRunner.ProcessResult> BoostrapSvcutilAsync(bool keepBootstrapperDir, ILogger logger, CancellationToken cancellationToken) 175internal async Task<string> GenerateParamsFileAsync(ILogger logger, CancellationToken cancellationToken)
CodeDomFixup\CodeDomHelpers.cs (1)
96(MatchType(method.ReturnType, new CodeTypeReference(typeof(Task<>)), false, true) ||
CommandProcessorOptions.cs (1)
137internal static async Task<CommandProcessorOptions> ParseArgumentsAsync(string[] args, ILogger logger, CancellationToken cancellationToken)
DebugLogger.cs (1)
78public async Task<DateTime> WriteStartOperationAsync(string message, bool logToUI = false)
FrameworkFork\Microsoft.Xml\Xml\AsyncHelper.cs (15)
19public static readonly Task<bool> DoneTaskTrue = Task.FromResult(true); 21public static readonly Task<bool> DoneTaskFalse = Task.FromResult(false); 23public static readonly Task<int> DoneTaskZero = Task.FromResult(0); 49public static async Task<bool> ReturnTaskBoolWhenFinish(this Task task, bool ret) 59public static async Task<bool> _ReturnTaskBoolWhenFinish(this Task task, bool ret) 83public static Task<bool> CallBoolTaskFuncWhenFinish(this Task task, Func<Task<bool>> func) 95private static async Task<bool> _CallBoolTaskFuncWhenFinish(this Task task, Func<Task<bool>> func) 101public static Task<bool> ContinueBoolTaskFuncWhenFalse(this Task<bool> task, Func<Task<bool>> func) 116private static async Task<bool> _ContinueBoolTaskFuncWhenFalse(Task<bool> task, Func<Task<bool>> func)
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\XmlBinaryReaderAsync.cs (14)
22public override Task<string> GetValueAsync() 27public override Task<bool> ReadAsync() 32public override Task<object> ReadContentAsObjectAsync() 37public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 42public override Task<XmlNodeType> MoveToContentAsync() 47public override Task<string> ReadContentAsStringAsync() 52public override Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 57public override Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 62public override Task<object> ReadElementContentAsObjectAsync() 67public override Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 72public override Task<string> ReadInnerXmlAsync() 77public override Task<string> ReadOuterXmlAsync() 82public override Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 92public override Task<string> ReadElementContentAsStringAsync()
FrameworkFork\Microsoft.Xml\Xml\Core\ReadContentAsBinaryHelperAsync.cs (9)
17internal async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 73internal async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 129internal async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 185internal async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 261private async Task<bool> InitAsync() 274private async Task<bool> InitOnElementAsync() 302private async Task<int> ReadContentAsBinaryAsync(byte[] buffer, int index, int count) 361private async Task<int> ReadElementContentAsBinaryAsync(byte[] buffer, int index, int count) 386private async Task<bool> MoveToNextContentNodeAsync(bool moveIfOnContentNode)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlAsyncCheckReader.cs (32)
802public override Task<string> GetValueAsync() 805var task = _coreReader.GetValueAsync(); 810public override Task<object> ReadContentAsObjectAsync() 813var task = _coreReader.ReadContentAsObjectAsync(); 818public override Task<string> ReadContentAsStringAsync() 821var task = _coreReader.ReadContentAsStringAsync(); 826public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 829var task = _coreReader.ReadContentAsAsync(returnType, namespaceResolver); 834public override Task<object> ReadElementContentAsObjectAsync() 837var task = _coreReader.ReadElementContentAsObjectAsync(); 842public override Task<string> ReadElementContentAsStringAsync() 845var task = _coreReader.ReadElementContentAsStringAsync(); 850public override Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 853var task = _coreReader.ReadElementContentAsAsync(returnType, namespaceResolver); 858public override Task<bool> ReadAsync() 861var task = _coreReader.ReadAsync(); 874public override Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 877var task = _coreReader.ReadContentAsBase64Async(buffer, index, count); 882public override Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 885var task = _coreReader.ReadElementContentAsBase64Async(buffer, index, count); 890public override Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 893var task = _coreReader.ReadContentAsBinHexAsync(buffer, index, count); 898public override Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 901var task = _coreReader.ReadElementContentAsBinHexAsync(buffer, index, count); 906public override Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 909var task = _coreReader.ReadValueChunkAsync(buffer, index, count); 914public override Task<XmlNodeType> MoveToContentAsync() 917var task = _coreReader.MoveToContentAsync(); 922public override Task<string> ReadInnerXmlAsync() 925var task = _coreReader.ReadInnerXmlAsync(); 930public override Task<string> ReadOuterXmlAsync() 933var task = _coreReader.ReadOuterXmlAsync();
FrameworkFork\Microsoft.Xml\Xml\Core\XmlCharCheckingReaderAsync.cs (5)
23public override async Task<bool> ReadAsync() 221public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 264public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 307public override async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 368public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlReaderAsync.cs (19)
28public virtual Task<string> GetValueAsync() 35public virtual async Task<object> ReadContentAsObjectAsync() 46public virtual Task<string> ReadContentAsStringAsync() 57public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 87public virtual async Task<object> ReadElementContentAsObjectAsync() 99public virtual async Task<string> ReadElementContentAsStringAsync() 111public virtual async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 125public virtual Task<bool> ReadAsync() 141public virtual Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 147public virtual Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 153public virtual Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 159public virtual Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 166public virtual Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 174public virtual async Task<XmlNodeType> MoveToContentAsync() 196public virtual async Task<string> ReadInnerXmlAsync() 283public virtual async Task<string> ReadOuterXmlAsync() 322private async Task<bool> SkipSubtreeAsync() 346internal async Task<string> InternalReadContentAsStringAsync() 397private async Task<bool> SetupReadElementContentAsXxxAsync(string methodName)
FrameworkFork\Microsoft.Xml\Xml\Core\XmlSubtreeReaderAsync.cs (13)
21public override Task<string> GetValueAsync() 33public override async Task<bool> ReadAsync() 188public override async Task<object> ReadContentAsObjectAsync() 204public override async Task<string> ReadContentAsStringAsync() 220public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 236public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 315public override async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 372public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 451public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 507public override Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 558private async Task<bool> InitReadElementContentAsBinaryAsync(State binaryState) 589private async Task<bool> FinishReadElementContentAsBinaryAsync() 623private async Task<bool> FinishReadContentAsBinaryAsync()
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWrappingReaderAsync.cs (2)
20public override Task<string> GetValueAsync() 25public override Task<bool> ReadAsync()
FrameworkFork\Microsoft.Xml\Xml\Core\XsdCachingReaderAsync.cs (2)
24public override Task<string> GetValueAsync() 37public override async Task<bool> ReadAsync()
FrameworkFork\Microsoft.Xml\Xml\Core\XsdValidatingReaderAsync.cs (26)
26public override Task<string> GetValueAsync() 35public override Task<object> ReadContentAsObjectAsync() 45public override async Task<string> ReadContentAsStringAsync() 78public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 123public override async Task<object> ReadElementContentAsObjectAsync() 135public override async Task<string> ReadElementContentAsStringAsync() 173public override async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 219private Task<bool> ReadAsync_Read(Task<bool> task) 243private async Task<bool> _ReadAsync_Read(Task<bool> task) 261private Task<bool> ReadAsync_ReadAhead(Task task) 274private async Task<bool> _ReadAsync_ReadAhead(Task task) 282public override Task<bool> ReadAsync() 287Task<bool> readTask = _coreReader.ReadAsync(); 373public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 399public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 425public override async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 451public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 649private Task<object> InternalReadContentAsObjectAsync() 654private async Task<object> InternalReadContentAsObjectAsync(bool unwrapTypedValue) 661private async Task<Tuple<string, object>> InternalReadContentAsObjectTupleAsync(bool unwrapTypedValue) 732private Task<Tuple<XmlSchemaType, object>> InternalReadElementContentAsObjectAsync() 737private async Task<Tuple<XmlSchemaType, object>> InternalReadElementContentAsObjectAsync(bool unwrapTypedValue) 744private async Task<Tuple<XmlSchemaType, string, object>> InternalReadElementContentAsObjectTupleAsync(bool unwrapTypedValue) 820private async Task<object> ReadTillEndElementAsync()
FrameworkFork\Microsoft.Xml\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
19public override Task<Object> GetEntityAsync(Uri absoluteUri,
FrameworkFork\Microsoft.Xml\Xml\schema\ParserAsync.cs (1)
18public async Task<SchemaType> ParseAsync(XmlReader reader, string targetNamespace)
FrameworkFork\Microsoft.Xml\Xml\XmlResolverAsync.cs (1)
14public virtual Task<Object> GetEntityAsync(Uri absoluteUri,
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (1)
534private async Task<string> StartElementAsync(string prefix, string localName, string ns, XmlDictionaryString xNs)
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlStreamNodeWriter.cs (1)
111protected async Task<BytesWithOffset> GetBufferAsync(int count)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TaskHelpers.cs (6)
33public static Task<TResult> ToApm<TResult>(this Task<TResult> task, AsyncCallback callback, object state) 135Task<TResult> task = iar as Task<TResult>; 153public static async Task<bool> AwaitWithTimeout(this Task task, TimeSpan timeout) 188public static TResult WaitForCompletion<TResult>(this Task<TResult> task)
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (6)
39public async Task<CancellationToken> GetCancellationTokenAsync() 247private static readonly ConcurrentDictionary<long, Task<CancellationToken>> s_tokenCache = 248new ConcurrentDictionary<long, Task<CancellationToken>>(); 253Task<CancellationToken> ignored; 269public static Task<CancellationToken> FromTimeoutAsync(int millisecondsTimeout) 298Task<CancellationToken> tokenTask;
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\KerberosSecurityTokenProvider.cs (1)
68protected override Task<SecurityToken> GetTokenCoreAsync(CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\SecurityTokenProvider.cs (4)
26public async Task<SecurityToken> GetTokenAsync(CancellationToken cancellationToken) 36public async Task<SecurityToken> RenewTokenAsync(CancellationToken cancellationToken, SecurityToken tokenToBeRenewed) 60protected abstract Task<SecurityToken> GetTokenCoreAsync(CancellationToken cancellationToken); 62protected virtual Task<SecurityToken> RenewTokenCoreAsync(CancellationToken cancellationToken, SecurityToken tokenToBeRenewed)
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\UserNameSecurityTokenProvider.cs (1)
26protected override Task<SecurityToken> GetTokenCoreAsync(CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\IdentityModel\Selectors\X509SecurityTokenProvider.cs (1)
63protected override async Task<SecurityToken> GetTokenCoreAsync(CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedConnection.cs (1)
301public async Task<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\BufferedWriteStream.cs (1)
225public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketFactory.cs (1)
23public abstract Task<WebSocket> CreateWebSocketAsync(Uri address, WebHeaderCollection headers, ICredentials credentials, WebSocketTransportSettings settings, TimeoutHelper timeoutHelper);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ClientWebSocketTransportDuplexSessionChannel.cs (1)
190private async Task<WebSocket> CreateWebSocketWithFactoryAsync(X509Certificate2 certificate, TimeoutHelper timeoutHelper)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\Connection.cs (10)
39Task<IConnection> ConnectAsync(Uri uri, TimeSpan timeout); 378public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 448private Action<Task<int>, object> _onRead; 450private Task<int> _readResult; 464_onRead = new Action<Task<int>, object>(OnRead); 675Task<int> localTask = _stream.ReadAsync(AsyncReadBuffer, offset, size); 696Task<int> localResult = _readResult; 714private void OnRead(Task<int> antecedant, object state) 828internal static async Task<int> ReadAsync(this IConnection connection, int offset, int size, TimeSpan timeout) 846internal static async Task<int> ReadAsync(this IConnection connection, byte[] buffer, int offset, int size, TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ConnectionPoolHelper.cs (2)
45protected abstract Task<IConnection> AcceptPooledConnectionAsync(IConnection connection, ref TimeoutHelper timeoutHelper); 53public async Task<IConnection> EstablishConnectionAsync(TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrClientWebSocketFactory.cs (1)
16public override async Task<WebSocket> CreateWebSocketAsync(Uri address, WebHeaderCollection headers, ICredentials credentials,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\CoreClrSocketConnection.cs (1)
938protected override async Task<IConnection> CreateConnectionAsync(IPAddress address, int port)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\DelegatingStream.cs (1)
146public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\DetectEofStream.cs (1)
25public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, Threading.CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\DnsCache.cs (2)
75public static async Task<IPAddress[]> ResolveAsync(Uri uri) 166internal static async Task<IPAddress[]> LookupHostName(string hostName)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\FramingChannels.cs (3)
241private async Task<IConnection> SendPreambleAsync(IConnection connection, ArraySegment<byte> preamble, TimeSpan timeout) 436protected override Task<IConnection> AcceptPooledConnectionAsync(IConnection connection, ref TimeoutHelper timeoutHelper) 559public static async Task<bool> InitiateUpgradeAsync(StreamUpgradeInitiator upgradeInitiator, OutWrapper<IConnection> connectionWrapper,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelFactory.cs (5)
229internal async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, SecurityTokenProviderContainer tokenProvider, 816internal virtual Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper) 821protected async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, SecurityTokenContainer clientCertificateToken, TimeoutHelper timeoutHelper) 931var cancelTokenTask = _timeoutHelper.GetCancellationTokenAsync(); 1004public async Task<Message> ReceiveReplyAsync(TimeoutHelper timeoutHelper)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpChannelHelpers.cs (3)
51public static Task<NetworkCredential> GetCredentialAsync(AuthenticationSchemes authenticationScheme, SecurityTokenProviderContainer credentialProvider, 68private static async Task<NetworkCredential> GetCredentialCoreAsync(AuthenticationSchemes authenticationScheme, 241public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpResponseMessageHelper.cs (12)
36internal async Task<Message> ParseIncomingResponse() 127private async Task<bool> ValidateContentTypeAsync() 166private Task<Message> ReadStreamAsMessageAsync() 169Task<Stream> contentStreamTask = GetStreamAsync(); 182private async Task<Message> ReadChunkedBufferedMessageAsync(Task<Stream> inputStreamTask) 195private async Task<Message> ReadBufferedMessageAsync(Task<Stream> inputStreamTask) 231private async Task<Message> ReadStreamedMessageAsync(Task<Stream> inputStreamTask) 258private async Task<Message> DecodeBufferedMessageAsync(ArraySegment<byte> buffer, Stream inputStream) 289private async Task<Stream> GetStreamAsync()
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\HttpsChannelFactory.cs (1)
316internal override async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IMessageSource.cs (2)
12Task<Message> ReceiveAsync(TimeSpan timeout); 15Task<bool> WaitForMessageAsync(TimeSpan timeout);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\IRequestChannel.cs (2)
25Task<Message> RequestAsync(Message message); 26Task<Message> RequestAsync(Message message, TimeSpan timeout);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MaxMessageSizeStream.cs (1)
24public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageContent.cs (2)
177protected override Task<Stream> CreateContentReadStreamAsync() 215protected override Task<Stream> CreateContentReadStreamAsync()
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\MessageEncoder.cs (5)
37public virtual Task<Message> ReadMessageAsync(Stream stream, int maxSizeOfHeaders, string contentType) 42public virtual Task<Message> ReadMessageAsync(ArraySegment<byte> buffer, BufferManager bufferManager, string contentType) 58internal async Task<ArraySegment<byte>> BufferMessageStreamAsync(Stream stream, BufferManager bufferManager, int maxBufferSize) 93internal virtual async Task<Message> ReadMessageAsync(Stream stream, BufferManager bufferManager, int maxBufferSize, string contentType) 130public virtual Task<ArraySegment<byte>> WriteMessageAsync(Message message, int maxMessageSize,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\ProducerConsumerStream.cs (1)
51public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\RequestChannel.cs (4)
245public Task<Message> RequestAsync(Message message) 250private async Task<Message> RequestAsyncInternal(Message message, TimeSpan timeout) 256public async Task<Message> RequestAsync(Message message, TimeSpan timeout) 333Task<Message> ReceiveReplyAsync(TimeoutHelper timeoutHelper);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SessionConnectionReader.cs (2)
102public async Task<Message> ReceiveAsync(TimeSpan timeout) 242public async Task<bool> WaitForMessageAsync(TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SocketConnection.cs (3)
433protected abstract Task<IConnection> CreateConnectionAsync(IPAddress address, int port); 482private static async Task<IPAddress[]> GetIPAddressesAsync(Uri uri) 587public async Task<IConnection> ConnectAsync(Uri uri, TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
580protected override async Task<Stream> OnInitiateUpgradeAsync(Stream stream, OutWrapper<SecurityMessageProperty> remoteSecurityWrapper)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (2)
79internal override async Task<Stream> InitiateUpgradeAsync(Stream stream) 121protected abstract Task<Stream> OnInitiateUpgradeAsync(Stream stream, OutWrapper<SecurityMessageProperty> remoteSecurity);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\StreamUpgradeInitiator.cs (1)
21internal abstract Task<Stream> InitiateUpgradeAsync(Stream stream);
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SynchronizedMessageSource.cs (2)
23public async Task<bool> WaitForMessageAsync(TimeSpan timeout) 72public async Task<Message> ReceiveAsync(TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TextMessageEncoder.cs (1)
471public override Task<ArraySegment<byte>> WriteMessageAsync(Message message, int maxMessageSize, BufferManager bufferManager, int messageOffset)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TimeoutStream.cs (2)
46public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 56private async Task<int> ReadAsyncInternal(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (2)
120public async Task<Message> ReceiveAsync(TimeSpan timeout) 209public async Task<bool> WaitForMessageAsync(TimeSpan timeout)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportSecurityHelpers.cs (5)
24public static async Task<NetworkCredential> GetSspiCredentialAsync(SecurityTokenProviderContainer tokenProvider, 38public static async Task<NetworkCredential> GetSspiCredentialAsync(SspiSecurityTokenProvider tokenProvider, 87public static async Task<NetworkCredential> GetSspiCredentialAsync(SspiSecurityTokenProvider tokenProvider, 227private static async Task<T> GetTokenAsync<T>(SecurityTokenProvider tokenProvider, CancellationToken cancellationToken) 239public static async Task<NetworkCredential> GetUserNameCredentialAsync(SecurityTokenProviderContainer tokenProvider, CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (6)
516public async Task<Message> ReceiveAsync(TimeSpan timeout) 674public async Task<bool> WaitForMessageAsync(TimeSpan timeout) 1017public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 1048private async Task<int> ReadAsyncCore(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 1205var cancelTokenTask = timeoutHelper.GetCancellationTokenAsync(); 1271Task<WebSocketReceiveResult> receiveTask =
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (1)
391protected override Task<Stream> OnInitiateUpgradeAsync(Stream stream, OutWrapper<SecurityMessageProperty> remoteSecurity)
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\MetadataExchangeClient.cs (5)
273public Task<MetadataSet> GetMetadataAsync() 283public Task<MetadataSet> GetMetadataAsync(Uri address, MetadataExchangeClientMode mode) 294public Task<MetadataSet> GetMetadataAsync(EndpointAddress address) 304public Task<MetadataSet> GetMetadataAsync(EndpointAddress address, Uri via) 763Task<WebResponse> task = request.GetResponseAsync();
FrameworkFork\System.ServiceModel\System\ServiceModel\Description\ServiceReflector.cs (1)
351internal static readonly Type taskTResultType = typeof(Task<>);
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\DispatchRuntime.cs (1)
363public Task<object> InvokeAsync(object instance, object[] inputs, out object[] outputs)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (3)
63var task = result as Task<Tuple<object, object[]>>; 74private Task<Tuple<object, object[]>> InvokeAsync(object instance, object[] inputs)
FrameworkFork\System.ServiceModel\System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (3)
71var invokeTask = result as Task<Tuple<object, object[]>>; 129private async Task<Tuple<object, object[]>> InvokeAsync(object instance, object[] inputs)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (2)
272internal Task<SecurityToken> GetTokenAsync(CancellationToken cancellationToken, ChannelBinding channelbinding) 278protected override Task<SecurityToken> GetTokenCoreAsync(CancellationToken cancellationToken)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SspiSecurityTokenProvider.cs (1)
34protected override Task<SecurityToken> GetTokenCoreAsync(CancellationToken cancellationToken)
Metadata\MetadaExchangeResolver.cs (4)
86public async Task<IEnumerable<MetadataSection>> ResolveMetadataAsync(CancellationToken cancellationToken) 171private async Task<bool> ResolveMetadataAsync(Uri serviceUri, MetadataExchangeClientMode metadataExchangeMode, bool captureException, CancellationToken cancellationToken) 222private async Task<bool> ResolveMetadataAsync(Stream stream, string baseUri, CancellationToken cancellationToken) 238public async Task<Stream> DownloadMetadataFileAsync(CancellationToken cancellationToken)
Metadata\MetadataDocumentLoader.cs (2)
371private async Task<string> LoadAsSchemaImportLocationAsync(string schemaLocation, string baseUrl, string basePath, string specNamespace, string fileExtension, CancellationToken cancellationToken) 563private async Task<Stream> DownloadSchemaImportAsync(Uri schemaUri, CancellationToken cancellationToken)
Metadata\MetadataDocumentSaver.cs (2)
49public static async Task<SaveResult> SaveMetadataAsync(string directoryPath, IEnumerable<MetadataSection> documents, CancellationToken cancellationToken) 54public static async Task<SaveResult> SaveMetadataAsync(string directoryPath, IEnumerable<MetadataSection> documents, MetadataFileNamingConvention namingConvention, bool overwrite, CancellationToken cancellationToken)
Metadata\ServiceDescriptor.cs (4)
123var xmlReader = await (Task<System.Xml.XmlReader>)methodInfo.Invoke(typeInstance, new object[] { MetadataUrl }); 228public async Task<MetadataDocumentSaver.SaveResult> SaveMetadataAsync(string directoryPath, CancellationToken cancellationToken) 233public async Task<MetadataDocumentSaver.SaveResult> SaveMetadataAsync(string directoryPath, MetadataFileNamingConvention fileNamingConvention, bool overwrite, CancellationToken cancellationToken) 288private async Task<WsdlImporter> CreateWsdlImporterAsync(bool useMessageFormat, CancellationToken cancellationToken)
Shared\MSBuildProj.cs (12)
145public static async Task<MSBuildProj> FromPathAsync(string filePath, ILogger logger, CancellationToken cancellationToken) 152internal static async Task<MSBuildProj> FromPathAsync(string filePath, ILogger logger, string tfMoniker, CancellationToken cancellationToken) 159public static async Task<MSBuildProj> ParseAsync(string projectText, string projectFullPath, ILogger logger, CancellationToken cancellationToken, string tfMoniker = "") 374public static async Task<MSBuildProj> DotNetNewAsync(string fullPath, ILogger logger, CancellationToken cancellationToken, string optional = "") 711public async Task<ProcessRunner.ProcessResult> RestoreAsync(ILogger logger, CancellationToken cancellationToken) 731public async Task<ProcessRunner.ProcessResult> BuildAsync(bool restore, ILogger logger, CancellationToken cancellationToken) 740public async Task<ProcessRunner.ProcessResult> BuildAsync(ILogger logger, CancellationToken cancellationToken) 750public async Task<IEnumerable<ProjectDependency>> ResolveProjectReferencesAsync(IEnumerable<ProjectDependency> excludeDependencies, ILogger logger, CancellationToken cancellationToken) 783private async Task<List<ProjectDependency>> ResolvePackageReferencesAsync(ILogger logger, CancellationToken cancellationToken) 861private async Task<List<ProjectDependency>> ResolveAssemblyReferencesAsync(ILogger logger, CancellationToken cancellationToken) 949public async Task<IEnumerable<KeyValuePair<string, string>>> ResolveProperyValuesAsync(IEnumerable<string> propertyNames, ILogger logger, CancellationToken cancellationToken) 988private async Task<string> ResolveDepsFilePathFromBuildConfigAsync(string outputPath, ILogger logger, CancellationToken cancellationToken)
Shared\ProjectPropertyResolver.cs (4)
23public async Task<Dictionary<string, string>> EvaluateProjectPropertiesAsync(string projectPath, string targetFramework, IEnumerable<string> propertyNames, IDictionary<string, string> globalProperties, ILogger logger, CancellationToken cancellationToken) 117public static async Task<string> GetSdkVersionAsync(string workingDirectory, ILogger logger, CancellationToken cancellationToken) 137public static async Task<string> GetSdkPathAsync(string workingDirectory, ILogger logger, CancellationToken cancellationToken) 171private async Task<Assembly> LoadMSBuildAssembliesAsync(string sdkPath, ILogger logger, CancellationToken cancellationToken)
Shared\Utilities\AsyncHelper.cs (4)
38public static async Task<T> RunAsync<T>(Func<T> func, CancellationToken cancellationToken) 43public static async Task<T> RunAsync<T>(Func<T> func, Action onCancellation, CancellationToken cancellationToken) 45Task<T> finishedTask = null; 50finishedTask = await Task.WhenAny(Task<T>.Run(func, cancellationToken), taskCompletionSrc.Task);
Shared\Utilities\ILogger.cs (1)
17Task<DateTime> WriteStartOperationAsync(string message, bool logToUI = false);
Shared\Utilities\PathHelper.cs (4)
203public static async Task<string> TryCopyFileIfFoundAsync(string fileName, string workingDirectory, string destinationDir, ILogger logger, CancellationToken cancellationToken) 228public static async Task<string> TryFindFileAsync(string fileName, string workingDir, ILogger logger, CancellationToken cancellationToken) 233public static async Task<string> TryFindFolderAsync(string folderName, string workingDir, ILogger logger, CancellationToken cancellationToken) 238private static async Task<string> TryFindItemAsync(Func<string, IEnumerable<string>> EnumerateItems, string itemName, string workingDir, ILogger logger, CancellationToken cancellationToken)
Shared\Utilities\ProcessRunner.cs (5)
33public static async Task<ProcessResult> RunAsync(string processName, string processArgs, string currentDir, ILogger logger, CancellationToken cancellationToken) 38public static async Task<ProcessResult> RunAsync(string processName, string processArgs, string currentDir, bool redirectOutput, ILogger logger, CancellationToken cancellationToken) 43public static async Task<ProcessResult> TryRunAsync(string processName, string processArgs, string currentDir, ILogger logger, CancellationToken cancellationToken) 47public static async Task<ProcessResult> RunAsync(string processName, string processArgs, string currentDir, bool redirectOutput, bool throwOnError, ILogger logger, CancellationToken cancellationToken) 53public static async Task<ProcessResult> RunAsync(string processName, string processArgs, string currentDir, bool redirectOutput, bool throwOnError, IDictionary<string, string> environmentVariables, ILogger logger, CancellationToken cancellationToken)
Shared\Utilities\RuntimeEnvironmentHelper.cs (1)
69public static async Task<bool> TryAddSvcutilNuGetFeedAsync(string nugetConfigPath, string packageFeed, ILogger logger, CancellationToken cancellationToken)
Shared\Utilities\SafeLogger.cs (2)
34public static async Task<SafeLogger> WriteStartOperationAsync(ILogger logger, string message, bool logToUI = false) 69public Task<DateTime> WriteStartOperationAsync(string message, bool logToUI = false)
Tool.cs (4)
76internal static async Task<int> MainAsync(string[] args, ILogger logger, CancellationToken cancellationToken) 198internal static async Task<ToolExitCode> RunAsync(CommandProcessorOptions options, CancellationToken cancellationToken) 271private static async Task<bool> AddProjectReferencesAsync(MSBuildProj project, CommandProcessorOptions options, CancellationToken cancellationToken) 330private static async Task<int> ProcessExceptionAsync(Exception ex, CommandProcessorOptions options)
dotnet-svcutil-lib.Tests (1)
TestLogger.cs (1)
47public Task<DateTime> WriteStartOperationAsync(string message, bool logToUI = false)
dotnet-user-jwts (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-user-secrets (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
DynamicSchemes (2)
Controllers\AuthController.cs (1)
31public async Task<IActionResult> AddOrUpdate(string scheme, string optionsMessage)
SimpleAuthHandler.cs (1)
20protected override Task<AuthenticateResult> HandleAuthenticateAsync()
FilesWebSite (2)
Controllers\UploadFilesController.cs (1)
12public async Task<object> Post(User user)
Models\User.cs (1)
12public async Task<string> ReadBiography()
FormatterWebSite (6)
Controllers\AsyncEnumerableController.cs (1)
17public async Task<IAsyncEnumerable<Project>> GetAllProjectsAsTask()
Controllers\DataContractSerializerController.cs (2)
36public Task<Person> GetTaskOfPerson(string name) 44public Task<object> GetTaskOfPersonAsObject(string name)
Controllers\XmlSerializerController.cs (2)
49public Task<DummyClass> GetTaskOfDummyClass() 55public Task<object> GetTaskOfDummyClassAsObject()
StringInputFormatter.cs (1)
20public override async Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding effectiveEncoding)
GenerateDocumentationAndConfigFiles (15)
Program.cs (4)
60public static Task<int> Main(string[] args) 263private static async Task<int> HandleAsync(CommandLineArgs args, CancellationToken cancellationToken) 839async Task<bool> checkHelpLinkAsync(string helpLink) 864async Task<bool> createGlobalConfigFilesAsync()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
GenerateDocumentationAndConfigFilesForBrokenRuntime (1)
Program.cs (1)
11public static Task<int> Main(string[] args)
GenerateRulesMissingDocumentation (1)
Program.cs (1)
104async Task<bool> checkHelpLinkAsync(string helpLink)
GetDocument.Insider (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
HealthChecksSample (3)
DbConnectionHealthCheck.cs (1)
33public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default(CancellationToken))
GCInfoHealthCheck.cs (1)
49public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default(CancellationToken))
SlowDependencyHealthCheck.cs (1)
21public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default(CancellationToken))
HelixTestRunner (4)
ProcessUtil.cs (1)
71public static async Task<ProcessResult> RunAsync(
TestRunner.cs (3)
121public async Task<bool> InstallDotnetToolsAsync() 198public async Task<bool> CheckTestDiscoveryAsync() 223public async Task<int> RunTestsAsync()
HostedBlazorWebassemblyApp.Client (1)
Data\HttpWeatherForecastService.cs (1)
23public async Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
HostedBlazorWebassemblyApp.Server (2)
Controllers\WeatherForecastController.cs (1)
26public Task<WeatherForecast[]> Get()
Data\WeatherForecastService.cs (1)
19public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
HostedBlazorWebassemblyApp.Shared (1)
IWeatherForecastService.cs (1)
14Task<WeatherForecast[]> GetForecastAsync(DateTime startDate);
http2cat (7)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
HttpStress (2)
Program.cs (2)
218Task<HttpResponseMessage> t = ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token); 306Task<HttpResponseMessage> t = ctx.HttpClient.SendAsync(req, HttpCompletionOption.ResponseHeadersRead, cts.Token);
IdeBenchmarks (3)
InheritanceMargin\BenchmarksHelpers.cs (1)
18public static async Task<ImmutableArray<InheritanceMarginItem>> GenerateInheritanceMarginItemsAsync(
RegexClassifierBenchmarks.cs (2)
69protected Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, TextSpan span, ParseOptions parseOptions) 78protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, TextSpan span)
IdeCoreBenchmarks (2)
ClassificationBenchmarks.cs (1)
85protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, TextSpan span)
NavigateToBenchmarks.cs (1)
226private async Task<int> SearchAsync(Solution solution, IGrouping<INavigateToSearchService, Project> grouping, ImmutableArray<Document> priorityDocuments)
Identity.DefaultUI.WebSite (32)
Pages\Contoso\Login.cshtml.cs (1)
46public async Task<IActionResult> OnPostAsync()
Services\ContosoAuthenticationHandler.cs (1)
22protected override Task<AuthenticateResult> HandleAuthenticateAsync() =>
src\Identity\test\InMemory.Test\InMemoryUserStore.cs (30)
33public Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 80public Task<string> GetEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 85public Task<string> GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 96public Task<bool> GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 107public Task<TUser> FindByEmailAsync(string email, CancellationToken cancellationToken = default(CancellationToken)) 114public Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 125public Task<int> IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 137public Task<int> GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 142public Task<bool> GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 188public Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 195public Task<TUser> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) 205public Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 210public Task<string> GetUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 221public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 227public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 233public Task<TUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 246public Task<TUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 253public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 269public Task<string> GetPasswordHashAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 274public Task<bool> HasPasswordAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 285public Task<string> GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 290public Task<bool> GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 307public Task<string> GetSecurityStampAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 318public Task<bool> GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 323public Task<string> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 334public Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 383public Task<string> GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken) 402public Task<string> GetAuthenticatorKeyAsync(TUser user, CancellationToken cancellationToken) 413public async Task<bool> RedeemCodeAsync(TUser user, string code, CancellationToken cancellationToken) 426public async Task<int> CountCodesAsync(TUser user, CancellationToken cancellationToken)
Identity.ExternalClaims (31)
Controllers\AccountController.cs (1)
29public async Task<IActionResult> Logout()
Pages\Account\ConfirmEmail.cshtml.cs (1)
24public async Task<IActionResult> OnGetAsync(string userId, string code)
Pages\Account\ExternalLogin.cshtml.cs (2)
63public async Task<IActionResult> OnGetCallbackAsync(string returnUrl = null, string remoteError = null) 109public async Task<IActionResult> OnPostConfirmationAsync(string returnUrl = null)
Pages\Account\ForgotPassword.cshtml.cs (1)
37public async Task<IActionResult> OnPostAsync()
Pages\Account\Login.cshtml.cs (1)
68public async Task<IActionResult> OnPostAsync(string returnUrl = null)
Pages\Account\LoginWith2fa.cshtml.cs (2)
47public async Task<IActionResult> OnGetAsync(bool rememberMe, string returnUrl = null) 63public async Task<IActionResult> OnPostAsync(bool rememberMe, string returnUrl = null)
Pages\Account\LoginWithRecoveryCode.cshtml.cs (2)
42public async Task<IActionResult> OnGetAsync(string returnUrl = null) 56public async Task<IActionResult> OnPostAsync(string returnUrl = null)
Pages\Account\Manage\ChangePassword.cshtml.cs (2)
58public async Task<IActionResult> OnGetAsync() 75public async Task<IActionResult> OnPostAsync()
Pages\Account\Manage\Disable2fa.cshtml.cs (2)
29public async Task<IActionResult> OnGet() 45public async Task<IActionResult> OnPostAsync()
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (2)
55public async Task<IActionResult> OnGetAsync() 73public async Task<IActionResult> OnPostAsync()
Pages\Account\Manage\ExternalLogins.cshtml.cs (4)
38public async Task<IActionResult> OnGetAsync() 54public async Task<IActionResult> OnPostRemoveLoginAsync(string loginProvider, string providerKey) 73public async Task<IActionResult> OnPostLinkLoginAsync(string provider) 84public async Task<IActionResult> OnGetLinkLoginCallbackAsync()
Pages\Account\Manage\GenerateRecoveryCodes.cshtml.cs (1)
31public async Task<IActionResult> OnGetAsync()
Pages\Account\Manage\Index.cshtml.cs (3)
55public async Task<IActionResult> OnGetAsync() 76public async Task<IActionResult> OnPostAsync() 110public async Task<IActionResult> OnPostSendVerificationEmailAsync()
Pages\Account\Manage\ResetAuthenticator.cshtml.cs (2)
28public async Task<IActionResult> OnGet() 39public async Task<IActionResult> OnPostAsync()
Pages\Account\Manage\SetPassword.cshtml.cs (2)
49public async Task<IActionResult> OnGetAsync() 67public async Task<IActionResult> OnPostAsync()
Pages\Account\Manage\TwoFactorAuthentication.cshtml.cs (1)
39public async Task<IActionResult> OnGet()
Pages\Account\Register.cshtml.cs (1)
66public async Task<IActionResult> OnPostAsync(string returnUrl = null)
Pages\Account\ResetPassword.cshtml.cs (1)
63public async Task<IActionResult> OnPostAsync()
IdentitySample.DefaultUI (4)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (2)
50public async Task<IActionResult> OnGetAsync() 69public async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
76public async Task<IActionResult> OnPostAsync(string returnUrl = null)
Startup.cs (1)
13public Task<bool> IsConfirmedAsync(UserManager<ApplicationUser> manager, ApplicationUser user)
IdentitySample.Mvc (32)
Controllers\AccountController.cs (17)
53public async Task<IActionResult> Login(LoginViewModel model, string returnUrl = null) 101public async Task<IActionResult> Register(RegisterViewModel model, string returnUrl = null) 131public async Task<IActionResult> LogOff() 155public async Task<IActionResult> ExternalLoginCallback(string returnUrl = null, string remoteError = null) 201public async Task<IActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl = null) 237public async Task<IActionResult> ConfirmEmail(string userId, string code) 266public async Task<IActionResult> ForgotPassword(ForgotPasswordViewModel model) 313public async Task<IActionResult> ResetPassword(ResetPasswordViewModel model) 347public async Task<ActionResult> SendCode(string returnUrl = null, bool rememberMe = false) 364public async Task<IActionResult> SendCode(SendCodeViewModel model) 406public async Task<IActionResult> VerifyCode(string provider, bool rememberMe, string returnUrl = null) 422public async Task<IActionResult> VerifyCode(VerifyCodeViewModel model) 453public async Task<IActionResult> VerifyAuthenticatorCode(bool rememberMe, string returnUrl = null) 469public async Task<IActionResult> VerifyAuthenticatorCode(VerifyAuthenticatorCodeViewModel model) 500public async Task<IActionResult> UseRecoveryCode(string returnUrl = null) 516public async Task<IActionResult> UseRecoveryCode(UseRecoveryCodeViewModel model) 545private Task<ApplicationUser> GetCurrentUserAsync()
Controllers\ManageController.cs (15)
39public async Task<IActionResult> Index(ManageMessageId? message = null) 67public async Task<IActionResult> RemoveLogin(RemoveLoginViewModel account) 94public async Task<IActionResult> AddPhoneNumber(AddPhoneNumberViewModel model) 111public async Task<IActionResult> ResetAuthenticatorKey() 126public async Task<IActionResult> GenerateRecoveryCode() 142public async Task<IActionResult> EnableTwoFactorAuthentication() 158public async Task<IActionResult> DisableTwoFactorAuthentication() 173public async Task<IActionResult> VerifyPhoneNumber(string phoneNumber) 184public async Task<IActionResult> VerifyPhoneNumber(VerifyPhoneNumberViewModel model) 209public async Task<IActionResult> RemovePhoneNumber() 236public async Task<IActionResult> ChangePassword(ChangePasswordViewModel model) 270public async Task<IActionResult> SetPassword(SetPasswordViewModel model) 294public async Task<IActionResult> ManageLogins(ManageMessageId? message = null) 332public async Task<ActionResult> LinkLoginCallback() 371private Task<ApplicationUser> GetCurrentUserAsync()
IIS.Common.TestLib (7)
TestConnections.cs (7)
77public async Task<int> ReadCharAsync() 83public async Task<string> ReadLineAsync() 99public async Task<Memory<byte>> ReceiveChunk() 123public async Task<Memory<byte>> Receive(int length) 131var task = _stream.ReadAsync(actual, offset, actual.Length - offset); 166var task = _stream.ReadAsync(actual, offset, 1); 190public async Task<string[]> ReceiveHeaders(params string[] lines)
IIS.FunctionalTests (22)
Http2TrailersResetTests.cs (1)
513private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
118private async Task<IISDeploymentResult> SetupFrebApp(IISDeploymentParameters parameters = null)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
389private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
62private static async Task<EventLogEntry[]> AssertEntryAsync(string regexString, IISDeploymentResult deploymentResult, bool allowMultiple = false)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (3)
33protected virtual async Task<IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) 39protected virtual async Task<IISDeploymentResult> StartAsync(IISDeploymentParameters parameters) 46protected virtual async Task<string> GetStringAsync(IISDeploymentParameters parameters, string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (3)
105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
30public async Task<IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) 57public async Task<IISDeploymentResult> AssertStarts(HostingModel hostingModel)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
23public override Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (1)
85private async Task<(int Status, string Body)> SendSocketRequestAsync(string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
792private async Task<(int Status, string Body)> SendSocketRequestAsync(string path)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
IIS.LongTests (18)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
62private static async Task<EventLogEntry[]> AssertEntryAsync(string regexString, IISDeploymentResult deploymentResult, bool allowMultiple = false)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (3)
33protected virtual async Task<IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) 39protected virtual async Task<IISDeploymentResult> StartAsync(IISDeploymentParameters parameters) 46protected virtual async Task<string> GetStringAsync(IISDeploymentParameters parameters, string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (3)
105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
30public async Task<IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) 57public async Task<IISDeploymentResult> AssertStarts(HostingModel hostingModel)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
23public override Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
IIS.NewHandler.FunctionalTests (18)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
62private static async Task<EventLogEntry[]> AssertEntryAsync(string regexString, IISDeploymentResult deploymentResult, bool allowMultiple = false)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (3)
33protected virtual async Task<IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) 39protected virtual async Task<IISDeploymentResult> StartAsync(IISDeploymentParameters parameters) 46protected virtual async Task<string> GetStringAsync(IISDeploymentParameters parameters, string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (3)
105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
30public async Task<IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) 57public async Task<IISDeploymentResult> AssertStarts(HostingModel hostingModel)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
23public override Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
IIS.NewShim.FunctionalTests (18)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
62private static async Task<EventLogEntry[]> AssertEntryAsync(string regexString, IISDeploymentResult deploymentResult, bool allowMultiple = false)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (3)
33protected virtual async Task<IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) 39protected virtual async Task<IISDeploymentResult> StartAsync(IISDeploymentParameters parameters) 46protected virtual async Task<string> GetStringAsync(IISDeploymentParameters parameters, string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (3)
105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
30public async Task<IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) 57public async Task<IISDeploymentResult> AssertStarts(HostingModel hostingModel)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
23public override Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
IIS.ShadowCopy.Tests (12)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
62private static async Task<EventLogEntry[]> AssertEntryAsync(string regexString, IISDeploymentResult deploymentResult, bool allowMultiple = false)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (3)
33protected virtual async Task<IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) 39protected virtual async Task<IISDeploymentResult> StartAsync(IISDeploymentParameters parameters) 46protected virtual async Task<string> GetStringAsync(IISDeploymentParameters parameters, string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (3)
105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
30public async Task<IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) 57public async Task<IISDeploymentResult> AssertStarts(HostingModel hostingModel)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
23public override Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
IIS.Tests (4)
Utilities\TestServer.cs (4)
70public static async Task<TestServer> Create(Action<IApplicationBuilder> appBuilder, ILoggerFactory loggerFactory, IISServerOptions options, bool isHttps = false) 81public static Task<TestServer> Create(RequestDelegate app, ILoggerFactory loggerFactory) 86public static Task<TestServer> Create(RequestDelegate app, ILoggerFactory loggerFactory, IISServerOptions options) 91public static Task<TestServer> CreateHttps(RequestDelegate app, ILoggerFactory loggerFactory)
IISExpress.FunctionalTests (24)
OutOfProcess\MultipleAppTests.cs (2)
45var requestTasks = new List<Task<HttpResponseMessage>>(); 52foreach (var requestTask in requestTasks)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
118private async Task<IISDeploymentResult> SetupFrebApp(IISDeploymentParameters parameters = null)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
389private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\EventLogHelpers.cs (1)
62private static async Task<EventLogEntry[]> AssertEntryAsync(string regexString, IISDeploymentResult deploymentResult, bool allowMultiple = false)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\FunctionalTestsBase.cs (3)
33protected virtual async Task<IISDeploymentResult> DeployAsync(IISDeploymentParameters parameters) 39protected virtual async Task<IISDeploymentResult> StartAsync(IISDeploymentParameters parameters) 46protected virtual async Task<string> GetStringAsync(IISDeploymentParameters parameters, string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (3)
105public static Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, bool> predicate) 110public static async Task<HttpResponseMessage> RetryRequestAsync(this HttpClient client, string uri, Func<HttpResponseMessage, Task<bool>> predicate)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\IISFunctionalTestBase.cs (2)
30public async Task<IISDeploymentResult> DeployApp(HostingModel hostingModel = HostingModel.InProcess) 57public async Task<IISDeploymentResult> AssertStarts(HostingModel hostingModel)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\PublishedApplicationPublisher.cs (1)
23public override Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestPathBaseTests.cs (1)
85private async Task<(int Status, string Body)> SendSocketRequestAsync(string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
792private async Task<(int Status, string Body)> SendSocketRequestAsync(string path)
src\Servers\IIS\IIS\test\Common.LongTests\StartupTests.cs (1)
1491private async Task<HttpResponseMessage> DeployAppWithStartupFailure(IISDeploymentParameters deploymentParameters)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
ILLink.CodeFixProvider (2)
BaseAttributeCodeFixProvider.cs (1)
53 private async Task<Document> AddAttributeAsync (
DynamicallyAccessedMembersCodeFixProvider.cs (1)
120 private static async Task<Document> AddAttributeAsync (
ILLink.RoslynAnalyzer (1)
CompilationExtensions.cs (1)
168 => compilation.GetTypeByMetadataName (typeof (Task<>).FullName!);
Infrastructure.Common (3)
ServiceUtilHelper.cs (2)
155public static async Task<X509Certificate2> GetServiceMacineCertFromServerAsync() 575public static async Task<byte[]> GetResourceFromServiceAsByteArrayAsync(string resource)
xunit\WcfTestCase.cs (1)
47public override async Task<RunSummary> RunAsync(
InMemory.FunctionalTests (36)
ConnectionMiddlewareTests.cs (1)
444public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Http2\Http2StreamTests.cs (5)
3005var dataTask = ExpectAsync(Http2FrameType.DATA, 3251var readTask = context.Request.Body.ReadAsync(new byte[100], 0, 100).DefaultTimeout(); 3294var readTask = context.Request.Body.ReadAsync(new byte[100], 0, 100).DefaultTimeout(); 3429var thrownExTask = Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Request.Body.ReadAsync(buffer, 0, buffer.Length)); 3454var thrownExTask = Assert.ThrowsAnyAsync<OperationCanceledException>(() => context.Request.Body.ReadAsync(buffer, 0, buffer.Length));
Http2\Http2TestBase.cs (8)
344var stalledReadTask = context.Request.Body.ReadAsync(buffer, 0, buffer.Length); 867internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, Http2HeadersEnumerator headersEnumerator) 883internal Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 937internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, Http2HeadersEnumerator headersEnumerator) 965internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 1210internal async Task<byte[]> ReadAllAsync() 1226internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = uint.MaxValue) 1266internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
Http2\TlsTests.cs (1)
103private async Task<Http2Frame> ReceiveFrameAsync(PipeReader reader)
Http3\Http3ConnectionTests.cs (1)
811private async Task<ConnectionContext> MakeRequestAsync(int index, KeyValuePair<string, string>[] headers, bool sendData, bool waitForServerDispose)
Http3\Http3TestBase.cs (1)
86var stalledReadTask = context.Request.Body.ReadAsync(buffer, 0, buffer.Length);
RequestBodyTimeoutTests.cs (2)
58var readTask = context.Request.Body.ReadAsync(new byte[1], 0, 1); 168var readTask = context.Request.Body.ReadAsync(new byte[1], 0, 1);
RequestTests.cs (2)
135var task = context.Request.Body.ReadAsync(data, 0, data.Length, cts.Token); 1163static async Task<ReadResult> ReadAtLeastAsync(PipeReader reader, int numBytes)
ResponseTests.cs (1)
161var writeTask = context.Response.BodyWriter.WriteAsync(new Memory<byte>(data, 0, data.Length), cts.Token).AsTask().DefaultTimeout();
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
535protected Task<ReadResult> ReadApplicationInputAsync()
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
104var task = _reader.ReadAsync(actual, offset, actual.Length - offset);
src\Servers\Kestrel\shared\test\StreamExtensions.cs (4)
15public static async Task<int> FillBufferUntilEndAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 34public static async Task<int> FillEntireBufferAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 49public static async Task<byte[]> ReadAtLeastLengthAsync(this Stream stream, int length, int bufferLength = 1024, bool allowEmpty = false, CancellationToken cancellationToken = default) 76public static async Task<byte[]> ReadUntilEndAsync(this Stream stream, int bufferLength = 1024, CancellationToken cancellationToken = default)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
39public Task<LogMessage> WaitForMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
34public Task<LogMessage> WaitForLogMessage(Func<LogMessage, bool> messageFilter)
TestTransport\InMemoryHttpClientSlim.cs (6)
29public async Task<string> GetStringAsync(string requestUri, bool validateCertificate = true) 32public async Task<string> GetStringAsync(Uri requestUri, bool validateCertificate = true) 68public async Task<string> PostAsync(string requestUri, HttpContent content, bool validateCertificate = true) 71public async Task<string> PostAsync(Uri requestUri, HttpContent content, bool validateCertificate = true) 91private static async Task<string> ReadResponse(Stream stream) 120private static async Task<Stream> GetStream(Stream rawStream, Uri requestUri, bool validateCertificate)
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.WebSockets.cs (1)
142private static async Task<WebSocket> Upgrade(HttpContext context)
IntegrationTestsWebsite (15)
artifacts\obj\IntegrationTestsWebsite\Release\net10.0\Protos\GreetGrpc.cs (14)
189public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHello(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 195public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloPost(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 201public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloComplex(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 207public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloPostEnum(global::IntegrationTestsWebsite.EnumHelloRequest request, grpc::ServerCallContext context) 213public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloComplexCatchAll1(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 219public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloComplexCatchAll2(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 225public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloComplexCatchAll3(global::IntegrationTestsWebsite.ComplextHelloRequest request, grpc::ServerCallContext context) 231public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloComplexCatchAll4(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 237public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloCustomVerbOne(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 243public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloCustomVerbTwo(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 249public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloCatchAllCustomVerbOne(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 255public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloCatchAllCustomVerbTwo(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 261public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloPostCustomVerbOne(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context) 267public virtual global::System.Threading.Tasks.Task<global::IntegrationTestsWebsite.HelloReply> SayHelloPostCustomVerbTwo(global::IntegrationTestsWebsite.HelloRequest request, grpc::ServerCallContext context)
Services\GreeterService.cs (1)
16public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
InteractiveHost.UnitTests (5)
AbstractInteractiveHostTests.cs (5)
132public async Task<bool> LoadReference(string reference) 137public async Task<bool> Execute(string code) 143public Task<string> ReadErrorOutputToEnd() 162public async Task<string> ReadOutputToEnd(bool isError = false) 212public async Task<string> GetHostRuntimeDirectoryAsync()
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
18private static async Task<int> Main(string[] args)
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
18private static async Task<int> Main(string[] args)
Interop.FunctionalTests (45)
Http2\Http2RequestTests.cs (2)
269var longRunningTask = StartLongRunningRequestAsync(logger, host, client); 290private static async Task<(byte[], HttpResponseHeaders)> StartLongRunningRequestAsync(ILogger logger, IHost host, HttpMessageInvoker client)
Http2WebSocketInteropTests.cs (1)
197protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Http3\Http3RequestTests.cs (19)
60public Task<Stream> GetStreamAsync() 300var responseTask = client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 370static async Task<HttpResponseMessage> SendRequestAsync(HttpProtocols protocol, IHost host, HttpMessageInvoker client) 380var responseTask = client.SendAsync(request, CancellationToken.None).DefaultTimeout(); 424var responseTask = client.SendAsync(request, CancellationToken.None); 495var responseTask = client.SendAsync(request, cts.Token); 566var sendTask = client.SendAsync(request, CancellationToken.None); 625var sendTask = client.SendAsync(request, CancellationToken.None); 734var responseTask = client.SendAsync(request, cts.Token); 781var connectionRequestTasks = new List<Task<int>>(); 797static async Task<int> RunConnection(string address) 1020var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1117var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1263var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1781var responseTask1 = client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/1"), CancellationToken.None); 1890var responseTask = client.SendAsync(request1, CancellationToken.None); 2010var readTask = context.Request.Body.ReadUntilEndAsync(); 2045var responseTask = client.SendAsync(request, CancellationToken.None); 2145var responseTask = client.SendAsync(request, CancellationToken.None);
Http3\Http3TlsTests.cs (1)
198var sendTask = client.SendAsync(request, CancellationToken.None);
HttpClientHttp2InteropTests.cs (18)
299var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 376var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 792var requestTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).DefaultTimeout(); 823var readTask = context.Request.Body.ReadAsync(new byte[11], 0, 11); 844var requestTask = client.SendAsync(request); 870var readTask = context.Request.Body.ReadAsync(new byte[11], 0, 11); 889var requestTask = client.SendAsync(request); 932var requestTask = client.GetAsync(url, requestCancellation.Token); 1063var requestTask = client.SendAsync(request); 1172var requestTask = client.SendAsync(request); 1226var tasks = new List<Task<HttpResponseMessage>>(10); 1229var requestTask = client.GetAsync(url).DefaultTimeout(); 1287var tasks = new List<Task<HttpResponseMessage>>(10); 1290var requestTask = client.PostAsync(url, new StringContent("Hello World")).DefaultTimeout(); 1433var requestTask = client.PostAsync(url, streamingContent); 1481var requestTask = client.GetStreamAsync(url); 1518var requestTask0 = client.PostAsync(url, streamingContent0); 1519var requestTask1 = client.PostAsync(url, streamingContent1);
src\Servers\Kestrel\shared\test\StreamExtensions.cs (4)
15public static async Task<int> FillBufferUntilEndAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 34public static async Task<int> FillEntireBufferAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 49public static async Task<byte[]> ReadAtLeastLengthAsync(this Stream stream, int length, int bufferLength = 1024, bool allowEmpty = false, CancellationToken cancellationToken = default) 76public static async Task<byte[]> ReadUntilEndAsync(this Stream stream, int bufferLength = 1024, CancellationToken cancellationToken = default)
InteropClient (4)
Assert.cs (1)
62public static async Task<TException> ThrowsAsync<TException>(Func<Task> action) where TException : Exception
AsyncStreamExtensions.cs (1)
43public static async Task<List<T>> ToListAsync<T>(this IAsyncStreamReader<T> streamReader)
InteropClient.cs (2)
143private async Task<IChannelWrapper> HttpClientCreateChannel() 180private async Task<ChannelCredentials> CreateCredentialsAsync(bool? useTestCaOverride = null)
InteropWebsite (11)
artifacts\obj\InteropWebsite\Release\net10.0\TestGrpc.cs (8)
166public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> EmptyCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) 178public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> UnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) 192public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.SimpleResponse> CacheableUnaryCall(global::Grpc.Testing.SimpleRequest request, grpc::ServerCallContext context) 219public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.StreamingInputCallResponse> StreamingInputCall(grpc::IAsyncStreamReader<global::Grpc.Testing.StreamingInputCallRequest> requestStream, grpc::ServerCallContext context) 263public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) 373public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> UnimplementedCall(global::Grpc.Testing.Empty request, grpc::ServerCallContext context) 474public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.Empty> Start(global::Grpc.Testing.ReconnectParams request, grpc::ServerCallContext context) 480public virtual global::System.Threading.Tasks.Task<global::Grpc.Testing.ReconnectInfo> Stop(global::Grpc.Testing.Empty request, grpc::ServerCallContext context)
TestServiceImpl.cs (3)
28public override Task<Empty> EmptyCall(Empty request, ServerCallContext context) 33public override async Task<SimpleResponse> UnaryCall(SimpleRequest request, ServerCallContext context) 59public override async Task<StreamingInputCallResponse> StreamingInputCall(IAsyncStreamReader<StreamingInputCallRequest> requestStream, ServerCallContext context)
JwtClientSample (3)
Program.cs (3)
24private readonly ConcurrentDictionary<string, Task<string>> _tokens = new ConcurrentDictionary<string, Task<string>>(StringComparer.Ordinal); 82private static async Task<string> GetJwtToken(string userId)
Kestrel.SampleApp (1)
ClientCertBufferingFeature.cs (1)
57public async Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken)
Keycloak.Web (2)
AuthorizationHandler.cs (1)
8protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
WeatherApiClient.cs (1)
5public async Task<WeatherForecast[]> GetWeatherAsync(int maxItems = 10, CancellationToken cancellationToken = default)
Metrics (26)
Program.cs (3)
41private static async Task<ErrorCode> RunAsync(string[] args, CancellationToken cancellationToken) 222async Task<ErrorCode> writeOutputAsync() 264private static async Task<(ImmutableArray<(string, CodeAnalysisMetricData)>, ErrorCode)> GetMetricDatasAsync(List<string> projectsOrSolutions, bool quiet, CancellationToken cancellationToken)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
Metrics.Legacy (26)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Tools\Metrics\Program.cs (3)
41private static async Task<ErrorCode> RunAsync(string[] args, CancellationToken cancellationToken) 222async Task<ErrorCode> writeOutputAsync() 264private static async Task<(ImmutableArray<(string, CodeAnalysisMetricData)>, ErrorCode)> GetMetricDatasAsync(List<string> projectsOrSolutions, bool quiet, CancellationToken cancellationToken)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
Microsoft.Analyzers.Extra (10)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (9)
39internal Func<Document, CancellationToken, Task<SyntaxNode?>> GetSyntaxRootAsync = (d, t) => d.GetSyntaxRootAsync(t); 40internal Func<Document, CancellationToken, Task<SemanticModel?>> GetSemanticModelAsync = (d, t) => d.GetSemanticModelAsync(t); 70internal async Task<(ExpressionSyntax? invocationExpression, FixDetails? details)> 132internal async Task<(string methodName, bool existing)> GetFinalTargetMethodNameAsync( 263private static async Task<(Solution solution, ClassDeclarationSyntax declarationSyntax, Document document)> 320private static async Task<(Document document, ExpressionSyntax expressionSyntax)> 463private static async Task<Solution> RewriteLoggingCallAsync( 535private async Task<Solution> ApplyFixAsync(Document invocationDoc, ExpressionSyntax invocationExpression, FixDetails details, CancellationToken cancellationToken) 569private async Task<Solution> InsertLoggingMethodSignatureAsync(
MakeExeTypesInternalFixer.cs (1)
37private static async Task<Document> MakeInternalAsync(Document document, SyntaxNode decl, CancellationToken cancellationToken)
Microsoft.Analyzers.Extra.Tests (10)
Resources\RoslynTestUtils.cs (10)
174public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 203public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 234public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 286public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 404public static async Task<(IReadOnlyList<string> results, string title)> RunAnalyzerAndFixAllCodeAction( 492private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 504private static async Task<Document> RecreateDocumentAsync(Document document) 522public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 527public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 533public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Microsoft.Analyzers.Local.Tests (11)
InternalReferencedInPublicDocAnalyzerTests.cs (1)
484private static async Task<IReadOnlyList<Diagnostic>> Analyze(string source)
Resources\RoslynTestUtils.cs (10)
174public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 203public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 234public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 287public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 405public static async Task<(IReadOnlyList<string> results, string title)> RunAnalyzerAndFixAllCodeAction( 493private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 505private static async Task<Document> RecreateDocumentAsync(Document document) 523public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 528public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 534public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Microsoft.Arcade.Common (14)
ArcadeHttpMessageHandler.cs (2)
15public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request) => SendAsync(request, CancellationToken.None); 17protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
ExponentialRetry.cs (4)
34public Task<bool> RunAsync(Func<int, Task<bool>> actionSuccessfulAsync) 39public async Task<bool> RunAsync( 40Func<int, Task<bool>> actionSuccessfulAsync,
Helpers.cs (2)
61public T MutexExec<T>(Func<Task<T>> function, string mutexName) => 71public T DirectoryMutexExec<T>(Func<Task<T>> function, string path) =>
IHelpers.cs (2)
14T MutexExec<T>(Func<Task<T>> function, string mutexName); 18T DirectoryMutexExec<T>(Func<Task<T>> function, string path);
IRetryHandler.cs (4)
12Task<bool> RunAsync( 13Func<int, Task<bool>> actionSuccessfulAsync); 15Task<bool> RunAsync( 16Func<int, Task<bool>> actionSuccessfulAsync,
Microsoft.Arcade.Test.Common (2)
FakeHttpClient.cs (2)
41protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 72protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Analyzer.Testing (6)
CodeFixRunner.cs (2)
22public async Task<string> ApplyCodeFixAsync( 61private static async Task<Solution> ApplyFixAsync(CodeAction codeAction)
DiagnosticAnalyzerRunner.cs (2)
31protected Task<Diagnostic[]> GetDiagnosticsAsync( 53protected async Task<Diagnostic[]> GetDiagnosticsAsync(
DiagnosticVerifier.cs (2)
58protected Task<Diagnostic[]> GetDiagnosticsAsync(string[] sources, DiagnosticAnalyzer analyzer, string[] additionalEnabledDiagnostics) 71protected async Task<Diagnostic[]> GetDiagnosticsAsync(Document[] documents, DiagnosticAnalyzer analyzer, string[] additionalEnabledDiagnostics)
Microsoft.AspNetCore.Analyzers (1)
CompilationFeatureDetector.cs (1)
16public static async Task<IImmutableSet<string>> DetectFeaturesAsync(
Microsoft.AspNetCore.Antiforgery (5)
IAntiforgery.cs (2)
45/// A <see cref="Task{Boolean}"/> that, when completed, returns <c>true</c> if the request uses a safe HTTP 48Task<bool> IsRequestValidAsync(HttpContext httpContext);
Internal\DefaultAntiforgery.cs (1)
88public async Task<bool> IsRequestValidAsync(HttpContext httpContext)
Internal\DefaultAntiforgeryTokenStore.cs (1)
36public async Task<AntiforgeryTokenSet> GetRequestTokensAsync(HttpContext httpContext)
Internal\IAntiforgeryTokenStore.cs (1)
17Task<AntiforgeryTokenSet> GetRequestTokensAsync(HttpContext httpContext);
Microsoft.AspNetCore.App.Analyzers (4)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (2)
66public override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 77public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (2)
60public override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 71public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Microsoft.AspNetCore.App.Analyzers.Test (13)
Dependencies\AddPackageTests.cs (1)
72internal override Task<CodeAction> TryCreateCodeActionAsync(
Dependencies\ExtensionMethodsCompletionProviderTests.cs (1)
158private Task<CompletionResult> GetCompletionsAndServiceAsync(string source, CompletionTrigger? completionTrigger = null)
RouteEmbeddedLanguage\FrameworkParametersCompletionProviderTests.cs (1)
1094private Task<CompletionResult> GetCompletionsAndServiceAsync(string source, CompletionTrigger? completionTrigger = null)
RouteEmbeddedLanguage\Infrastructure\CompletionTestHelpers.cs (1)
10public static async Task<CompletionResult> GetCompletionsAndServiceAsync(TestDiagnosticAnalyzerRunner runner, string source, CompletionTrigger? completionTrigger = null)
RouteEmbeddedLanguage\RoutePatternCompletionProviderTests.cs (1)
709private Task<CompletionResult> GetCompletionsAndServiceAsync(string source, CompletionTrigger? completionTrigger = null)
TestDiagnosticAnalyzer.cs (8)
29public async Task<ClassifiedSpan[]> GetClassificationSpansAsync(TextSpan textSpan, params string[] sources) 39public Task<CompletionResult> GetCompletionsAndServiceAsync(int caretPosition, params string[] sources) 46public async Task<CompletionResult> GetCompletionsAndServiceAsync(int caretPosition, CompletionTrigger completionTrigger, params string[] sources) 68private async Task<(SyntaxToken token, SemanticModel model)> TryGetStringSyntaxTokenAtPositionAsync(int caretPosition, params string[] sources) 90public async Task<AspNetCoreBraceMatchingResult?> GetBraceMatchesAsync(int caretPosition, params string[] sources) 98public async Task<List<AspNetCoreHighlightSpan>> GetHighlightingAsync(int caretPosition, params string[] sources) 107public Task<Diagnostic[]> GetDiagnosticsAsync(params string[] sources) 166public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
Microsoft.AspNetCore.App.CodeFixes (8)
Authorization\AddAuthorizationBuilderFixer.cs (1)
134private static Task<Document> ReplaceWithAddAuthorizationBuilder(Diagnostic diagnostic, SyntaxNode root, Document document, InvocationExpressionSyntax invocation)
Dependencies\AddPackageFixer.cs (1)
112internal virtual async Task<CodeAction?> TryCreateCodeActionAsync(
DetectMismatchedParameterOptionalityFixer.cs (1)
37private static async Task<Document> FixMismatchedParameterOptionalityAsync(Diagnostic diagnostic, Document document, CancellationToken cancellationToken)
Http\HeaderDictionaryAddFixer.cs (2)
68private static Task<Document> ReplaceWithAppend(Diagnostic diagnostic, WellKnownTypes wellKnownTypes, SyntaxNode root, Document document, InvocationExpressionSyntax invocation) 99private static Task<Document> ReplaceWithIndexer(Diagnostic diagnostic, SyntaxNode root, Document document, AssignmentExpressionSyntax assignment)
Http\HeaderDictionaryIndexerFixer.cs (1)
42private static async Task<Document> FixHeaderDictionaryIndexer(Diagnostic diagnostic, Document document, string resolvedPropertyName, CancellationToken cancellationToken)
RouteParameterUnusedParameterFixer.cs (1)
58private static Task<Document> AddRouteParameterAsync(Diagnostic diagnostic, SyntaxNode root, RouteUsageCache routeUsageCache, Document document, CancellationToken cancellationToken)
WebApplicationBuilderFixer.cs (1)
77private static Task<Document> FixWebApplicationBuilderAsync(Diagnostic diagnostic, SyntaxNode root, Document document, InvocationExpressionSyntax invocation)
Microsoft.AspNetCore.Authentication (13)
AuthenticationHandler.cs (6)
18private Task<AuthenticateResult>? _authenticateTask; 183protected virtual Task<object> CreateEventsAsync() => Task.FromResult(new object()); 215public async Task<AuthenticateResult> AuthenticateAsync() 248protected Task<AuthenticateResult> HandleAuthenticateOnceAsync() 263protected async Task<AuthenticateResult> HandleAuthenticateOnceSafeAsync() 279protected abstract Task<AuthenticateResult> HandleAuthenticateAsync();
PolicySchemeHandler.cs (1)
53protected override Task<AuthenticateResult> HandleAuthenticateAsync()
RemoteAuthenticationHandler.cs (6)
61protected override Task<object> CreateEventsAsync() 68public virtual Task<bool> ShouldHandleRequestAsync() 75public virtual async Task<bool> HandleRequestAsync() 189protected abstract Task<HandleRequestResult> HandleRemoteAuthenticateAsync(); 192protected override async Task<AuthenticateResult> HandleAuthenticateAsync() 287protected virtual async Task<HandleRequestResult> HandleAccessDeniedErrorAsync(AuthenticationProperties properties)
Microsoft.AspNetCore.Authentication.Abstractions (19)
AuthenticationHttpContextExtensions.cs (4)
22public static Task<AuthenticateResult> AuthenticateAsync(this HttpContext context) => 31public static Task<AuthenticateResult> AuthenticateAsync(this HttpContext context, string? scheme) => 202public static Task<string?> GetTokenAsync(this HttpContext context, string? scheme, string tokenName) => 212public static Task<string?> GetTokenAsync(this HttpContext context, string tokenName) =>
IAuthenticationHandler.cs (1)
24Task<AuthenticateResult> AuthenticateAsync();
IAuthenticationHandlerProvider.cs (1)
19Task<IAuthenticationHandler?> GetHandlerAsync(HttpContext context, string authenticationScheme);
IAuthenticationRequestHandler.cs (1)
20Task<bool> HandleRequestAsync();
IAuthenticationSchemeProvider.cs (8)
17Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync(); 24Task<AuthenticationScheme?> GetSchemeAsync(string name); 32Task<AuthenticationScheme?> GetDefaultAuthenticateSchemeAsync(); 40Task<AuthenticationScheme?> GetDefaultChallengeSchemeAsync(); 48Task<AuthenticationScheme?> GetDefaultForbidSchemeAsync(); 56Task<AuthenticationScheme?> GetDefaultSignInSchemeAsync(); 64Task<AuthenticationScheme?> GetDefaultSignOutSchemeAsync(); 100Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync();
IAuthenticationService.cs (1)
20Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string? scheme);
IClaimsTransformation.cs (1)
20Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal);
TokenExtensions.cs (2)
123public static Task<string?> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string tokenName) 134public static async Task<string?> GetTokenAsync(this IAuthenticationService auth, HttpContext context, string? scheme, string tokenName)
Microsoft.AspNetCore.Authentication.BearerToken (1)
BearerTokenHandler.cs (1)
24protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
Microsoft.AspNetCore.Authentication.Certificate (4)
CertificateAuthenticationHandler.cs (4)
40protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new CertificateAuthenticationEvents()); 48protected override async Task<AuthenticateResult> HandleAuthenticateAsync() 104private async Task<CertificateAuthenticationFailedContext> HandleFailureAsync(Exception error) 115private async Task<AuthenticateResult> ValidateCertificateAsync(X509Certificate2 clientCertificate)
Microsoft.AspNetCore.Authentication.Cookies (11)
CookieAuthenticationHandler.cs (5)
33private Task<AuthenticateResult>? _readCookieTask; 80protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new CookieAuthenticationEvents()); 82private Task<AuthenticateResult> EnsureCookieTicket() 150private async Task<AuthenticateResult> ReadCookieTicket() 200protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
ITicketStore.cs (6)
20Task<string> StoreAsync(AuthenticationTicket ticket); 28Task<string> StoreAsync(AuthenticationTicket ticket, CancellationToken cancellationToken) => StoreAsync(ticket); 37Task<string> StoreAsync(AuthenticationTicket ticket, HttpContext httpContext, CancellationToken cancellationToken) => StoreAsync(ticket, cancellationToken); 71Task<AuthenticationTicket?> RetrieveAsync(string key); 79Task<AuthenticationTicket?> RetrieveAsync(string key, CancellationToken cancellationToken) => RetrieveAsync(key); 88Task<AuthenticationTicket?> RetrieveAsync(string key, HttpContext httpContext, CancellationToken cancellationToken) => RetrieveAsync(key, cancellationToken);
Microsoft.AspNetCore.Authentication.Core (22)
AuthenticationHandlerProvider.cs (1)
37public async Task<IAuthenticationHandler?> GetHandlerAsync(HttpContext context, string authenticationScheme)
AuthenticationSchemeProvider.cs (11)
50private static readonly Task<AuthenticationScheme?> _nullScheme = Task.FromResult<AuthenticationScheme?>(null); 51private Task<AuthenticationScheme?> _autoDefaultScheme = _nullScheme; 57private Task<AuthenticationScheme?> GetDefaultSchemeAsync() 68public virtual Task<AuthenticationScheme?> GetDefaultAuthenticateSchemeAsync() 79public virtual Task<AuthenticationScheme?> GetDefaultChallengeSchemeAsync() 90public virtual Task<AuthenticationScheme?> GetDefaultForbidSchemeAsync() 101public virtual Task<AuthenticationScheme?> GetDefaultSignInSchemeAsync() 112public virtual Task<AuthenticationScheme?> GetDefaultSignOutSchemeAsync() 122public virtual Task<AuthenticationScheme?> GetSchemeAsync(string name) 129public virtual Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync() 207public virtual Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync()
AuthenticationService.cs (8)
63public virtual async Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string? scheme) 218private async Task<Exception> CreateMissingHandlerException(string scheme) 234private async Task<string> GetAllSignInSchemeNames() 241private async Task<Exception> CreateMissingSignInHandlerException(string scheme) 258private async Task<Exception> CreateMismatchedSignInHandlerException(string scheme, IAuthenticationHandler handler) 274private async Task<string> GetAllSignOutSchemeNames() 281private async Task<Exception> CreateMissingSignOutHandlerException(string scheme) 297private async Task<Exception> CreateMismatchedSignOutHandlerException(string scheme, IAuthenticationHandler handler)
AuthenticationServiceImpl.cs (1)
19public override async Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string? scheme)
NoopClaimsTransformation.cs (1)
18public virtual Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
Microsoft.AspNetCore.Authentication.Core.Test (10)
AuthenticationSchemeProviderTests.cs (1)
258public Task<AuthenticateResult> AuthenticateAsync()
AuthenticationServiceTests.cs (8)
246public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal) 255public Task<AuthenticateResult> AuthenticateAsync() 282public Task<AuthenticateResult> AuthenticateAsync() 315public Task<AuthenticateResult> AuthenticateAsync() 343public Task<AuthenticateResult> AuthenticateAsync() 358public Task<bool> HandleRequestAsync() 381public Task<AuthenticateResult> AuthenticateAsync() 396public Task<bool> HandleRequestAsync()
TokenExtensionTests.cs (1)
154public Task<AuthenticateResult> AuthenticateAsync()
Microsoft.AspNetCore.Authentication.Facebook (1)
FacebookHandler.cs (1)
40protected override async Task<AuthenticationTicket> CreateTicketAsync(ClaimsIdentity identity, AuthenticationProperties properties, OAuthTokenResponse tokens)
Microsoft.AspNetCore.Authentication.Google (1)
GoogleHandler.cs (1)
41protected override async Task<AuthenticationTicket> CreateTicketAsync(
Microsoft.AspNetCore.Authentication.JwtBearer (3)
JwtBearerHandler.cs (3)
50protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new JwtBearerEvents()); 56protected override async Task<AuthenticateResult> HandleAuthenticateAsync() 239private async Task<TokenValidationParameters> SetupTokenValidationParametersAsync()
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
MicrosoftAccountHandler.cs (1)
41protected override async Task<AuthenticationTicket> CreateTicketAsync(ClaimsIdentity identity, AuthenticationProperties properties, OAuthTokenResponse tokens)
Microsoft.AspNetCore.Authentication.Negotiate (5)
Internal\LdapAdapter.cs (1)
48var searchResponse = (SearchResponse)await Task<DirectoryResponse>.Factory.FromAsync(
NegotiateHandler.cs (4)
61protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new NegotiateEvents()); 69public async Task<bool> HandleRequestAsync() 264private async Task<bool?> InvokeAuthenticateFailedEvent(Exception ex) 292protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
Microsoft.AspNetCore.Authentication.Negotiate.Test (5)
EventTests.cs (2)
409private static async Task<IHost> CreateHostAsync(Action<NegotiateOptions> configureOptions = null) 457private static Task<HttpContext> SendAsync(TestServer server, string path, TestConnection connection, string authorizationHeader = null)
NegotiateHandlerTests.cs (2)
380private static async Task<IHost> CreateHostAsync(Action<NegotiateOptions> configureOptions = null) 480private static Task<HttpContext> SendAsync(TestServer server, string path, TestConnection connection, string authorizationHeader = null, bool http2 = false)
ServerDeferralTests.cs (1)
42private static async Task<IHost> CreateHostAsync(bool supportsAuth = false, bool isEnabled = false, string authScheme = null)
Microsoft.AspNetCore.Authentication.OAuth (4)
OAuthHandler.cs (4)
61protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new OAuthEvents()); 64protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync() 198protected virtual async Task<OAuthTokenResponse> ExchangeCodeAsync(OAuthCodeExchangeContext context) 252protected virtual async Task<AuthenticationTicket> CreateTicketAsync(ClaimsIdentity identity, AuthenticationProperties properties, OAuthTokenResponse tokens)
Microsoft.AspNetCore.Authentication.OpenIdConnect (15)
OpenIdConnectHandler.cs (15)
86protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new OpenIdConnectEvents()); 89public override Task<bool> HandleRequestAsync() 104protected virtual async Task<bool> HandleRemoteSignOutAsync() 312protected virtual async Task<bool> HandleSignOutCallbackAsync() 604private async Task<string> GetPushedAuthorizationRequestUri(HttpResponseMessage parResponseMessage) 629protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync() 983protected virtual async Task<OpenIdConnectMessage> RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest) 1036protected virtual async Task<HandleRequestResult> GetUserInformationAsync( 1204private async Task<MessageReceivedContext> RunMessageReceivedEventAsync(OpenIdConnectMessage message, AuthenticationProperties? properties) 1228private async Task<TokenValidatedContext> RunTokenValidatedEventAsync(OpenIdConnectMessage authorizationResponse, OpenIdConnectMessage? tokenEndpointResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt, string? nonce) 1254private async Task<AuthorizationCodeReceivedContext> RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal? user, AuthenticationProperties properties, JwtSecurityToken? jwt) 1300private async Task<TokenResponseReceivedContext> RunTokenResponseReceivedEventAsync( 1329private async Task<UserInformationReceivedContext> RunUserInformationReceivedEventAsync(ClaimsPrincipal principal, AuthenticationProperties properties, OpenIdConnectMessage message, JsonDocument user) 1355private async Task<AuthenticationFailedContext> RunAuthenticationFailedEventAsync(OpenIdConnectMessage message, Exception exception) 1437private async Task<TokenValidationResult> ValidateTokenUsingHandlerAsync(string idToken, AuthenticationProperties properties, TokenValidationParameters validationParameters)
Microsoft.AspNetCore.Authentication.Test (63)
AuthenticationMiddlewareTests.cs (6)
250public Task<AuthenticateResult> AuthenticateAsync() 265public Task<bool> HandleRequestAsync() 292public Task<AuthenticateResult> AuthenticateAsync() 307public Task<bool> HandleRequestAsync() 333public Task<AuthenticateResult> AuthenticateAsync() 348public Task<bool> HandleRequestAsync()
CertificateTests.cs (1)
787private static async Task<IHost> CreateHost(
CookieTests.cs (6)
156public async Task<string> StoreAsync(AuthenticationTicket ticket) 171public Task<AuthenticationTicket> RetrieveAsync(string key) 1774public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal p) 1793private Task<IHost> CreateHost(Action<CookieAuthenticationOptions> configureOptions, Func<HttpContext, Task> testpath = null, Uri baseAddress = null, bool claimsTransform = false) 1807private static async Task<IHost> CreateHostWithServices(Action<IServiceCollection> configureServices, Func<HttpContext, Task> testpath = null, Uri baseAddress = null) 1903private static async Task<Transaction> SendAsync(TestServer server, string uri, string cookieHeader = null)
DynamicSchemeTests.cs (2)
115protected override Task<AuthenticateResult> HandleAuthenticateAsync() 129private static async Task<IHost> CreateHost(Action<IServiceCollection> configureServices = null)
FacebookTests.cs (2)
455private static async Task<IHost> CreateHost(Action<IApplicationBuilder> configure, Action<IServiceCollection> configureServices, Func<HttpContext, Task<bool>> handler)
GoogleTests.cs (6)
396var sendTask = server.SendAsync("https://example.com/signin-google?error=access_denied&error_description=SoBad&error_uri=foobar&state=protected_state", 514var sendTask = server.SendAsync("https://example.com/signin-google?error=itfailed&error_description=whyitfailed&error_uri=https://example.com/fail&state=protected_state", 622var sendTask = server.SendAsync( 674var sendTask = server.SendAsync( 1132public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal p) 1144private static async Task<IHost> CreateHost(Action<GoogleOptions> configureOptions, Func<HttpContext, Task> testpath = null)
JwtBearerTests.cs (2)
1159private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null) 1248private static async Task<Transaction> SendAsync(TestServer server, string uri, string authorizationHeader = null)
JwtBearerTests_Handler.cs (5)
1115public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1142public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1203public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1226private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null) 1315private static async Task<Transaction> SendAsync(TestServer server, string uri, string authorizationHeader = null)
MicrosoftAccountTests.cs (1)
355private static async Task<IHost> CreateHost(Action<MicrosoftAccountOptions> configureOptions)
OAuthTests.cs (2)
511private static async Task<IHost> CreateHost(Action<IServiceCollection> configureServices, Func<HttpContext, Task<bool>> handler = null)
OpenIdConnect\OpenIdConnectChallengeTests.cs (1)
972protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectEventTests.cs (2)
1308private Task<HttpResponseMessage> PostAsync(TestServer server, string path, string form) 1391protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\OpenIdConnectEventTests_Handler.cs (3)
1306private Task<HttpResponseMessage> PostAsync(TestServer server, string path, string form) 1350public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1386protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
OpenIdConnect\TestServerExtensions.cs (3)
12public static Task<TestTransaction> SendAsync(this TestServer server, string url) 17public static Task<TestTransaction> SendAsync(this TestServer server, string url, string cookieHeader) 22public static async Task<TestTransaction> SendAsync(this TestServer server, HttpRequestMessage request, string cookieHeader)
OpenIdConnect\TestSettings.cs (2)
318protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 332private async Task<HttpResponseMessage> ReturnResource(string resource)
PolicyTests.cs (3)
370public Task<AuthenticateResult> AuthenticateAsync() 420public Task<AuthenticateResult> AuthenticateAsync() 461private static async Task<TestServer> CreateServer(Action<IServiceCollection> configure = null, string defaultScheme = null)
RemoteAuthenticationTests.cs (2)
18private Task<IHost> CreateHost(Action<TOptions> configureOptions, Func<HttpContext, Task> testpath = null, bool isDefault = true) 34protected virtual async Task<IHost> CreateHostWithServices(Action<IServiceCollection> configureServices, Func<HttpContext, Task> testpath = null)
SharedAuthenticationTests.cs (1)
208public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
TestExtensions.cs (1)
18public static async Task<Transaction> SendAsync(this TestServer server, string uri, string cookieHeader = null)
TestHandlers.cs (2)
35protected override Task<AuthenticateResult> HandleAuthenticateAsync() 67public Task<AuthenticateResult> AuthenticateAsync()
TestHttpMessageHandler.cs (1)
12protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken)
TwitterTests.cs (2)
535private static async Task<IHost> CreateHost(Action<TwitterOptions> options, Func<HttpContext, Task<bool>> handler = null)
WsFederation\TestTokenHandler.cs (1)
16public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters)
WsFederation\WsFederationTest.cs (3)
274private async Task<HttpClient> CreateClient(bool allowUnsolicited = false) 421var result = context.AuthenticateAsync(); 450protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
WsFederation\WsFederationTest_Handler.cs (3)
272private async Task<HttpClient> CreateClient(bool allowUnsolicited = false) 417var result = context.AuthenticateAsync(); 446protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Authentication.Twitter (7)
TwitterHandler.cs (7)
55protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new TwitterEvents()); 58protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync() 149protected virtual async Task<AuthenticationTicket> CreateTicketAsync( 183private async Task<HttpResponseMessage> ExecuteRequestAsync(string url, HttpMethod httpMethod, RequestToken? accessToken = null, Dictionary<string, string>? extraOAuthPairs = null, Dictionary<string, string>? queryParameters = null, Dictionary<string, string>? formData = null) 269private async Task<RequestToken> ObtainRequestTokenAsync(string callBackUri, AuthenticationProperties properties) 292private async Task<AccessToken> ObtainAccessTokenAsync(RequestToken token, string verifier) 320private async Task<JsonDocument> RetrieveUserDetailsAsync(AccessToken accessToken)
Microsoft.AspNetCore.Authentication.WsFederation (5)
WsFederationHandler.cs (5)
61protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new WsFederationEvents()); 67public override Task<bool> HandleRequestAsync() 148protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync() 372private async Task<TokenValidationParameters> SetupTokenValidationParametersAsync() 470protected virtual async Task<bool> HandleRemoteSignOutAsync()
Microsoft.AspNetCore.Authorization (33)
AssertionRequirement.cs (2)
19public Func<AuthorizationHandlerContext, Task<bool>> Handler { get; } 36public AssertionRequirement(Func<AuthorizationHandlerContext, Task<bool>> handler)
AuthorizationOptions.cs (6)
16private static readonly Task<AuthorizationPolicy?> _nullPolicyTask = Task.FromResult<AuthorizationPolicy?>(null); 18private Dictionary<string, Task<AuthorizationPolicy?>> PolicyMap { get; } = new Dictionary<string, Task<AuthorizationPolicy?>>(StringComparer.OrdinalIgnoreCase); 86if (PolicyMap.TryGetValue(name, out var value)) 94internal Task<AuthorizationPolicy?> GetPolicyTask(string name) 98if (PolicyMap.TryGetValue(name, out var value))
AuthorizationPolicy.cs (2)
99public static Task<AuthorizationPolicy?> CombineAsync(IAuthorizationPolicyProvider policyProvider, 114public static async Task<AuthorizationPolicy?> CombineAsync(IAuthorizationPolicyProvider policyProvider,
AuthorizationPolicyBuilder.cs (1)
212public AuthorizationPolicyBuilder RequireAssertion(Func<AuthorizationHandlerContext, Task<bool>> handler)
AuthorizationServiceExtensions.cs (4)
27public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement) 46public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy) 64public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy) 82public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, string policyName)
DefaultAuthorizationHandlerProvider.cs (2)
17private readonly Task<IEnumerable<IAuthorizationHandler>> _handlersTask; 31public Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context)
DefaultAuthorizationPolicyProvider.cs (5)
18private Task<AuthorizationPolicy>? _cachedDefaultPolicy; 19private Task<AuthorizationPolicy?>? _cachedFallbackPolicy; 36public Task<AuthorizationPolicy> GetDefaultPolicyAsync() 50public Task<AuthorizationPolicy?> GetFallbackPolicyAsync() 65public virtual Task<AuthorizationPolicy?> GetPolicyAsync(string policyName)
DefaultAuthorizationService.cs (3)
62public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable<IAuthorizationRequirement> requirements) 99public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, string policyName) 106private protected async Task<AuthorizationPolicy> GetPolicyAsync(string policyName)
DefaultAuthorizationServiceImpl.cs (2)
24public override async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable<IAuthorizationRequirement> requirements) 41public override async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, string policyName)
IAuthorizationHandlerProvider.cs (1)
19Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context);
IAuthorizationPolicyProvider.cs (3)
18Task<AuthorizationPolicy?> GetPolicyAsync(string policyName); 24Task<AuthorizationPolicy> GetDefaultPolicyAsync(); 30Task<AuthorizationPolicy?> GetFallbackPolicyAsync();
IAuthorizationService.cs (2)
32Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable<IAuthorizationRequirement> requirements); 52Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, string policyName);
Microsoft.AspNetCore.Authorization.Policy (4)
IPolicyEvaluator.cs (2)
22Task<AuthenticateResult> AuthenticateAsync(AuthorizationPolicy policy, HttpContext context); 37Task<PolicyAuthorizationResult> AuthorizeAsync(AuthorizationPolicy policy, AuthenticateResult authenticationResult, HttpContext context, object? resource);
PolicyEvaluator.cs (2)
34public virtual async Task<AuthenticateResult> AuthenticateAsync(AuthorizationPolicy policy, HttpContext context) 94public virtual async Task<PolicyAuthorizationResult> AuthorizeAsync(AuthorizationPolicy policy, AuthenticateResult authenticationResult, HttpContext context, object? resource)
Microsoft.AspNetCore.Authorization.Test (16)
AuthorizationMiddlewareTests.cs (2)
335public new Task<AuthorizationPolicy> GetFallbackPolicyAsync() 341public override Task<AuthorizationPolicy> GetPolicyAsync(string policyName)
DefaultAuthorizationServiceTests.cs (7)
997public Task<AuthorizationPolicy> GetDefaultPolicyAsync() 1002public Task<AuthorizationPolicy> GetFallbackPolicyAsync() 1007public Task<AuthorizationPolicy> GetPolicyAsync(string policyName) 1036public Task<AuthorizationPolicy> GetDefaultPolicyAsync() 1041public Task<AuthorizationPolicy> GetFallbackPolicyAsync() 1046public Task<AuthorizationPolicy> GetPolicyAsync(string policyName) 1133public Task<IEnumerable<IAuthorizationHandler>> GetHandlersAsync(AuthorizationHandlerContext context)
PolicyEvaluatorTests.cs (6)
171public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable<IAuthorizationRequirement> requirements) 174public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName) 180public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable<IAuthorizationRequirement> requirements) 183public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName) 189public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme) 209public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme)
TestObjects\TestAuthenticationService.cs (1)
20public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme)
Microsoft.AspNetCore.BrowserTesting (9)
BrowserManager.cs (9)
43public static async Task<BrowserManager> CreateAsync(BrowserManagerConfiguration configuration, ILoggerFactory loggerFactory) 85public Task<IBrowserContext> GetBrowserInstance(BrowserKind browserInstance, ContextInformation contextInfo) => 88public Task<IBrowserContext> GetBrowserInstance(string browserInstance, ContextInformation contextInfo) 97public Task<IBrowserContext> GetBrowserInstance(BrowserKind browserInstance, string contextName, ContextInformation contextInfo) => 100public Task<IBrowserContext> GetBrowserInstance(string browserInstance, string contextName, ContextInformation contextInfo) 109public Task<IBrowserContext> GetBrowserInstance(BrowserKind browserInstance, string contextName, BrowserNewContextOptions options, ContextInformation contextInfo) => 112public Task<IBrowserContext> GetBrowserInstance(string browserInstance, string contextName, BrowserNewContextOptions options, ContextInformation contextInfo) 135private async Task<IBrowserContext> AttachContextInfo(Task<IBrowserContext> browserContextTask, ContextInformation contextInfo)
Microsoft.AspNetCore.Components (22)
Dispatcher.cs (5)
72/// <returns>A <see cref="Task{TResult}"/> that will be completed when the function has finished executing.</returns> 73public abstract Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem); 79/// <returns>A <see cref="Task{TResult}"/> that will be completed when the function has finished executing.</returns> 80public abstract Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem);
IPersistentComponentStateStore.cs (1)
15Task<IDictionary<string, byte[]>> GetPersistedStateAsync();
PersistentState\ComponentStatePersistenceManager.cs (8)
114async Task<bool> TryPersistState(IPersistentComponentStateStore store) 179internal Task<bool> TryPauseAsync(IPersistentComponentStateStore store) 181List<Task<bool>>? pendingCallbackTasks = null; 202var result = TryExecuteCallback(registration.Callback, _logger); 226static Task<bool> TryExecuteCallback(Func<Task> callback, ILogger<ComponentStatePersistenceManager> logger) 246static async Task<bool> Awaited(Task task, ILogger<ComponentStatePersistenceManager> logger) 261static async Task<bool> AnyTaskFailed(List<Task<bool>> pendingCallbackTasks)
Rendering\RendererSynchronizationContext.cs (5)
80public Task<TResult> InvokeAsync<TResult>(Func<TResult> function) 83var t = completion.Task; // lazy initialize before passing around the struct 139public Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> asyncFunction) 142var t = completion.Task; // lazy initialize before passing around the struct
Rendering\RendererSynchronizationContextDispatcher.cs (3)
44public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 55public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
Microsoft.AspNetCore.Components.Analyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
50private static Task<Document> GetTransformedDocumentAsync(
Microsoft.AspNetCore.Components.Analyzers.Tests (3)
AnalyzerTestBase.cs (1)
42public Task<Compilation> CreateCompilationAsync(string source)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
19public Task<Diagnostic[]> GetDiagnosticsAsync(string source) 24public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
Microsoft.AspNetCore.Components.Authorization (11)
AuthenticationStateProvider.cs (3)
15public abstract Task<AuthenticationState> GetAuthenticationStateAsync(); 27protected void NotifyAuthenticationStateChanged(Task<AuthenticationState> task) 39public delegate void AuthenticationStateChangedHandler(Task<AuthenticationState> task);
AuthorizeRouteView.cs (2)
15/// Additionally, this component supplies a cascading parameter of type <see cref="Task{AuthenticationState}"/>, 67private Task<AuthenticationState>? ExistingCascadedAuthenticationState { get; set; }
AuthorizeViewCore.cs (2)
44[CascadingParameter] private Task<AuthenticationState>? AuthenticationState { get; set; } 99private async Task<bool> IsAuthorizedAsync(ClaimsPrincipal user)
CascadingAuthenticationStateServiceCollectionExtensions.cs (3)
22return serviceCollection.AddCascadingValue<Task<AuthenticationState>>(services => 29private sealed class AuthenticationStateCascadingValueSource : CascadingValueSource<Task<AuthenticationState>>, IDisposable 43private void HandleAuthenticationStateChanged(Task<AuthenticationState> newAuthStateTask)
IHostEnvironmentAuthenticationStateProvider.cs (1)
18void SetAuthenticationState(Task<AuthenticationState> authenticationStateTask);
Microsoft.AspNetCore.Components.Authorization.Tests (20)
AuthorizeRouteViewTest.cs (5)
293component => Assert.IsType<CascadingValue<Task<AuthenticationState>>>(component), 320component => Assert.IsType<CascadingValue<Task<AuthenticationState>>>(component), 402private readonly Task<AuthenticationState> _authenticationState; 406Task<AuthenticationState> authenticationState, 415builder.OpenComponent<CascadingValue<Task<AuthenticationState>>>(0);
AuthorizeViewTest.cs (4)
523public Task<AuthenticationState> AuthenticationState { get; set; } 533builder.OpenComponent<CascadingValue<Task<AuthenticationState>>>(0); 534builder.AddComponentParameter(1, nameof(CascadingValue<Task<AuthenticationState>>.Value), AuthenticationState); 560public static Task<AuthenticationState> CreateAuthenticationState(string username)
CascadingAuthenticationStateTest.cs (1)
157[CascadingParameter] Task<AuthenticationState> AuthStateTask { get; set; }
TestAsyncAuthorizationService.cs (2)
17public async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable<IAuthorizationRequirement> requirements) 31public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName)
TestAuthenticationStateProvider.cs (3)
8public Task<AuthenticationState> CurrentAuthStateTask { get; set; } 10public override Task<AuthenticationState> GetAuthenticationStateAsync() 15internal void TriggerAuthenticationStateChanged(Task<AuthenticationState> authState)
TestAuthorizationPolicyProvider.cs (3)
12public Task<AuthorizationPolicy> GetDefaultPolicyAsync() 15public Task<AuthorizationPolicy> GetFallbackPolicyAsync() 18public Task<AuthorizationPolicy> GetPolicyAsync(string policyName) => Task.FromResult(
TestAuthorizationService.cs (2)
17public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, IEnumerable<IAuthorizationRequirement> requirements) 28public Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object resource, string policyName)
Microsoft.AspNetCore.Components.Endpoints (10)
DependencyInjection\ServerAuthenticationStateProvider.cs (3)
13private Task<AuthenticationState>? _authenticationStateTask; 16public override Task<AuthenticationState> GetAuthenticationStateAsync() 21public void SetAuthenticationState(Task<AuthenticationState> authenticationStateTask)
RazorComponentEndpointInvoker.cs (1)
177private async Task<RequestValidationState> ValidateRequestAsync(HttpContext context, IAntiforgery? antiforgery)
Rendering\EndpointHtmlRenderer.cs (1)
103Task<AuthenticationState>? authStateTask = null;
Rendering\EndpointHtmlRenderer.PrerenderingState.cs (2)
256public Task<IDictionary<string, byte[]>> GetPersistedStateAsync() => throw new NotImplementedException(); 267public Task<IDictionary<string, byte[]>> GetPersistedStateAsync() => throw new NotImplementedException();
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
37internal async Task<ResourceAssetCollection> GetResourceCollection() 50private async Task<ResourceAssetCollection> LoadResourceCollection()
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
46public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.QuickGrid (2)
IAsyncQueryExecutor.cs (2)
27Task<int> CountAsync<T>(IQueryable<T> queryable); 35Task<T[]> ToArrayAsync<T>(IQueryable<T> queryable);
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
50private static Task<Document> GetTransformedDocumentAsync(
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (3)
AnalyzerTestBase.cs (1)
42public Task<Compilation> CreateCompilationAsync(string source)
ComponentAnalyzerDiagnosticAnalyzerRunner.cs (2)
19public Task<Diagnostic[]> GetDiagnosticsAsync(string source) 24public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
Microsoft.AspNetCore.Components.Server (26)
CircuitDisconnectMiddleware.cs (1)
52private async Task<CircuitId?> GetCircuitIdAsync(HttpContext context)
Circuits\CircuitClientProxy.cs (1)
48public Task<T> InvokeCoreAsync<T>(string method, object[] args, CancellationToken cancellationToken = default)
Circuits\CircuitHost.cs (6)
477internal async Task<bool> ReceiveJSDataChunk(long streamId, long chunkId, byte[] chunk, string error) 500public async Task<int> SendDotNetStreamAsync(DotNetStreamReference dotNetStreamReference, long streamId, byte[] buffer) 520public async Task<DotNetStreamReference> TryClaimPendingStream(long streamId) 648internal async Task<TResult> HandleInboundActivityAsync<TResult>(Func<Task<TResult>> handler) 897internal async Task<bool> SendPersistedStateToClient(string rootComponents, string applicationState, CancellationToken cancellation)
Circuits\CircuitPersistenceManager.cs (3)
66internal async Task<(string rootComponents, string applicationState)> ToProtectedStateAsync(PersistedCircuitState state) 96public async Task<PersistedCircuitState> ResumeCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default) 215Task<IDictionary<string, byte[]>> IPersistentComponentStateStore.GetPersistedStateAsync() => throw new NotImplementedException();
Circuits\CircuitRegistry.cs (1)
172public virtual async Task<CircuitHost> ConnectAsync(CircuitId circuitId, ISingleClientProxy clientProxy, string connectionId, CancellationToken cancellationToken)
Circuits\DefaultInMemoryCircuitPersistenceProvider.cs (2)
19private static readonly Task<PersistedCircuitState> _noMatch = Task.FromResult<PersistedCircuitState>(null); 99public Task<PersistedCircuitState> RestoreCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default)
Circuits\HybridCacheCircuitPersistenceProvider.cs (1)
63public async Task<PersistedCircuitState> RestoreCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default)
Circuits\ICircuitPersistenceProvider.cs (1)
11Task<PersistedCircuitState> RestoreCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default);
Circuits\RemoteJSDataStream.cs (3)
24public static async Task<bool> ReceiveData(RemoteJSRuntime runtime, long streamId, long chunkId, byte[] chunk, string error) 88private async Task<bool> ReceiveData(long chunkId, byte[] chunk, string error) 182public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Circuits\RemoteJSRuntime.cs (1)
226protected override async Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
Circuits\RevalidatingServerAuthenticationStateProvider.cs (2)
57protected abstract Task<bool> ValidateAuthenticationStateAsync(AuthenticationState authenticationState, CancellationToken cancellationToken); 59private async Task RevalidationLoop(Task<AuthenticationState> authenticationStateTask, CancellationToken cancellationToken)
DependencyInjection\ServerRazorComponentsBuilderExtensions.cs (2)
170public Task<WebSocket> AcceptAsync(WebSocketAcceptContext context) 191private async Task<WebSocket> ReturnAwaited(Task result, WebSocketAcceptContext context)
src\Components\Shared\src\ArrayBuilderMemoryStream.cs (1)
51public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
46public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.Server.Tests (23)
Circuits\CircuitPersistenceManagerTest.cs (3)
396private async Task<CircuitHost> CreateCircuitHostAsync( 568public Task<PersistedCircuitState> RestoreCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default) 652Task<IDictionary<string, byte[]>> IPersistentComponentStateStore.GetPersistedStateAsync() =>
Circuits\CircuitRegistryTest.cs (6)
311var connectCore = registry.ConnectAsync(circuitHost.CircuitId, client, newId, default); 364var connectCore = registry.ConnectAsync(circuitHost.CircuitId, client, newId, default); 395var connect = Task.Run(() => registry.ConnectAsync(circuitHost.CircuitId, client, newId, default)); 521var connectTask = Task.Run(async () => 526var connectResultAttempt = registry.ConnectAsync(circuitHost.CircuitId, newClient, newConnectionId, default); 641public Task<PersistedCircuitState> RestoreCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default)
Circuits\RemoteJSDataStreamTest.cs (3)
55var sendDataTask = Task.Run(async () => 83var sendDataTask = Task.Run(async () => 345private static async Task<RemoteJSDataStream> CreateRemoteJSDataStreamAsync(TestRemoteJSRuntime jsRuntime = null)
Circuits\RemoteRendererTest.cs (1)
669private static Task<ComponentMarkerKey> AddWebRootComponentAsync(RemoteRenderer renderer, int ssrComponentId, string componentKey = null)
Circuits\RevalidatingServerAuthenticationStateProviderTest.cs (10)
21var hostAuthStateTask = (new TaskCompletionSource<AuthenticationState>()).Task; 26var hostAuthStateTask2 = (new TaskCompletionSource<AuthenticationState>()).Task; 63var newAuthStateNotificationTcs = new TaskCompletionSource<Task<AuthenticationState>>(); 67var newAuthStateTask = await newAuthStateNotificationTcs.Task; 87var newAuthStateNotificationTcs = new TaskCompletionSource<Task<AuthenticationState>>(); 91var newAuthStateTask = await newAuthStateNotificationTcs.Task; 217static Task<AuthenticationState> CreateAuthenticationStateTask(string username) 238public Task<bool> NextValidationResult { get; set; } 248protected override Task<bool> ValidateAuthenticationStateAsync(AuthenticationState authenticationState, CancellationToken cancellationToken) 251var result = NextValidationResult;
Microsoft.AspNetCore.Components.Tests (44)
NavigationManagerTest.cs (18)
225var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 254var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 280var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 311var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 336var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 367var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 403var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 442var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 484var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 516var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 571var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 573var navigation2 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir2", null, false); 625var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 626var navigation2 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir2", null, false); 634var navigation3 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir3", null, false); 694var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 838var navigation1 = navigationManager.RunNotifyLocationChangingAsync($"{baseUri}/subdir1", null, false); 906public async Task<bool> RunNotifyLocationChangingAsync(string uri, string state, bool isNavigationIntercepted)
PersistentState\ComponentStatePersistenceManagerTest.cs (2)
379public Task<IDictionary<string, byte[]>> GetPersistedStateAsync() 403public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
PersistentState\PersistentServicesRegistryTest.cs (1)
289public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
RendererTest.cs (6)
5713var result = entry.EventAction(); 5723var result = entrySync.EventAction(); 5738var result = entry.EventAction(); 5749var result = entrySync.EventAction(); 5770var result = entrySync.EventAction(); 5800public Func<Task<(int id, EventType @event)>> EventAction { get; set; }
Rendering\RendererSynchronizationContextTest.cs (10)
502var task = context.InvokeAsync(() => 533var task2 = context.InvokeAsync(() => 556var task = context.InvokeAsync<string>((Func<string>)(() => 572var task = context.InvokeAsync<string>((Func<string>)(() => 684var task = context.InvokeAsync(() => 715var task2 = context.InvokeAsync(() => 738var task = context.InvokeAsync<string>((Func<Task<string>>)(() => 754var task = context.InvokeAsync<string>((Func<Task<string>>)(() =>
Routing\RouterTest.cs (6)
79var janTask = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/jan", false)); 80var febTask = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/feb", false)); 119var jan = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/jan", false)); 120var feb = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/feb", false)); 172var jan = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/jan", false)); 173var feb = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/feb", false));
SupplyParameterFromPersistentComponentStateValueProviderTests.cs (1)
676public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.Web (7)
Forms\InputFile\BrowserFileStream.cs (3)
16private readonly Task<Stream> OpenReadStreamTask; 67public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 86private async Task<Stream> OpenReadStreamAsync(CancellationToken cancellationToken)
HtmlRendering\HtmlRenderer.cs (4)
99public Task<HtmlRootComponent> RenderComponentAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TComponent>() where TComponent : IComponent 108public Task<HtmlRootComponent> RenderComponentAsync( 119public Task<HtmlRootComponent> RenderComponentAsync<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] TComponent>( 130public async Task<HtmlRootComponent> RenderComponentAsync(
Microsoft.AspNetCore.Components.Web.Tests (5)
Forms\EditFormTest.cs (1)
214private async Task<EditForm> RenderAndGetTestEditFormComponentAsync(TestEditFormHostComponent hostComponent)
Forms\InputNumberTest.cs (1)
96private async Task<int> RenderAndGetTestInputNumberComponentIdAsync(TestInputHostComponent<int, TestInputNumberComponent> hostComponent)
Forms\InputRadioTest.cs (1)
111private static async Task<IEnumerable<TestInputRadio>> RenderAndGetTestInputComponentAsync(TestInputRadioHostComponent<TestEnum> rootComponent)
Forms\InputRenderer.cs (1)
11public static async Task<TComponent> RenderAndGetComponent<TValue, TComponent>(TestInputHostComponent<TValue, TComponent> hostComponent)
HtmlRendering\HtmlRendererTest.cs (1)
28var resultTask = htmlRenderer.RenderComponentAsync<TestComponent>();
Microsoft.AspNetCore.Components.WebAssembly (18)
Rendering\NullDispatcher.cs (3)
31public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 38public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
Rendering\WebAssemblyDispatcher.cs (4)
51public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 124public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem) 139var state = ((TaskCompletionSource<TResult> tcs, Func<Task<TResult>> workItem))o!;
Services\DefaultWebAssemblyJSRuntime.cs (1)
160protected override Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
Services\InternalJSImportMethods.cs (2)
21public static async Task<RootComponentOperationBatch> GetInitialComponentUpdate() 70private static partial Task<string> GetInitialUpdateCore();
Services\LazyAssemblyLoader.cs (4)
38public Task<IEnumerable<Assembly>> LoadAssembliesAsync(IEnumerable<string> assembliesToLoad) 48private static Task<IEnumerable<Assembly>> LoadAssembliesInServerAsync(IEnumerable<string> assembliesToLoad) 69private static async Task<IEnumerable<Assembly>> LoadAssembliesInClientAsync(IEnumerable<string> assembliesToLoad) 105public static partial Task<bool> LoadLazyAssembly(string assemblyToLoad);
src\Components\Shared\src\PullFromJSDataStream.cs (1)
76public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\Components\Shared\src\ResourceCollectionProvider.cs (2)
37internal async Task<ResourceAssetCollection> GetResourceCollection() 50private async Task<ResourceAssetCollection> LoadResourceCollection()
src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
46public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.WebAssembly.Server (7)
AuthenticationStateSerializer.cs (2)
19private Task<AuthenticationState>? _authenticationStateTask; 43public void SetAuthenticationState(Task<AuthenticationState> authenticationStateTask)
DebugProxyLauncher.cs (3)
18private static Task<string>? LaunchedDebugProxyUrl; 31public static Task<string> EnsureLaunchedAndGetUrl(IServiceProvider serviceProvider, string devToolsHost, bool isFirefox) 56private static async Task<string> LaunchAndGetUrl(IServiceProvider serviceProvider, string devToolsHost, bool isFirefox)
TargetPickerUi.cs (2)
59static async Task<string> ReceiveMessageLoop(TcpClient browserDebugClientConnect, CancellationToken token) 444private async Task<IEnumerable<BrowserTab>> GetOpenedBrowserTabs()
Microsoft.AspNetCore.Components.WebView (4)
Services\WebViewJSRuntime.cs (1)
69protected override Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
src\Components\Shared\src\ArrayBuilderMemoryStream.cs (1)
51public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\Components\Shared\src\PullFromJSDataStream.cs (1)
76public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
WebViewManager.cs (1)
176public async Task<bool> TryDispatchAsync(Action<IServiceProvider> workItem)
Microsoft.AspNetCore.Components.WebView.Maui (7)
BlazorWebView.cs (1)
89 public virtual async Task<bool> TryDispatchAsync(Action<IServiceProvider> workItem)
MauiDispatcher.cs (3)
31 public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 36 public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
src\Core\src\TaskExtensions.cs (2)
12 this Task<TResult> task, 64 public static async void RunAndReport<T>(this TaskCompletionSource<T> request, Task<T> task)
Standard\BlazorWebViewHandler.cs (1)
25 public virtual Task<bool> TryDispatchAsync(Action<IServiceProvider> workItem) => throw new NotSupportedException();
Microsoft.AspNetCore.Components.WebView.Photino (8)
PhotinoDispatcher.cs (3)
44public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 54public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
PhotinoSynchronizationContext.cs (5)
107public Task<TResult> InvokeAsync<TResult>(Func<TResult> function) 131public Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> asyncFunction) 133var completion = new PhotinoSynchronizationTaskCompletionSource<Func<Task<TResult>>, TResult>(asyncFunction); 136var completion = (PhotinoSynchronizationTaskCompletionSource<Func<Task<TResult>>, TResult>)state;
Microsoft.AspNetCore.Components.WebView.WindowsForms (7)
BlazorWebView.cs (1)
301 public virtual async Task<bool> TryDispatchAsync(Action<IServiceProvider> workItem)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (2)
62 private readonly Task<bool> _webviewReadyTask; 201 private async Task<bool> TryInitializeWebView2()
WindowsFormsDispatcher.cs (4)
109 public override async Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 120 return await Task<TResult>.Factory.FromAsync(asyncResult, result => (TResult)_dispatchThreadControl.EndInvoke(result)!); 133 public override async Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
Microsoft.AspNetCore.Components.WebView.Wpf (6)
BlazorWebView.cs (1)
361 public virtual async Task<bool> TryDispatchAsync(Action<IServiceProvider> workItem)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (2)
62 private readonly Task<bool> _webviewReadyTask; 201 private async Task<bool> TryInitializeWebView2()
WpfDispatcher.cs (3)
72 public override async Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 95 public override async Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
Microsoft.AspNetCore.Components.WebViewE2E.Test (1)
BasicBlazorHybridTest.cs (1)
167public async Task<bool> WaitForControlDiv(PhotinoWindow photinoWindow, string controlValueToWaitFor)
Microsoft.AspNetCore.ConcurrencyLimiter.Tests (4)
TaskExtensions.cs (2)
28public static async Task<T> OrThrowIfOtherFails<T>(this Task<T> task, Task otherTask)
TestUtils.cs (2)
72private Func<TestQueue, Task<bool>> _onTryEnter { get; } 78public TestQueue(Func<TestQueue, Task<bool>> onTryEnter, Action onExit = null)
Microsoft.AspNetCore.CookiePolicy.Test (2)
CookieConsentTests.cs (1)
702private async Task<HttpContext> RunTestAsync(Action<CookiePolicyOptions> configureOptions, Action<HttpContext> configureRequest, RequestDelegate handleRequest)
TestExtensions.cs (1)
15public static async Task<Transaction> SendAsync(this TestServer server, string uri, string cookieHeader = null)
Microsoft.AspNetCore.Cors (7)
Infrastructure\CorsMiddleware.cs (2)
150var policyTask = corsPolicyProvider.GetPolicyAsync(context, policyName); 161async Task InvokeCoreAwaited(HttpContext context, Task<CorsPolicy?> policyTask)
Infrastructure\CorsOptions.cs (2)
15internal IDictionary<string, (CorsPolicy policy, Task<CorsPolicy> policyTask)> PolicyMap { get; } 16= new Dictionary<string, (CorsPolicy, Task<CorsPolicy>)>(StringComparer.Ordinal);
Infrastructure\DefaultCorsPolicyProvider.cs (2)
12private static readonly Task<CorsPolicy?> NullResult = Task.FromResult<CorsPolicy?>(null); 25public Task<CorsPolicy?> GetPolicyAsync(HttpContext context, string? policyName)
Infrastructure\ICorsPolicyProvider.cs (1)
19Task<CorsPolicy?> GetPolicyAsync(HttpContext context, string? policyName);
Microsoft.AspNetCore.DataProtection (3)
KeyManagement\KeyRingProvider.cs (3)
24private Task<CacheableKeyRing>? _cacheableKeyRingTask; // Also covered by _cacheableKeyRingLockObj 345Task<CacheableKeyRing>? existingTask = null; 444private IKeyRing? GetKeyRingFromCompletedTaskUnsynchronized(Task<CacheableKeyRing> task, DateTime utcNow)
Microsoft.AspNetCore.DataProtection.Tests (2)
KeyManagement\KeyRingProviderTests.cs (2)
691var backgroundGetKeyRingTask = Task.Run(() => 841var tasks = new Task<IKeyRing>[taskCount];
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (1)
MigrationsEndPointMiddleware.cs (1)
95private static async Task<DbContext?> GetDbContext(HttpContext context, ILogger logger)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (5)
Logging\TestController.cs (5)
19public async Task<IActionResult> GetTest1Async([PrivateData] string userId) 28public async Task<IActionResult> GetTest2Async([PrivateData] string userId, [PrivateData] string teamId) 37public async Task<IActionResult> GetTest3Async([PrivateData] string userId, [PrivateData] string teamId, string chatId) 45public async Task<IActionResult> GetTest4Async() 54public async Task<IActionResult> GetTest5Async(string userId, string teamId, string chatId)
Microsoft.AspNetCore.FunctionalTests (1)
WebHostFunctionalTests.cs (1)
184private async Task ExecuteStartOrStartWithTest(Func<DeploymentResult, Task<HttpResponseMessage>> getResponse, string applicationName)
Microsoft.AspNetCore.Grpc.JsonTranscoding (14)
src\Grpc\JsonTranscoding\src\Shared\Server\ClientStreamingServerMethodInvoker.cs (4)
66private async Task<TResponse> ResolvedInterceptorInvoker(IAsyncStreamReader<TRequest> requestStream, ServerCallContext resolvedContext) 92/// <returns>A <see cref="Task{TResponse}"/> that represents the asynchronous method. The <see cref="Task{TResponse}.Result"/> 94public async Task<TResponse> Invoke(HttpContext httpContext, ServerCallContext serverCallContext, IAsyncStreamReader<TRequest> requestStream)
src\Grpc\JsonTranscoding\src\Shared\Server\DuplexStreamingServerMethodInvoker.cs (1)
94/// <returns>A <see cref="Task{TResponse}"/> that represents the asynchronous method.</returns>
src\Grpc\JsonTranscoding\src\Shared\Server\UnaryServerMethodInvoker.cs (9)
67private async Task<TResponse> ResolvedInterceptorInvoker(TRequest resolvedRequest, ServerCallContext resolvedContext) 90/// <returns>A <see cref="Task{TResponse}"/> that represents the asynchronous method. The <see cref="Task{TResponse}.Result"/> 92public Task<TResponse> Invoke(HttpContext httpContext, ServerCallContext serverCallContext, TRequest request) 97Task<TResponse>? invokerTask = null; 147private async Task<TResponse> AwaitInvoker(Task<TResponse> invokerTask, GrpcActivatorHandle<TService> serviceHandle) 162private static async Task<TResponse> AwaitServiceReleaseAndThrow(ValueTask releaseTask, ExceptionDispatchInfo ex) 171private async Task<TResponse> AwaitServiceReleaseAndReturn(TResponse invokerResult, GrpcActivatorHandle<TService> serviceHandle)
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (25)
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\HttpbodyGrpc.cs (1)
76public virtual global::System.Threading.Tasks.Task<global::Google.Api.HttpBody> HelloWorld(global::Transcoding.HelloWorldRequest request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\Issue045270\HelloGrpc.cs (1)
72public virtual global::System.Threading.Tasks.Task<global::Example.Hello.SayResponse> Say(global::Example.Hello.SayRequest request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\Issue048192\HelloGrpc.cs (1)
72public virtual global::System.Threading.Tasks.Task<global::Custom.Http.Rule.SayResponse> Say(global::Custom.Http.Rule.SayRequest request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests\Release\net10.0\Proto\TranscodingGrpc.cs (16)
140public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> SayHello(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 146public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> ResponseBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 152public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> Custom(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 158public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> AdditionalBindings(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 164public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> NoOption(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 176public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> Body(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 182public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> SubBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 188public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> SubRepeatedBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 497public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> BadResponseBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 640public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> BadResponseBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 783public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> BadBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 926public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> BadBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 1069public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> BadPattern(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 1234public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> GetClientStreaming(grpc::IAsyncStreamReader<global::Transcoding.HelloRequest> requestStream, grpc::ServerCallContext context) 1405public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> StartFrameImport(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 1411public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply> GetFrameImport(global::Transcoding.HelloRequest request, grpc::ServerCallContext context)
Infrastructure\JsonTranscodingGreeterService.cs (1)
11public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
ServerStreamingServerCallHandlerTests.cs (1)
262public async Task<string?> ReadLineAsync(PipeReader pipeReader)
TestObjects\Services\HttpBodyService.cs (1)
14public override Task<HttpBody> HelloWorld(HelloWorldRequest request, ServerCallContext context)
UnaryServerCallHandlerTests.cs (3)
1421public override Task<TResponse> UnaryServerHandler<TRequest, TResponse>(TRequest request, ServerCallContext context, UnaryServerMethod<TRequest, TResponse> continuation) 1631private async Task<HelloRequest> ExecuteUnaryHandler( 1633Func<HelloRequest, ServerCallContext, Task<HelloReply>>? handler = null)
Microsoft.AspNetCore.Grpc.Swagger.Tests (36)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\BodyGrpc.cs (4)
100public virtual global::System.Threading.Tasks.Task<global::Body.BodyParamResponse> DemoBodyOne(global::Body.RequestOne request, grpc::ServerCallContext context) 106public virtual global::System.Threading.Tasks.Task<global::Body.BodyParamResponse> DemoBodyTwo(global::Body.RequestOne request, grpc::ServerCallContext context) 112public virtual global::System.Threading.Tasks.Task<global::Body.BodyParamResponse> DemoBodyThree(global::Body.RequestOne request, grpc::ServerCallContext context) 118public virtual global::System.Threading.Tasks.Task<global::Body.BodyParamResponse> DemoBodyFour(global::Body.RequestOne request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\CounterGrpc.cs (1)
76public virtual global::System.Threading.Tasks.Task<global::Count.CountReply> Add(global::Count.CountRequest request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\GreeterGrpc.cs (1)
85public virtual global::System.Threading.Tasks.Task<global::Greet.HelloReply> SayHello(global::Greet.HelloRequest request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\ParametersGrpc.cs (11)
170public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersOne(global::Params.RequestOne request, grpc::ServerCallContext context) 182public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersTwo(global::Params.RequestOne request, grpc::ServerCallContext context) 194public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersThree(global::Params.RequestTwo request, grpc::ServerCallContext context) 206public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersFour(global::Params.RequestTwo request, grpc::ServerCallContext context) 218public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersFive(global::Params.RequestTwo request, grpc::ServerCallContext context) 230public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersSix(global::Params.RequestThree request, grpc::ServerCallContext context) 242public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersSeven(global::Params.RequestFour request, grpc::ServerCallContext context) 248public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersEight(global::Params.RequestFour request, grpc::ServerCallContext context) 254public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersNine(global::Params.RequestFive request, grpc::ServerCallContext context) 260public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersTenOne(global::Params.RequestOne request, grpc::ServerCallContext context) 266public virtual global::System.Threading.Tasks.Task<global::Params.ParamResponse> DemoParametersTenTwo(global::Params.RequestOne request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\ResponsebodyGrpc.cs (4)
100public virtual global::System.Threading.Tasks.Task<global::ResponseBody.BodyParamResponse> DemoBodyOne(global::ResponseBody.Request request, grpc::ServerCallContext context) 106public virtual global::System.Threading.Tasks.Task<global::ResponseBody.BodyParamResponse> DemoBodyTwo(global::ResponseBody.Request request, grpc::ServerCallContext context) 112public virtual global::System.Threading.Tasks.Task<global::ResponseBody.BodyParamResponse> DemoBodyThree(global::ResponseBody.Request request, grpc::ServerCallContext context) 118public virtual global::System.Threading.Tasks.Task<global::ResponseBody.BodyParamResponse> DemoBodyFour(global::ResponseBody.Request request, grpc::ServerCallContext context)
artifacts\obj\Microsoft.AspNetCore.Grpc.Swagger.Tests\Release\net10.0\Proto\XmldocGrpc.cs (5)
119public virtual global::System.Threading.Tasks.Task<global::Xmldoc.StringReply> BasicGet(global::Xmldoc.StringRequest request, grpc::ServerCallContext context) 131public virtual global::System.Threading.Tasks.Task<global::Xmldoc.StringReply> BodyRootPost(global::Xmldoc.StringRequestWithDetail request, grpc::ServerCallContext context) 143public virtual global::System.Threading.Tasks.Task<global::Xmldoc.StringReply> BodyPathPost(global::Xmldoc.StringRequestWithDetail request, grpc::ServerCallContext context) 155public virtual global::System.Threading.Tasks.Task<global::Xmldoc.StringReply> BasicDelete(global::Xmldoc.StringRequest request, grpc::ServerCallContext context) 167public virtual global::System.Threading.Tasks.Task<global::Xmldoc.StringReply> QueryGet(global::Xmldoc.StringRequestWithDetail request, grpc::ServerCallContext context)
Services\GreeterService.cs (1)
19public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
Services\ParametersService.cs (4)
11public override Task<ParamResponse> DemoParametersOne(RequestOne requestId, ServerCallContext ctx) 16public override Task<ParamResponse> DemoParametersTwo(RequestOne requestId, ServerCallContext ctx) 21public override Task<ParamResponse> DemoParametersThree(RequestTwo request, ServerCallContext ctx) 26public override Task<ParamResponse> DemoParametersFour(RequestTwo request, ServerCallContext ctx)
Services\XmlDocService.cs (3)
19public override Task<StringReply> BasicGet(StringRequest request, ServerCallContext context) 24public override Task<StringReply> BodyRootPost(StringRequestWithDetail request, ServerCallContext context) 29public override Task<StringReply> BodyPathPost(StringRequestWithDetail request, ServerCallContext context)
Services\XmlDocServiceWithComments.cs (2)
33public override Task<StringReply> BasicGet(StringRequest request, ServerCallContext context) 44public override Task<StringReply> BodyRootPost(StringRequestWithDetail request, ServerCallContext context)
Microsoft.AspNetCore.HeaderPropagation (1)
HeaderPropagationMessageHandler.cs (1)
41protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.HeaderPropagation.Tests (3)
HeaderPropagationIntegrationTest.cs (2)
194private async Task<IHost> CreateHost(Action<HeaderPropagationOptions> configure, HttpMessageHandler primaryHandler, Action<HeaderPropagationMessageHandlerOptions> configureClient = null) 232protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HeaderPropagationMessageHandlerTest.cs (1)
264protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
Microsoft.AspNetCore.Http (11)
Features\FormFeature.cs (4)
22private Task<IFormCollection>? _parsedFormTask; 156public Task<IFormCollection> ReadFormAsync() => ReadFormAsync(CancellationToken.None); 159public Task<IFormCollection> ReadFormAsync(CancellationToken cancellationToken) 177private async Task<IFormCollection> InnerReadFormAsync(CancellationToken cancellationToken)
Features\TlsConnectionFeature.cs (1)
17public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
Internal\DefaultConnectionInfo.cs (1)
86public override Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken = default)
Internal\DefaultHttpRequest.cs (1)
161public override Task<IFormCollection> ReadFormAsync(CancellationToken cancellationToken)
Internal\DefaultWebSocketManager.cs (2)
61public override Task<WebSocket> AcceptWebSocketAsync(string? subProtocol) 68public override Task<WebSocket> AcceptWebSocketAsync(WebSocketAcceptContext acceptContext)
Internal\ReferenceReadStream.cs (1)
101public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
RequestFormReaderExtensions.cs (1)
21public static Task<IFormCollection> ReadFormAsync(this HttpRequest request, FormOptions options,
Microsoft.AspNetCore.Http.Abstractions (5)
ConnectionInfo.cs (1)
54public abstract Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken = new CancellationToken());
HttpRequest.cs (1)
147public abstract Task<IFormCollection> ReadFormAsync(CancellationToken cancellationToken = new CancellationToken());
WebSocketManager.cs (3)
30public virtual Task<WebSocket> AcceptWebSocketAsync() 40public abstract Task<WebSocket> AcceptWebSocketAsync(string? subProtocol); 47public virtual Task<WebSocket> AcceptWebSocketAsync(WebSocketAcceptContext acceptContext) => throw new NotImplementedException();
Microsoft.AspNetCore.Http.Connections (12)
Internal\HttpConnectionContext.cs (3)
137public Task<bool>? TransportTask { get; set; } 470async Task<bool> Func() 532internal async Task<bool> CancelPreviousPoll(HttpContext context)
Internal\HttpConnectionDispatcher.cs (3)
570private async Task<bool> EnsureConnectionStateAsync(HttpConnectionContext connection, HttpContext context, HttpTransportType transportType, HttpTransportType supportedTransports, ConnectionLogScope logScope) 773private async Task<HttpConnectionContext?> GetConnectionAsync(HttpContext context) 800private async Task<HttpConnectionContext?> GetOrCreateConnectionAsync(HttpContext context, HttpConnectionDispatcherOptions options)
Internal\Transports\IHttpTransport.cs (1)
14Task<bool> ProcessRequestAsync(HttpContext context, CancellationToken token);
Internal\Transports\LongPollingServerTransport.cs (1)
32public async Task<bool> ProcessRequestAsync(HttpContext context, CancellationToken token)
Internal\Transports\ServerSentEventsServerTransport.cs (1)
31public async Task<bool> ProcessRequestAsync(HttpContext context, CancellationToken cancellationToken)
Internal\Transports\WebSocketsServerTransport.cs (1)
37public async Task<bool> ProcessRequestAsync(HttpContext context, CancellationToken token)
src\SignalR\common\Shared\TaskCache.cs (2)
8public static readonly Task<bool> True = Task.FromResult(true); 9public static readonly Task<bool> False = Task.FromResult(false);
Microsoft.AspNetCore.Http.Connections.Client (12)
HttpConnection.cs (5)
34private static readonly Task<string?> _noAccessToken = Task.FromResult<string?>(null); 53private Func<Task<string?>>? _accessTokenProvider; 445private async Task<NegotiationResponse> NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken) 683internal Task<string?> GetAccessTokenAsync() 715private async Task<NegotiationResponse> GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken)
HttpConnectionOptions.cs (1)
186public Func<Task<string?>>? AccessTokenProvider { get; set; }
Internal\AccessTokenHttpMessageHandler.cs (1)
22protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\DefaultTransportFactory.cs (2)
15private readonly Func<Task<string?>> _accessTokenProvider; 20public DefaultTransportFactory(HttpTransportType requestedTransportType, ILoggerFactory loggerFactory, HttpClient? httpClient, HttpConnectionOptions httpConnectionOptions, Func<Task<string?>> accessTokenProvider)
Internal\Http2HttpMessageHandler.cs (1)
20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\LoggingHttpMessageHandler.cs (1)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Internal\WebSocketsTransport.cs (1)
74public WebSocketsTransport(HttpConnectionOptions httpConnectionOptions, ILoggerFactory loggerFactory, Func<Task<string?>> accessTokenProvider, HttpClient? httpClient,
Microsoft.AspNetCore.Http.Connections.Tests (18)
HttpConnectionDispatcherTests.cs (1)
3611protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
ServerSentEventsTests.cs (2)
74var task = sse.ProcessRequestAsync(context, context.RequestAborted); 96var task = sse.ProcessRequestAsync(context, context.RequestAborted);
TestWebSocketConnectionFeature.cs (5)
36public Task<WebSocket> AcceptAsync() => AcceptAsync(new WebSocketAcceptContext()); 38public Task<WebSocket> AcceptAsync(WebSocketAcceptContext context) 130public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) 210public async Task<WebSocketMessage> GetNextMessageAsync() 230public async Task<WebSocketConnectionSummary> ExecuteAndCaptureFramesAsync()
WebSocketsTests.cs (10)
44var client = feature.Client.ExecuteAndCaptureFramesAsync(); 92var client = feature.Client.ExecuteAndCaptureFramesAsync(); 152var client = feature.Client.ExecuteAndCaptureFramesAsync(); 185var client = feature.Client.ExecuteAndCaptureFramesAsync(); 256var client = feature.Client.ExecuteAndCaptureFramesAsync(); 291var client = feature.Client.ExecuteAndCaptureFramesAsync(); 330var client = feature.Client.ExecuteAndCaptureFramesAsync(); 376var transport = ws.ProcessRequestAsync(context, CancellationToken.None); 384var client = feature.Client.ExecuteAndCaptureFramesAsync(); 410var client = feature.Client.ExecuteAndCaptureFramesAsync();
Microsoft.AspNetCore.Http.Extensions (24)
RequestDelegateFactory.cs (17)
540returnType.GetGenericTypeDefinition() == typeof(Task<>)) 570private static ValueTask<object?> TaskOfTToValueTaskOfObject<T>(Task<T> task) 572static async ValueTask<object?> ExecuteAwaited(Task<T> task) 1082else if (returnType == typeof(Task<object>)) 1112returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1367static async Task<(object? FormValue, bool Successful)> TryReadBodyAsync( 1496static async Task<(object? FormValue, bool Successful)> TryReadFormAsync( 2411private static Task ExecuteTaskOfObject(Task<object> task, HttpContext httpContext, JsonTypeInfo<object> jsonTypeInfo) 2413static async Task ExecuteAwaited(Task<object> task, HttpContext httpContext, JsonTypeInfo<object> jsonTypeInfo) 2431private static Task ExecuteTaskOfTFast<T>(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2435static async Task ExecuteAwaited(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2448private static Task ExecuteTaskOfT<T>(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2452static async Task ExecuteAwaited(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2465private static Task ExecuteTaskOfString(Task<string?> task, HttpContext httpContext) 2470static async Task ExecuteAwaited(Task<string> task, HttpContext httpContext) 2600private static async Task ExecuteTaskResult<T>(Task<T?> task, HttpContext httpContext) where T : IResult 2804private static void EnsureRequestTaskOfNotNull<T>(Task<T?> task) where T : IResult
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (5)
38/// to a <see cref="Task{TResult}"/>, if <paramref name="possibleFSharpAsyncType"/> is in fact a closed F# async type, 49/// to a <see cref="Task{TResult}"/>, or to a <see cref="Task"/>, if <c>TResult</c> is <see href="https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-unit-0.html">FSharp.Core.Unit</see>; 53/// When this method returns, contains the type of the closed generic instantiation of <see cref="Task{TResult}"/> or of <see cref="Task"/> that will be returned 75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 145var typeDef when typeDef == typeof(Task<>) && IsFSharpUnit(genericAwaitableType.GetGenericArguments()[0]) => (typeof(Task), MakeTaskOfUnitToTaskExpression(genericAwaitableType)),
Microsoft.AspNetCore.Http.Extensions.Tests (38)
ParameterBindingMethodCacheTests.cs (3)
1141public static Task<InvalidWrongReturnBindAsyncStruct> BindAsync(HttpContext context, ParameterInfo parameter) => 1147public static Task<InvalidWrongReturnBindAsyncClass> BindAsync(HttpContext context, ParameterInfo parameter) => 1159public static Task<InvalidWrongParamBindAsyncClass> BindAsync(ParameterInfo parameter) =>
RequestDelegateFactoryTests.cs (31)
972public static Task<BadBindAsyncStruct> BindAsync(HttpContext context, ParameterInfo parameter) => 978public static Task<BadBindAsyncClass> BindAsync(HttpContext context, ParameterInfo parameter) => 1309Task<JsonTodo> TaskTestAction() => Task.FromResult<JsonTodo>(originalTodo); 1310async Task<JsonTodo> TaskTestActionAwaited() 1326new object[] { (Func<Task<JsonTodo>>)TaskTestAction}, 1327new object[] { (Func<Task<JsonTodo>>)TaskTestActionAwaited}, 1422Task<CustomResult> TaskTestAction() => Task.FromResult(new CustomResult(resultString)); 1427static Task<CustomResult> StaticTaskTestAction() => Task.FromResult(new CustomResult("Still not enough tests!")); 1435static Task<object> StaticTaskOfIResultAsObject() => Task.FromResult<object>(new CustomResult("Still not enough tests!")); 1440Task<StructResult> TaskTestStructAction() => Task.FromResult(new StructResult(resultString)); 1447new object[] { (Func<Task<CustomResult>>)TaskTestAction}, 1452new object[] { (Func<Task<CustomResult>>)StaticTaskTestAction}, 1458new object[] { (Func<Task<object>>)StaticTaskOfIResultAsObject}, 1463new object[] { (Func<Task<StructResult>>)TaskTestStructAction }, 1493Task<bool?>? TaskBoolAction() => null; 1494Task<IResult?>? TaskNullAction() => null; 1495Task<IResult?> TaskTestAction() => Task.FromResult<IResult?>(null); 1501new object[] { (Func<Task<IResult?>?>)TaskNullAction, "The IResult in Task<IResult> response must not be null." }, 1502new object[] { (Func<Task<bool?>?>)TaskBoolAction, "The Task returned by the Delegate must not be null." }, 1503new object[] { (Func<Task<IResult?>>)TaskTestAction, "The IResult returned by the Delegate must not be null." }, 2244async Task<string> Yield() 2255async Task<object> Yield() 2320Task<FSharp.Core.Unit> TaskOfUnitMethod() 2344async Task<FSharp.Core.Unit> Yield() 2357new object[] { (Func<Task<FSharp.Core.Unit>>)TaskOfUnitMethod }, 2446Task<TodoStruct> TaskOfStructMethod() 2451async Task<TodoStruct> TaskOfStructWithYieldMethod() 2466async Task<TodoStruct> Yield() 2477new object[] { (Func<Task<TodoStruct>>)TaskOfStructMethod }, 2478new object[] { (Func<Task<TodoStruct>>)TaskOfStructWithYieldMethod }, 3850public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (3)
42internal async Task<(GeneratorRunResult?, Compilation)> RunGeneratorAsync(string sources, params string[] updatedSources) 232internal static async Task<string> GetResponseBodyAsync(HttpContext httpContext) 303private static Task<Compilation> CreateCompilationAsync(string sources)
RequestDelegateGenerator\SharedTypes.cs (1)
549public Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken)
Microsoft.AspNetCore.Http.Features (4)
IFormFeature.cs (1)
42Task<IFormCollection> ReadFormAsync(CancellationToken cancellationToken);
IHttpUpgradeFeature.cs (1)
22Task<Stream> UpgradeAsync();
IHttpWebSocketFeature.cs (1)
24Task<WebSocket> AcceptAsync(WebSocketAcceptContext context);
ITlsConnectionFeature.cs (1)
21Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken);
Microsoft.AspNetCore.Http.Microbenchmarks (4)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (3)
42internal async Task<(GeneratorRunResult?, Compilation)> RunGeneratorAsync(string sources, params string[] updatedSources) 232internal static async Task<string> GetResponseBodyAsync(HttpContext httpContext) 303private static Task<Compilation> CreateCompilationAsync(string sources)
src\Http\Http.Extensions\test\RequestDelegateGenerator\SharedTypes.cs (1)
549public Task<X509Certificate2> GetClientCertificateAsync(CancellationToken cancellationToken)
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (1)
504public Task<WebSocket> AcceptAsync(WebSocketAcceptContext context)
Features\NonSeekableReadStream.cs (1)
62public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Microsoft.AspNetCore.HttpLogging (4)
BufferingStream.cs (1)
236public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
RequestBufferingStream.cs (1)
44public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
UpgradeFeatureLoggingDecorator.cs (1)
33public async Task<Stream> UpgradeAsync()
Microsoft.AspNetCore.HttpOverrides (2)
CertificateForwardingFeature.cs (2)
16private Task<X509Certificate2?>? _certificateTask; 31public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
Microsoft.AspNetCore.Identity (48)
DataProtectorTokenProvider.cs (6)
75/// <returns>A <see cref="Task{TResult}"/> representing the generated token.</returns> 76public virtual async Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user) 105/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous validation, 108public virtual async Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user) 183/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, 187public virtual Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user)
IdentityApiEndpointRouteBuilderExtensions.cs (11)
57routeGroup.MapPost("/register", async Task<Results<Ok, ValidationProblem>> 90routeGroup.MapPost("/login", async Task<Results<Ok<AccessTokenResponse>, EmptyHttpResult, ProblemHttpResult>> 122routeGroup.MapPost("/refresh", async Task<Results<Ok<AccessTokenResponse>, UnauthorizedHttpResult, SignInHttpResult, ChallengeHttpResult>> 142routeGroup.MapGet("/confirmEmail", async Task<Results<ContentHttpResult, UnauthorizedHttpResult>> 193routeGroup.MapPost("/resendConfirmationEmail", async Task<Ok> 206routeGroup.MapPost("/forgotPassword", async Task<Results<Ok, ValidationProblem>> 225routeGroup.MapPost("/resetPassword", async Task<Results<Ok, ValidationProblem>> 260accountGroup.MapPost("/2fa", async Task<Results<Ok<TwoFactorResponse>, ValidationProblem, NotFound>> 336accountGroup.MapGet("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 348accountGroup.MapPost("/info", async Task<Results<Ok<InfoResponse>, ValidationProblem, NotFound>> 457private static async Task<InfoResponse> CreateInfoResponseAsync<TUser>(TUser user, UserManager<TUser> userManager)
IdentityServiceCollectionExtensions.cs (1)
192protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
SecurityStampValidator.cs (1)
126protected virtual Task<TUser?> VerifySecurityStamp(ClaimsPrincipal? principal)
SignInManager.cs (28)
114public virtual async Task<ClaimsPrincipal> CreateUserPrincipalAsync(TUser user) => await ClaimsFactory.CreateAsync(user); 136public virtual async Task<bool> CanSignInAsync(TUser user) 285public virtual async Task<TUser?> ValidateSecurityStampAsync(ClaimsPrincipal? principal) 308public virtual async Task<TUser?> ValidateTwoFactorSecurityStampAsync(ClaimsPrincipal? principal) 330public virtual async Task<bool> ValidateSecurityStampAsync(TUser? user, string? securityStamp) 345public virtual async Task<SignInResult> PasswordSignInAsync(TUser user, string password, 366public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password, 387public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) 444public virtual async Task<bool> IsTwoFactorClientRememberedAsync(TUser user) 484public virtual async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode) 502private async Task<SignInResult> DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) 547public virtual async Task<SignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) 595public virtual async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) 637public virtual async Task<TUser?> GetTwoFactorAuthenticationUserAsync() 656public virtual Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) 668public virtual async Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 688public virtual async Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync() 700public virtual async Task<ExternalLoginInfo?> GetExternalLoginInfoAsync(string? expectedXsrf = null) 738public virtual async Task<IdentityResult> UpdateExternalAuthenticationTokensAsync(ExternalLoginInfo externalLogin) 798internal async Task<ClaimsPrincipal> StoreRememberClient(TUser user) 818public virtual async Task<bool> IsTwoFactorEnabledAsync(TUser user) 832protected virtual async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false) 872private async Task<TwoFactorAuthenticationInfo?> RetrieveTwoFactorInfoAsync() 909protected virtual async Task<bool> IsLockedOut(TUser user) 919protected virtual Task<SignInResult> LockedOut(TUser user) 930protected virtual async Task<SignInResult?> PreSignInCheck(TUser user) 962private async Task<IdentityResult> ResetLockoutWithResult(TUser user) 979if (resetLockoutTask is Task<IdentityResult> resultTask)
TwoFactorSecurityStampValidator.cs (1)
43protected override Task<TUser?> VerifySecurityStamp(ClaimsPrincipal? principal)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (55)
RoleStore.cs (18)
129/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 130public virtual async Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 145/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 146public virtual async Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 170/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 171public virtual async Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 193/// <returns>A <see cref="Task{TResult}"/> that contains the ID of the role.</returns> 194public virtual Task<string> GetRoleIdAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 207/// <returns>A <see cref="Task{TResult}"/> that contains the name of the role.</returns> 208public virtual Task<string?> GetRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 265/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns> 266public virtual Task<TRole?> FindByIdAsync(string id, CancellationToken cancellationToken = default(CancellationToken)) 279/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns> 280public virtual Task<TRole?> FindByNameAsync(string normalizedName, CancellationToken cancellationToken = default(CancellationToken)) 292/// <returns>A <see cref="Task{TResult}"/> that contains the name of the role.</returns> 293public virtual Task<string?> GetNormalizedRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 335/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a role.</returns> 336public virtual async Task<IList<Claim>> GetClaimsAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken))
UserOnlyStore.cs (15)
149public override async Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 165public override async Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 191public override async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 217public override Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 233public override Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) 255protected override Task<TUser?> FindUserAsync(TKey userId, CancellationToken cancellationToken) 268protected override Task<TUserLogin?> FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken) 280protected override Task<TUserLogin?> FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken) 290/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a user.</returns> 291public override async Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 410public override async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 429public override async Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey, 450public override Task<TUser?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)) 466public override async Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 489protected override Task<TUserToken?> FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
UserStore.cs (22)
151public override async Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 167public override async Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 193public override async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 219public override Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 235public override Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) 257protected override Task<TRole?> FindRoleAsync(string normalizedRoleName, CancellationToken cancellationToken) 269protected override Task<TUserRole?> FindUserRoleAsync(TKey userId, TKey roleId, CancellationToken cancellationToken) 280protected override Task<TUser?> FindUserAsync(TKey userId, CancellationToken cancellationToken) 293protected override Task<TUserLogin?> FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken) 305protected override Task<TUserLogin?> FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken) 362/// <returns>A <see cref="Task{TResult}"/> that contains the roles the user is a member of.</returns> 363public override async Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 382/// <returns>A <see cref="Task{TResult}"/> containing a flag indicating if the specified user is a member of the given group. If the 384public override async Task<bool> IsInRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken)) 405/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a user.</returns> 406public override async Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 525public override async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 544public override async Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey, 565public override Task<TUser?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)) 581public override async Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 604public override async Task<IList<TUser>> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken)) 632protected override Task<TUserToken?> FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken)
Microsoft.AspNetCore.Identity.FunctionalTests (86)
Extensions\HttpClientExtensions.cs (3)
11public static Task<HttpResponseMessage> SendAsync( 19public static Task<HttpResponseMessage> SendAsync( 30public static Task<HttpResponseMessage> SendAsync(
Extensions\ResponseAssert.cs (1)
21public static async Task<IHtmlDocument> IsHtmlDocumentAsync(HttpResponseMessage response)
MapIdentityApiTests.cs (7)
1277private async Task<WebApplication> CreateAppAsync<TUser, TContext>(Action<IServiceCollection>? configureServices, bool autoStart = true) 1344private Task<WebApplication> CreateAppAsync(Action<IServiceCollection>? configureServices = null) 1388private async Task<string> LoginAsync(HttpClient client, string? groupPrefix = null, string? email = null) 1405private async Task<string> LoginWithEmailConfirmationAsync(HttpClient client, TestEmailSender emailSender, string? groupPrefix = null, string? email = null) 1489public async Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user) 1494public async Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user) 1499public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user)
Pages\Account\ConfirmEmail.cs (1)
18public static async Task<ConfirmEmail> Create(IHtmlAnchorElement link, HttpClient client, DefaultUIContext context)
Pages\Account\ExternalLogin.cs (2)
27public async Task<Index> SendEmailAsync(string email) 39public async Task<RegisterConfirmation> SendEmailWithConfirmationAsync(string email, bool hasRealEmail)
Pages\Account\ForgotPassword.cs (1)
18public async Task<ForgotPasswordConfirmation> SendForgotPasswordAsync(string email)
Pages\Account\Login.cs (7)
35public async Task<Contoso.Login> ClickLoginWithContosoLinkAsync() 46public async Task<ForgotPassword> ClickForgotPasswordLinkAsync() 54public async Task<ResendEmailConfirmation> ClickReconfirmEmailLinkAsync() 62public async Task<Index> LoginValidUserAsync(string userName, string password) 85public async Task<DefaultUIPage> LockoutUserAsync(string userName, string password) 97private async Task<HttpResponseMessage> SendLoginForm(string userName, string password) 106public async Task<LoginWith2fa> PasswordLoginValidUserWith2FaAsync(string userName, string password)
Pages\Account\LoginWith2fa.cs (2)
24internal async Task<Index> Send2FACodeAsync(string twoFactorKey) 41internal async Task<LoginWithRecoveryCode> ClickRecoveryCodeLinkAsync()
Pages\Account\LoginWithRecoveryCode.cs (1)
19public async Task<Index> SendRecoveryCodeAsync(string recoveryCode)
Pages\Account\Manage\ChangePassword.cs (1)
19public async Task<ChangePassword> ChangePasswordAsync(string oldPassword, string newPassword)
Pages\Account\Manage\DeleteUser.cs (2)
19public async Task<FunctionalTests.Index> Delete(string password) 30private async Task<HttpResponseMessage> SendDeleteForm(string password)
Pages\Account\Manage\Email.cs (2)
34internal async Task<Email> SendConfirmationEmailAsync() 46internal async Task<Email> SendUpdateEmailAsync(string newEmail)
Pages\Account\Manage\EnableAuthenticator.cs (1)
28internal async Task<ShowRecoveryCodes> SendValidCodeAsync()
Pages\Account\Manage\Index.cs (8)
41public async Task<TwoFactorAuthentication> ClickTwoFactorLinkAsync(bool consent = true) 56public async Task<TwoFactorAuthentication> ClickTwoFactorEnabledLinkAsync() 65public async Task<ChangePassword> ClickChangePasswordLinkAsync() 74public async Task<SetPassword> ClickChangePasswordLinkExternalLoginAsync() 83public async Task<PersonalData> ClickPersonalDataLinkAsync() 90public async Task<Email> ClickEmailLinkAsync() 97public async Task<LinkExternalLogin> ClickLinkLoginAsync() 105public async Task<ExternalLogins> ClickExternalLoginsAsync()
Pages\Account\Manage\LinkExternalLogin.cs (1)
21public async Task<ManageExternalLogin> LinkExternalLoginAsync(string loginEmail)
Pages\Account\Manage\ManageExternalLogin.cs (1)
19public async Task<RemoveExternalLogin> ManageExternalLoginAsync(string loginEmail)
Pages\Account\Manage\PersonalData.cs (2)
21internal async Task<DeleteUser> ClickDeleteLinkAsync() 28internal async Task<HttpResponseMessage> SubmitDownloadForm()
Pages\Account\Manage\RemoveExternalLogin.cs (1)
19public async Task<RemoveExternalLogin> RemoveLoginAsync(string loginProvider, string providerKey)
Pages\Account\Manage\ResetAuthenticator.cs (1)
25internal async Task<ResetAuthenticator> ResetAuthenticatorAsync()
Pages\Account\Manage\SetPassword.cs (1)
19public async Task<SetPassword> SetPasswordAsync(string newPassword)
Pages\Account\Manage\TwoFactorAuthentication.cs (2)
34internal async Task<EnableAuthenticator> ClickEnableAuthenticatorLinkAsync() 44internal async Task<ResetAuthenticator> ClickResetAuthenticatorLinkAsync()
Pages\Account\Register.cs (3)
26public async Task<Contoso.Login> ClickLoginWithContosoLinkAsync() 37public async Task<Index> SubmitRegisterFormForValidUserAsync(string userName, string password) 54public async Task<RegisterConfirmation> SubmitRegisterFormWithConfirmation(string userName, string password, bool hasRealEmail = false)
Pages\Account\ResendEmailConfirmation.cs (1)
18public Task<HttpResponseMessage> ResendAsync(string email)
Pages\Account\ResetPassword.cs (2)
18internal static async Task<ResetPassword> CreateAsync(IHtmlAnchorElement link, HttpClient client, DefaultUIContext context) 26public async Task<ResetPasswordConfirmation> SendNewPasswordAsync(string email, string newPassword)
Pages\Contoso\Login.cs (3)
20public async Task<ExternalLogin> SendNewUserNameAsync(string userName) 27public async Task<Index> SendExistingUserNameAsync(string userName) 34private async Task<IHtmlDocument> SendLoginForm(string userName)
Pages\Index.cs (5)
34public static async Task<Index> CreateAsync(HttpClient client, DefaultUIContext context = null) 42public async Task<Register> ClickRegisterLinkAsync() 52public async Task<Login> ClickLoginLinkAsync() 62internal async Task<Account.Manage.Index> ClickManageLinkAsync() 72internal async Task<Account.Manage.Index> ClickManageLinkWithExternalLoginAsync()
Pages\RegisterConfirmation.cs (1)
31public async Task<ConfirmEmail> ClickConfirmLinkAsync()
UserStories.cs (23)
16internal static async Task<Index> RegisterNewUserAsync(HttpClient client, string userName = null, string password = null) 27internal static async Task<RegisterConfirmation> RegisterNewUserAsyncWithConfirmation(HttpClient client, string userName = null, string password = null, bool hasRealEmailSender = false) 38internal static async Task<Index> LoginExistingUserAsync(HttpClient client, string userName, string password) 56internal static async Task<DefaultUIPage> LockoutExistingUserAsync(HttpClient client, string userName, string password) 66internal static async Task<Index> RegisterNewUserWithSocialLoginAsync(HttpClient client, string userName, string email) 79internal static async Task<RegisterConfirmation> RegisterNewUserWithSocialLoginWithConfirmationAsync(HttpClient client, string userName, string email, bool hasRealEmailSender = false) 92internal static async Task<Index> RegisterNewUserWithSocialLoginAsyncViaRegisterPage(HttpClient client, string userName, string email) 105internal static async Task<Email> SendEmailConfirmationLinkAsync(Index index) 112internal static async Task<Email> SendUpdateEmailAsync(Index index, string newEmail) 119internal static async Task<Index> LoginWithSocialLoginAsync(HttpClient client, string userName) 134internal static async Task<Index> LoginExistingUser2FaAsync(HttpClient client, string userName, string password, string twoFactorKey) 145internal static async Task<ShowRecoveryCodes> EnableTwoFactorAuthentication(Index index, bool consent = true) 157internal static async Task<ResetAuthenticator> ResetAuthenticator(Index index) 165internal static async Task<Index> LoginExistingUserRecoveryCodeAsync( 182internal static async Task<ConfirmEmail> ConfirmEmailAsync(IdentityEmail email, HttpClient client) 203internal static async Task<ForgotPasswordConfirmation> ForgotPasswordAsync(HttpClient client, string userName) 214internal static async Task<ResetPasswordConfirmation> ResetPasswordAsync(HttpClient client, IdentityEmail resetPasswordEmail, string email, string newPassword) 224internal static async Task<ChangePassword> ChangePasswordAsync(Index index, string oldPassword, string newPassword) 232internal static async Task<SetPassword> SetPasswordAsync(Index index, string newPassword) 240internal static async Task<ManageExternalLogin> LinkExternalLoginAsync(Index index, string loginEmail) 248internal static async Task<RemoveExternalLogin> RemoveExternalLoginAsync(ManageExternalLogin manageExternalLogin, string loginEmail) 257internal static async Task<Index> DeleteUser(Index index, string password) 265internal static async Task<JObject> DownloadPersonalData(Index index, string userName)
Microsoft.AspNetCore.Identity.InMemory.Test (44)
FunctionalTest.cs (2)
291private async Task<TestServer> CreateServer(Action<IServiceCollection> configureServices = null, Func<HttpContext, Task> testpath = null, Uri baseAddress = null, bool testCore = false) 428private static async Task<Transaction> SendAsync(TestServer server, string uri, string cookieHeader = null, bool ajaxRequest = false)
InMemoryStore.cs (12)
40public Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 50public Task<bool> IsInRoleAsync(TUser user, string role, CancellationToken cancellationToken = default(CancellationToken)) 58public Task<IList<TUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) 72public Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 78public Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 88public Task<string> GetRoleIdAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 93public Task<string> GetRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 104public Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 110Task<TRole> IRoleStore<TRole>.FindByIdAsync(string roleId, CancellationToken cancellationToken) 119Task<TRole> IRoleStore<TRole>.FindByNameAsync(string roleName, CancellationToken cancellationToken) 126public Task<IList<Claim>> GetClaimsAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 150public Task<string> GetNormalizedRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken))
InMemoryUserStore.cs (30)
33public Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 80public Task<string> GetEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 85public Task<string> GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 96public Task<bool> GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 107public Task<TUser> FindByEmailAsync(string email, CancellationToken cancellationToken = default(CancellationToken)) 114public Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 125public Task<int> IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 137public Task<int> GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 142public Task<bool> GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 188public Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 195public Task<TUser> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) 205public Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 210public Task<string> GetUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 221public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 227public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 233public Task<TUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 246public Task<TUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 253public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 269public Task<string> GetPasswordHashAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 274public Task<bool> HasPasswordAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 285public Task<string> GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 290public Task<bool> GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 307public Task<string> GetSecurityStampAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 318public Task<bool> GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 323public Task<string> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 334public Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 383public Task<string> GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken) 402public Task<string> GetAuthenticatorKeyAsync(TUser user, CancellationToken cancellationToken) 413public async Task<bool> RedeemCodeAsync(TUser user, string code, CancellationToken cancellationToken) 426public async Task<int> CountCodesAsync(TUser user, CancellationToken cancellationToken)
Microsoft.AspNetCore.Identity.Specification.Tests (13)
IdentitySpecificationTestBase.cs (3)
143public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 148public Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role) 153public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user)
UserManagerSpecificationTests.cs (10)
145public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 150public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 159public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 164public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 961public async Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user) 966public async Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user) 971public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user) 1415public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user) 1418public Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user) 1421public Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user)
Microsoft.AspNetCore.Identity.Test (128)
IdentityBuilderTest.cs (19)
273public Task<IdentityResult> CreateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 278public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 283public Task<IdentityResult> DeleteAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 288public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 298public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 303public Task<PocoUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) 308public Task<string> GetNormalizedRoleNameAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 313public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 318public Task<string> GetRoleIdAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 323public Task<string> GetRoleNameAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 328public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 333public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 358public Task<IdentityResult> UpdateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 363public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 368public Task<IdentityResult> ValidateAsync(RoleManager<PocoRole> manager, PocoRole role) 373public Task<IdentityResult> ValidateAsync(UserManager<PocoUser> manager, PocoUser user) 378public Task<IdentityResult> ValidateAsync(UserManager<PocoUser> manager, PocoUser user, string password) 383Task<PocoRole> IRoleStore<PocoRole>.FindByIdAsync(string roleId, CancellationToken cancellationToken) 388Task<PocoRole> IRoleStore<PocoRole>.FindByNameAsync(string roleName, CancellationToken cancellationToken)
IdentityUIScriptsTest.cs (1)
44private async Task<string> GetShaIntegrity(ScriptTag scriptTag)
NoopRoleStore.cs (8)
8public Task<IdentityResult> CreateAsync(PocoRole user, CancellationToken cancellationToken = default(CancellationToken)) 13public Task<IdentityResult> UpdateAsync(PocoRole user, CancellationToken cancellationToken = default(CancellationToken)) 18public Task<string> GetRoleNameAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 28public Task<PocoRole> FindByIdAsync(string roleId, CancellationToken cancellationToken = default(CancellationToken)) 33public Task<PocoRole> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 42public Task<IdentityResult> DeleteAsync(PocoRole user, CancellationToken cancellationToken = default(CancellationToken)) 47public Task<string> GetRoleIdAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 52public Task<string> GetNormalizedRoleNameAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken))
NoopUserStore.cs (8)
8public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 13public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 23public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 28public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 33public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 38public Task<PocoUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 47public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 52public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken))
RetryHandler.cs (1)
26protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
RoleManagerTest.cs (8)
153public Task<IdentityResult> CreateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 158public Task<IdentityResult> UpdateAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 163public Task<IdentityResult> DeleteAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 168public Task<string> GetRoleIdAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 173public Task<string> GetRoleNameAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken)) 183public Task<PocoRole> FindByIdAsync(string roleId, CancellationToken cancellationToken = default(CancellationToken)) 188public Task<PocoRole> FindByNameAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) 198public Task<string> GetNormalizedRoleNameAsync(PocoRole role, CancellationToken cancellationToken = default(CancellationToken))
SecurityStampValidatorTest.cs (2)
21public Task<AuthenticateResult> AuthenticateAsync() 36public Task<bool> HandleRequestAsync()
SignInManagerTest.cs (9)
344public override Task<bool> ValidateAsync(string purpose, string token, UserManager<PocoUser> manager, PocoUser user) 1412public Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync() => Task.FromResult<IEnumerable<AuthenticationScheme>>(_defaultCookieSchemes.Values); 1413public Task<AuthenticationScheme> GetSchemeAsync(string name) => Task.FromResult(_defaultCookieSchemes.TryGetValue(name, out var scheme) ? scheme : null); 1417public Task<AuthenticationScheme> GetDefaultAuthenticateSchemeAsync() => throw new NotImplementedException(); 1418public Task<AuthenticationScheme> GetDefaultChallengeSchemeAsync() => throw new NotImplementedException(); 1419public Task<AuthenticationScheme> GetDefaultForbidSchemeAsync() => throw new NotImplementedException(); 1420public Task<AuthenticationScheme> GetDefaultSignInSchemeAsync() => throw new NotImplementedException(); 1421public Task<AuthenticationScheme> GetDefaultSignOutSchemeAsync() => throw new NotImplementedException(); 1422public Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync() => throw new NotImplementedException();
UserManagerTest.cs (72)
771public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<PocoUser> manager, PocoUser user) 776public Task<string> GenerateAsync(string purpose, UserManager<PocoUser> manager, PocoUser user) 781public Task<bool> ValidateAsync(string purpose, string token, UserManager<PocoUser> manager, PocoUser user) 828public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken) 833public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken) 843public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken) 848public Task<PocoUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) 853public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken) 858public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken) 863public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken) 878public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken) 1203public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 1218public Task<IList<Claim>> GetClaimsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1243public Task<string> GetEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1248public Task<bool> GetEmailConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1258public Task<PocoUser> FindByEmailAsync(string email, CancellationToken cancellationToken = default(CancellationToken)) 1263public Task<DateTimeOffset?> GetLockoutEndDateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1273public Task<int> IncrementAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1283public Task<int> GetAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1288public Task<bool> GetLockoutEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1308public Task<IList<UserLoginInfo>> GetLoginsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1313public Task<PocoUser> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) 1327public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1332public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1337public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1342public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 1347public Task<PocoUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 1357public Task<string> GetPasswordHashAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1362public Task<bool> HasPasswordAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1372public Task<string> GetPhoneNumberAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1377public Task<bool> GetPhoneNumberConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1397public Task<IList<string>> GetRolesAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1402public Task<bool> IsInRoleAsync(PocoUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) 1412public Task<string> GetSecurityStampAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1422public Task<bool> GetTwoFactorEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1427public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1432public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1437public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1447public Task<IList<PocoUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 1452public Task<IList<PocoUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) 1457public Task<string> GetNormalizedEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1472public Task<string> GenerateAsync(string purpose, UserManager<PocoUser> manager, PocoUser user) 1477public Task<bool> ValidateAsync(string purpose, string token, UserManager<PocoUser> manager, PocoUser user) 1482public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<PocoUser> manager, PocoUser user) 1498public Task<IList<Claim>> GetClaimsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1523public Task<string> GetEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1528public Task<bool> GetEmailConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1538public Task<PocoUser> FindByEmailAsync(string email, CancellationToken cancellationToken = default(CancellationToken)) 1543public Task<DateTimeOffset?> GetLockoutEndDateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1553public Task<int> IncrementAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1563public Task<int> GetAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1568public Task<bool> GetLockoutEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1588public Task<IList<UserLoginInfo>> GetLoginsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1593public Task<PocoUser> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) 1603public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1608public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1618public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 1623public Task<PocoUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 1633public Task<string> GetPasswordHashAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1638public Task<bool> HasPasswordAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1648public Task<string> GetPhoneNumberAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1653public Task<bool> GetPhoneNumberConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1668public Task<bool> GetTwoFactorEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1683public Task<IList<string>> GetRolesAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1688public Task<bool> IsInRoleAsync(PocoUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) 1693public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1703public Task<IList<PocoUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 1708public Task<IList<PocoUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) 1713Task<IdentityResult> IUserStore<PocoUser>.CreateAsync(PocoUser user, CancellationToken cancellationToken) 1718Task<IdentityResult> IUserStore<PocoUser>.UpdateAsync(PocoUser user, CancellationToken cancellationToken) 1723Task<IdentityResult> IUserStore<PocoUser>.DeleteAsync(PocoUser user, CancellationToken cancellationToken) 1728public Task<string> GetNormalizedEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken))
Microsoft.AspNetCore.Identity.UI (168)
Areas\Identity\Pages\V4\Account\ConfirmEmail.cshtml.cs (2)
31public virtual Task<IActionResult> OnGetAsync(string userId, string code) => throw new NotImplementedException(); 43public override async Task<IActionResult> OnGetAsync(string userId, string code)
Areas\Identity\Pages\V4\Account\ConfirmEmailChange.cshtml.cs (2)
31public virtual Task<IActionResult> OnGetAsync(string userId, string email, string code) => throw new NotImplementedException(); 45public override async Task<IActionResult> OnGetAsync(string userId, string email, string code)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (4)
82public virtual Task<IActionResult> OnGetCallbackAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null, string? remoteError = null) => throw new NotImplementedException(); 88public virtual Task<IActionResult> OnPostConfirmationAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 125public override async Task<IActionResult> OnGetCallbackAsync(string? returnUrl = null, string? remoteError = null) 170public override async Task<IActionResult> OnPostConfirmationAsync(string? returnUrl = null)
Areas\Identity\Pages\V4\Account\ForgotPassword.cshtml.cs (2)
48public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 62public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (2)
89public virtual Task<IActionResult> OnPostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 120public override async Task<IActionResult> OnPostAsync(string? returnUrl = null)
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (4)
68public virtual Task<IActionResult> OnGetAsync(bool rememberMe, [StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 74public virtual Task<IActionResult> OnPostAsync(bool rememberMe, [StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 93public override async Task<IActionResult> OnGetAsync(bool rememberMe, string? returnUrl = null) 109public override async Task<IActionResult> OnPostAsync(bool rememberMe, string? returnUrl = null)
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (4)
55public virtual Task<IActionResult> OnGetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 61public virtual Task<IActionResult> OnPostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 80public override async Task<IActionResult> OnGetAsync(string? returnUrl = null) 94public override async Task<IActionResult> OnPostAsync(string? returnUrl = null)
Areas\Identity\Pages\V4\Account\Logout.cshtml.cs (2)
31public virtual Task<IActionResult> OnPost(string? returnUrl = null) => throw new NotImplementedException(); 45public override async Task<IActionResult> OnPost(string? returnUrl = null)
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (4)
71public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 77public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 96public override async Task<IActionResult> OnGetAsync() 113public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\DeletePersonalData.cshtml.cs (4)
50public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 56public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 75public override async Task<IActionResult> OnGet() 87public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\Disable2fa.cshtml.cs (4)
28public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 34public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 50public override async Task<IActionResult> OnGet() 66public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\DownloadPersonalData.cshtml.cs (2)
29public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 50public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\Email.cshtml.cs (6)
66public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 72public virtual Task<IActionResult> OnPostChangeEmailAsync() => throw new NotImplementedException(); 78public virtual Task<IActionResult> OnPostSendVerificationEmailAsync() => throw new NotImplementedException(); 110public override async Task<IActionResult> OnGetAsync() 122public override async Task<IActionResult> OnPostChangeEmailAsync() 157public override async Task<IActionResult> OnPostSendVerificationEmailAsync()
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (4)
76public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 82public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 103public override async Task<IActionResult> OnGetAsync() 116public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\ExternalLogins.cshtml.cs (8)
47public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 53public virtual Task<IActionResult> OnPostRemoveLoginAsync(string loginProvider, string providerKey) => throw new NotImplementedException(); 59public virtual Task<IActionResult> OnPostLinkLoginAsync(string provider) => throw new NotImplementedException(); 65public virtual Task<IActionResult> OnGetLinkLoginCallbackAsync() => throw new NotImplementedException(); 84public override async Task<IActionResult> OnGetAsync() 107public override async Task<IActionResult> OnPostRemoveLoginAsync(string loginProvider, string providerKey) 127public override async Task<IActionResult> OnPostLinkLoginAsync(string provider) 138public override async Task<IActionResult> OnGetLinkLoginCallbackAsync()
Areas\Identity\Pages\V4\Account\Manage\GenerateRecoveryCodes.cshtml.cs (4)
36public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 42public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 58public override async Task<IActionResult> OnGetAsync() 75public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\Index.cshtml.cs (4)
56public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 62public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 91public override async Task<IActionResult> OnGetAsync() 103public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\PersonalData.cshtml.cs (2)
21public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 37public override async Task<IActionResult> OnGet()
Areas\Identity\Pages\V4\Account\Manage\ResetAuthenticator.cshtml.cs (4)
28public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 34public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 53public override async Task<IActionResult> OnGet() 64public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (4)
61public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 67public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 83public override async Task<IActionResult> OnGetAsync() 101public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Manage\TwoFactorAuthentication.cshtml.cs (4)
53public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 59public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 76public override async Task<IActionResult> OnGetAsync() 92public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (2)
90public virtual Task<IActionResult> OnPostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 123public override async Task<IActionResult> OnPostAsync(string? returnUrl = null)
Areas\Identity\Pages\V4\Account\RegisterConfirmation.cshtml.cs (2)
42public virtual Task<IActionResult> OnGetAsync(string email, string? returnUrl = null) => throw new NotImplementedException(); 56public override async Task<IActionResult> OnGetAsync(string email, string? returnUrl = null)
Areas\Identity\Pages\V4\Account\ResendEmailConfirmation.cshtml.cs (2)
54public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 72public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (2)
78public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 106public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\ConfirmEmail.cshtml.cs (2)
31public virtual Task<IActionResult> OnGetAsync(string userId, string code) => throw new NotImplementedException(); 43public override async Task<IActionResult> OnGetAsync(string userId, string code)
Areas\Identity\Pages\V5\Account\ConfirmEmailChange.cshtml.cs (2)
31public virtual Task<IActionResult> OnGetAsync(string userId, string email, string code) => throw new NotImplementedException(); 45public override async Task<IActionResult> OnGetAsync(string userId, string email, string code)
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (4)
82public virtual Task<IActionResult> OnGetCallbackAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null, string? remoteError = null) => throw new NotImplementedException(); 88public virtual Task<IActionResult> OnPostConfirmationAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 125public override async Task<IActionResult> OnGetCallbackAsync(string? returnUrl = null, string? remoteError = null) 170public override async Task<IActionResult> OnPostConfirmationAsync(string? returnUrl = null)
Areas\Identity\Pages\V5\Account\ForgotPassword.cshtml.cs (2)
48public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 62public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (2)
89public virtual Task<IActionResult> OnPostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 120public override async Task<IActionResult> OnPostAsync(string? returnUrl = null)
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (4)
68public virtual Task<IActionResult> OnGetAsync(bool rememberMe, [StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 74public virtual Task<IActionResult> OnPostAsync(bool rememberMe, [StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 93public override async Task<IActionResult> OnGetAsync(bool rememberMe, string? returnUrl = null) 109public override async Task<IActionResult> OnPostAsync(bool rememberMe, string? returnUrl = null)
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (4)
55public virtual Task<IActionResult> OnGetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 61public virtual Task<IActionResult> OnPostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 80public override async Task<IActionResult> OnGetAsync(string? returnUrl = null) 94public override async Task<IActionResult> OnPostAsync(string? returnUrl = null)
Areas\Identity\Pages\V5\Account\Logout.cshtml.cs (2)
31public virtual Task<IActionResult> OnPost(string? returnUrl = null) => throw new NotImplementedException(); 45public override async Task<IActionResult> OnPost(string? returnUrl = null)
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (4)
71public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 77public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 96public override async Task<IActionResult> OnGetAsync() 113public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\DeletePersonalData.cshtml.cs (4)
50public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 56public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 75public override async Task<IActionResult> OnGet() 87public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\Disable2fa.cshtml.cs (4)
28public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 34public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 50public override async Task<IActionResult> OnGet() 66public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\DownloadPersonalData.cshtml.cs (2)
29public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 50public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\Email.cshtml.cs (6)
66public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 72public virtual Task<IActionResult> OnPostChangeEmailAsync() => throw new NotImplementedException(); 78public virtual Task<IActionResult> OnPostSendVerificationEmailAsync() => throw new NotImplementedException(); 110public override async Task<IActionResult> OnGetAsync() 122public override async Task<IActionResult> OnPostChangeEmailAsync() 157public override async Task<IActionResult> OnPostSendVerificationEmailAsync()
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (4)
76public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 82public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 103public override async Task<IActionResult> OnGetAsync() 116public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\ExternalLogins.cshtml.cs (8)
47public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 53public virtual Task<IActionResult> OnPostRemoveLoginAsync(string loginProvider, string providerKey) => throw new NotImplementedException(); 59public virtual Task<IActionResult> OnPostLinkLoginAsync(string provider) => throw new NotImplementedException(); 65public virtual Task<IActionResult> OnGetLinkLoginCallbackAsync() => throw new NotImplementedException(); 84public override async Task<IActionResult> OnGetAsync() 107public override async Task<IActionResult> OnPostRemoveLoginAsync(string loginProvider, string providerKey) 127public override async Task<IActionResult> OnPostLinkLoginAsync(string provider) 138public override async Task<IActionResult> OnGetLinkLoginCallbackAsync()
Areas\Identity\Pages\V5\Account\Manage\GenerateRecoveryCodes.cshtml.cs (4)
36public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 42public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 58public override async Task<IActionResult> OnGetAsync() 75public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\Index.cshtml.cs (4)
56public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 62public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 91public override async Task<IActionResult> OnGetAsync() 103public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\PersonalData.cshtml.cs (2)
21public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 37public override async Task<IActionResult> OnGet()
Areas\Identity\Pages\V5\Account\Manage\ResetAuthenticator.cshtml.cs (4)
28public virtual Task<IActionResult> OnGet() => throw new NotImplementedException(); 34public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 53public override async Task<IActionResult> OnGet() 64public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (4)
61public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 67public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 83public override async Task<IActionResult> OnGetAsync() 101public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Manage\TwoFactorAuthentication.cshtml.cs (4)
53public virtual Task<IActionResult> OnGetAsync() => throw new NotImplementedException(); 59public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 76public override async Task<IActionResult> OnGetAsync() 92public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (2)
90public virtual Task<IActionResult> OnPostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? returnUrl = null) => throw new NotImplementedException(); 123public override async Task<IActionResult> OnPostAsync(string? returnUrl = null)
Areas\Identity\Pages\V5\Account\RegisterConfirmation.cshtml.cs (2)
42public virtual Task<IActionResult> OnGetAsync(string email, string? returnUrl = null) => throw new NotImplementedException(); 56public override async Task<IActionResult> OnGetAsync(string email, string? returnUrl = null)
Areas\Identity\Pages\V5\Account\ResendEmailConfirmation.cshtml.cs (2)
54public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 72public override async Task<IActionResult> OnPostAsync()
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (2)
78public virtual Task<IActionResult> OnPostAsync() => throw new NotImplementedException(); 106public override async Task<IActionResult> OnPostAsync()
Microsoft.AspNetCore.InternalTesting (31)
ExceptionAssertions.cs (5)
50public static async Task<TException> ThrowsAsync<TException>(Func<Task> testCode, string exceptionMessage) 109public static Task<ArgumentException> ThrowsArgumentAsync(Func<Task> testCode, string paramName, string exceptionMessage) 114private static async Task<TException> ThrowsArgumentAsyncInternal<TException>( 164public static Task<ArgumentException> ThrowsArgumentNullOrEmptyAsync(Func<Task> testCode, string paramName) 188public static Task<ArgumentException> ThrowsArgumentNullOrEmptyStringAsync(Func<Task> testCode, string paramName)
HttpClientSlim.cs (9)
25public static async Task<string> GetStringAsync(string requestUri, bool validateCertificate = true) 29public static async Task<string> GetStringAsync(Uri requestUri, bool validateCertificate = true) 68public static async Task<string> PostAsync(string requestUri, HttpContent content, bool validateCertificate = true) 72public static async Task<string> PostAsync(Uri requestUri, HttpContent content, bool validateCertificate = true) 94private static async Task<string> ReadResponse(Stream stream) 109private static async Task<string> RetryRequest(Func<Task<string>> retryBlock) 150private static async Task<Stream> GetStream(Uri requestUri, bool validateCertificate) 171public static async Task<Socket> GetSocket(Uri requestUri)
src\Shared\TaskExtensions.cs (8)
54public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = DefaultTimeoutDuration, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 59public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 64public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = DefaultTimeoutDuration, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 69public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 75public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout,
xunit\AspNetTestAssemblyRunner.cs (1)
101protected override async Task<RunSummary> RunTestCollectionAsync(
xunit\AspNetTestClassRunner.cs (1)
29protected override Task<RunSummary> RunTestMethodAsync(ITestMethod testMethod, IReflectionMethodInfo method, IEnumerable<IXunitTestCase> testCases, object[] constructorArguments)
xunit\AspNetTestCollectionRunner.cs (1)
59protected override Task<RunSummary> RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo @class, IEnumerable<IXunitTestCase> testCases)
xunit\AspNetTestInvoker.cs (1)
35protected override async Task<decimal> InvokeTestMethodAsync(object testClassInstance)
xunit\AspNetTestMethodRunner.cs (1)
34protected override Task<RunSummary> RunTestCaseAsync(IXunitTestCase testCase)
xunit\AspNetTestRunner.cs (4)
53protected override async Task<Tuple<decimal, string>> InvokeTestAsync(ExceptionAggregator aggregator) 76private async Task<Tuple<decimal, string>> RunTestCaseWithRetryAsync(RetryAttribute retryAttribute, ExceptionAggregator aggregator) 105protected override async Task<decimal> InvokeTestMethodAsync(ExceptionAggregator aggregator) 129private Task<decimal> InvokeTestMethodCoreAsync(ExceptionAggregator aggregator)
Microsoft.AspNetCore.InternalTesting.Tests (1)
TaskExtensionsTest.cs (1)
80async Task<bool> ExpectedTimeout()
Microsoft.AspNetCore.Localization (9)
AcceptLanguageHeaderRequestCultureProvider.cs (1)
23public override Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext)
CookieRequestCultureProvider.cs (1)
29public override Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext)
CustomRequestCultureProvider.cs (3)
13private readonly Func<HttpContext, Task<ProviderCultureResult?>> _provider; 19public CustomRequestCultureProvider(Func<HttpContext, Task<ProviderCultureResult?>> provider) 27public override Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext)
IRequestCultureProvider.cs (1)
21Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext);
QueryStringRequestCultureProvider.cs (1)
27public override Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext)
RequestCultureProvider.cs (2)
18protected static readonly Task<ProviderCultureResult?> NullProviderCultureResult = Task.FromResult(default(ProviderCultureResult)); 26public abstract Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext);
Microsoft.AspNetCore.Localization.Routing (1)
RouteDataRequestCultureProvider.cs (1)
28public override Task<ProviderCultureResult?> DetermineProviderCultureResult(HttpContext httpContext)
Microsoft.AspNetCore.Mvc.Abstractions (9)
Filters\ActionExecutionDelegate.cs (1)
13public delegate Task<ActionExecutedContext> ActionExecutionDelegate();
Filters\ResourceExecutionDelegate.cs (1)
11public delegate Task<ResourceExecutedContext> ResourceExecutionDelegate();
Filters\ResultExecutionDelegate.cs (1)
11public delegate Task<ResultExecutedContext> ResultExecutionDelegate();
Formatters\IInputFormatter.cs (1)
27Task<InputFormatterResult> ReadAsync(InputFormatterContext context);
Formatters\InputFormatterResult.cs (5)
13private static readonly Task<InputFormatterResult> _failureAsync = Task.FromResult(_failure); 14private static readonly Task<InputFormatterResult> _noValueAsync = Task.FromResult(_noValue); 66public static Task<InputFormatterResult> FailureAsync() 94public static Task<InputFormatterResult> SuccessAsync(object? model) 120public static Task<InputFormatterResult> NoValueAsync()
Microsoft.AspNetCore.Mvc.Api.Analyzers (3)
AddResponseTypeAttributeCodeFixAction.cs (2)
45protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 127private async Task<CodeActionContext?> CreateCodeActionContext(CancellationToken cancellationToken)
ApiActionsDoNotRequireExplicitModelValidationCodeFixProvider.cs (1)
52protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
360(declaredReturnType.GetGenericTypeDefinition() == typeof(Task<>) || declaredReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)))
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (13)
ApiResponseTypeProviderTest.cs (4)
72public Task<ActionResult<BaseModel>> Get(int id) => null; 252public Task<ActionResult<BaseModel>> DeleteBase(int id) => null; 285public Task<ActionResult<BaseModel>> PostModel(int id, BaseModel model) => null; 341public Task<ActionResult<BaseModel>> Put(int id, BaseModel model) => null;
DefaultApiDescriptionProviderTest.cs (8)
2401private Task<Product> ReturnsTaskOfProduct() 2406private Task<object> ReturnsTaskOfObject() 2416private Task<IActionResult> ReturnsTaskOfActionResult() 2421private Task<JsonResult> ReturnsTaskOfJsonResult() 2461private Task<ActionResult<Product>> ReturnsTaskOfActionResultOfProduct() => null; 2462private Task<Http.HttpResults.Ok<Product>> ReturnsTaskOfResultOfProductWithEndpointMetadata() => null; 2464private Task<ActionResult<IEnumerable<Product>>> ReturnsTaskOfActionResultOfSequenceOfProducts() => null; 2841public override Task<InputFormatterResult> ReadRequestBodyAsync(
EndpointMetadataApiDescriptionProviderTest.cs (1)
501async Task<Results<Created<InferredJsonClass>, ProblemHttpResult>> () =>
Microsoft.AspNetCore.Mvc.Core (57)
Authorization\AuthorizeFilter.cs (1)
119internal async Task<AuthorizationPolicy> GetEffectivePolicyAsync(AuthorizationFilterContext context)
ControllerBase.cs (9)
2525public virtual Task<bool> TryUpdateModelAsync<TModel>( 2544public virtual async Task<bool> TryUpdateModelAsync<TModel>( 2572public virtual Task<bool> TryUpdateModelAsync<TModel>( 2604public async Task<bool> TryUpdateModelAsync<TModel>( 2641public async Task<bool> TryUpdateModelAsync<TModel>( 2680public Task<bool> TryUpdateModelAsync<TModel>( 2714public Task<bool> TryUpdateModelAsync<TModel>( 2746public virtual async Task<bool> TryUpdateModelAsync( 2783public Task<bool> TryUpdateModelAsync(
Formatters\InputFormatter.cs (2)
92public virtual Task<InputFormatterResult> ReadAsync(InputFormatterContext context) 118public abstract Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context);
Formatters\SystemTextJsonInputFormatter.cs (1)
53public sealed override async Task<InputFormatterResult> ReadRequestBodyAsync(
Formatters\TextInputFormatter.cs (2)
35public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context) 60public abstract Task<InputFormatterResult> ReadRequestBodyAsync(
Infrastructure\ActionMethodExecutor.cs (3)
260var actionResult = await (Task<IActionResult>)returnValue!; 275var actionResult = await (Task<IActionResult>)returnValue!; 282=> typeof(Task<IActionResult>).IsAssignableFrom(executor.MethodReturnType);
Infrastructure\AsyncEnumerableReader.cs (5)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new(); 52public bool TryGetReader(Type type, [NotNullWhen(true)] out Func<object, CancellationToken, Task<ICollection>>? reader) 67var converter = (Func<object, CancellationToken, Task<ICollection>>)Converter 69.CreateDelegate(typeof(Func<object, CancellationToken, Task<ICollection>>), this); 79private async Task<ICollection> ReadInternal<T>(object value, CancellationToken cancellationToken)
Infrastructure\ControllerActionInvoker.cs (3)
340private Task<ActionExecutedContext> InvokeNextActionFilterAwaitedAsync() 358static async Task<ActionExecutedContext> Awaited(ControllerActionInvoker invoker, Task task) 366static async Task<ActionExecutedContext> Throw()
Infrastructure\IActionResultTypeMapper.cs (2)
28/// Prior to calling this method, the infrastructure will unwrap <see cref="Task{TResult}"/> or 42/// Prior to calling this method, the infrastructure will unwrap <see cref="Task{TResult}"/> or
Infrastructure\NonDisposableStream.cs (1)
76public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Infrastructure\ResourceInvoker.cs (6)
906private Task<ResourceExecutedContext> InvokeNextResourceFilterAwaitedAsync() 925static async Task<ResourceExecutedContext> Awaited(ResourceInvoker invoker, Task task) 933static async Task<ResourceExecutedContext> Throw() 1400private Task<ResultExecutedContext> InvokeNextResultFilterAwaitedAsync<TFilter, TFilterAsync>() 1421static async Task<ResultExecutedContext> Awaited(ResourceInvoker invoker, Task task) 1429static async Task<ResultExecutedContext> Throw()
ModelBinding\Binders\CollectionModelBinder.cs (3)
263internal async Task<CollectionResult> BindSimpleCollection( 302private Task<CollectionResult> BindComplexCollection(ModelBindingContext bindingContext) 322internal async Task<CollectionResult> BindComplexCollectionFromIndexes(
ModelBinding\Binders\ComplexTypeModelBinder.cs (1)
256private async Task<ModelBindingResult> BindProperty(
ModelBinding\Binders\KeyValuePairModelBinder.cs (1)
90internal static async Task<ModelBindingResult> TryBindStrongModel<TModel>(
ModelBinding\CompositeValueProvider.cs (4)
42/// A <see cref="Task{TResult}"/> which, when completed, asynchronously returns a 45public static async Task<CompositeValueProvider> CreateAsync(ControllerContext controllerContext) 61/// A <see cref="Task{TResult}"/> which, when completed, asynchronously returns a 64public static async Task<CompositeValueProvider> CreateAsync(
ModelBinding\ModelBindingHelper.cs (5)
37public static Task<bool> TryUpdateModelAsync<TModel>( 77public static Task<bool> TryUpdateModelAsync<TModel>( 123public static Task<bool> TryUpdateModelAsync<TModel>( 162public static Task<bool> TryUpdateModelAsync( 203public static async Task<bool> TryUpdateModelAsync(
ModelBinding\ParameterBinder.cs (1)
64public virtual Task<ModelBindingResult> BindModelAsync(
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (5)
38/// to a <see cref="Task{TResult}"/>, if <paramref name="possibleFSharpAsyncType"/> is in fact a closed F# async type, 49/// to a <see cref="Task{TResult}"/>, or to a <see cref="Task"/>, if <c>TResult</c> is <see href="https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-unit-0.html">FSharp.Core.Unit</see>; 53/// When this method returns, contains the type of the closed generic instantiation of <see cref="Task{TResult}"/> or of <see cref="Task"/> that will be returned 75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 145var typeDef when typeDef == typeof(Task<>) && IsFSharpUnit(genericAwaitableType.GetGenericArguments()[0]) => (typeof(Task), MakeTaskOfUnitToTaskExpression(genericAwaitableType)),
Microsoft.AspNetCore.Mvc.Core.Test (45)
ApplicationModels\DefaultApplicationModelProviderTest.cs (2)
1908public Task<IActionResult> GetPersonAsync() => null; 1911public Task<IActionResult> GetAddressAsync() => null;
ApplicationModels\EndpointMetadataProviderTest.cs (4)
319public Task<AddsCustomEndpointMetadataResult> ActionWithMetadataInTaskOfResult() 334public Task<AddsCustomEndpointMetadataActionResult> ActionWithMetadataInTaskOfActionResult() 345public Task<RemovesAcceptsMetadataResult> ActionWithNoAcceptsMetadataInTaskOfResult() 356public Task<RemovesAcceptsMetadataActionResult> ActionWithNoAcceptsMetadataInTaskOfActionResult()
Authorization\AuthorizeFilterTest.cs (3)
240public Task<AuthorizationPolicy> GetDefaultPolicyAsync() 243public Task<AuthorizationPolicy> GetPolicyAsync(string policyName) 249public Task<AuthorizationPolicy> GetFallbackPolicyAsync()
Formatters\InputFormatterTest.cs (2)
434public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context) 449public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context)
Formatters\TextInputFormatterTest.cs (1)
221public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
Infrastructure\ActionMethodExecutorTest.cs (7)
490public Task<IActionResult> ReturnIActionResultAsync() => Task.FromResult((IActionResult)new StatusCodeResult(201)); 492public Task<ViewResult> ReturnActionResultAsync() => Task.FromResult(new ViewResult { StatusCode = 200 }); 494public Task<StatusCodeResult> ReturnsIActionResultSubTypeAsync() => Task.FromResult(new StatusCodeResult(200)); 496public Task<TestModel> ReturnsModelAsModelAsync() => Task.FromResult(new TestModel()); 498public Task<object> ReturnsModelAsObjectAsync() => Task.FromResult((object)new TestModel()); 500public Task<object> ReturnIActionResultAsObjectAsync() => Task.FromResult((object)new OkResult()); 502public Task<ActionResult<TestModel>> ReturnActionResultOFTAsync() => Task.FromResult(new ActionResult<TestModel>(new TestModel()));
Infrastructure\ControllerActionInvokerTest.cs (13)
1802public async Task<TestActionResult> AsyncActionMethodWithTestActionResult(int value) 1817public async Task<object> AsyncActionMethodReturningActionResultWithTaskOfObjectAsReturnType(int value = 5) 1827public async Task<IActionResult> AsyncActionMethodWithNullActionResult() 1832public async Task<TestActionResult> AsyncActionMethodWithNullTestActionResult() 1844public async Task<int> TaskValueTypeAction(int i, string s) 1851public async Task<Task<int>> TaskOfTaskAction(int i, string s) 1857public Task<int> TaskValueTypeActionWithoutAsync(int i, string s) 1863public async Task<int> TaskActionWithException(int i, string s) 1869public Task<int> TaskActionWithExceptionWithoutAsync(int i, string s) 1874public async Task<int> TaskActionThrowAfterAwait(int i, string s) 1895/// Returns a <see cref="Task{TResult}"/> instead of a <see cref="Task"/>. 1925public Task<ConvertibleToActionResult> ActionReturningConvertibleToActionResultAsync(int input)
Infrastructure\FileStreamResultExecutorTest.cs (1)
51public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
ModelBinding\Binders\BodyModelBinderProviderTest.cs (1)
156public Task<InputFormatterResult> ReadAsync(InputFormatterContext context)
ModelBinding\Binders\BodyModelBinderTests.cs (10)
725private readonly Func<InputFormatterContext, Encoding, Task<InputFormatterResult>> _readRequestBodyAsync; 727public XyzFormatter(Func<InputFormatterContext, Encoding, Task<InputFormatterResult>> readRequestBodyAsync) 739public override Task<InputFormatterResult> ReadRequestBodyAsync( 761public Task<InputFormatterResult> ReadAsync(InputFormatterContext context) 783public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) 805public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) 827public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) 853public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) 875public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) 895public override Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
ModelBinding\StubModelBinder.cs (1)
45public StubModelBinder(Func<ModelBindingContext, Task<ModelBindingResult>> callback)
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
NonSeekableReadableStream.cs (1)
72public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Microsoft.AspNetCore.Mvc.Formatters.Xml (2)
XmlDataContractSerializerInputFormatter.cs (1)
99public override async Task<InputFormatterResult> ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding)
XmlSerializerInputFormatter.cs (1)
81public override async Task<InputFormatterResult> ReadRequestBodyAsync(
Microsoft.AspNetCore.Mvc.FunctionalTests (10)
AuthMiddlewareAndFilterTestBase.cs (2)
277private async Task<string> GetAuthCookieAsync(string action) 286private async Task<string> GetBearerTokenAsync()
AuthMiddlewareUsingRequireAuthTest.cs (1)
79private async Task<string> GetAuthCookieAsync(string action)
Infrastructure\HttpClientExtensions.cs (3)
14public static async Task<IHtmlDocument> GetHtmlDocumentAsync(this HttpClient client, string requestUri) 22public static async Task<IHtmlDocument> GetHtmlDocumentAsync(this HttpResponseMessage response) 35public static async Task<HttpResponseMessage> AssertStatusCodeAsync(this HttpResponseMessage response, HttpStatusCode expectedStatusCode)
Infrastructure\ResourceFile.cs (2)
124/// A <see cref="Task{string}"/> which on completion returns the <see cref="string"/> content of 134public static async Task<string> ReadResourceAsync(Assembly assembly, string resourceName, bool sourceFile)
src\Shared\SizeLimitedStream.cs (1)
82public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
TestingInfrastructureTests.cs (1)
272protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.AspNetCore.Mvc.IntegrationTests (6)
AuthorizeFilterIntegrationTest.cs (3)
191public Task<AuthorizationPolicy> GetDefaultPolicyAsync() 196public Task<AuthorizationPolicy> GetPolicyAsync(string policyName) 207public Task<AuthorizationPolicy> GetFallbackPolicyAsync()
ParameterBinderExtensions.cs (2)
16public static Task<ModelBindingResult> BindModelAsync( 55public static async Task<ModelBindingResult> BindModelAsync(
TryUpdateModelIntegrationTest.cs (1)
1354private async Task<bool> TryUpdateModelAsync(
Microsoft.AspNetCore.Mvc.NewtonsoftJson (7)
NewtonsoftJsonInputFormatter.cs (1)
94public override async Task<InputFormatterResult> ReadRequestBodyAsync(
NewtonsoftJsonPatchInputFormatter.cs (1)
61public override async Task<InputFormatterResult> ReadRequestBodyAsync(
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (5)
34private readonly ConcurrentDictionary<Type, Func<object, CancellationToken, Task<ICollection>>?> _asyncEnumerableConverters = new(); 52public bool TryGetReader(Type type, [NotNullWhen(true)] out Func<object, CancellationToken, Task<ICollection>>? reader) 67var converter = (Func<object, CancellationToken, Task<ICollection>>)Converter 69.CreateDelegate(typeof(Func<object, CancellationToken, Task<ICollection>>), this); 79private async Task<ICollection> ReadInternal<T>(object value, CancellationToken cancellationToken)
Microsoft.AspNetCore.Mvc.Razor (16)
Compilation\DefaultRazorPageFactoryProvider.cs (1)
38var compileTask = Compiler.CompileAsync(relativePath);
Compilation\DefaultViewCompiler.cs (5)
23private Dictionary<string, Task<CompiledViewDescriptor>>? _compiledViews; 52var compiledViews = new Dictionary<string, Task<CompiledViewDescriptor>>( 79internal Dictionary<string, Task<CompiledViewDescriptor>>? CompiledViews => _compiledViews; 88public Task<CompiledViewDescriptor> CompileAsync(string relativePath) 96if (_compiledViews.TryGetValue(relativePath, out var cachedResult))
Compilation\IViewCompiler.cs (1)
16Task<CompiledViewDescriptor> CompileAsync(string relativePath);
RazorPage.cs (6)
110var task = RenderSectionAsyncCore(name, required); 119/// A <see cref="Task{HtmlString}"/> that on completion returns an empty <see cref="IHtmlContent"/>. 124public Task<HtmlString?> RenderSectionAsync(string name) 138/// A <see cref="Task{HtmlString}"/> that on completion returns an empty <see cref="IHtmlContent"/>. 145public Task<HtmlString?> RenderSectionAsync(string name, bool required) 153private async Task<HtmlString?> RenderSectionAsyncCore(string sectionName, bool required)
RazorPageBase.cs (2)
675/// <returns>A <see cref="Task{HtmlString}"/> that represents the asynchronous flush operation and on 683public virtual async Task<HtmlString> FlushAsync()
RazorView.cs (1)
89private async Task<ViewBufferTextWriter> RenderPageAsync(
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (8)
PageLoaderMatcherPolicy.cs (2)
77var compiled = _loader.LoadAsync(page, endpoint.Metadata); 95private static async Task ApplyAsyncAwaited(PageLoader pageLoader, CandidateSet candidates, Task<CompiledPageActionDescriptor> actionDescriptorTask, int index)
RuntimeViewCompiler.cs (6)
85public Task<CompiledViewDescriptor> CompileAsync(string relativePath) 91if (_cache.TryGetValue<Task<CompiledViewDescriptor>>(relativePath, out var cachedResult) && cachedResult is not null) 107private Task<CompiledViewDescriptor> OnCacheMiss(string normalizedPath) 119if (_cache.TryGetValue<Task<CompiledViewDescriptor>>(normalizedPath, out var result) && result is not null)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (5)
PageLoaderMatcherPolicyTest.cs (1)
70var loadTask = Task.Run(async () =>
RuntimeViewCompilerTest.cs (4)
630var task1 = Task.Run(() => compiler.CompileAsync(path1)); 631var task2 = Task.Run(() => compiler.CompileAsync(path2)); 670var task1 = Task.Run(() => compiler.CompileAsync(path)); 671var task2 = Task.Run(() =>
Microsoft.AspNetCore.Mvc.RazorPages (39)
Filters\PageHandlerExecutionDelegate.cs (1)
13public delegate Task<PageHandlerExecutedContext> PageHandlerExecutionDelegate();
Infrastructure\DefaultPageLoader.cs (4)
35public override Task<CompiledPageActionDescriptor> LoadAsync(PageActionDescriptor actionDescriptor) 38public override Task<CompiledPageActionDescriptor> LoadAsync(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata) 50var task = actionDescriptor.CompiledPageActionDescriptorTask; 60private async Task<CompiledPageActionDescriptor> LoadAsyncCore(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata)
Infrastructure\ExecutorFactory.cs (11)
42var taskType = ClosedGenericMatcher.ExtractGenericInterface(returnType, typeof(Task<>)); 74public abstract Task<IActionResult?> Execute(object receiver, object?[]? arguments); 96public override async Task<IActionResult?> Execute(object receiver, object?[]? arguments) 109private readonly Func<object, object?[]?, Task<object>> _thunk; 117_thunk = Expression.Lambda<Func<object, object?[]?, Task<object>>>( 130public override async Task<IActionResult?> Execute(object receiver, object?[]? arguments) 136private static async Task<object?> Convert<T>(object taskAsObject) 138var task = (Task<T>)taskAsObject; 162public override Task<IActionResult?> Execute(object receiver, object?[]? arguments) 190public override Task<IActionResult?> Execute(object receiver, object?[]? arguments)
Infrastructure\PageActionInvoker.cs (1)
673private async Task<PageHandlerExecutedContext> InvokeNextPageFilterAwaitedAsync()
Infrastructure\PageHandlerExecutorDelegate.cs (1)
6internal delegate Task<IActionResult?> PageHandlerExecutorDelegate(object handler, object?[]? arguments);
Infrastructure\PageLoader.cs (2)
21public abstract Task<CompiledPageActionDescriptor> LoadAsync(PageActionDescriptor actionDescriptor); 29public virtual Task<CompiledPageActionDescriptor> LoadAsync(PageActionDescriptor actionDescriptor, EndpointMetadataCollection endpointMetadata)
PageActionDescriptor.cs (1)
62internal Task<CompiledPageActionDescriptor>? CompiledPageActionDescriptorTask { get; set; }
PageBase.cs (9)
1276public virtual Task<bool> TryUpdateModelAsync<TModel>( 1294public virtual async Task<bool> TryUpdateModelAsync<TModel>( 1321public virtual Task<bool> TryUpdateModelAsync<TModel>( 1352public async Task<bool> TryUpdateModelAsync<TModel>( 1388public async Task<bool> TryUpdateModelAsync<TModel>( 1426public Task<bool> TryUpdateModelAsync<TModel>( 1459public Task<bool> TryUpdateModelAsync<TModel>( 1490public virtual async Task<bool> TryUpdateModelAsync( 1526public Task<bool> TryUpdateModelAsync(
PageModel.cs (9)
185protected internal Task<bool> TryUpdateModelAsync<TModel>(TModel model) 201protected internal async Task<bool> TryUpdateModelAsync<TModel>(TModel model, string name) 226protected internal Task<bool> TryUpdateModelAsync<TModel>( 257protected internal async Task<bool> TryUpdateModelAsync<TModel>( 293protected internal async Task<bool> TryUpdateModelAsync<TModel>( 331protected internal Task<bool> TryUpdateModelAsync<TModel>( 364protected internal Task<bool> TryUpdateModelAsync<TModel>( 395protected internal async Task<bool> TryUpdateModelAsync( 431protected internal Task<bool> TryUpdateModelAsync(
Microsoft.AspNetCore.Mvc.RazorPages.Test (12)
Infrastructure\ExecutorFactoryTest.cs (12)
27var actionResultTask = executor(new TestPage(), null); 47var actionResultTask = executor(new TestPage(), null); 68var actionResultTask = executor(new TestPage(), CreateArguments(methodInfo)); 91var actionResultTask = executor(page, null); 114var actionResultTask = executor(page, null); 136var actionResultTask = executor(new TestPage(), null); 157var actionResultTask = executor(new TestPage(), CreateArguments(methodInfo)); 250public Task<IActionResult> GenericTaskHandler() => Task.FromResult<IActionResult>(new EmptyResult()); 252public Task<ContentResult> TaskReturningConcreteSubtype(string arg = "value") 295public Task<IActionResult> GenericTaskHandler() => Task.FromResult<IActionResult>(new EmptyResult()); 297public Task<ContentResult> TaskReturningConcreteSubtype(string arg = "value") 307public Task<object> TaskOfObject() => Task.FromResult(new object());
Microsoft.AspNetCore.Mvc.TagHelpers (15)
Cache\DistributedCacheTagHelperFormatter.cs (2)
16public Task<byte[]> SerializeAsync(DistributedCacheTagHelperFormattingContext context) 33public Task<HtmlString> DeserializeAsync(byte[] value)
Cache\DistributedCacheTagHelperService.cs (4)
37private readonly ConcurrentDictionary<CacheTagKey, Task<IHtmlContent>> _workers; 61_workers = new ConcurrentDictionary<CacheTagKey, Task<IHtmlContent>>(); 65public async Task<IHtmlContent> ProcessContentAsync(TagHelperOutput output, CacheTagKey key, DistributedCacheEntryOptions options) 72if (!_workers.TryGetValue(key, out var result))
Cache\DistributedCacheTagHelperStorage.cs (1)
26public Task<byte[]> GetAsync(string key)
Cache\IDistributedCacheTagHelperFormatter.cs (2)
19Task<byte[]> SerializeAsync(DistributedCacheTagHelperFormattingContext context); 26Task<HtmlString> DeserializeAsync(byte[] value);
Cache\IDistributedCacheTagHelperService.cs (1)
23Task<IHtmlContent> ProcessContentAsync(TagHelperOutput output, CacheTagKey key, DistributedCacheEntryOptions options);
Cache\IDistributedCacheTagHelperStorage.cs (1)
20Task<byte[]> GetAsync(string key);
CacheTagHelper.cs (4)
70if (MemoryCache.TryGetValue(cacheKey, out Task<IHtmlContent> cachedResult)) 90private async Task<IHtmlContent> CreateCacheEntry(CacheTagKey cacheKey, TagHelperOutput output) 118var result = ProcessContentAsync(output); 204private async Task<IHtmlContent> ProcessContentAsync(TagHelperOutput output)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (3)
CacheTagHelperTest.cs (3)
522var result = cache.TryGetValue(cacheTagKey, out Task<IHtmlContent> cachedValue); 715Task<TagHelperContent> GetChildContentAsync(bool useCachedResult, HtmlEncoder encoder) 906Func<bool, HtmlEncoder, Task<TagHelperContent>> getChildContentAsync = (useCachedResult, _) =>
Microsoft.AspNetCore.Mvc.Testing (4)
Handlers\CookieContainerHandler.cs (1)
41protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Handlers\RedirectHandler.cs (3)
45protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 66private static async Task<HttpContent?> DuplicateRequestContent(HttpRequestMessage request) 111private static async Task<(Stream originalBody, Stream copy)> CopyBody(HttpRequestMessage request)
Microsoft.AspNetCore.Mvc.ViewFeatures (29)
Controller.cs (2)
353var task = next(); 364static async Task Awaited(Controller controller, Task<ActionExecutedContext> task)
HtmlHelper.cs (1)
445public async Task<IHtmlContent> PartialAsync(
IViewComponentHelper.cs (2)
26Task<IHtmlContent> InvokeAsync(string name, object? arguments); 39Task<IHtmlContent> InvokeAsync(Type componentType, object? arguments);
Rendering\HtmlHelperComponentExtensions.cs (3)
24public static Task<IHtmlContent> RenderComponentAsync<TComponent>(this IHtmlHelper htmlHelper, RenderMode renderMode) where TComponent : IComponent 35public static Task<IHtmlContent> RenderComponentAsync<TComponent>( 49public static async Task<IHtmlContent> RenderComponentAsync(
Rendering\HtmlHelperPartialExtensions.cs (4)
25public static Task<IHtmlContent> PartialAsync( 47public static Task<IHtmlContent> PartialAsync( 70public static Task<IHtmlContent> PartialAsync( 168var result = htmlHelper.PartialAsync(partialViewName, model, viewData);
Rendering\IHtmlHelper.cs (1)
491Task<IHtmlContent> PartialAsync(string partialViewName, object model, ViewDataDictionary viewData);
Rendering\ViewComponentHelperExtensions.cs (4)
22public static Task<IHtmlContent> InvokeAsync(this IViewComponentHelper helper, string name) 36public static Task<IHtmlContent> InvokeAsync(this IViewComponentHelper helper, Type componentType) 51public static Task<IHtmlContent> InvokeAsync<TComponent>(this IViewComponentHelper helper, object? arguments) 65public static Task<IHtmlContent> InvokeAsync<TComponent>(this IViewComponentHelper helper)
ViewComponentResultExecutor.cs (1)
142private static Task<IHtmlContent> GetViewComponentResult(IViewComponentHelper viewComponentHelper, ILogger logger, ViewComponentResult result)
ViewComponents\DefaultViewComponentDescriptorProvider.cs (1)
87selectedMethod.ReturnType.GetGenericTypeDefinition() != typeof(Task<>))
ViewComponents\DefaultViewComponentHelper.cs (3)
67public Task<IHtmlContent> InvokeAsync(string name, object? arguments) 85public Task<IHtmlContent> InvokeAsync(Type componentType, object? arguments) 129private async Task<IHtmlContent> InvokeCoreAsync(ViewComponentDescriptor descriptor, object? arguments)
ViewComponents\DefaultViewComponentInvoker.cs (7)
91private async Task<IViewComponentResult> InvokeAsyncCore(ObjectMethodExecutor executor, object component, ViewComponentContext context) 105if (returnType == typeof(Task<IViewComponentResult>)) 113resultAsObject = await (Task<IViewComponentResult>)task; 115else if (returnType == typeof(Task<string>)) 123resultAsObject = await (Task<string>)task; 125else if (returnType == typeof(Task<IHtmlContent>)) 133resultAsObject = await (Task<IHtmlContent>)task;
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (15)
DefaultEditorTemplatesTest.cs (1)
1550public Task<IHtmlContent> PartialAsync(
DependencyInjection\MvcViewFeaturesMvcBuilderExtensionsTest.cs (1)
174public Task<string> InvokeAsync() => Task.FromResult("Hello world");
Rendering\HtmlHelperPartialExtensionsTest.cs (3)
90public static TheoryData<Func<IHtmlHelper, Task<IHtmlContent>>, object, ViewDataDictionary> PartialAsyncExtensionMethods 96return new TheoryData<Func<IHtmlHelper, Task<IHtmlContent>>, object, ViewDataDictionary> 108Func<IHtmlHelper, Task<IHtmlContent>> partialAsyncMethod,
ViewComponentResultTest.cs (3)
408var result = Task.FromResult<IHtmlContent>(new HtmlContentBuilder().AppendHtml(expected)); 450var result = Task.FromResult<IHtmlContent>(new HtmlContentBuilder().AppendHtml(expected)); 742public Task<HtmlString> InvokeAsync(string name)
ViewComponents\DefaultViewComponentDescriptorProviderTest.cs (6)
102protected Task<IViewComponentResult> InvokeAsync() => null; 107public Task<IViewComponentResult> InvokeAsync(string a) => null; 109public Task<IViewComponentResult> InvokeAsync(int a) => null; 111public Task<IViewComponentResult> InvokeAsync(int a, int b) => null; 116public Task<IViewComponentResult> InvokeAsync(string a) => null; 145public Task<int> Invoke() => Task.FromResult(0);
ViewComponents\ViewComponentFeatureProviderTest.cs (1)
72public Task<string> InvokeAsync() => Task.FromResult("Hello world");
Microsoft.AspNetCore.OpenApi (24)
Services\IOpenApiDocumentProvider.cs (1)
27Task<OpenApiDocument> GetOpenApiDocumentAsync(CancellationToken cancellationToken = default);
Services\OpenApiDocumentService.cs (11)
58public async Task<OpenApiDocument> GetOpenApiDocumentAsync(IServiceProvider scopedServiceProvider, HttpRequest? httpRequest = null, CancellationToken cancellationToken = default) 238private async Task<OpenApiPaths> GetOpenApiPathsAsync( 258private async Task<Dictionary<HttpMethod, OpenApiOperation>> GetOperationsAsync( 304private async Task<OpenApiOperation> GetOperationAsync( 358private async Task<OpenApiResponses> GetResponsesAsync( 391private async Task<OpenApiResponse> GetResponseAsync( 432private async Task<List<IOpenApiParameter>?> GetParametersAsync( 503private async Task<OpenApiRequestBody?> GetRequestBodyAsync(OpenApiDocument document, ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken) 521private async Task<OpenApiRequestBody> GetFormRequestBody( 684private async Task<OpenApiRequestBody> GetJsonRequestBody( 762public Task<OpenApiDocument> GetOpenApiDocumentAsync(CancellationToken cancellationToken = default)
Services\Schemas\OpenApiSchemaService.cs (2)
120internal async Task<OpenApiSchema> GetOrCreateUnresolvedSchemaAsync(OpenApiDocument? document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) 139internal async Task<IOpenApiSchema> GetOrCreateSchemaAsync(OpenApiDocument document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (5)
38/// to a <see cref="Task{TResult}"/>, if <paramref name="possibleFSharpAsyncType"/> is in fact a closed F# async type, 49/// to a <see cref="Task{TResult}"/>, or to a <see cref="Task"/>, if <c>TResult</c> is <see href="https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-unit-0.html">FSharp.Core.Unit</see>; 53/// When this method returns, contains the type of the closed generic instantiation of <see cref="Task{TResult}"/> or of <see cref="Task"/> that will be returned 75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 145var typeDef when typeDef == typeof(Task<>) && IsFSharpUnit(genericAwaitableType.GetGenericArguments()[0]) => (typeof(Task), MakeTaskOfUnitToTaskExpression(genericAwaitableType)),
Transformers\OpenApiDocumentTransformerContext.cs (1)
46public Task<OpenApiSchema> GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
Transformers\OpenApiOperationTransformerContext.cs (1)
46public Task<OpenApiSchema> GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
Transformers\OpenApiSchemaTransformerContext.cs (1)
70public Task<OpenApiSchema> GetOrCreateSchemaAsync(Type type, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.OpenApi.Tests (1)
Transformers\CustomSchemaTransformerTests.cs (1)
398var tasks = new Task<OpenApiSchema>[5];
Microsoft.AspNetCore.OutputCaching (11)
DispatcherExtensions.cs (7)
10private readonly ConcurrentDictionary<TKey, Task<TValue?>> _workers = new(); 12public async Task<TValue?> ScheduleAsync(TKey key, Func<TKey, Task<TValue?>> valueFactory) 18if (_workers.TryGetValue(key, out var task)) 51public async Task<TValue?> ScheduleAsync<TState>(TKey key, TState state, Func<TKey, TState, Task<TValue?>> valueFactory) 57if (_workers.TryGetValue(key, out var task))
OutputCacheMiddleware.cs (3)
158async Task<OutputCacheEntry?> ExecuteResponseAsync() 253internal async Task<bool> TryServeCachedResponseAsync(OutputCacheContext context, OutputCacheEntry? cacheEntry, IReadOnlyList<IOutputCachePolicy> policies) 330internal async Task<bool> TryServeFromCacheAsync(OutputCacheContext cacheContext, IReadOnlyList<IOutputCachePolicy> policies)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheOptions.cs (1)
32public Func<Task<IConnectionMultiplexer>>? ConnectionMultiplexerFactory { get; set; }
Microsoft.AspNetCore.OutputCaching.Tests (4)
CachedResponseBodyTests.cs (1)
36var copyTask = RecyclableReadOnlySequenceSegment.CopyToAsync(body, pipe.Writer, cts.Token).AsTask().ContinueWith(t => pipe.Writer.CompleteAsync(t.Exception));
OutputCacheMiddlewareTests.cs (1)
1040async Task<string> SendRequestAsync(bool includeRefreshHeader)
OutputCacheTests.cs (2)
983var clients = new Task<Guid>[1024]; 997static async Task<Guid> RunClient(TestServer server, int id)
Microsoft.AspNetCore.Owin (11)
OwinEnvironment.cs (1)
24Task<WebSocket>
OwinFeatureCollection.cs (3)
262async Task<X509Certificate2> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken) 311Task<WebSocket> IHttpWebSocketFeature.AcceptAsync(WebSocketAcceptContext context) 318var accept = (Func<WebSocketAcceptContext, Task<WebSocket>>)obj;
WebSockets\OwinWebSocketAcceptAdapter.cs (2)
24Task<WebSocket> 48private async Task<WebSocket> AcceptWebSocketAsync(WebSocketAcceptContext context)
WebSockets\OwinWebSocketAdapter.cs (2)
17Task<Tuple<int /* messageType */, 102public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken)
WebSockets\WebSocketAcceptAdapter.cs (1)
24Task<WebSocket>
WebSockets\WebSocketAdapter.cs (2)
17Task<Tuple<int /* messageType */, 76internal async Task<WebSocketReceiveTuple> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancel)
Microsoft.AspNetCore.Razor (6)
TagHelpers\TagHelperOutput.cs (6)
14private readonly Func<bool, HtmlEncoder, Task<TagHelperContent>> _getChildContentAsync; 43Func<bool, HtmlEncoder, Task<TagHelperContent>> getChildContentAsync) 225public Task<TagHelperContent> GetChildContentAsync() 238public Task<TagHelperContent> GetChildContentAsync(bool useCachedResult) 256public Task<TagHelperContent> GetChildContentAsync(HtmlEncoder encoder) 274public Task<TagHelperContent> GetChildContentAsync(bool useCachedResult, HtmlEncoder encoder)
Microsoft.AspNetCore.Razor.Runtime (1)
Runtime\TagHelpers\TagHelperExecutionContext.cs (1)
227internal async Task<TagHelperContent> GetChildContentAsync(bool useCachedResult, HtmlEncoder encoder)
Microsoft.AspNetCore.Razor.Test (1)
TagHelpers\TagHelperOutputTest.cs (1)
22Func<bool, HtmlEncoder, Task<TagHelperContent>> initialGetChildContentAsync =
Microsoft.AspNetCore.RequestDecompression (1)
src\Shared\SizeLimitedStream.cs (1)
82public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Microsoft.AspNetCore.RequestDecompression.Tests (6)
RequestDecompressionMiddlewareTests.cs (6)
31private static async Task<byte[]> GetCompressedContent( 46private static async Task<byte[]> GetBrotliCompressedContent(byte[] uncompressedBytes) 54private static async Task<byte[]> GetDeflateCompressedContent(byte[] uncompressedBytes) 62private static async Task<byte[]> GetZlibCompressedContent(byte[] uncompressedBytes) 70private static async Task<byte[]> GetGZipCompressedContent(byte[] uncompressedBytes) 678private static async Task<(List<WriteContext>, byte[])> InvokeMiddleware(
Microsoft.AspNetCore.ResponseCaching (3)
ResponseCachingMiddleware.cs (2)
136internal async Task<bool> TryServeCachedResponseAsync(ResponseCachingContext context, IResponseCacheEntry? cacheEntry) 204internal async Task<bool> TryServeFromCacheAsync(ResponseCachingContext context)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.ResponseCaching.Tests (1)
CachedResponseBodyTests.cs (1)
44var copyTask = body.CopyToAsync(pipe.Writer, cts.Token).ContinueWith(_ => pipe.Writer.CompleteAsync());
Microsoft.AspNetCore.ResponseCompression (1)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.ResponseCompression.Tests (1)
ResponseCompressionMiddlewareTest.cs (1)
1230private static async Task<(HttpResponseMessage, List<WriteContext>)> InvokeMiddleware(
Microsoft.AspNetCore.Routing (7)
EndpointRoutingMiddleware.cs (7)
32private Task<Matcher>? _initializationTask; 71var matcherTask = InitializeAsync(); 86static async Task AwaitMatcher(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task<Matcher> matcherTask) 240private Task<Matcher> InitializeAsync() 242var initializationTask = _initializationTask; 251private Task<Matcher> InitializeCoreAsync() 254var initializationTask = Interlocked.CompareExchange(ref _initializationTask, initialization.Task, null);
Microsoft.AspNetCore.Routing.FunctionalTests (1)
src\Shared\SizeLimitedStream.cs (1)
82public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Microsoft.AspNetCore.Routing.Tests (1)
Builder\RequestDelegateEndpointRouteBuilderExtensionsTest.cs (1)
88static async Task<string> GenericTypeTaskDelegate(HttpContext context)
Microsoft.AspNetCore.Server.HttpSys (11)
AuthenticationHandler.cs (1)
14public Task<AuthenticateResult> AuthenticateAsync()
RequestProcessing\OpaqueStream.cs (1)
98public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
RequestProcessing\Request.cs (1)
401public async Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken = default(CancellationToken))
RequestProcessing\RequestContext.cs (1)
88public Task<Stream> UpgradeAsync()
RequestProcessing\RequestContext.FeatureCollection.cs (4)
61private Task<X509Certificate2?>? _clientCertTask; 351Task<X509Certificate2?> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken) 370async Task<X509Certificate2?> GetCertificateAsync(CancellationToken cancellation) 550async Task<Stream> IHttpUpgradeFeature.UpgradeAsync()
RequestProcessing\RequestStream.cs (1)
189public override unsafe Task<int> ReadAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken)
RequestProcessing\RequestStreamAsyncResult.cs (1)
56internal Task<int> Task
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (140)
AuthenticationTests.cs (1)
457private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool useDefaultCredentials = false)
DelegateTests.cs (2)
362private async Task<string> SendRequestAsync(string uri) 368private async Task<string> SendRequestWithBodyAsync(string uri)
Http2Tests.cs (3)
855var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10); 905var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10); 954var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10);
HttpsTests.cs (2)
294private async Task<string> SendRequestAsync(string uri, 307private async Task<string> SendRequestAsync(string uri, string upload)
Listener\AuthenticationOnExistingQueueTests.cs (8)
60Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 83Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 85var contextTask = server.AcceptAsync(Utilities.DefaultTimeout); // Fails when the server shuts down, the challenge happens internally. 101Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 126Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 151Task<HttpResponseMessage> responseTask = SendRequestAsync(address, useDefaultCredentials: true); 181Task<HttpResponseMessage> responseTask = SendRequestAsync(address, useDefaultCredentials: true); 219private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool useDefaultCredentials = false)
Listener\RequestBodyTests.cs (13)
25Task<string> responseTask = SendRequestAsync(address, "Hello World"); 51Task<string> responseTask = SendRequestAsync(address, "Hello World"); 59Task<int> task = context.Request.Body.ReadAsync(input, 0, input.Length, cts.Token); 76Task<string> responseTask = SendRequestAsync(address, content); 100Task<string> responseTask = SendRequestAsync(address, content); 125Task<string> responseTask = SendRequestAsync(address, content); 132var readTask = context.Request.Body.ReadAsync(input, 0, input.Length, cts.Token); 150Task<string> responseTask = SendRequestAsync(address, content); 158var readTask = context.Request.Body.ReadAsync(input, 0, input.Length, cts.Token); 178var responseTask = client.PostAsync(address, content); 185var assertTask = Assert.ThrowsAsync<IOException>(async () => await context.Request.Body.ReadAsync(input, 0, input.Length, context.DisconnectToken)); 195private Task<string> SendRequestAsync(string uri, string upload) 200private async Task<string> SendRequestAsync(string uri, HttpContent content)
Listener\RequestHeaderTests.cs (2)
149var responseTask = SendRequestAsync(address, "Custom-Header", customValues, Encoding.Latin1); 205private async Task<string> SendRequestAsync(string address, string customHeader, string[] customValues, Encoding encoding)
Listener\RequestTests.cs (9)
23var responseTask = SendSocketRequestAsync(root, requestPath); 24var contextTask = server.AcceptAsync(Utilities.DefaultTimeout); 37var responseTask = SendSocketRequestAsync(root, "*", "OPTIONS"); 75var responseTask = SendSocketRequestAsync(root, "/" + requestPath); 100var responseTask = SendSocketRequestAsync(root, requestPath); 101var contextTask = server.AcceptAsync(Utilities.DefaultTimeout); 125var responseTask = SendSocketRequestAsync(root, requestPath); 162var responseTask = SendSocketRequestAsync(root, requestPath); 172private async Task<string> SendSocketRequestAsync(string address, string path, string method = "GET")
Listener\ResponseBodyTests.cs (18)
25var responseTask = SendRequestAsync(address); 59var responseTask = SendRequestAsync(address); 82var responseTask = SendRequestAsync(address); 107var responseTask = SendRequestAsync(address); 128var responseTask = SendRequestAsync(address); 151var responseTask = SendRequestAsync(address); 171var responseTask = SendRequestAsync(address); 192var responseTask = SendRequestAsync(address); 214var responseTask = SendRequestAsync(address); 239var responseTask = SendRequestAsync(address, cts.Token); 275var responseTask = SendRequestAsync(address, cts.Token); 310var responseTask = SendRequestAsync(address, cts.Token); 338var responseTask = SendRequestAsync(address, cts.Token); 368var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 408var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 447var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 481var responseTask = client.GetAsync(address, HttpCompletionOption.ResponseHeadersRead); 506private async Task<HttpResponseMessage> SendRequestAsync(string uri, CancellationToken cancellationToken = new CancellationToken())
Listener\ResponseHeaderTests.cs (12)
33Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 55Task<HttpResponseMessage> responseTask = SendRequestAsync(address, usehttp11: false); 78Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address); 106Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address, usehttp11: false); 135Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address); 164Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 187Task<HttpResponseMessage> responseTask = SendHeadRequestAsync(address); 228Task<HttpResponseMessage> responseTask = SendRequestAsync(address, usehttp11: false, sendKeepAlive: true, httpClient: client); 259Task<HttpResponseMessage> responseTask = SendRequestAsync(address, usehttp11: false, sendKeepAlive: true); 299Task<HttpResponseMessage> responseTask = SendRequestAsync(address); 339private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool usehttp11 = true, bool sendKeepAlive = false, HttpClient httpClient = null) 354private async Task<HttpResponseMessage> SendHeadRequestAsync(string uri, bool usehttp11 = true)
Listener\ServerOnExistingQueueTests.cs (15)
24var responseTask = SendRequestAsync(address); 39Task<string> responseTask = SendRequestAsync(address); 58var responseTask = SendRequestAsync(address, "Hello World"); 80var responseTask = SendRequestAsync(address); 96var responseTask = SendRequestAsync(root + "/pathBase/paTh"); 113var responseTask = SendRequestAsync(root + "/pathBase/paTh"); 138var responseTask = SendRequestAsync(root + requestPath); 158var responseTask = SendRequestAsync(root + "/basepath/secondTier/path/thing"); 177var responseTask = SendRequestAsync(address); 213var responseTask = SendRequestAsync(address); 261var responseTask = SendRequestAsync(address); 281var responseTask = SendRequestAsync(address); 301var responseTask = SendRequestAsync(rootAddress + "/baseServer"); 318private async Task<string> SendRequestAsync(string uri) 324private async Task<string> SendRequestAsync(string uri, string upload)
Listener\ServerTests.cs (7)
33var responseTask = client.GetAsync(address); 62var responseTask = client.GetAsync(address); 90var responseTask = SendRequestAsync(address); 119var responseTask = SendRequestAsync(address); 150var responseTask = SendRequestAsync(address); 183var responseTask = SendRequestAsync(address); 207private async Task<string> SendRequestAsync(string uri)
Listener\Utilities.cs (6)
108internal static async Task<RequestContext> AcceptAsync(this HttpSysListener server, TimeSpan timeout) 113async Task<RequestContext> AcceptAsync() 130var acceptTask = AcceptAsync(); 145internal static async Task<RequestContext> Before<T>(this Task<RequestContext> acceptTask, Task<T> responseTask)
OpaqueUpgradeTests.cs (2)
369private async Task<HttpResponseMessage> SendRequestAsync(string uri) 378private async Task<Stream> SendOpaqueRequestAsync(string method, string address, string extraHeader = null)
RequestBodyLimitTests.cs (4)
190var ex = Assert.Throws<BadHttpRequestException>(() => { var t = httpContext.Request.Body.ReadAsync(input, 0, input.Length); }); 193ex = Assert.Throws<BadHttpRequestException>(() => { var t = httpContext.Request.Body.ReadAsync(input, 0, input.Length); }); 405private Task<string> SendRequestAsync(string uri, string upload, bool chunked = false) 410private async Task<string> SendRequestAsync(string uri, HttpContent content, bool chunked = false)
RequestBodyTests.cs (3)
294private Task<string> SendRequestAsync(string uri, string upload) 299private async Task<string> SendRequestAsync(string uri, HttpContent content) 309private async Task<string> SendSocketRequestAsync(string address)
RequestHeaderTests.cs (2)
244private async Task<string> SendRequestAsync(string uri) 252private async Task<string> SendRequestAsync(string address, IHeaderDictionary headers)
RequestTests.cs (2)
617private async Task<string> SendRequestAsync(string uri) 625private async Task<string> SendSocketRequestAsync(string address, string path)
ResponseBodyTests.cs (1)
437private async Task<HttpResponseMessage> SendRequestAsync(string uri)
ResponseCachingTests.cs (2)
469private async Task<string> SendRequestAsync(string uri, int status = 200) 484private async Task<string> GetFileAsync(string uri)
ResponseHeaderTests.cs (1)
327private async Task<HttpResponseMessage> SendRequestAsync(string uri)
ResponseSendFileTests.cs (3)
519var responseTask = SendRequestAsync(address, cts.Token); 562var responseTask = SendRequestAsync(address, cts.Token); 679private async Task<HttpResponseMessage> SendRequestAsync(string uri, CancellationToken cancellationToken = new CancellationToken())
ResponseTests.cs (1)
279private async Task<HttpResponseMessage> SendRequestAsync(string uri)
ResponseTrailersTests.cs (1)
358private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
ServerTests.cs (14)
147Task<string> responseTask; 167Task<string> responseTask; 188Task<string> responseTask; 215Task<string> requestTask = SendRequestAsync(address); 234Task<string> requestTask = SendRequestAsync(address); 267Task<string> requestTask = SendRequestAsync(address); 417Task<string> responseTask; 451Task<string> responseTask; 488Task<string> responseTask; 525Task<string> responseTask; 562Task<string> responseTask; 637private async Task<string> SendRequestAsync(string uri) 645private async Task<string> SendRequestAsync(string uri, string upload) 655private async Task<TcpClient> SendHungRequestAsync(string method, string address)
src\Shared\Http2cat\Http2Utilities.cs (5)
499internal async Task<bool> SendHeadersAsync(int streamId, Http2HeadersFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 564internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerator<KeyValuePair<string, string>> headersEnumerator) 592internal async Task<bool> SendContinuationAsync(int streamId, Http2ContinuationFrameFlags flags, IEnumerable<KeyValuePair<string, string>> headers) 833internal async Task<Http2FrameWithPayload> ReceiveFrameAsync(uint maxFrameSize = Http2PeerSettings.DefaultMaxFrameSize) 872internal async Task<Http2FrameWithPayload> ExpectAsync(Http2FrameType type, int withLength, byte withFlags, int withStreamId)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.Server.IIS (13)
Core\DuplexStream.cs (1)
53public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Core\EmptyStream.cs (1)
40public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Core\HttpRequestStream.cs (1)
44public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Core\HttpUpgradeStream.cs (1)
138public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Core\IISHttpContext.cs (1)
671public abstract Task<bool> ProcessRequestAsync();
Core\IISHttpContext.FeatureCollection.cs (2)
337async Task<Stream> IHttpUpgradeFeature.UpgradeAsync() 378Task<X509Certificate2?> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken)
Core\IISHttpContextOfT.cs (1)
24public override async Task<bool> ProcessRequestAsync()
Core\IISServerAuthenticationHandlerInternal.cs (1)
22public Task<AuthenticateResult> AuthenticateAsync()
Core\WrappingStream.cs (1)
60public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Core\WriteOnlyStreamInternal.cs (1)
44public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.Server.IISIntegration (2)
AuthenticationHandler.cs (1)
17public Task<AuthenticateResult> AuthenticateAsync()
ForwardedTlsConnectionFeature.cs (1)
48public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
Microsoft.AspNetCore.Server.IntegrationTesting (10)
ApplicationPublisher.cs (1)
20public virtual Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
CachingApplicationPublisher.cs (1)
16public override async Task<PublishedApplication> Publish(DeploymentParameters deploymentParameters, ILogger logger)
Common\LoggingHandler.cs (1)
18protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Common\RetryHelper.cs (2)
19public static async Task<HttpResponseMessage> RetryRequest( 20Func<Task<HttpResponseMessage>> retryBlock,
Deployers\ApplicationDeployer.cs (1)
73public abstract Task<DeploymentResult> DeployAsync();
Deployers\NginxDeployer.cs (1)
28public override async Task<DeploymentResult> DeployAsync()
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (1)
73public override async Task<DeploymentResult> DeployAsync()
Deployers\SelfHostDeployer.cs (2)
32public override async Task<DeploymentResult> DeployAsync() 78protected async Task<(Uri url, CancellationToken hostExitToken)> StartSelfHostAsync(Uri hintUrl)
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (5)
IISDeployer.cs (1)
73public override Task<DeploymentResult> DeployAsync()
IISExpressDeployer.cs (2)
43public override async Task<DeploymentResult> DeployAsync() 152private async Task<(Uri url, CancellationToken hostExitToken)> StartIISExpressAsync(string contentRoot)
LoggingHandler.cs (1)
21protected override async Task<HttpResponseMessage> SendAsync(
RetryHandler.cs (1)
23protected override async Task<HttpResponseMessage> SendAsync(
Microsoft.AspNetCore.Server.Kestrel.Core (17)
Internal\Http\HttpProtocol.FeatureCollection.cs (1)
259async Task<Stream> IHttpUpgradeFeature.UpgradeAsync()
Internal\Http\HttpRequestStream.cs (1)
47public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Internal\Http\HttpResponseStream.cs (1)
43public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Internal\Http\HttpUpgradeStream.cs (1)
138public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Internal\Http2\Http2Connection.cs (1)
526private async Task<bool> TryReadPrefaceAsync()
Internal\Infrastructure\TransportConnectionManager.cs (2)
55public async Task<bool> CloseAllConnectionsAsync(CancellationToken token) 72public async Task<bool> AbortAllConnectionsAsync()
Internal\Infrastructure\TransportManager.cs (2)
35public async Task<EndPoint> BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig? endpointConfig, CancellationToken cancellationToken) 64public async Task<EndPoint> BindAsync(EndPoint endPoint, MultiplexedConnectionDelegate multiplexedConnectionDelegate, ListenOptions listenOptions, CancellationToken cancellationToken)
Internal\Infrastructure\WrappingStream.cs (1)
59public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Internal\Infrastructure\WriteOnlyStream.cs (1)
21public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Internal\TlsConnectionFeature.cs (3)
20private Task<X509Certificate2?>? _clientCertTask; 76public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken) 95private async Task<X509Certificate2?> GetClientCertificateAsyncCore(CancellationToken cancellationToken)
Middleware\Internal\LoggingStream.cs (1)
96public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (12)
Http1\Http1ConnectionTests.cs (1)
664Assert.IsNotType<Task<Task>>(requestProcessingTask);
Http2\Http2FrameWriterTests.cs (1)
100public static async Task<byte[]> ReadForLengthAsync(this PipeReader pipeReader, int length)
MessageBodyTests.cs (3)
222var task = stream.ReadAsync(buffer, 0, buffer.Length); 247var task = stream.ReadAsync(buffer, 0, buffer.Length); 344var readTask = stream.ReadAsync(buffer, 0, buffer.Length);
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
104var task = _reader.ReadAsync(actual, offset, actual.Length - offset);
src\Servers\Kestrel\shared\test\StreamExtensions.cs (4)
15public static async Task<int> FillBufferUntilEndAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 34public static async Task<int> FillEntireBufferAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 49public static async Task<byte[]> ReadAtLeastLengthAsync(this Stream stream, int length, int bufferLength = 1024, bool allowEmpty = false, CancellationToken cancellationToken = default) 76public static async Task<byte[]> ReadUntilEndAsync(this Stream stream, int bufferLength = 1024, CancellationToken cancellationToken = default)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
39public Task<LogMessage> WaitForMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
34public Task<LogMessage> WaitForLogMessage(Func<LogMessage, bool> messageFilter)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
InMemoryTransportBenchmark.cs (1)
209public async Task<byte[]> GetResponseAsync(int length)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
39public Task<LogMessage> WaitForMessage(Func<LogMessage, bool> messageFilter)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (3)
Internal\QuicConnectionContext.FeatureCollection.cs (2)
13private Task<X509Certificate2?>? _clientCertTask; 36public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (24)
QuicConnectionContextTests.cs (5)
33var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 57var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 83var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 124var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 296var acceptTask = serverConnection.AcceptAsync().AsTask();
QuicConnectionListenerTests.cs (7)
49var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 73var acceptTask1 = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 82var serverFailureLogTask = WaitForLogMessage(m => m.EventId.Name == "ConnectionListenerAcceptConnectionFailed"); 85var acceptTask2 = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 126var serverStreamTask = serverConnection.AcceptAsync().DefaultTimeout(); 180var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout(); 448var acceptTask = connectionListener.AcceptAndAddFeatureAsync().DefaultTimeout();
QuicStreamContextTests.cs (3)
119var readTask = clientStream.ReadUntilEndAsync(); 197var readingTask = clientStream.ReadUntilEndAsync(); 504var serverReadTask = serverStream.Transport.Input.ReadAtLeastAsync(TestData.Length).AsTask();
QuicTestHelpers.cs (3)
47public static async Task<QuicConnectionListener> CreateConnectionListenerFactory( 65public static async Task<QuicConnectionListener> CreateConnectionListenerFactory( 143public static async Task<QuicStreamContext> CreateAndCompleteBidirectionalStreamGracefully(QuicConnection clientConnection, MultiplexedConnectionContext serverConnection, ILogger logger)
src\Servers\Kestrel\shared\test\StreamExtensions.cs (4)
15public static async Task<int> FillBufferUntilEndAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 34public static async Task<int> FillEntireBufferAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 49public static async Task<byte[]> ReadAtLeastLengthAsync(this Stream stream, int length, int bufferLength = 1024, bool allowEmpty = false, CancellationToken cancellationToken = default) 76public static async Task<byte[]> ReadUntilEndAsync(this Stream stream, int bufferLength = 1024, CancellationToken cancellationToken = default)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
39public Task<LogMessage> WaitForMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
34public Task<LogMessage> WaitForLogMessage(Func<LogMessage, bool> messageFilter)
Microsoft.AspNetCore.Session.Tests (1)
SessionTests.cs (1)
1170public Task<byte[]> GetAsync(string key, CancellationToken token = default)
Microsoft.AspNetCore.Shared.Tests (19)
ObjectMethodExecutorTest.cs (7)
364var resultTask = FSharpAsync.StartAsTask(fsharpAsync, 451public Task<int> ValueMethodAsync(int i, int j) 461public Task<Unit> TaskOfUnitMethodAsync(int i) 481public Task<TestObject> ValueMethodWithReturnTypeAsync(int i) 492public async Task<Unit> ValueMethodWithReturnUnitThrowsExceptionAsync(TestObject i) 521public async Task<TestObject> ValueMethodWithReturnTypeThrowsExceptionAsync(TestObject i) 527public Task<TestObject> ValueMethodUpdateValueAsync(TestObject parameter)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (5)
38/// to a <see cref="Task{TResult}"/>, if <paramref name="possibleFSharpAsyncType"/> is in fact a closed F# async type, 49/// to a <see cref="Task{TResult}"/>, or to a <see cref="Task"/>, if <c>TResult</c> is <see href="https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-unit-0.html">FSharp.Core.Unit</see>; 53/// When this method returns, contains the type of the closed generic instantiation of <see cref="Task{TResult}"/> or of <see cref="Task"/> that will be returned 75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 145var typeDef when typeDef == typeof(Task<>) && IsFSharpUnit(genericAwaitableType.GetGenericArguments()[0]) => (typeof(Task), MakeTaskOfUnitToTaskExpression(genericAwaitableType)),
src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
src\Shared\TaskToApm.cs (1)
52if (asyncResult is TaskAsyncResult twar && twar._task is Task<TResult> task)
StackTraceHelperTest.cs (2)
251async Task<string> MethodAsync(int value) 258async Task<string> MethodAsync<TValue>(TValue value)
Microsoft.AspNetCore.SignalR.Client.Core (113)
HubConnection.cs (16)
355public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task<object?>> handler, object state) 428/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 429/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 434public virtual async Task<ChannelReader<object?>> StreamAsChannelCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 450/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 451/// The <see cref="Task{TResult}.Result"/> property returns an <see cref="object"/> for the hub method return value. 456public virtual async Task<object?> InvokeCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 701private async Task<ChannelReader<object?>> StreamAsChannelCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1021private async Task<(ConnectionState, Activity?)> WaitForActiveConnectionWithActivityAsync(string sendingMethodName, string invokedMethodName, CancellationToken token) 1030var connectionStateTask = _state.WaitForActiveConnectionAsync(sendingMethodName, token); 1079private async Task<object?> InvokeCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1087Task<object?> invocationTask; 1287private async Task<CloseMessage?> ProcessMessagesAsync(HubMessage message, ConnectionState connectionState, ChannelWriter<InvocationMessage> invocationMessageWriter) 1409if (handler.HasResult && task is Task<object?> resultTask) 2105public bool HasResult => _callback.Method.ReturnType == typeof(Task<object>); 2507public async Task<ConnectionState> WaitForActiveConnectionAsync(string methodName, CancellationToken token)
HubConnectionExtensions.InvokeAsync.cs (1)
23/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns>
HubConnectionExtensions.InvokeAsyncGeneric.cs (36)
25/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 26/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 29public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, CancellationToken cancellationToken = default) 43/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 44/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 47public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, CancellationToken cancellationToken = default) 62/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 63/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 66public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, CancellationToken cancellationToken = default) 82/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 83/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 86public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, CancellationToken cancellationToken = default) 103/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 104/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 107public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, CancellationToken cancellationToken = default) 125/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 126/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 129public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, CancellationToken cancellationToken = default) 148/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 149/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 152public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, CancellationToken cancellationToken = default) 172/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 173/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 176public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, CancellationToken cancellationToken = default) 197/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 198/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 201public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, CancellationToken cancellationToken = default) 223/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 224/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 227public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, CancellationToken cancellationToken = default) 250/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 251/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 254public static Task<TResult> InvokeAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, object? arg10, CancellationToken cancellationToken = default) 268/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 269/// The <see cref="Task{TResult}.Result"/> property returns a <typeparamref name="TResult"/> for the hub method return value. 271public static async Task<TResult> InvokeCoreAsync<TResult>(this HubConnection hubConnection, string methodName, object?[] args, CancellationToken cancellationToken = default)
HubConnectionExtensions.OnResult.cs (11)
37public static IDisposable On<TResult>(this HubConnection hubConnection, string methodName, Type[] parameterTypes, Func<object?[], Task<TResult>> handler) 41var currentHandler = (Func<object?[], Task<TResult>>)state; 55public static IDisposable On<TResult>(this HubConnection hubConnection, string methodName, Func<Task<TResult>> handler) 268public static IDisposable On<T1, TResult>(this HubConnection hubConnection, string methodName, Func<T1, Task<TResult>> handler) 288public static IDisposable On<T1, T2, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, Task<TResult>> handler) 309public static IDisposable On<T1, T2, T3, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, Task<TResult>> handler) 331public static IDisposable On<T1, T2, T3, T4, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, T4, Task<TResult>> handler) 354public static IDisposable On<T1, T2, T3, T4, T5, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, T4, T5, Task<TResult>> handler) 378public static IDisposable On<T1, T2, T3, T4, T5, T6, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, T4, T5, T6, Task<TResult>> handler) 403public static IDisposable On<T1, T2, T3, T4, T5, T6, T7, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, T4, T5, T6, T7, Task<TResult>> handler) 429public static IDisposable On<T1, T2, T3, T4, T5, T6, T7, T8, TResult>(this HubConnection hubConnection, string methodName, Func<T1, T2, T3, T4, T5, T6, T7, T8, Task<TResult>> handler)
HubConnectionExtensions.SendAsync.cs (11)
23/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 38/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 54/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 71/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 89/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 108/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 128/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 149/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 171/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 194/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns> 218/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous invoke.</returns>
HubConnectionExtensions.StreamAsChannelAsync.cs (36)
26/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 27/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 30public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, CancellationToken cancellationToken = default) 44/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 45/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 48public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, CancellationToken cancellationToken = default) 63/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 64/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 67public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, CancellationToken cancellationToken = default) 83/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 84/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 87public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, CancellationToken cancellationToken = default) 104/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 105/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 108public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, CancellationToken cancellationToken = default) 126/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 127/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 130public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, CancellationToken cancellationToken = default) 149/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 150/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 153public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, CancellationToken cancellationToken = default) 173/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 174/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 177public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, CancellationToken cancellationToken = default) 198/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 199/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 202public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, CancellationToken cancellationToken = default) 224/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 225/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 228public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, CancellationToken cancellationToken = default) 251/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 252/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 255public static Task<ChannelReader<TResult>> StreamAsChannelAsync<TResult>(this HubConnection hubConnection, string methodName, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, object? arg10, CancellationToken cancellationToken = default) 269/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 270/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 272public static async Task<ChannelReader<TResult>> StreamAsChannelCoreAsync<TResult>(this HubConnection hubConnection, string methodName, object?[] args, CancellationToken cancellationToken = default)
Internal\InvocationRequest.cs (2)
48public static InvocationRequest Invoke(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection, Activity? activity, out Task<object?> result) 176public Task<object?> Result => _completionSource.Task;
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (12)
HubConnectionTests.cs (10)
575var ex = Assert.ThrowsAsync<OperationCanceledException>(async () => 1369var result = connection.InvokeAsync<string>(nameof(TestHub.CallWithUnserializableObject)); 1423var result = connection.InvokeAsync<string>(nameof(TestHub.GetUnserializableObject)).DefaultTimeout(); 1476async Task<string> AccessTokenProvider() 2342var invokeTask = connection.InvokeAsync<string>(nameof(TestHub.HelloWorld)); 2590var resultTask = connection.InvokeAsync<string>(nameof(TestHub.Echo), originalMessage).DefaultTimeout(); 2825var resultTask = connection.InvokeAsync<string>(nameof(TestHub.Echo), originalMessage).DefaultTimeout(); 2901var resultTask = connection.InvokeAsync<string>(nameof(TestHub.Echo), originalMessage).DefaultTimeout(); 2972public Task<HttpResponseMessage> ActivePoll { get; private set; } 2978protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HubConnectionTests.Tracing.cs (2)
81var resultTask = connection.InvokeAsync<string>(nameof(TestHub.HelloWorld)).DefaultTimeout(); 103var resultTask = connection.InvokeAsync<string>(nameof(TestHub.HelloWorld));
Microsoft.AspNetCore.SignalR.Client.Tests (88)
HttpConnectionFactoryTests.cs (1)
80Func<Task<string>> tokenProvider = () => Task.FromResult("");
HttpConnectionTests.Helpers.cs (1)
27Func<Task<string>> accessTokenProvider = null)
HttpConnectionTests.Negotiate.cs (1)
394Task<string> AccessTokenProvider() => Task.FromResult<string>("firstSecret");
HttpConnectionTests.Transport.cs (6)
59Task<string> AccessTokenProvider() 328Task<string> AccessTokenProvider() 398Task<string> AccessTokenProvider() 436Task<string> AccessTokenProvider() 496Task<string> AccessTokenProvider() 539Task<string> AccessTokenProvider()
HubConnectionTests.cs (11)
134var invokeTask = hubConnection.InvokeAsync<int>("testMethod").DefaultTimeout(); 156var invokeTask = hubConnection.InvokeAsync<int>("testMethod").DefaultTimeout(); 175var invokeTask = hubConnection.InvokeAsync<int>("testMethod", cancellationToken: cts.Token).DefaultTimeout(); 439var invokeTask = hubConnection.InvokeAsync<int>("SomeMethod", channel.Reader); 510var invokeTask = hubConnection.InvokeAsync<SampleObject>("UploadMethod", channel.Reader); 555var invokeTask = hubConnection.InvokeAsync<object>("UploadMethod", channel.Reader, cts.Token); 587var invokeTask = hubConnection.InvokeAsync<object>("UploadMethod", channel.Reader, cts.Token); 612var invokeTask = hubConnection.InvokeAsync<object>("UploadMethod", channel.Reader); 646var invokeTask = hubConnection.InvokeAsync<long>("UploadMethod", channel.Reader); 679var invokeTask = hubConnection.InvokeAsync<int>("SumInts", channel.Reader); 764var accessTokenFactory = new Func<Task<string>>(() => Task.FromResult("fakeAccessToken"));
HubConnectionTests.Extensions.cs (1)
674private async Task<JToken> InvokeOnWithResult(Action<HubConnection, TaskCompletionSource<object[]>> onAction, object[] args)
HubConnectionTests.Protocol.cs (7)
280var invokeTask = hubConnection.InvokeAsync<int>("Foo"); 302var invokeTask = hubConnection.InvokeAsync<int>("Foo"); 371var invokeTask = hubConnection.InvokeAsync<int>("Foo"); 485var handlerTask = handlerCalled.Task; 488var ex = Assert.ThrowsAsync<TimeoutException>(async () => await handlerTask.DefaultTimeout(2000)); 517var handlerTask = handlerCalled.Task; 522var ex = Assert.ThrowsAsync<TimeoutException>(async () => await handlerTask.DefaultTimeout(2000));
HubConnectionTests.Reconnect.cs (1)
1133public Task<TestConnection> GetNextOrCurrentTestConnection()
HubServerProxyGeneratorTests.cs (10)
32Task<int> GetScalar(); 33Task<List<int>> GetCollection(); 34Task<int> SetScalar(int a); 35Task<List<int>> SetCollection(List<int> a); 36Task<ChannelReader<int>> StreamToClientViaChannel(); 37Task<ChannelReader<int>> StreamToClientViaChannelWithToken(CancellationToken cancellationToken); 41Task<int> StreamFromClientButAlsoReturnValue(ChannelReader<int> reader); 42Task<ChannelReader<int>> StreamBidirectionalViaChannel(ChannelReader<float> reader); 43Task<ChannelReader<int>> StreamBidirectionalViaChannelWithToken(ChannelReader<float> reader, CancellationToken cancellationToken); 48Task<int?> HandleNullables(float? nullable);
LongPollingTransportTests.cs (15)
35.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 70.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 104.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 159.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 187.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 233.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 278.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 327.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 369.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 406.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 463.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 531.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 587.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 616.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 642.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>())
ServerSentEventsTransportTests.cs (10)
31.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 72.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 125.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 175.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 230.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 273.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 304.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 362.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 389.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 474.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>())
TestConnection.cs (5)
82public async Task<string> ReadHandshakeAndSendResponseAsync(int minorVersion = 0) 122public async Task<string> ReadSentTextMessageAsync(bool ignorePings = true) 144private async Task<string> ReadSentTextMessageAsyncInner() 172public async Task<JObject> ReadSentJsonAsync() 177public async Task<IList<string>> ReadAllSentMessagesAsync(bool ignorePings = true)
TestHttpMessageHandler.cs (18)
15delegate Task<HttpResponseMessage> RequestDelegate(HttpRequestMessage requestMessage, CancellationToken cancellationToken); 77protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 135public void OnRequest(Func<HttpRequestMessage, Func<Task<HttpResponseMessage>>, CancellationToken, Task<HttpResponseMessage>> handler) 151public void OnGet(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Get, pathAndQuery, handler); 152public void OnPost(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Post, pathAndQuery, handler); 153public void OnPut(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Put, pathAndQuery, handler); 154public void OnDelete(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Delete, pathAndQuery, handler); 155public void OnHead(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Head, pathAndQuery, handler); 156public void OnOptions(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Options, pathAndQuery, handler); 157public void OnTrace(string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) => OnRequest(HttpMethod.Trace, pathAndQuery, handler); 159public void OnRequest(HttpMethod method, string pathAndQuery, Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 177public void OnNegotiate(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 194public void OnLongPollDelete(Func<CancellationToken, Task<HttpResponseMessage>> handler) 211public void OnLongPoll(Func<CancellationToken, Task<HttpResponseMessage>> handler) 221public void OnLongPoll(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handler) 238public void OnSocketSend(Func<byte[], CancellationToken, Task<HttpResponseMessage>> handler) 254private Task<HttpResponseMessage> BaseHandler(HttpRequestMessage request, CancellationToken cancellationToken)
WebSocketsTransportTests.cs (1)
66public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken)
Microsoft.AspNetCore.SignalR.Core (37)
ClientProxyExtensions.cs (11)
230public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, CancellationToken cancellationToken) 244public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, CancellationToken cancellationToken) 259public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, CancellationToken cancellationToken) 275public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, CancellationToken cancellationToken) 292public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, CancellationToken cancellationToken) 310public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, CancellationToken cancellationToken) 329public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, CancellationToken cancellationToken) 349public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, CancellationToken cancellationToken) 370public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, CancellationToken cancellationToken) 392public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, CancellationToken cancellationToken) 415public static Task<T> InvokeAsync<T>(this ISingleClientProxy clientProxy, string method, object? arg1, object? arg2, object? arg3, object? arg4, object? arg5, object? arg6, object? arg7, object? arg8, object? arg9, object? arg10, CancellationToken cancellationToken)
DefaultHubLifetimeManager.cs (2)
334public override async Task<T> InvokeConnectionAsync<T>(string connectionId, string methodName, object?[] args, CancellationToken cancellationToken) 352var task = _clientResultsManager.AddInvocation<T>(connectionId, invocationId, linkedToken);
HubConnectionContext.cs (1)
493internal async Task<bool> HandshakeAsync(TimeSpan timeout, IReadOnlyList<string>? supportedProtocols, IHubProtocolResolver protocolResolver,
HubLifetimeManager.cs (1)
147public virtual Task<T> InvokeConnectionAsync<T>(string connectionId, string methodName, object?[] args, CancellationToken cancellationToken)
Internal\ChannelBasedSemaphore.cs (3)
43public ValueTask RunAsync<TState>(Func<TState, Task<bool>> callback, TState state) 54private async ValueTask RunSlowAsync<TState>(Func<TState, Task<bool>> callback, TState state) 60private async Task RunTask<TState>(Func<TState, Task<bool>> callback, TState state)
Internal\DefaultHubDispatcher.cs (4)
318private async Task<bool> Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, 665private static Task<bool> IsHubMethodAuthorized(IServiceProvider provider, HubConnectionContext hubConnectionContext, HubMethodDescriptor descriptor, object?[] hubMethodArguments, Hub hub) 676private static async Task<bool> IsHubMethodAuthorizedSlow(IServiceProvider provider, ClaimsPrincipal principal, IList<IAuthorizeData> policies, HubInvocationContext resource) 690private async Task<bool> ValidateInvocationMode(HubMethodDescriptor hubMethodDescriptor, bool isStreamResponse,
Internal\HubCallerClients.cs (2)
108public Task<T> InvokeCoreAsync<T>(string method, object?[] args, CancellationToken cancellationToken = default) 130public async Task<T> InvokeCoreAsync<T>(string method, object?[] args, CancellationToken cancellationToken = default)
Internal\NonInvokingSingleClientProxy.cs (1)
20public Task<T> InvokeCoreAsync<T>(string method, object?[] args, CancellationToken cancellationToken = default) =>
Internal\Proxies.cs (1)
165public Task<T> InvokeCoreAsync<T>(string method, object?[] args, CancellationToken cancellationToken = default)
ISingleClientProxy.cs (1)
23Task<T> InvokeCoreAsync<T>(string method, object?[] args, CancellationToken cancellationToken);
src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\Shared\ObjectMethodExecutor\ObjectMethodExecutorFSharpSupport.cs (5)
38/// to a <see cref="Task{TResult}"/>, if <paramref name="possibleFSharpAsyncType"/> is in fact a closed F# async type, 49/// to a <see cref="Task{TResult}"/>, or to a <see cref="Task"/>, if <c>TResult</c> is <see href="https://fsharp.github.io/fsharp-core-docs/reference/fsharp-core-unit-0.html">FSharp.Core.Unit</see>; 53/// When this method returns, contains the type of the closed generic instantiation of <see cref="Task{TResult}"/> or of <see cref="Task"/> that will be returned 75awaitableType = typeof(Task<>).MakeGenericType(awaiterResultType); 145var typeDef when typeDef == typeof(Task<>) && IsFSharpUnit(genericAwaitableType.GetGenericArguments()[0]) => (typeof(Task), MakeTaskOfUnitToTaskExpression(genericAwaitableType)),
src\SignalR\common\Shared\ClientResultsManager.cs (1)
18public Task<T> AddInvocation<T>(string connectionId, string invocationId, CancellationToken cancellationToken)
src\SignalR\common\Shared\TaskCache.cs (2)
8public static readonly Task<bool> True = Task.FromResult(true); 9public static readonly Task<bool> False = Task.FromResult(false);
Microsoft.AspNetCore.SignalR.Microbenchmarks (3)
DefaultHubDispatcherBenchmark.cs (2)
124public Task<int> InvocationReturnAsync() 142public Task<ChannelReader<int>> StreamChannelReaderAsync()
Shared\TestPipeWriter.cs (1)
49public async Task<FlushResult> ForceAsyncResult()
Microsoft.AspNetCore.SignalR.Specification.Tests (41)
HubLifetimeManagerTestBase.cs (7)
189var resultTask = manager.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 216var resultTask = manager.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 246var resultTask = manager.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 302var invoke1 = manager1.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 303var invoke2 = manager1.InvokeConnectionAsync<int>(connection2.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 332var invoke1 = manager1.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 358var invoke1 = manager1.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cts.Token);
Internal\TaskExtensions.cs (2)
13public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout,
ScaleoutHubLifetimeManagerTests.cs (6)
485var resultTask = manager2.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 516var resultTask = manager2.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 568var invoke1 = manager1.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 597var invoke1 = manager1.InvokeConnectionAsync<int>(connection.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 600var invoke2 = manager2.InvokeConnectionAsync<int>(connection.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default); 648var resultTask = manager2.InvokeConnectionAsync<int>(connection1.ConnectionId, "Result", new object[] { "test" }, cancellationToken: default);
src\Shared\TaskExtensions.cs (8)
54public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = DefaultTimeoutDuration, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 59public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 64public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = DefaultTimeoutDuration, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 69public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string filePath = null, [CallerLineNumber] int lineNumber = default) 75public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout,
src\SignalR\common\testassets\Tests.Utils\TaskExtensions.cs (2)
28public static async Task<T> OrThrowIfOtherFails<T>(this Task<T> task, Task otherTask)
src\SignalR\common\testassets\Tests.Utils\TestClient.cs (16)
68public async Task<Task> ConnectAsync( 91public Task<IList<HubMessage>> StreamAsync(string methodName, params object[] args) 96public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, params object[] args) 102public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args) 108public async Task<IList<HubMessage>> ListenAllAsync(string invocationId) 149public async Task<CompletionMessage> InvokeAsync(string methodName, params object[] args) 189public Task<string> SendInvocationAsync(string methodName, params object[] args) 194public Task<string> SendInvocationAsync(string methodName, IDictionary<string, string> headers, params object[] args) 199public Task<string> SendInvocationAsync(string methodName, bool nonBlocking, params object[] args) 204public Task<string> SendInvocationAsync(string methodName, bool nonBlocking, IDictionary<string, string> headers, params object[] args) 210public Task<string> SendStreamInvocationAsync(string methodName, params object[] args) 215public Task<string> SendStreamInvocationAsync(string methodName, string[] streamIds, params object[] args) 220public Task<string> SendStreamInvocationAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args) 226public Task<string> BeginUploadStreamAsync(string invocationId, string methodName, string[] streamIds, params object[] args) 232public async Task<string> SendHubMessageAsync(HubMessage message) 240public async Task<HubMessage> ReadAsync(bool isHandshake = false)
Microsoft.AspNetCore.SignalR.StackExchangeRedis (6)
RedisHubLifetimeManager.cs (3)
295private async Task<long> PublishAsync(string channel, byte[] payload) 380public override async Task<T> InvokeConnectionAsync<T>(string connectionId, string methodName, object?[] args, CancellationToken cancellationToken) 392var task = _clientResultsManager.AddInvocation<T>(connectionId, invocationId, linkedToken);
RedisOptions.cs (2)
27public Func<TextWriter, Task<IConnectionMultiplexer>>? ConnectionFactory { get; set; } 29internal async Task<IConnectionMultiplexer> ConnectAsync(TextWriter log)
src\SignalR\common\Shared\ClientResultsManager.cs (1)
18public Task<T> AddInvocation<T>(string connectionId, string invocationId, CancellationToken cancellationToken)
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (10)
RedisEndToEnd.cs (1)
401public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken)
RedisServerFixture.cs (1)
61private async Task<InProcessTestServer<TStartup>> StartServer()
TestConnectionMultiplexer.cs (8)
107public Task<bool> ConfigureAsync(TextWriter log = null) 187public Task<long> PublishReconfigureAsync(CommandFlags flags = CommandFlags.None) 202public T Wait<T>(Task<T> task) 322public Task<EndPoint> IdentifyEndpointAsync(RedisChannel channel, CommandFlags flags = CommandFlags.None) 337public Task<TimeSpan> PingAsync(CommandFlags flags = CommandFlags.None) 349public async Task<long> PublishAsync(RedisChannel channel, RedisValue message, CommandFlags flags = CommandFlags.None) 410public T Wait<T>(Task<T> task) 435public Task<ChannelMessageQueue> SubscribeAsync(RedisChannel channel, CommandFlags flags = CommandFlags.None)
Microsoft.AspNetCore.SignalR.Tests (55)
EndToEndTests.cs (2)
174.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>()) 224.Setup<Task<HttpResponseMessage>>("SendAsync", ItExpr.IsAny<HttpRequestMessage>(), ItExpr.IsAny<CancellationToken>())
HubConnectionHandlerTests.ClientResult.cs (5)
146var resultTask = context.Clients.Client(client.Connection.ConnectionId).InvokeAsync<int>("GetClientResult", 1, cancellationToken: default); 180var resultTask = context.Clients.Client(connectionId).GetClientResult(1); 307var invocationMessage = Assert.IsType<InvocationMessage>(await (Task<HubMessage>)task); 373var resultTask = context.Clients.Client(connectionId).GetClientResultWithCancellation(1, cts.Token); 418var resultTask = context.Clients.Client(connectionId).InvokeAsync<int>(nameof(MethodHub.GetClientResult), 1, cts.Token);
HubConnectionHandlerTests.cs (12)
352var task = client.ReadAsync(isHandshake: true); 393var task = client.ReadAsync(); 434var task = client.ReadAsync(isHandshake: true); 676var handshakeReadTask = client.ReadAsync(true); 3031var hubMethodTask1 = client.InvokeAsync(nameof(LongRunningHub.LongRunningMethod)); 3087var hubMethodTask = client.InvokeAsync(nameof(LongRunningHub.LongRunningMethod)); 4421var messagePromise = client.StreamAsync(nameof(StreamingHub.StreamEcho), new[] { streamId }, Array.Empty<object>()).DefaultTimeout(); 4583var task = (Task<int>)client.Connection.Items[nameof(MethodHub.UploadDoesWorkOnComplete)]; 5232var readTask = client.ReadAsync(); 5451public static async Task<IEnumerable<T>> ReadAsync<T>(this IAsyncEnumerable<T> enumerable, int count) 5470public static async Task<IEnumerable<T>> ReadAllAsync<T>(this IAsyncEnumerable<T> enumerable)
HubConnectionHandlerTestUtils\Hubs.cs (19)
83public Task<int> TaskValueMethod() 191public async Task<string> StreamingConcat(ChannelReader<string> source) 213public async Task<int> StreamingSum(ChannelReader<int> source) 226public async Task<List<object>> UploadArray(ChannelReader<object> source) 242public async Task<List<object>> UploadArrayAuth(ChannelReader<object> source) 257public async Task<string> TestTypeCastingErrors(ChannelReader<int> source) 271public async Task<bool> TestCustomErrorPassing(ChannelReader<int> source) 338public async Task<int> GetClientResult(int num) 362public async Task<int> GetClientResultWithStream(ChannelReader<int> channelReader) 571public async Task<ClientResults> GetClientResultTwoWays(int clientValue, int callerValue) => 582Task<int> GetClientResult(int value); 584Task<int> GetClientResultWithCancellation(int value, CancellationToken cancellationToken); 718public async Task<ChannelReader<string>> CounterChannelAsync(int count) 725public async Task<ChannelReader<string>> CounterChannelAsync2(int count) 755public async Task<IAsyncEnumerable<string>> CounterAsyncEnumerableAsync(int count) 928private async Task<bool> MoveNextAsyncAwaited(ValueTask<T> channelReadTask) 1018public async Task<int> LongRunningMethod() 1025public async Task<ChannelReader<string>> LongRunningStream() 1375public async Task<int> ServicesAndParams(int value, [FromService] Service1 service, ChannelReader<int> channelReader, [FromService] Service2 service2, bool value2)
HubFilterTests.cs (3)
352var invokeTask = client.InvokeAsync(nameof(MethodHub.Echo), "Hello world!"); 412var invokeTask = client.InvokeAsync(nameof(MethodHub.Echo), "Hello world!"); 474var invokeTask = client.InvokeAsync(nameof(MethodHub.Echo), "Hello world!");
Internal\MessageBufferTests.cs (1)
510var writeTask = messageBuffer.WriteAsync(new SerializedHubMessage(new InvocationMessage("t", new object[] { new byte[100] })), default).DefaultTimeout();
Internal\TypedClientBuilderTests.cs (8)
212var task = typedProxy.GetValue(1008, objArg, "test"); 250var task1 = typedProxy.MethodReturning("foo", cts1.Token); 254var task2 = typedProxy.NoArgumentMethodReturning(cts2.Token); 284Task<int> GetValue(int arg1, object arg2, string arg3); 323Task<int> NoArgumentMethodReturning(CancellationToken cancellationToken); 324Task<string> MethodReturning(string foo, CancellationToken cancellationToken); 339Task<int> GetValue(); 369public async Task<T> InvokeCoreAsync<T>(string method, object[] args, CancellationToken cancellationToken = default)
NativeAotTests.cs (3)
214public async Task<int> TaskValueMethod() 299public async Task<string> EnumerableIntParameter(IAsyncEnumerable<object> source) 321public async Task<string> ChannelShortParameter(ChannelReader<object> source)
SerializedHubMessageTests.cs (2)
69var firstSerialization = Task.Run(() => message.GetSerializedMessage(protocol)); 73var secondSerialization = Task.Run(() => message.GetSerializedMessage(protocol));
Microsoft.AspNetCore.SignalR.Tests.Utils (27)
ChannelExtensions.cs (3)
10public static async Task<List<T>> ReadAndCollectAllAsync<T>(this ChannelReader<T> channel, bool suppressExceptions = false) 37public static async Task<List<T>> ReadAtLeastAsync<T>(this ChannelReader<T> reader, int minimumCount, CancellationToken cancellationToken = default) 59var readTask = reader.WaitToReadAsync(cancellationToken).AsTask();
PipeReaderExtensions.cs (4)
10public static async Task<bool> WaitToReadAsync(this PipeReader pipeReader) 36public static async Task<byte[]> ReadSingleAsync(this PipeReader pipeReader) 69public static async Task<byte[]> ReadAllAsync(this PipeReader pipeReader) 85public static async Task<byte[]> ReadAsync(this PipeReader pipeReader, int numBytes)
src\Shared\SignalR\FunctionalTestBase.cs (1)
40public Task<InProcessTestServer<T>> StartServer<T>(Func<WriteContext, bool> expectedErrorsFilter = null, Action<KestrelServerOptions> configureKestrelServerOptions = null) where T : class
src\Shared\SignalR\InProcessTestServer.cs (1)
61public static async Task<InProcessTestServer<TStartup>> StartServer(ILoggerFactory loggerFactory, Action<KestrelServerOptions> configureKestrelServerOptions = null, IDisposable disposable = null)
TaskExtensions.cs (2)
28public static async Task<T> OrThrowIfOtherFails<T>(this Task<T> task, Task otherTask)
TestClient.cs (16)
68public async Task<Task> ConnectAsync( 91public Task<IList<HubMessage>> StreamAsync(string methodName, params object[] args) 96public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, params object[] args) 102public async Task<IList<HubMessage>> StreamAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args) 108public async Task<IList<HubMessage>> ListenAllAsync(string invocationId) 149public async Task<CompletionMessage> InvokeAsync(string methodName, params object[] args) 189public Task<string> SendInvocationAsync(string methodName, params object[] args) 194public Task<string> SendInvocationAsync(string methodName, IDictionary<string, string> headers, params object[] args) 199public Task<string> SendInvocationAsync(string methodName, bool nonBlocking, params object[] args) 204public Task<string> SendInvocationAsync(string methodName, bool nonBlocking, IDictionary<string, string> headers, params object[] args) 210public Task<string> SendStreamInvocationAsync(string methodName, params object[] args) 215public Task<string> SendStreamInvocationAsync(string methodName, string[] streamIds, params object[] args) 220public Task<string> SendStreamInvocationAsync(string methodName, string[] streamIds, IDictionary<string, string> headers, params object[] args) 226public Task<string> BeginUploadStreamAsync(string invocationId, string methodName, string[] streamIds, params object[] args) 232public async Task<string> SendHubMessageAsync(HubMessage message) 240public async Task<HubMessage> ReadAsync(bool isHandshake = false)
Microsoft.AspNetCore.SpaProxy (2)
SpaProxyLaunchManager.cs (2)
73public async Task<bool> IsSpaProxyRunning(CancellationToken cancellationToken) 106private async Task<bool> ProbeSpaDevelopmentServerUrl(HttpClient httpClient, CancellationToken cancellationToken)
Microsoft.AspNetCore.SpaServices.Extensions (14)
AngularCli\AngularCliMiddleware.cs (2)
41var angularCliServerInfoTask = StartAngularCliServerAsync(sourcePath, scriptName, pkgManagerCommand, devServerPort, logger, diagnosticSource, applicationStoppingToken); 55private static async Task<Uri> StartAngularCliServerAsync(
Proxying\ConditionalProxyMiddleware.cs (2)
17private readonly Task<Uri> _baseUriTask; 27Task<Uri> baseUriTask,
Proxying\SpaProxy.cs (4)
54public static async Task<bool> PerformProxyRequest( 57Task<Uri> baseUriTask, 209private static async Task<bool> AcceptProxyWebSocketRequest(HttpContext context, Uri destinationUri, CancellationToken cancellationToken) 283var resultTask = source.ReceiveAsync(new ArraySegment<byte>(buffer), cancellationToken);
Proxying\SpaProxyingExtensions.cs (1)
58Func<Task<Uri>> baseUriTaskFactory)
ReactDevelopmentServer\ReactDevelopmentServerMiddleware.cs (2)
41var portTask = StartCreateReactAppServerAsync(sourcePath, scriptName, pkgManagerCommand, devServerPort, logger, diagnosticSource, applicationStoppingToken); 61private static async Task<int> StartCreateReactAppServerAsync(
Util\EventedStreamReader.cs (1)
33public Task<Match> WaitForMatch(Regex regex)
Util\TaskTimeoutExtensions.cs (2)
20public static async Task<T> WithTimeout<T>(this Task<T> task, TimeSpan timeoutDelay, string message)
Microsoft.AspNetCore.SpaServices.Extensions.Tests (2)
SpaProxyTests.cs (2)
23.Setup<Task<HttpResponseMessage>>("SendAsync", 57var baseUriTask = Task.FromResult(new Uri(baseUrl));
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
565private static async Task<HttpClient> CreateClient()
Microsoft.AspNetCore.StaticFiles.Tests (1)
StaticFilesTestServer.cs (1)
15public static async Task<IHost> Create(Action<IApplicationBuilder> configureApp, Action<IServiceCollection> configureServices = null)
Microsoft.AspNetCore.TestHost (14)
AsyncStreamWrapper.cs (1)
52public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
ClientHandler.cs (2)
73/// <returns>A <see cref="Task{TResult}"/> returning the <see cref="HttpResponseMessage"/>.</returns> 74protected override async Task<HttpResponseMessage> SendAsync(
HttpContextBuilder.cs (1)
84internal Task<HttpContext> SendAsync(CancellationToken cancellationToken)
RequestBuilder.cs (3)
72public Task<HttpResponseMessage> SendAsync(string method) 82public Task<HttpResponseMessage> GetAsync() 92public Task<HttpResponseMessage> PostAsync()
ResponseBodyReaderStream.cs (1)
72public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
TestServer.cs (1)
207public async Task<HttpContext> SendAsync(Action<HttpContext> configureContext, CancellationToken cancellationToken = default)
TestWebSocket.cs (2)
110public override async Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) 259public async Task<Message> ReceiveAsync(CancellationToken cancellationToken)
UpgradeFeature.cs (1)
13public Task<Stream> UpgradeAsync()
WebSocketClient.cs (2)
54public async Task<WebSocket> ConnectAsync(Uri uri, CancellationToken cancellationToken) 135async Task<WebSocket> IHttpWebSocketFeature.AcceptAsync(WebSocketAcceptContext context)
Microsoft.AspNetCore.TestHost.Tests (15)
ClientHandlerTests.cs (6)
232var readTask = responseBody.ReadAsync(new byte[100], 0, 100); 316var responseTask = invoker.SendAsync(message, CancellationToken.None); 393Task<HttpResponseMessage> task = httpClient.GetAsync("https://example.com/"); 455Task<int> readTask = responseStream.ReadAsync(new byte[100], 0, 100); 478Task<int> readTask = responseStream.ReadAsync(new byte[100], 0, 100, cts.Token); 496Task<HttpResponseMessage> responseTask;
HttpContextBuilderTests.cs (4)
107var task = server.SendAsync(c => { }); 209Task<int> readTask = responseStream.ReadAsync(new byte[100], 0, 100); 232var contextTask = server.SendAsync(c => { }, cts.Token); 259var readTask = responseStream.ReadAsync(new byte[100], 0, 100, cts.Token);
RequestLifetimeTests.cs (1)
97private Task<IHost> CreateHost(RequestDelegate appDelegate)
ResponseBodyTests.cs (2)
146var zeroByteRead = stream.ReadAsync(Array.Empty<byte>(), 0, 0); 157private Task<IHost> CreateHost(RequestDelegate appDelegate)
ResponseResetTests.cs (1)
160private Task<IHost> CreateHost(RequestDelegate appDelegate)
TestClientTests.cs (1)
412var pendingReadTask = ctx.Request.Body.ReadAsync(new byte[1024], 0, 1024);
Microsoft.AspNetCore.Testing.Tests (2)
TestResources\ReturningHttpClientHandler.cs (1)
20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
TestResources\TestHandler.cs (1)
13protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
2857public Task<bool> HandleRequestAsync() => Task.FromResult(false); 2859protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Microsoft.AspNetCore.WebSockets (2)
AbortStream.cs (1)
50public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
WebSocketMiddleware.cs (1)
132public async Task<WebSocket> AcceptAsync(WebSocketAcceptContext acceptContext)
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\AutobahnTester.cs (1)
31public async Task<AutobahnResult> Run(CancellationToken cancellationToken)
Autobahn\Executable.cs (1)
33public async Task<int> ExecAsync(string args, CancellationToken cancellationToken, ILogger logger)
Microsoft.AspNetCore.WebSockets.Tests (4)
BufferStream.cs (2)
165public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 248var result = tcs.Task;
DuplexStream.cs (1)
100public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
WebSocketMiddlewareTests.cs (1)
526var pendingResponse = serverSocket.ReceiveAsync(new ArraySegment<byte>(new byte[1024]), default);
Microsoft.AspNetCore.WebUtilities (19)
BufferedReadStream.cs (4)
220public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 262public async Task<bool> EnsureBufferedAsync(CancellationToken cancellationToken) 312public async Task<bool> EnsureBufferedAsync(int minCount, CancellationToken cancellationToken) 370public async Task<string> ReadLineAsync(int lengthLimit, CancellationToken cancellationToken)
FileBufferingReadStream.cs (1)
327public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FileBufferingWriteStream.cs (1)
99public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
FormMultipartSection.cs (1)
56public Task<string> GetValueAsync() => Section.ReadAsStringAsync();
FormPipeReader.cs (1)
91public async Task<Dictionary<string, StringValues>> ReadFormAsync(CancellationToken cancellationToken = default)
FormReader.cs (2)
158public async Task<KeyValuePair<string, string>?> ReadNextPairAsync(CancellationToken cancellationToken = new CancellationToken()) 299public async Task<Dictionary<string, StringValues>> ReadFormAsync(CancellationToken cancellationToken = new CancellationToken())
HttpRequestStreamReader.cs (4)
214public override Task<int> ReadAsync(char[] buffer, int index, int count) 320public override async Task<string?> ReadLineAsync() 482private async Task<int> ReadIntoBufferAsync() 513public override async Task<string> ReadToEndAsync()
MultipartReader.cs (2)
84public async Task<MultipartSection?> ReadNextSectionAsync(CancellationToken cancellationToken = new CancellationToken()) 106private async Task<Dictionary<string, StringValues>> ReadHeadersAsync(CancellationToken cancellationToken)
MultipartReaderStream.cs (2)
243public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 307static async Task<int> ReadBoundaryAsync(MultipartReaderStream stream, int length, CancellationToken cancellationToken)
MultipartSectionStreamExtensions.cs (1)
19public static Task<string> ReadAsStringAsync(this MultipartSection section)
Microsoft.AspNetCore.WebUtilities.Microbenchmarks (1)
HttpRequestStreamReaderReadLineBenchmark.cs (1)
29public async Task<string> ReadLineAsync()
Microsoft.AspNetCore.WebUtilities.Tests (17)
FormPipeReaderTests.cs (3)
199var readTask = Assert.ThrowsAsync<InvalidDataException>( 622internal virtual Task<Dictionary<string, StringValues>> ReadFormAsync(FormPipeReader reader) 627private static async Task<PipeReader> MakePipeReader(string text)
FormReaderAsyncTest.cs (2)
10protected override async Task<Dictionary<string, StringValues>> ReadFormAsync(FormReader reader) 15protected override async Task<KeyValuePair<string, string>?> ReadPair(FormReader reader)
FormReaderTests.cs (2)
205protected virtual Task<Dictionary<string, StringValues>> ReadFormAsync(FormReader reader) 210protected virtual Task<KeyValuePair<string, string>?> ReadPair(FormReader reader)
HttpRequestStreamReaderTest.cs (9)
150public static async Task ReadLine_ReadMultipleLines(Func<HttpRequestStreamReader, Task<string>> action) 172public static async Task ReadLine_ReadWithNoNewlines(Func<HttpRequestStreamReader, Task<string>> action) 189public static async Task ReadLine_MultipleContinuousLines(Func<HttpRequestStreamReader, Task<string>> action) 213public static async Task ReadLine_CarriageReturnAndLineFeedAcrossBufferBundaries(Func<HttpRequestStreamReader, Task<string>> action) 237public static async Task ReadLine_EOF(Func<HttpRequestStreamReader, Task<string>> action) 250public static async Task ReadLine_NewLineOnly(Func<HttpRequestStreamReader, Task<string>> action) 483yield return new object[] { new Func<HttpRequestStreamReader, Task<string?>>((httpRequestStreamReader) => 486yield return new object[] { new Func<HttpRequestStreamReader, Task<string?>>((httpRequestStreamReader) => 529public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
NonSeekableReadStream.cs (1)
63public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Microsoft.Bcl.TimeProvider (2)
System\Threading\Tasks\TimeProviderTaskExtensions.cs (2)
221public static Task<TResult> WaitAsync<TResult>(this Task<TResult> task, TimeSpan timeout, TimeProvider timeProvider, CancellationToken cancellationToken = default)
Microsoft.Build (36)
AwaitExtensions.cs (1)
96internal static Task<int> ToTask(this WaitHandle[] handles, int timeout = Timeout.Infinite)
BackEnd\Components\ProjectCache\ProjectCachePluginBase.cs (1)
34public abstract Task<CacheResult> GetCacheResultAsync(
BackEnd\Components\ProjectCache\ProjectCacheService.cs (6)
49private readonly ConcurrentDictionary<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> _projectCachePlugins = new(ProjectCacheDescriptorEqualityComparer.Instance); 159private Task<ProjectCachePlugin> GetProjectCachePluginAsync( 169descriptor => new Lazy<Task<ProjectCachePlugin>>(() => CreateAndInitializePluginAsync(descriptor, projectGraph, buildRequestConfiguration, requestedTargets, cancellationToken))) 194private async Task<ProjectCachePlugin> CreateAndInitializePluginAsync( 759if (!_projectCachePlugins.TryGetValue(projectCacheDescriptor, out Lazy<Task<ProjectCachePlugin>>? pluginLazyTask)) 823foreach (KeyValuePair<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> kvp in _projectCachePlugins)
BackEnd\Components\RequestBuilder\IntrinsicTasks\CallTarget.cs (1)
86public Task<bool> ExecuteInternal()
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (3)
232public async Task<bool> ExecuteInternal() 404private async Task<bool> BuildProjectsInParallel(Dictionary<string, string> propertiesTable, string[] undefinePropertiesArray, List<string[]> targetLists, bool success, bool[] skipProjects) 516internal static async Task<bool> ExecuteTargets(
BackEnd\Components\RequestBuilder\IRequestBuilderCallback.cs (1)
29Task<BuildResult[]> BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets = false);
BackEnd\Components\RequestBuilder\ITargetBuilder.cs (1)
29Task<BuildResult> BuildTargets(ProjectLoggingContext projectLoggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name, TargetBuiltReason reason)[] targets, Lookup baseLookup, CancellationToken cancellationToken);
BackEnd\Components\RequestBuilder\ITargetBuilderCallback.cs (1)
35Task<ITargetResult[]> LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation);
BackEnd\Components\RequestBuilder\ITaskBuilder.cs (1)
54Task<WorkUnitResult> ExecuteTask(TargetLoggingContext targetLoggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild task, TaskExecutionMode mode, Lookup lookupForInference, Lookup lookupForExecution, CancellationToken cancellationToken);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
333public async Task<BuildResult[]> BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets = false) 920private async Task<BuildResult[]> StartNewBuildRequests(FullyQualifiedBuildRequest[] requests) 1092private async Task<BuildResult> BuildProject()
BackEnd\Components\RequestBuilder\TargetBuilder.cs (5)
108public async Task<BuildResult> BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name, TargetBuiltReason reason)[] targetNames, Lookup baseLookup, CancellationToken cancellationToken) 250async Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation taskLocation) 329async Task<BuildResult[]> IRequestBuilderCallback.BuildProjects(string[] projectFiles, Microsoft.Build.Collections.PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets) 665private async Task<bool> PushTargets(IList<TargetSpecification> targets, TargetEntry parentTargetEntry, Lookup baseLookup, bool addAsErrorTarget, bool stopProcessingOnCompletion, TargetBuiltReason buildReason) 768private async Task<bool> CompleteOutstandingActiveRequests(string targetName)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
152public async Task<WorkUnitResult> ExecuteTask(TargetLoggingContext loggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild taskInstance, TaskExecutionMode mode, Lookup inferLookup, Lookup executeLookup, CancellationToken cancellationToken) 657private async Task<WorkUnitResult> InitializeAndExecuteTask(TaskLoggingContext taskLoggingContext, ItemBucket bucket, IDictionary<string, string> taskIdentityParameters, TaskHost taskHost, TaskExecutionMode howToExecuteTask)
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
969public async Task<BuildEngineResult> InternalBuildProjects(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false) 1142private async Task<BuildEngineResult> BuildProjectFilesInParallelAsync(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false)
BackEnd\Components\Scheduler\IScheduler.cs (1)
83Task<int> RequestCores(int requestId, int requestedCores, bool waitForCores);
BackEnd\Components\Scheduler\Scheduler.cs (1)
600public Task<int> RequestCores(int requestId, int requestedCores, bool waitForCores)
BufferedReadStream.cs (1)
130public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Instance\RunningObjectTable.cs (2)
22private readonly Task<IRunningObjectTable> _rotTask; 68var task = Task.Run(() =>
Logging\BinaryLogger\Postprocessing\SubStream.cs (1)
70public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (1)
112public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
NodeEndpointOutOfProcBase.cs (1)
525Task<int> readTask = localReadPipe.ReadAsync(headerByte, 0, headerByte.Length, CancellationToken.None);
Microsoft.Build.Engine.UnitTests (34)
BackEnd\MockTaskBuilder.cs (5)
78public Task<WorkUnitResult> ExecuteTask(TargetLoggingContext targetLoggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild task, TaskExecutionMode mode, Lookup lookupForInference, Lookup lookupForExecution, CancellationToken cancellationToken) 82return Task<WorkUnitResult>.FromResult(new WorkUnitResult(WorkUnitResultCode.Canceled, WorkUnitActionCode.Stop, null)); 115return Task<WorkUnitResult>.FromResult(new WorkUnitResult(WorkUnitResultCode.Failed, WorkUnitActionCode.Continue, null)); 118return Task<WorkUnitResult>.FromResult(new WorkUnitResult(WorkUnitResultCode.Failed, WorkUnitActionCode.Stop, null)); 122return Task<WorkUnitResult>.FromResult(new WorkUnitResult(WorkUnitResultCode.Success, WorkUnitActionCode.Continue, null));
BackEnd\RequestBuilder_Tests.cs (4)
358public Task<BuildResult> BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name, TargetBuiltReason reason)[] targets, Lookup baseLookup, CancellationToken cancellationToken) 369return Task<BuildResult>.FromResult(result); 394return Task<BuildResult>.FromResult(result); 398return Task<BuildResult>.FromResult(_cache.GetResultForRequest(entry.Request));
BackEnd\SdkResolverService_Tests.cs (2)
197var res1 = Task.Run(() => TryResolveSdk(service)); 200var res2 = Task.Run(() => TryResolveSdk(service));
BackEnd\TargetBuilder_Tests.cs (1)
1481Task<BuildResult[]> IRequestBuilderCallback.BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets)
BackEnd\TargetEntry_Tests.cs (2)
927Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation) 939Task<BuildResult[]> IRequestBuilderCallback.BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets)
BackEnd\TaskBuilder_Tests.cs (2)
874Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation) 929Task<BuildResult[]> IRequestBuilderCallback.BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets)
BackEnd\TaskHost_Tests.cs (2)
1415public Task<BuildResult[]> BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets) 1417return Task<BuildResult[]>.FromResult(_buildResultsToReturn);
ProjectCache\ProjectCacheTests.cs (16)
196private readonly Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> _getCacheResultDelegate; 198public DelegatingMockCache(Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>> getCacheResultDelegate) 208public override async Task<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, PluginLoggerBase logger, CancellationToken cancellationToken) 237public Func<BuildRequestData, PluginLoggerBase, CancellationToken, Task<CacheResult>>? GetCacheResultImplementation { get; set; } 246public override Task<CacheResult> GetCacheResultAsync( 289public override async Task<CacheResult> GetCacheResultAsync( 701foreach (var task in referenceBuildTasks) 1405var task2 = BuildProjectFileAsync(2); 1406var task3 = BuildProjectFileAsync(3); 1407var task4 = BuildProjectFileAsync(4); 1423var task1 = BuildProjectFileAsync(1); 1427Task<BuildResult> BuildProjectFileAsync(int projectNumber) 1476var buildResultTasks = new List<Task<BuildResult>>(); 1483Task<BuildResult> buildResultTask = buildSession.BuildProjectFileAsync( 1494foreach (var buildResultTask in buildResultTasks) 1622var buildTasks = new List<Task<BuildResult>>();
Microsoft.Build.Tasks.CodeAnalysis (10)
src\Compilers\Core\CommandLine\BuildProtocol.cs (2)
122public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 318public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
567var responseTask = BuildServerConnection.RunServerBuildRequestAsync(
src\Compilers\Shared\BuildServerConnection.cs (7)
88internal static async Task<bool> RunServerShutdownRequestAsync( 157internal static Task<BuildResponse> RunServerBuildRequestAsync( 171internal static async Task<BuildResponse> RunServerBuildRequestAsync( 200static Task<NamedPipeClientStream?> tryConnectToServerAsync( 277static async Task<BuildResponse> tryRunRequestAsync( 300var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 371internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Microsoft.Build.Tasks.CodeAnalysis.Sdk (10)
src\Compilers\Core\CommandLine\BuildProtocol.cs (2)
122public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 318public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
567var responseTask = BuildServerConnection.RunServerBuildRequestAsync(
src\Compilers\Shared\BuildServerConnection.cs (7)
88internal static async Task<bool> RunServerShutdownRequestAsync( 157internal static Task<BuildResponse> RunServerBuildRequestAsync( 171internal static async Task<BuildResponse> RunServerBuildRequestAsync( 200static Task<NamedPipeClientStream?> tryConnectToServerAsync( 277static async Task<BuildResponse> tryRunRequestAsync( 300var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 371internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Microsoft.Build.Tasks.Core (5)
AssemblyDependency\Node\OutOfProcRarNode.cs (3)
75private async Task<RarNodeShutdownReason> RunNodeAsync(CancellationToken cancellationToken) 129static async Task<LinkStatus> WaitForConnection(NodePipeServer pipeServer, CancellationToken cancellationToken) 131Task<LinkStatus> linkStatusTask = Task.Run(pipeServer.WaitForConnection);
DownloadFile.cs (1)
86private async Task<bool> ExecuteAsync()
NodePipeBase.cs (1)
164internal async Task<INodePacket> ReadPacketAsync(CancellationToken cancellationToken = default)
Microsoft.Build.Tasks.UnitTests (3)
DownloadFile_Tests.cs (3)
46Task<bool> task = Task.Run(() => downloadFile.Execute()); 304var runaway = Task.Run(() => downloadFile.Execute()); 398protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Build.UnitTests.Shared (3)
ObjectModelHelpers.cs (3)
2097var buildTask = BuildProjectFileAsync(projectFile, entryTargets, globalProperties); 2101public async Task<BuildResult> BuildProjectFileAsync( 2115public async Task<BuildResult> BuildAsync(BuildRequestData requestData)
Microsoft.CodeAnalysis (80)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
863public async Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(Compilation compilation, CancellationToken cancellationToken) 1520var workerTasks = new Task<CompilationCompletedEvent?>[workerCount]; 1574private async Task<CompilationCompletedEvent?> ProcessCompilationEventsCoreAsync(AnalysisScope analysisScope, bool prePopulatedEventQueue, CancellationToken cancellationToken) 2022private static async Task<(AnalyzerActions actions, ImmutableHashSet<DiagnosticAnalyzer> unsuppressedAnalyzers)> GetAnalyzerActionsAsync( 2223private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>> CreateAnalyzerGateMapAsync( 2248private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags>> CreateGeneratedCodeAnalysisFlagsMapAsync( 2357internal async Task<AnalyzerActionCounts> GetAnalyzerActionCountsAsync(DiagnosticAnalyzer analyzer, CompilationOptions compilationOptions, AnalysisScope analysisScope, CancellationToken cancellationToken)
DiagnosticAnalyzer\AnalyzerManager.AnalyzerExecutionContext.cs (10)
44private Task<HostSessionStartAnalysisScope>? _lazySessionScopeTask; 49private Task<HostCompilationStartAnalysisScope>? _lazyCompilationScopeTask; 54private Dictionary<ISymbol, Task<HostSymbolStartAnalysisScope>>? _lazySymbolScopeTasks; 75public Task<HostSessionStartAnalysisScope> GetSessionAnalysisScopeAsync(AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 79Task<HostSessionStartAnalysisScope> task; 89static Task<HostSessionStartAnalysisScope> getSessionAnalysisScopeTaskSlowAsync(AnalyzerExecutionContext context, AnalyzerExecutor executor, CancellationToken cancellationToken) 109public Task<HostCompilationStartAnalysisScope> GetCompilationAnalysisScopeAsync( 139public Task<HostSymbolStartAnalysisScope> GetSymbolAnalysisScopeAsync( 150_lazySymbolScopeTasks ??= new Dictionary<ISymbol, Task<HostSymbolStartAnalysisScope>>(); 151if (!_lazySymbolScopeTasks.TryGetValue(symbol, out var symbolScopeTask))
DiagnosticAnalyzer\AnalyzerManager.cs (5)
92private async Task<HostSymbolStartAnalysisScope> GetSymbolAnalysisScopeAsync( 106private async Task<HostSymbolStartAnalysisScope> GetSymbolAnalysisScopeCoreAsync( 149var task = analyzerExecutionContext.GetSessionAnalysisScopeAsync(analyzerExecutor, cancellationToken); 234public async Task<bool> IsConcurrentAnalyzerAsync(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken) 244public async Task<GeneratedCodeAnalysisFlags> GetGeneratedCodeAnalysisFlagsAsync(DiagnosticAnalyzer analyzer, AnalyzerExecutor analyzerExecutor, CancellationToken cancellationToken)
DiagnosticAnalyzer\AsyncQueue.cs (3)
232public Task<TElement> DequeueAsync(CancellationToken cancellationToken = default(CancellationToken)) 245static async Task<TElement> dequeueSlowAsync(ValueTask<Optional<TElement>> optionalResult) 291/// <typeparam name="T">The type of value returned by a successfully completed <see cref="Task{TResult}"/>.</typeparam>
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (37)
233public Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync() 242public async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(CancellationToken cancellationToken = default) 253public async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 263public async Task<AnalysisResult> GetAnalysisResultAsync(CancellationToken cancellationToken) 273public async Task<AnalysisResult> GetAnalysisResultAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 284public Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync() 292public async Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(CancellationToken cancellationToken = default) 302async Task<ImmutableArray<Diagnostic>> getAllDiagnosticsWithoutStateTrackingAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 324public async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsAsync(CancellationToken cancellationToken) 335public async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 342private async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 349private async Task<AnalysisResult> GetAnalysisResultCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 356private async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 363private static async Task<AnalyzerDriver> CreateAndInitializeDriverAsync( 395public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, CancellationToken cancellationToken) 411public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, TextSpan? filterSpan, CancellationToken cancellationToken) 427public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 445public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 459public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, CancellationToken cancellationToken) 474public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, CancellationToken cancellationToken) 488public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 505public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 520public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, CancellationToken cancellationToken) 535public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 552public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, CancellationToken cancellationToken) 569public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 577private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SourceOrAdditionalFile file, ImmutableArray<DiagnosticAnalyzer> analyzers, TextSpan? filterSpan, CancellationToken cancellationToken) 584private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsCoreAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, TextSpan? filterSpan, CancellationToken cancellationToken) 598public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 613public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 628public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 643public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 651private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 658private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 830static async Task<(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts, bool hasAnyActionsRequiringCompilationEvents)> getAnalyzerActionCountsAsync( 1276public async Task<AnalyzerTelemetryInfo> GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1296private async Task<AnalyzerActionCounts> GetAnalyzerActionCountsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
56private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 196if (CopyMap.TryGetValue(originalFilePath, out var copyTask)) 203var task = CopyMap.GetOrAdd(originalFilePath, tcs.Task);
FileSystem\FileUtilities.cs (4)
334public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 339public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
PEWriter\DebugSourceDocument.cs (1)
24private readonly Task<DebugSourceInfo>? _sourceInfo;
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
Syntax\SyntaxReference.cs (1)
38public virtual Task<SyntaxNode> GetSyntaxAsync(CancellationToken cancellationToken = default)
Syntax\SyntaxTree.cs (3)
120public virtual Task<SourceText> GetTextAsync(CancellationToken cancellationToken = default) 154public Task<SyntaxNode> GetRootAsync(CancellationToken cancellationToken = default) 163protected abstract Task<SyntaxNode> GetRootAsyncCore(CancellationToken cancellationToken);
Microsoft.CodeAnalysis.Analyzers (49)
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (1)
56private static async Task<Document> AddMethodAsync(Document document, SyntaxNode classDecl, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (7)
104private static Task<Solution> AddAnalyzerReleaseTrackingFilesAsync(Project project) 168private static async Task<Solution> AddEntryToUnshippedFileAsync(Project project, string entryToAdd, CancellationToken cancellationToken) 180private static Task<SourceText> AddEntriesToUnshippedFileAsync( 186private static async Task<Solution> UpdateEntryInUnshippedFileAsync(Project project, string ruleId, string entryToUpdate, CancellationToken cancellationToken) 198private static Task<SourceText> UpdateEntriesInUnshippedFileAsync( 204private static Task<SourceText> AddOrUpdateEntriesToUnshippedFileAsync( 248private static async Task<SourceText> AddOrUpdateEntriesToUnshippedFileAsync(
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (5)
25public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 89protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 129private static async Task<SourceText> AddEntriesToUnshippedFileForDiagnosticsAsync(TextDocument unshippedDataDocument, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 143private static async Task<SourceText> UpdateEntriesInUnshippedFileForDiagnosticsAsync(TextDocument unshippedDataDocument, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 173protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
MetaAnalyzers\Fixers\ApplyDiagnosticAnalyzerAttributeFix.cs (1)
61private Task<Document> GetFixAsync(Document document, SyntaxNode root, SyntaxNode classDecl, SyntaxGenerator generator, params string[] languages)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (5)
64private async Task<Document> ConvertToEqualsAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 79private async Task<Document> CallOverloadWithEqualityComparerAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 115private static async Task<Document> CallOverloadWithEqualityComparerAsync(Document document, SyntaxNode nodeToReplace, IMethodSymbol? methodSymbol, 186private async Task<Document> EnsureEqualsCorrectAsync(Document document, SemanticModel semanticModel, IInvocationOperation invocationOperation, CancellationToken cancellationToken) 256private static async Task<Document> ConvertToEqualsAsync(Document document, SemanticModel semanticModel, IBinaryOperation binaryOperation, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\ConfigureGeneratedCodeAnalysisFix.cs (1)
42private async Task<Document> ConfigureGeneratedCodeAnalysisAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
156private static async Task<Solution> ApplyFixAsync(Document document, SyntaxNode root, FixInfo fixInfo, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (2)
29public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 96protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
MetaAnalyzers\Fixers\EnableConcurrentExecutionFix.cs (1)
41private async Task<Document> EnableConcurrentExecutionAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\PreferIsKindFix.cs (2)
37private async Task<Document> ConvertKindToIsKindAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 63protected override async Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
Microsoft.CodeAnalysis.AnalyzerUtilities (13)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
4152/// <see cref="INamedTypeSymbol"/> for <see cref="System.Threading.Tasks.Task{TResult}"/>
Microsoft.CodeAnalysis.BannedApiAnalyzers (23)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
Microsoft.CodeAnalysis.CodeStyle (88)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
389private static async Task<(ImmutableArray<Diagnostic> reportedDiagnostics, ImmutableArray<string> unhandledIds)> GetReportedDiagnosticsForIdsAsync( 732private async Task<bool> ProcessSuppressMessageAttributesAsync(
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
334public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 339public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (10)
339public static Task<TRootNode> ReplaceNodesAsync<TRootNode>( 342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync, 361public static Task<TRootNode> ReplaceTokensAsync<TRootNode>( 364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync, 374public static Task<TRoot> ReplaceTriviaAsync<TRoot>( 377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync, 387public static async Task<TRoot> ReplaceSyntaxAsync<TRoot>( 390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync, 392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync, 394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
45public static Task<SyntaxToken> GetTouchingWordAsync( 55public static Task<SyntaxToken> GetTouchingTokenAsync( 64public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
33public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync( 37public Task<ImmutableArray<SyntaxNode>> GetSelectedMembersAsync( 41private async Task<ImmutableArray<SyntaxNode>> GetSelectedMembersAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (15)
19public abstract Task<T> GetValueAsync(CancellationToken cancellationToken); 22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 62private Task<T>? _cachedResult; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 326public override Task<T> GetValueAsync(CancellationToken cancellationToken) 335var cachedResult = _cachedResult; 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction; 409var task = computationToStart.AsynchronousComputeFunction(_data, cancellationToken); 454private void CompleteWithTask(Task<T> task, CancellationToken cancellationToken) 486private Task<T> GetCachedValueAndCacheThisValueIfNoneCached_NoLock(Task<T> task) 569public void CompleteFromTask(Task<T> task)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
41private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 175public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 178Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 192Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 209public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 222public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 241private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 244Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 337private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 340Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 361var readTask = ReadFromChannelAndConsumeItemsAsync(); 366async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (17)
18public static readonly Task<bool> True = Task.FromResult(true); 19public static readonly Task<bool> False = Task.FromResult(false); 26public static Task<T?> AsNullable<T>(this Task<T> task) where T : class 30public static Task<T?> Default<T>() 34public static Task<T?> Null<T>() where T : class 38public static Task<IReadOnlyList<T>> EmptyReadOnlyList<T>() 42public static Task<IList<T>> EmptyList<T>() 46public static Task<ImmutableArray<T>> EmptyImmutableArray<T>() 50public static Task<IEnumerable<T>> EmptyEnumerable<T>() 87public static async ValueTask<ImmutableArray<TResult>> WhenAll<TResult>(this IReadOnlyCollection<Task<TResult>> tasks) 92foreach (var task in tasks) 184public static readonly Task<T?> Default = Task.FromResult<T?>(default); 185public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 186public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 187public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 188public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (3)
17public static T WaitAndGetResult<T>(this Task<T> task, CancellationToken cancellationToken) 45public static T WaitAndGetResult_CanCallOnBackground<T>(this Task<T> task, CancellationToken cancellationToken) 83public static TResult VerifyCompleted<TResult>(this Task<TResult> task)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
151=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
Microsoft.CodeAnalysis.CodeStyle.Fixes (206)
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
52private async Task<TAnonymousObjectMemberDeclaratorSyntax?> GetMemberDeclaratorAsync(
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
57private static async Task<INamedTypeSymbol?> GetObsoleteAttributeAsync(Document document, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (4)
345? new Func<CancellationToken, Task<Solution>>(cancellationToken => FixAsync(document, methodToUpdate, argumentToInsert, arguments, fixAllReferences: true, cancellationToken)) 373private async Task<Solution> FixAsync( 401private async Task<(ITypeSymbol, RefKind)> GetArgumentTypeAndRefKindAsync(Document invocationDocument, TArgumentSyntax argument, CancellationToken cancellationToken) 410private static async Task<(string argumentNameSuggestion, bool isNamed)> GetNameSuggestionForArgumentAsync(
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (4)
77public static async Task<Solution> AddParameterAsync<TExpressionSyntax>( 158async Task<Solution> AddConstructorAssignmentsAsync(Solution rewrittenSolution) 164async Task<Solution?> TryAddConstructorAssignmentsAsync(Solution rewrittenSolution) 214private static async Task<ImmutableArray<IMethodSymbol>> FindMethodDeclarationReferencesAsync(
src\Analyzers\Core\CodeFixes\AddParameter\CodeFixData.cs (4)
13Func<CancellationToken, Task<Solution>> createChangedSolutionNonCascading, 14Func<CancellationToken, Task<Solution>>? createChangedSolutionCascading) 25public Func<CancellationToken, Task<Solution>> CreateChangedSolutionNonCascading { get; } = createChangedSolutionNonCascading ?? throw new ArgumentNullException(nameof(createChangedSolutionNonCascading)); 30public Func<CancellationToken, Task<Solution>>? CreateChangedSolutionCascading { get; } = createChangedSolutionCascading;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (6)
300static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Document>> action, string equivalenceKey) 313private static async Task<Document> AddEditsAsync( 379private static Task<Document> TakeTopAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 382private static Task<Document> TakeBottomAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 385private static Task<Document> TakeBothAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 391private async Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
19protected abstract Task<string> GetDescriptionAsync(Diagnostic diagnostic, SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 20protected abstract Task<(SyntaxTree syntaxTree, SyntaxNode root)?> GetRootInOtherSyntaxTreeAsync(SyntaxNode node, SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken); 52private async Task<CodeAction?> GetCodeActionAsync(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
57protected async Task<Document> AddParamTagAsync(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
58private async Task<Document> RemoveDuplicateParamTagAsync(
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
45private async Task<Document> GetTransformedDocumentAsync(Document document, CancellationToken cancellationToken) 48private async Task<SyntaxNode> GetTransformedSyntaxRootAsync(Document document, CancellationToken cancellationToken) 57internal static async Task<SyntaxNode> GetTransformedSyntaxRootAsync(ISyntaxFacts syntaxFacts, AbstractFileHeaderHelper fileHeaderHelper, SyntaxTrivia newLineTrivia, Document document, string? fileHeaderTemplate, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
62private async Task<Document> FixOneAsync(CodeFixContext context, Diagnostic diagnostic, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
80public async Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (7)
65public static async Task<State?> GenerateAsync( 82private async Task<bool> TryInitializeAsync( 140private async Task<bool> TryInitializeDelegatedConstructorAsync(CancellationToken cancellationToken) 403public async Task<Document> GetChangedDocumentAsync( 419private async Task<Document?> GenerateThisOrBaseDelegatingConstructorAsync( 455private async Task<(ImmutableArray<ISymbol>, ImmutableArray<SyntaxNode>)> GenerateMembersAndAssignmentsAsync( 477private async Task<Document> GenerateMemberDelegatingConstructorAsync(
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
130public static async Task<
src\Analyzers\Core\CodeFixes\GenerateConstructor\IGenerateConstructorService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
30protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\IGenerateDefaultConstructorsService.cs (1)
16Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
22protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
27public static async Task<State?> GenerateAsync(
src\Analyzers\Core\CodeFixes\GenerateEnumMember\IGenerateEnumMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
26protected abstract Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (1)
27public async Task<ImmutableArray<CodeAction>> GenerateConversionAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (2)
18public static async Task<State> GenerateConversionStateAsync( 33private Task<bool> TryInitializeConversionAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
23public async Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (2)
25public static async Task<State> GenerateDeconstructMethodStateAsync( 41private async Task<bool> TryInitializeMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28public async Task<ImmutableArray<CodeAction>> GenerateMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
25public static async Task<State> GenerateMethodStateAsync( 40private Task<bool> TryInitializeMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
62protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
58protected async Task<bool> TryFinishInitializingStateAsync(TService service, SemanticDocument document, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateConversionService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConversionAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateDeconstructMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateParameterizedMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateMethodAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
123private async Task<ISet<INamedTypeSymbol>> GetDerivedAndImplementedTypesAsync(
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
47protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (2)
32public async Task<ImmutableArray<CodeAction>> GenerateVariableAsync( 115private static async Task<bool> NameIsHighlyUnlikelyToWarrantSymbolAsync(
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (2)
37protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 45private async Task<SyntaxNode> GetNewRootAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
42protected override Task<Solution?> GetChangedSolutionAsync(
src\Analyzers\Core\CodeFixes\GenerateVariable\IGenerateVariableService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateVariableAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (3)
40public static async Task<ImplementAbstractClassData?> TryGetDataAsync( 72public static async Task<Document?> TryImplementAbstractClassAsync( 82public async Task<Document> ImplementAbstractClassAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (3)
42public async Task<Document> ImplementInterfaceAsync( 62public async Task<ImplementInterfaceInfo?> AnalyzeAsync(Document document, SyntaxNode interfaceType, CancellationToken cancellationToken) 91public async Task<Document> ImplementInterfaceAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\IImplementInterfaceService.cs (3)
24Task<Document> ImplementInterfaceAsync(Document document, ImplementTypeOptions options, SyntaxNode node, CancellationToken cancellationToken); 26Task<ImplementInterfaceInfo?> AnalyzeAsync(Document document, SyntaxNode interfaceType, CancellationToken cancellationToken); 28Task<Document> ImplementInterfaceAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
56public Task<Document> ImplementInterfaceAsync(CancellationToken cancellationToken) 69private async Task<Document> ImplementInterfaceAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
39private async Task<Document> ImplementDisposePatternAsync( 88private async Task<Document> AddFinalizerCommentAsync( 227private static async Task<IFieldSymbol> CreateDisposedValueFieldAsync(
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
17protected abstract Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (3)
101private async Task<Solution> FixNodeAsync( 153private async Task<Solution> RenameThenAddAsyncTokenAsync( 183private async Task<Solution> AddAsyncTokenAsync(
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (6)
51private async Task<Solution> FixNodeAsync( 73private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 96private async Task<Solution> RemoveAsyncTokenAsync( 119private static async Task<Solution> RemoveAwaitFromCallersAsync( 154private static async Task<Solution> RemoveAwaitFromCallersAsync( 170private static async Task<Solution> RemoveAwaitFromCallersAsync(
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
42private static async Task<Solution> FixAllInDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (3)
28public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 51static async Task<ImmutableArray<Diagnostic>> GetSolutionDiagnosticsAsync(FixAllContext fixAllContext) 65private static async Task<Solution> FixAllByDocumentAsync(
src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (2)
16public static async Task<NamingRule> GetApplicableNamingRuleAsync( 34public static async Task<ImmutableArray<NamingRule>> GetNamingRulesAsync(
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (5)
103private static async Task<Solution> FixAsync( 120private readonly Func<CancellationToken, Task<Solution>> _createChangedSolutionAsync; 137Func<CancellationToken, Task<Solution>> createChangedSolutionAsync, 150protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 153protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\NewLines\ConsecutiveStatementPlacement\ConsecutiveStatementPlacementCodeFixProvider.cs (2)
41private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 44public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
41private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 44private static async Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (2)
103private Task<Document> FixAsync( 112private Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
42private static Task<Document> RemoveUnnecessaryImportsAsync(
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (9)
272private static async Task<Document> PreprocessDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 292private async Task<SyntaxNode> GetNewRootAsync( 744private async Task<SyntaxNode> PostProcessDocumentAsync( 773private static async Task<SyntaxNode> PostProcessDocumentCoreAsync( 774Func<SyntaxNode, Document, SyntaxFormattingOptions, CancellationToken, Task<SyntaxNode>> processMemberDeclarationAsync, 805private async Task<SyntaxNode> ReplaceDiscardDeclarationsWithAssignmentsAsync(SyntaxNode memberDeclaration, Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken) 821private async Task<SyntaxNode> AdjustLocalDeclarationsAsync( 890async Task<bool> TryRemoveUnusedLocalAsync(TLocalDeclarationStatementSyntax newDecl, TLocalDeclarationStatementSyntax originalDecl) 914private static async Task<bool> IsLocalDeclarationWithNoReferencesAsync(
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
57private static async Task<Solution> UnsealDeclarationsAsync(
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (5)
103private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 105private ProjectOptionsChangeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 111public static ProjectOptionsChangeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 114protected override Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 117protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
55protected abstract Task<(SyntaxNode oldNode, SyntaxNode newNode)> GetReplacementNodesAsync(
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
84protected async Task<TExpressionSyntax> CreateConditionalExpressionAsync( 144private static async Task<bool> MakeMultiLineAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
54protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 60private Task<Document> FixAllAsync( 69internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (10)
229private async Task<Document> GetEditAsync( 391public virtual Task<Document> AddEventAsync( 401public Task<Document> AddFieldAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 410public Task<Document> AddPropertyAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 419public Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 428public Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 437public Task<Document> AddNamespaceAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 446public Task<Document> AddMethodAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 455public Task<Document> AddMembersAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken) 464public Task<Document> AddNamespaceOrTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
29public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 36public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 43public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 50public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 57public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 64public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 71public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 78public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 85public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (9)
133Task<Document> AddEventAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken); 138Task<Document> AddFieldAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken); 143Task<Document> AddMethodAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken); 148Task<Document> AddPropertyAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken); 153Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken); 158Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken); 163Task<Document> AddNamespaceAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken); 168Task<Document> AddNamespaceOrTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken); 173Task<Document> AddMembersAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (7)
41public static Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this CodeRefactoringContext context) where TSyntaxNode : SyntaxNode 44public static async Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this CodeRefactoringContext context, bool allowEmptyNode) where TSyntaxNode : SyntaxNode 50public static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(this CodeRefactoringContext context) where TSyntaxNode : SyntaxNode 53public static async Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(this CodeRefactoringContext context, bool allowEmptyNodes) where TSyntaxNode : SyntaxNode 59public static async Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this Document document, TextSpan span, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 75public static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>( 81public static async Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (4)
30public async Task<Document> AddImportsAsync( 75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 109private async Task<Document> AddImportDirectivesFromSyntaxesAsync( 170private async Task<Document> AddImportDirectivesFromSymbolAnnotationsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
165public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 171public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 206public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
109public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (5)
35protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 37public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 46private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 76public async Task<Document> MoveDeclarationNearReferenceAsync( 203private async Task<bool> CanMergeDeclarationAndAssignmentAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\IMoveDeclarationNearReferenceService.cs (2)
17Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode localDeclarationStatement, CancellationToken cancellationToken); 24Task<Document> MoveDeclarationNearReferenceAsync(Document document, SyntaxNode localDeclarationStatement, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsService.cs (3)
20public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 23public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25protected async Task<HashSet<T>> GetCommonUnnecessaryImportsOfAllContextAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\ReplaceDiscardDeclarationsWithAssignments\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
139private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 176private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 286private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
18public static new async Task<SemanticDocument> CreateAsync(Document document, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Collections.Package (6)
Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpCompilation.cs (1)
2227/// or <see cref="System.Threading.Tasks.Task{T}" /> where the return type of GetAwaiter().GetResult()
Syntax\CSharpSyntaxTree.cs (2)
102public new virtual Task<CSharpSyntaxNode> GetRootAsync(CancellationToken cancellationToken = default) 881protected override async Task<SyntaxNode> GetRootAsyncCore(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (55)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
94private static async Task<MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>> GetUnassignedParametersAsync(
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
51private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken) 80private static async Task<Document> InsertCloseParenthesisAsync(
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (3)
26public static Task<Document> ConvertAsync(Document document, BaseNamespaceDeclarationSyntax baseNamespace, CSharpSyntaxFormattingOptions options, CancellationToken cancellationToken) 37public static async Task<Document> ConvertNamespaceDeclarationAsync(Document document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 238public static async Task<Document> ConvertFileScopedNamespaceAsync(
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (3)
32protected override async Task<string> GetDescriptionAsync( 45protected override async Task<(SyntaxTree syntaxTree, SyntaxNode root)?> GetRootInOtherSyntaxTreeAsync( 60private static async Task<MethodDeclarationSyntax?> GetMethodDeclarationAsync(
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
33public static async Task<CodeAction?> GetCodeActionAsync( 79private static async Task<Solution> ConvertToPositionalRecordAsync(
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
61private static async Task<(TypeSyntax declarationToFix, TypeSyntax fixedDeclaration)> TryGetOldAndNewReturnTypeAsync(
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
40protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
31protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
57protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
80protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
47protected override async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
30protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
45protected override async Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
37protected override async Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
26public static async Task<Document> MakeLocalFunctionStaticAsync(
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
63private static async Task<Document> FixCodeAsync(
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (4)
85internal static async Task<Document> TransformDocumentIfRequiredAsync( 135private static async Task<Document> GetTransformedDocumentAsync( 170private static async Task<CompilationUnitSyntax> ExpandUsingDirectivesAsync( 187private static async Task<SyntaxNode> ExpandUsingDirectiveAsync(Document document, UsingDirectiveSyntax usingDirective, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
44private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
44private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (2)
44private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 47public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
43private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
46public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
110private static async Task<TypeSyntax?> TryGetDeclarationTypeToFixAsync(
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
57private static async Task<Document> FixAllAsync(
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
54private static async Task<Document> FixAsync(
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
56private static async Task<Document> FixAsync(
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
64private static async Task<Document> ReplaceAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
33public static async Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync<TParentExpression, TMatchNode>(
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
105static async Task<Document> CreateTrackedDocumentAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
139static async Task<SeparatedSyntaxList<ArgumentSyntax>> GetArgumentsAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
36protected override async Task<(SyntaxNode, SyntaxNode)> GetReplacementNodesAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionExpression.cs (1)
20private static Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync(
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
61private static async Task<Document> FixAsync(
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
95private static async Task<Solution> UsePrimaryConstructorAsync(
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
61private static async Task<Solution> UseSystemThreadingLockAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
113public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
52protected override async Task<bool> TypesAreCompatibleAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
37public override async Task<Document> RemoveUnnecessaryImportsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
36public async Task<SyntaxNode> ReplaceAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
116public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree tree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1726if (name.Equals(nameof(Task<int>.ConfigureAwait)) && 1732else if (name.Equals(nameof(Task<int>.ContinueWith)))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\CSharpInitializeParameterService.cs (1)
109protected override Task<Solution> TryAddAssignmentForPrimaryConstructorAsync(Document document, IParameterSymbol parameter, ISymbol fieldOrProperty, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
33public static async Task<Solution> AddAssignmentForPrimaryConstructorAsync(
Microsoft.CodeAnalysis.CSharp.EditorFeatures (19)
EndConstruct\CSharpEndConstructGenerationService.cs (1)
24public Task<bool> TryDoAsync(ITextView textView, ITextBuffer subjectBuffer, char typedChar, CancellationToken cancellationToken)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (6)
98var eventNameTask = EventHookupSessionManager.CurrentSession.GetEventNameAsync(); 119Task<string?> eventNameTask, 143async Task<bool> TryExecuteCommandAsync() 189private static async Task<(Solution solution, TextSpan renameSpan)?> TryGetNewSolutionWithAddedMethodAsync( 190Document document, Task<string?> eventNameTask, int position, CancellationToken cancellationToken) 239private static async Task<Document?> AddMethodNameAndAnnotationsToSolutionAsync(
EventHookup\EventHookupSessionManager_EventHookupSession.cs (5)
47private readonly Task<string?> _eventNameTask; 116Task<string?> eventNameTask) 126public Task<string?> GetEventNameAsync() 129private async Task<string?> DetermineIfEventHookupAndGetHandlerNameAsync(Document document, int position, CancellationToken cancellationToken) 168private async Task<SyntaxToken?> GetPlusEqualsTokenInsideAddAssignExpressionAsync(Document document, int position, CancellationToken cancellationToken)
Formatting\CSharpFormattingInteractionService.cs (4)
76public Task<ImmutableArray<TextChange>> GetFormattingChangesAsync( 91public Task<ImmutableArray<TextChange>> GetFormattingChangesOnPasteAsync(Document document, ITextBuffer textBuffer, TextSpan textSpan, CancellationToken cancellationToken) 99public Task<ImmutableArray<TextChange>> GetFormattingChangesOnReturnAsync(Document document, int caretPosition, CancellationToken cancellationToken) 102public Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, char typedChar, int position, CancellationToken cancellationToken)
GoToBase\CSharpGoToBaseService.cs (1)
26protected override async Task<IMethodSymbol?> FindNextConstructorInChainAsync(
InlineRename\CSharpEditorInlineRenameService.cs (1)
37public override async Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(
NavigationBar\CSharpEditorNavigationBarItemService.cs (1)
23protected override async Task<bool> TryNavigateToItemAsync(Document document, WrappedNavigationBarItem item, ITextView textView, ITextVersion textVersion, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (43)
Classification\SemanticClassifierTests.cs (1)
34protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(
Classification\SyntacticClassifierTests.cs (1)
22protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
Classification\TotalClassifierTests.cs (1)
34protected override async Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, ImmutableArray<TextSpan> spans, ParseOptions? options, TestHost testHost)
CodeActions\ApplyChangesOperationTests.cs (1)
52protected override Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
40protected override Task<Workspace> CreateWorkspaceImplAsync()
CodeActions\MoveStaticMembers\CSharpMoveStaticMembersTests.cs (1)
3465protected override Task<Workspace> CreateWorkspaceImplAsync()
CodeActions\Preview\ErrorCases\ExceptionInCodeAction.cs (5)
42protected override Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 45protected override Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(CancellationToken cancellationToken) 48protected override Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 51protected override Task<Solution> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 54protected override Task<Document> PostProcessChangesAsync(Document document, CancellationToken cancellationToken)
CodeActions\PreviewTests.cs (2)
67protected override Task<Solution> GetChangedSolutionAsync( 91private async Task<(Document document, SolutionPreviewResult previews)> GetMainDocumentAndPreviewsAsync(TestParameters parameters, EditorTestWorkspace workspace)
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
105async Task<List<Tuple<Solution, Solution>>> TestOperationAsync( 219async Task<Tuple<Solution, Solution>> TestOperationAsync(TestParameters parameters, EditorTestWorkspace workspace)
Completion\CompletionProviders\DeclarationNameCompletionProviderTests_NameDeclarationInfoTests.cs (1)
802private async Task<NameDeclarationInfo> GetResultsAsync(string markup)
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (1)
390var description = service.GetDescriptionAsync(document, item, options, displayOptions);
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
594Task<SourceText> ISettingsEditorViewModel.UpdateEditorConfigAsync(SourceText sourceText)
ExtractMethod\ExtractMethodBase.cs (1)
117protected static async Task<SyntaxNode> ExtractMethodAsync(
Formatting\CodeCleanupTests.TestFixers.cs (2)
85public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 141public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
Formatting\Indentation\CSharpFormatterTestsBase.cs (3)
47protected static async Task<int> GetSmartTokenFormatterIndentationWorkerAsync( 59protected static async Task<string> TokenFormatAsync( 101protected static async Task<int> GetSmartTokenFormatterIndentationAsync(
InlineDiagnostics\InlineDiagnosticsTaggerProviderTests.cs (3)
37private static async Task<ImmutableArray<TagSpan<InlineDiagnosticsTag>>> GetTagSpansAsync(string content) 43private static async Task<ImmutableArray<TagSpan<InlineDiagnosticsTag>>> GetTagSpansInSourceGeneratedDocumentAsync(string content) 53private static async Task<ImmutableArray<TagSpan<InlineDiagnosticsTag>>> GetTagSpansAsync(EditorTestWorkspace workspace)
Intents\IntentTestsBase.cs (1)
93internal static async Task<ImmutableArray<IntentSource>> GetIntentsAsync(
Interactive\BraceMatching\InteractiveBraceHighlightingTests.cs (1)
30private static async Task<IEnumerable<TagSpan<BraceHighlightTag>>> ProduceTagsAsync(
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (3)
120protected static async Task<(SourceText?, TextSpan)> GetGeneratedSourceTextAsync( 187protected static Task<(Project, ISymbol)> CompileAndFindSymbolAsync( 202protected static async Task<(Project, ISymbol)> CompileAndFindSymbolAsync(
PdbSourceDocument\NullResultMetadataAsSourceFileProvider.cs (1)
40public Task<MetadataAsSourceFile?> GetGeneratedFileAsync(MetadataAsSourceWorkspace metadataWorkspace, Workspace sourceWorkspace, Project sourceProject, ISymbol symbol, bool signaturesOnly, MetadataAsSourceOptions options, string tempPath, TelemetryMessage? telemetry, CancellationToken cancellationToken)
PdbSourceDocument\TestSourceLinkService.cs (2)
23public Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken) 33public Task<SourceFilePathResult?> GetSourceFilePathAsync(string url, string relativePath, CancellationToken cancellationToken)
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
189private static async Task<QuickInfoItem> GetQuickinfo(EditorTestWorkspace workspace, Document document, int position)
Structure\CommentStructureTests.cs (1)
33internal override async Task<ImmutableArray<BlockSpan>> GetBlockSpansWorkerAsync(Document document, BlockStructureOptions options, int position)
Structure\MetadataAsSource\InvalidIdentifierStructureTests.cs (1)
29internal override async Task<ImmutableArray<BlockSpan>> GetBlockSpansWorkerAsync(Document document, BlockStructureOptions options, int position)
SymbolKey\SymbolKeyTests.cs (3)
254async Task<(Compilation bodyCompilation, Compilation referenceCompilation)> GetCompilationsAsync(Project bodyProject, Project referenceProject) 272async Task<(ISymbol bodyLocalSymbol, ISymbol referenceAssemblySymbol)> GetSymbolsAsync(Compilation bodyCompilation, Compilation referenceCompilation) 290async Task<ILocalSymbol> GetBodyLocalSymbol(Compilation bodyCompilation)
TaskList\NoCompilationTaskListTests.cs (1)
62public Task<ImmutableArray<TaskListItem>> GetTaskListItemsAsync(Document document, ImmutableArray<TaskListItemDescriptor> descriptors, CancellationToken cancellationToken)
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
247private static async Task<TypeDeclarationSyntax> GetRootTypeDeclarationAsync(Solution currentSnapshot)
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
Recommendations\RecommenderTests.cs (1)
31internal Func<int, CSharpSyntaxContext, Task<ImmutableArray<RecommendedKeyword>>>? RecommendKeywordsAsync;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\CompilationEventTests.cs (1)
32var te = queue.DequeueAsync(CancellationToken.None);
Diagnostics\DiagnosticAnalyzerTests.cs (1)
4253async Task<ImmutableArray<Diagnostic>> getDiagnosticsAsync(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Features (269)
AddImport\CSharpAddImportFeatureService.cs (3)
341protected override async Task<Document> AddImportAsync( 353private static async Task<CompilationUnitSyntax> AddImportWorkerAsync( 389protected override async Task<Document> AddImportAsync(
BraceMatching\BlockCommentBraceMatcher.cs (1)
21public async Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken)
BraceMatching\StringLiteralBraceMatcher.cs (1)
26public async Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken)
ChangeSignature\CSharpChangeSignatureService.cs (2)
117public override async Task<(ISymbol? symbol, int selectedIndex)> GetInvocationSymbolAsync( 870public override async Task<ImmutableArray<ISymbol>> DetermineCascadedSymbolsFromDelegateInvokeAsync(
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.cs (1)
50protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
CodeLens\CSharpCodeLensMemberFinder.cs (1)
27public async Task<ImmutableArray<CodeLensMember>> GetCodeLensMembersAsync(Document document, CancellationToken cancellationToken)
CodeRefactorings\ConvertLocalFunctionToMethod\CSharpConvertLocalFunctionToMethodCodeRefactoringProvider.cs (1)
66private static async Task<Document> UpdateDocumentAsync(
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (6)
68private static async Task<Solution> EnableNullableReferenceTypesAsync( 96private static async Task<SyntaxNode> EnableNullableReferenceTypesAsync(Document document, CancellationToken cancellationToken) 161private static async Task<SyntaxNode> DisableNullableReferenceTypesInExistingDocumentIfNecessaryAsync(Document document, SyntaxNode root, SyntaxToken firstToken, CancellationToken cancellationToken) 266Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 272private readonly Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution; 274protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (5)
34public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 39async Task<Solution> EnableNullableReferenceTypesInSolutionAsync( 56private sealed class FixAllCodeAction(Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 62private readonly Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution; 64protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
CodeRefactorings\ExtractClass\CSharpExtractClassCodeRefactoringProvider.cs (2)
39protected override async Task<SyntaxNode?> GetSelectedClassDeclarationAsync(CodeRefactoringContext context) 45protected override Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (5)
136private static async Task<Document> InlineTemporaryAsync(Document document, VariableDeclaratorSyntax declarator, CancellationToken cancellationToken) 316private static async Task<VariableDeclaratorSyntax> FindDeclaratorAsync(Document document, CancellationToken cancellationToken) 319private static async Task<T> FindNodeWithAnnotationAsync<T>(Document document, SyntaxAnnotation annotation, CancellationToken cancellationToken) 329private static async Task<ImmutableArray<IdentifierNameSyntax>> FindReferenceAnnotatedNodesAsync(Document document, CancellationToken cancellationToken) 430private static async Task<ExpressionSyntax> CreateExpressionToInlineAsync(
CodeRefactorings\MoveStaticMembers\CSharpMoveStaticMembersRefactoringProvider.cs (1)
20protected override Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context)
CodeRefactorings\MoveType\CSharpMoveTypeService.cs (1)
29protected override async Task<BaseTypeDeclarationSyntax?> GetRelevantNodeAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken)
CodeRefactorings\NodeSelectionHelpers.cs (1)
18internal static async Task<ImmutableArray<SyntaxNode>> GetSelectedDeclarationsOrVariablesAsync(CodeRefactoringContext context)
CodeRefactorings\PullMemberUp\CSharpPullMemberUpCodeRefactoringProvider.cs (1)
28protected override Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context)
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (2)
45protected override async Task<ImmutableArray<(DocumentId, SyntaxNode)>> GetValidContainersFromAllLinkedDocumentsAsync( 344protected override async Task<SyntaxNode?> TryGetApplicableContainerFromSpanAsync(Document document, TextSpan span, CancellationToken cancellationToken)
CodeRefactorings\SyncNamespace\CSharpSyncNamespaceCodeRefactoringProvider.cs (1)
25protected override async Task<SyntaxNode?> TryGetApplicableInvocationNodeAsync(Document document, TextSpan span, CancellationToken cancellationToken)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (2)
71private static async Task<SyntaxNode> GetDeclarationAsync(CodeRefactoringContext context) 118private async Task<Document> UpdateDocumentAsync(Document document, TypeSyntax type, CancellationToken cancellationToken)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (2)
198internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 246protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\CrefCompletionProvider.cs (2)
89protected override async Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync( 375protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
31protected override async Task<CompletionItem?> GetSuggestionModeItemAsync(
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (2)
44public static async Task<NameDeclarationInfo> GetDeclarationInfoAsync(Document document, int position, CancellationToken cancellationToken) 66private static async Task<NameDeclarationInfo> GetDeclarationInfoWorkerAsync(Document document, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
38public async Task<ImmutableArray<(string name, Glyph glyph)>> ProvideRecommendedNamesAsync(
Completion\CompletionProviders\DeclarationName\IDeclarationNameRecommender.cs (1)
15Task<ImmutableArray<(string name, Glyph glyph)>> ProvideRecommendedNamesAsync(
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
316internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.cs (2)
36protected override async Task<ISymbol> GenerateMemberAsync( 127internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\ExplicitInterfaceMemberCompletionProvider.ItemGetter.cs (2)
47public static async Task<ItemGetter> CreateAsync( 60public override async Task<ImmutableArray<CompletionItem>> GetItemsAsync()
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
63protected override Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync(
Completion\CompletionProviders\FunctionPointerUnmanagedCallingConventionCompletionProvider.cs (1)
122internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\ImportCompletion\ExtensionMethodImportCompletionProvider.cs (1)
46protected override Task<bool> ShouldProvideParenthesisCompletionAsync(
Completion\CompletionProviders\ImportCompletion\TypeImportCompletionProvider.cs (1)
51protected override async Task<bool> ShouldProvideParenthesisCompletionAsync(
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (2)
132internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 280protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
35protected override async Task<bool> IsExclusiveAsync(Document document, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\ObjectCreationCompletionProvider.cs (1)
64protected override async Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync(
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (4)
141public override Task<CompletionChange> GetChangeAsync( 157internal override async Task<CompletionDescription?> GetDescriptionAsync( 174private static Task<CompletionChange> ReplaceTextAfterOperatorAsync(Document document, CompletionItem item, string text, CancellationToken cancellationToken) 177private static async Task<CompletionChange> ReplaceTextAfterOperatorAsync(
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (3)
76private static async Task<CompletionChange> GetConversionChangeAsync( 132private static async Task<CompletionDescription?> GetConversionDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 142private static async Task<ISymbol?> TryRehydrateAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Indexers.cs (2)
39private static Task<CompletionChange> GetIndexerChangeAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 42private static Task<CompletionDescription> GetIndexerDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (2)
123private async Task<CompletionChange> GetOperatorChangeAsync( 160private static Task<CompletionDescription> GetOperatorDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\PartialTypeCompletionProvider.cs (1)
81public override async Task<TextChange?> GetTextChangeAsync(
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
159internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
102private static async Task<ImmutableArray<CompletionItem>> GetSnippetsForDocumentAsync(
Completion\CompletionProviders\SpeculativeTCompletionProvider.cs (1)
64private static async Task<bool> ShouldShowSpeculativeTCompletionItemAsync(Document document, CompletionContext completionContext, CancellationToken cancellationToken)
Completion\CompletionProviders\SymbolCompletionProvider.cs (5)
79protected override async Task<bool> ShouldPreselectInferredTypesAsync( 94protected override async Task<bool> ShouldProvideAvailableSymbolsInCurrentContextAsync( 116private static async Task<bool> IsTriggeredInArgumentListAsync( 145internal override async Task<bool> IsSyntacticTriggerCharacterAsync(Document document, int caretPosition, CompletionTrigger trigger, CompletionOptions options, CancellationToken cancellationToken) 175private static async Task<bool?> IsTriggerInArgumentListAsync(Document document, int characterPosition, CancellationToken cancellationToken)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
116protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (1)
69protected override async Task<IEnumerable<CompletionItem>?> GetItemsWorkerAsync(
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (2)
36protected override async Task<string> GetFieldNameAsync(Document document, IPropertySymbol property, CancellationToken cancellationToken) 159protected override async Task<Document> ExpandToFieldPropertyAsync(
ConvertBetweenRegularAndVerbatimString\AbstractConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (3)
81private static async Task<Document> ConvertAsync( 94private Task<Document> ConvertToVerbatimStringAsync(Document document, TStringExpressionSyntax stringExpression, CancellationToken cancellationToken) 97private Task<Document> ConvertToRegularStringAsync(Document document, TStringExpressionSyntax stringExpression, CancellationToken cancellationToken)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
54protected override Task<QueryExpressionSyntax> FindNodeToRefactorAsync(CodeRefactoringContext context)
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider.cs (3)
70private static async Task<Solution> ConvertAsync( 139async Task<MultiDictionary<IParameterSymbol, IdentifierNameSyntax>> GetParameterReferencesAsync() 216async Task<ImmutableHashSet<(ISymbol fieldOrProperty, EqualsValueClauseSyntax initializer)>> GetExistingAssignedFieldsOrPropertiesAsync()
ConvertProgram\ConvertProgramTransform_ProgramMain.cs (2)
26public static async Task<Document> ConvertToProgramMainAsync(Document document, AccessibilityModifiersRequired accessibilityModifiersRequired, CancellationToken cancellationToken) 69private static async Task<ClassDeclarationSyntax> GenerateProgramClassAsync(
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (3)
30public static async Task<Document> ConvertToTopLevelStatementsAsync( 61private static async Task<Document> ConvertFileScopedNamespaceAsync(Document document, CodeCleanupOptions cleanupOptions, CancellationToken cancellationToken) 69private static async Task<Document> AddUsingDirectivesAsync(
ConvertToExtension\ConvertToExtensionCodeRefactoringProvider.cs (1)
191private static async Task<Document> ConvertToExtensionAsync(
ConvertToExtension\ConvertToExtensionFixAllProvider.cs (1)
28protected override async Task<Document?> FixAllAsync(
ConvertToRawString\ConvertStringToRawStringCodeRefactoringProvider.cs (1)
122private static async Task<Document> UpdateDocumentAsync(
Copilot\CSharpCopilotCodeFixProvider.cs (1)
121async Task<Document> GetFixedDocumentAsync(SyntaxNode method, string fix, CancellationToken cancellationToken)
Copilot\CSharpCopilotCodeFixProvider.DismissChangesCodeAction.cs (2)
25protected override Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 28protected override Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(CancellationToken cancellationToken)
Copilot\CSharpCopilotCodeFixProvider.DocumentChangeCodeAction.cs (1)
23Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument,
Debugging\CSharpBreakpointResolutionService.cs (2)
31public async Task<BreakpointResolutionResult?> ResolveBreakpointAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) 54public Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken)
Debugging\CSharpLanguageDebugInfoService.cs (2)
19public Task<DebugLocationInfo> GetLocationInfoAsync(Document document, int position, CancellationToken cancellationToken) 22public Task<DebugDataTipInfo> GetDataTipInfoAsync(Document document, int position, bool includeKind, CancellationToken cancellationToken)
Debugging\CSharpProximityExpressionsService.cs (2)
49public async Task<bool> IsValidAsync( 87public async Task<IList<string>> GetProximityExpressionsAsync(
Debugging\DataTipInfoGetter.cs (1)
22public static async Task<DebugDataTipInfo> GetInfoAsync(
Debugging\LocationInfoGetter.cs (1)
18internal static async Task<DebugLocationInfo> GetInfoAsync(Document document, int position, CancellationToken cancellationToken)
DecompiledSource\CSharpDecompiledSourceService.cs (4)
31public async Task<Document?> AddSourceToAsync(Document document, Compilation symbolCompilation, ISymbol symbol, MetadataReference? metadataReference, string? assemblyLocation, SyntaxFormattingOptions? formattingOptions, CancellationToken cancellationToken) 55public static async Task<Document> FormatDocumentAsync(Document document, SyntaxFormattingOptions? formattingOptions, CancellationToken cancellationToken) 70private static async Task<Document> AddAssemblyInfoRegionAsync(Document document, ISymbol symbol, IDecompilationService decompilationService, CancellationToken cancellationToken) 98private static async Task<Document> ConvertDocCommentsToRegularCommentsAsync(Document document, IDocumentationCommentFormattingService docCommentFormattingService, CancellationToken cancellationToken)
DocumentHighlighting\CSharpDocumentHighlightsService.cs (1)
34protected override async Task<ImmutableArray<Location>> GetAdditionalReferencesAsync(
EncapsulateField\CSharpEncapsulateFieldService.cs (2)
36protected override async Task<SyntaxNode> RewriteFieldNameAndAccessibilityAsync(string originalFieldName, bool makePrivate, Document document, SyntaxAnnotation declarationAnnotation, CancellationToken cancellationToken) 123protected override async Task<ImmutableArray<IFieldSymbol>> GetFieldsAsync(Document document, TextSpan span, CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\IPythiaDeclarationNameRecommenderImplmentation.cs (1)
17public Task<ImmutableArray<string>> ProvideRecommendationsAsync(PythiaDeclarationNameContext context, CancellationToken cancellationToken);
ExternalAccess\Pythia\Api\IPythiaSignatureHelpProviderImplementation.cs (1)
14Task<(ImmutableArray<PythiaSignatureHelpItemWrapper> items, int? selectedItemIndex)> GetMethodGroupItemsAndSelectionAsync(ImmutableArray<IMethodSymbol> accessibleMethods, Document document, InvocationExpressionSyntax invocationExpression, SemanticModel semanticModel, SymbolInfo currentSymbol, CancellationToken cancellationToken);
ExternalAccess\Pythia\PythiaDeclarationNameRecommender.cs (1)
26public async Task<ImmutableArray<(string name, Glyph glyph)>> ProvideRecommendedNamesAsync(
ExternalAccess\Pythia\PythiaSignatureHelpProvider.cs (1)
30internal override async Task<(ImmutableArray<SignatureHelpItem> items, int? selectedItemIndex)> GetMethodGroupItemsAndSelectionAsync(
ExtractInterface\CSharpExtractInterfaceService.cs (2)
32protected override async Task<SyntaxNode> GetTypeDeclarationAsync(Document document, int position, TypeDiscoveryRule typeDiscoveryRule, CancellationToken cancellationToken) 66protected override Task<Solution> UpdateMembersWithExplicitImplementationsAsync(
ExtractMethod\CSharpMethodExtractor.cs (2)
162protected override async Task<TriviaResult> PreserveTriviaAsync(SyntaxNode root, CancellationToken cancellationToken) 178protected override async Task<(Document document, SyntaxToken invocationNameToken)> InsertNewLineBeforeLocalFunctionIfNecessaryAsync(
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (5)
112protected override async Task<SyntaxNode> GenerateBodyForCallSiteContainerAsync( 135private async Task<ImmutableArray<SyntaxNode>> CreateStatementsOrInitializerToInsertAtCallSiteAsync( 1001protected override async Task<SemanticDocument> PerformFinalTriviaFixupAsync( 1051protected override async Task<SemanticDocument> UpdateMethodAfterGenerationAsync( 1116static async Task<Document> GenerateNewDocumentAsync(
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
135protected override async Task<SyntaxNode> GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(CancellationToken cancellationToken)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.MultipleStatementsCodeGenerator.cs (1)
86protected override Task<SyntaxNode> GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(CancellationToken cancellationToken)
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.SingleStatementCodeGenerator.cs (1)
47protected override Task<SyntaxNode> GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(CancellationToken cancellationToken)
ExtractMethod\CSharpSelectionResult.cs (1)
30public static async Task<CSharpSelectionResult> CreateAsync(
ExtractMethod\CSharpSelectionValidator.cs (1)
87protected override async Task<SelectionResult> CreateSelectionResultAsync(
Formatting\CSharpAccessibilityModifiersNewDocumentFormattingProvider.cs (1)
30public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpNamespaceDeclarationNewDocumentFormattingProvider.cs (1)
31public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpOrganizeUsingsNewDocumentFormattingProvider.cs (1)
27public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\CSharpUseProgramMainNewDocumentFormattingProvider.cs (1)
25public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
FullyQualify\CSharpFullyQualifyService.cs (1)
43protected override async Task<SyntaxNode> ReplaceNodeAsync(SimpleNameSyntax simpleName, string containerName, bool resultingSymbolIsType, CancellationToken cancellationToken)
GenerateType\CSharpGenerateTypeService.cs (2)
542public override async Task<(INamespaceSymbol, INamespaceOrTypeSymbol, Location)> GetOrGenerateEnclosingNamespaceSymbolAsync( 713internal override async Task<Solution> TryAddUsingsOrImportToDocumentAsync(
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
25protected override Task<ISymbol> FindRelatedExplicitlyDeclaredSymbolAsync(Project project, ISymbol symbol, CancellationToken cancellationToken)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (2)
127private static async Task<(SyntaxNode?, ExplicitInterfaceSpecifierSyntax?, SyntaxToken)> GetContainerAsync(CodeRefactoringContext context) 209private async Task<Solution> ChangeImplementationAsync(
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
132static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Solution>> createSolution)
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider_Update.cs (2)
23private static async Task<Solution> AddMultipleMembersAsync( 72static async Task<Solution> AddSingleMemberAsync(
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
88protected override async Task<ExpressionStatementSyntax> CreateTupleDeconstructionAsync(
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (1)
24protected override Task<Document> IntroduceFieldAsync(
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (6)
95protected override Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 169private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 197private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 209private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 221private async Task<T?> GetFirstDeclarationAsync<T>(ISymbol symbol) where T : SyntaxNode 235private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync(
LineSeparators\CSharpLineSeparatorService.cs (1)
33public async Task<ImmutableArray<TextSpan>> GetLineSeparatorsAsync(
MetadataAsSource\CSharpMetadataAsSourceService.cs (3)
37protected override async Task<Document> AddAssemblyInfoRegionAsync(Document document, Compilation symbolCompilation, ISymbol symbol, CancellationToken cancellationToken) 61protected override async Task<Document> ConvertDocCommentsToRegularCommentsAsync(Document document, IDocumentationCommentFormattingService docCommentFormattingService, CancellationToken cancellationToken) 101protected override async Task<Document> AddNullableRegionsAsync(Document document, CancellationToken cancellationToken)
NavigationBar\CSharpNavigationBarItemService.cs (1)
49protected override async Task<ImmutableArray<RoslynNavigationBarItem>> GetItemsInCurrentProcessAsync(
Organizing\CSharpOrganizingService.cs (1)
25protected override async Task<Document> ProcessAsync(Document document, IEnumerable<ISyntaxOrganizer> organizers, CancellationToken cancellationToken)
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (3)
32protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 41protected override Task<QuickInfoItem?> BuildQuickInfoAsync( 89private async Task<QuickInfoItem?> GetQuickInfoForSuppressMessageAttributeAsync(
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
139protected override async Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoAsync(QuickInfoContext context, CancellationToken cancellationToken)
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (2)
29protected override Task<QuickInfoItem?> BuildQuickInfoAsync( 34protected override Task<QuickInfoItem?> BuildQuickInfoAsync(
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
34public override async Task<ImmutableArray<SyntaxNode>> GetReplacementMembersAsync(
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
262private static async Task<Document> ReverseForStatementAsync(
SignatureHelp\AttributeSignatureHelpProvider.cs (1)
72protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (3)
37private async Task<ConstructorInitializerSyntax?> TryGetConstructorInitializerAsync( 68protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken) 117private async Task<SignatureHelpState?> GetCurrentArgumentStateAsync(
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (1)
50protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
SignatureHelp\GenericNameSignatureHelpProvider.cs (1)
76protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
SignatureHelp\InitializerExpressionSignatureHelpProvider.cs (1)
55protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (4)
37private async Task<InvocationExpressionSyntax?> TryGetInvocationExpressionAsync(Document document, int position, SignatureHelpTriggerReason triggerReason, CancellationToken cancellationToken) 63protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync( 118protected async Task<SignatureHelpItems?> GetItemsWorkerForDelegateOrFunctionPointerAsync( 164private async Task<SignatureHelpState?> GetCurrentArgumentStateAsync(
SignatureHelp\InvocationExpressionSignatureHelpProviderBase_MethodGroup.cs (1)
20internal virtual Task<(ImmutableArray<SignatureHelpItem> items, int? selectedItemIndex)> GetMethodGroupItemsAndSelectionAsync(
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (4)
30private async Task<BaseObjectCreationExpressionSyntax?> TryGetObjectCreationExpressionAsync( 61protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken) 110private async Task<SignatureHelpItems?> GetItemsWorkerForDelegateAsync(Document document, int position, BaseObjectCreationExpressionSyntax objectCreationExpression, 134private async Task<SignatureHelpState?> GetCurrentArgumentStateAsync(
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (1)
69protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (1)
106protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
42protected override async Task<PropertyDeclarationSyntax> GenerateSnippetSyntaxAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
121protected override Task<Document> AddIndentationToDocumentAsync(Document document, ForStatementSyntax forStatement, CancellationToken cancellationToken)
Snippets\AbstractCSharpTypeSnippetProvider.cs (2)
45protected override async Task<TextChange?> GetAccessibilityModifiersChangeAsync(Document document, int position, CancellationToken cancellationToken) 96protected override async Task<Document> AddIndentationToDocumentAsync(Document document, TTypeDeclarationSyntax typeDeclaration, CancellationToken cancellationToken)
Snippets\CSharpClassSnippetProvider.cs (1)
45protected override async Task<ClassDeclarationSyntax> GenerateTypeDeclarationAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\CSharpConstructorSnippetProvider.cs (2)
59protected override async Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken) 84protected override Task<Document> AddIndentationToDocumentAsync(Document document, ConstructorDeclarationSyntax constructorDeclaration, CancellationToken cancellationToken)
Snippets\CSharpDoWhileLoopSnippetProvider.cs (1)
49protected override Task<Document> AddIndentationToDocumentAsync(Document document, DoStatementSyntax doStatement, CancellationToken cancellationToken)
Snippets\CSharpElseSnippetProvider.cs (2)
57protected override Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken) 69protected override Task<Document> AddIndentationToDocumentAsync(Document document, ElseClauseSyntax elseClause, CancellationToken cancellationToken)
Snippets\CSharpEnumSnippetProvider.cs (1)
42protected override async Task<EnumDeclarationSyntax> GenerateTypeDeclarationAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\CSharpForEachLoopSnippetProvider.cs (1)
129protected override Task<Document> AddIndentationToDocumentAsync(Document document, ForEachStatementSyntax forEachStatement, CancellationToken cancellationToken)
Snippets\CSharpIfSnippetProvider.cs (1)
39protected override Task<Document> AddIndentationToDocumentAsync(Document document, IfStatementSyntax ifStatement, CancellationToken cancellationToken)
Snippets\CSharpInterfaceSnippetProvider.cs (1)
41protected override async Task<InterfaceDeclarationSyntax> GenerateTypeDeclarationAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\CSharpIntMainSnippetProvider.cs (1)
50protected override async Task<Document> AddIndentationToDocumentAsync(Document document, MethodDeclarationSyntax methodDeclaration, CancellationToken cancellationToken)
Snippets\CSharpLockSnippetProvider.cs (1)
40protected override Task<Document> AddIndentationToDocumentAsync(Document document, LockStatementSyntax lockStatement, CancellationToken cancellationToken)
Snippets\CSharpSnippetFunctionService.cs (3)
21public override async Task<string?> GetContainingClassNameAsync(Document document, int position, CancellationToken cancellationToken) 30protected override async Task<ITypeSymbol?> GetEnumSymbolAsync(Document document, TextSpan switchExpressionSpan, CancellationToken cancellationToken) 47protected override async Task<(Document, TextSpan)> GetDocumentWithEnumCaseAsync(
Snippets\CSharpSnippetHelpers.cs (1)
45public static async Task<Document> AddBlockIndentationToDocumentAsync<TTargetNode>(
Snippets\CSharpStructSnippetProvider.cs (1)
43protected override async Task<StructDeclarationSyntax> GenerateTypeDeclarationAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\CSharpUsingSnippetProvider.cs (1)
40protected override Task<Document> AddIndentationToDocumentAsync(Document document, UsingStatementSyntax usingStatement, CancellationToken cancellationToken)
Snippets\CSharpVoidMainSnippetProvider.cs (1)
42protected override Task<Document> AddIndentationToDocumentAsync(Document document, MethodDeclarationSyntax methodDeclaration, CancellationToken cancellationToken)
Snippets\CSharpWhileLoopSnippetProvider.cs (1)
39protected override Task<Document> AddIndentationToDocumentAsync(Document document, WhileStatementSyntax whileStatement, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
94private static async Task<MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>> GetUnassignedParametersAsync(
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
51private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken) 80private static async Task<Document> InsertCloseParenthesisAsync(
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (3)
26public static Task<Document> ConvertAsync(Document document, BaseNamespaceDeclarationSyntax baseNamespace, CSharpSyntaxFormattingOptions options, CancellationToken cancellationToken) 37public static async Task<Document> ConvertNamespaceDeclarationAsync(Document document, NamespaceDeclarationSyntax namespaceDeclaration, SyntaxFormattingOptions options, CancellationToken cancellationToken) 238public static async Task<Document> ConvertFileScopedNamespaceAsync(
src\Analyzers\CSharp\CodeFixes\ConvertToAsync\CSharpConvertToAsyncMethodCodeFixProvider.cs (3)
32protected override async Task<string> GetDescriptionAsync( 45protected override async Task<(SyntaxTree syntaxTree, SyntaxNode root)?> GetRootInOtherSyntaxTreeAsync( 60private static async Task<MethodDeclarationSyntax?> GetMethodDeclarationAsync(
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
33public static async Task<CodeAction?> GetCodeActionAsync( 79private static async Task<Solution> ConvertToPositionalRecordAsync(
src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
61private static async Task<(TypeSyntax declarationToFix, TypeSyntax fixedDeclaration)> TryGetOldAndNewReturnTypeAsync(
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
40protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
31protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
57protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
80protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
47protected override async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
30protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
45protected override async Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpChangeToIEnumerableCodeFixProvider.cs (1)
37protected override async Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
26public static async Task<Document> MakeLocalFunctionStaticAsync(
src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
63private static async Task<Document> FixCodeAsync(
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (4)
85internal static async Task<Document> TransformDocumentIfRequiredAsync( 135private static async Task<Document> GetTransformedDocumentAsync( 170private static async Task<CompilationUnitSyntax> ExpandUsingDirectivesAsync( 187private static async Task<SyntaxNode> ExpandUsingDirectiveAsync(Document document, UsingDirectiveSyntax usingDirective, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
44private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
44private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (2)
44private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 47public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
43private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
46public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
110private static async Task<TypeSyntax?> TryGetDeclarationTypeToFixAsync(
src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
57private static async Task<Document> FixAllAsync(
src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
54private static async Task<Document> FixAsync(
src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
56private static async Task<Document> FixAsync(
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
64private static async Task<Document> ReplaceAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
33public static async Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync<TParentExpression, TMatchNode>(
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
105static async Task<Document> CreateTrackedDocumentAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
139static async Task<SeparatedSyntaxList<ArgumentSyntax>> GetArgumentsAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
36protected override async Task<(SyntaxNode, SyntaxNode)> GetReplacementNodesAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionExpression.cs (1)
20private static Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync(
src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
61private static async Task<Document> FixAsync(
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
95private static async Task<Solution> UsePrimaryConstructorAsync(
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorFixAllProvider.cs (2)
31public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 37private static async Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalContext, ImmutableArray<FixAllContext> contexts)
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
61private static async Task<Solution> UseSystemThreadingLockAsync(
src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockFixAllProvider.cs (2)
23public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 29private static async Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalContext, ImmutableArray<FixAllContext> contexts)
StringIndentation\CSharpStringIndentationService.cs (1)
27public async Task<ImmutableArray<StringIndentationRegion>> GetStringIndentationRegionsAsync(
UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
79protected override Task<SyntaxNode> UpdatePropertyAsync(
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
159private static async Task<Document> UpdateDocumentAsync(
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (5)
81var computationTask = analyzerActive 89private static async Task<ImmutableArray<CodeAction>> ComputeOpposingRefactoringsWhenAnalyzerActiveAsync( 145private static async Task<ImmutableArray<CodeAction>> ComputeAllRefactoringsWhenAnalyzerInactiveAsync( 161private static async Task<ImmutableArray<CodeAction>> ComputeRefactoringsAsync( 193private static async Task<Document> UpdateDocumentAsync(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (20)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (16)
579protected override Task<Workspace> CreateWorkspaceImplAsync() 619public Task<bool> IsRefineOptionEnabledAsync() 622public Task<bool> IsCodeAnalysisOptionEnabledAsync() 625public Task<bool> IsOnTheFlyDocsOptionEnabledAsync() 628public Task<bool> IsGenerateDocumentationCommentOptionEnabledAsync() 631public Task<bool> IsImplementNotImplementedExceptionEnabledAsync() 651public Task<ImmutableArray<string>> GetAvailablePromptTitlesAsync(Document document, CancellationToken cancellationToken) 654public Task<ImmutableArray<Diagnostic>> GetCachedDocumentDiagnosticsAsync(Document document, TextSpan? span, ImmutableArray<string> promptTitles, CancellationToken cancellationToken) 657public Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsAsync(string symbolSignature, ImmutableArray<string> declarationCode, string language, CancellationToken cancellationToken) 660public Task<bool> IsAvailableAsync(CancellationToken cancellationToken) 663public Task<bool> IsFileExcludedAsync(string filePath, CancellationToken cancellationToken) 669Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> ICopilotCodeAnalysisService.GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken) 672public Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsAsync( 703public Task<bool> IsImplementNotImplementedExceptionsAvailableAsync(CancellationToken cancellationToken) 708public Task<string> GetOnTheFlyDocsPromptAsync(OnTheFlyDocsInfo onTheFlyDocsInfo, CancellationToken cancellationToken) 713public Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseAsync(string prompt, CancellationToken cancellationToken)
Diagnostics\Suppression\SuppressionTests.cs (2)
755protected override async Task<(ImmutableArray<CodeAction>, CodeAction actionToInvoke)> GetCodeActionsAsync(TestWorkspace workspace, TestParameters parameters) 997protected override async Task<(ImmutableArray<CodeAction>, CodeAction actionToInvoke)> GetCodeActionsAsync(TestWorkspace workspace, TestParameters parameters)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
114private static async Task<DocumentAnalysisResults> AnalyzeDocumentAsync(
ExtractClass\ExtractClassTests.cs (1)
49protected override Task<Workspace> CreateWorkspaceImplAsync()
Microsoft.CodeAnalysis.CSharp.Scripting (4)
CSharpScript.cs (4)
98public static Task<ScriptState<T>> RunAsync<T>(string code, ScriptOptions options = null, object globals = null, Type globalsType = null, CancellationToken cancellationToken = default(CancellationToken)) 112public static Task<ScriptState<object>> RunAsync(string code, ScriptOptions options = null, object globals = null, Type globalsType = null, CancellationToken cancellationToken = default(CancellationToken)) 128public static Task<T> EvaluateAsync<T>(string code, ScriptOptions options = null, object globals = null, Type globalsType = null, CancellationToken cancellationToken = default(CancellationToken)) 143public static Task<object> EvaluateAsync(string code, ScriptOptions options = null, object globals = null, Type globalsType = null, CancellationToken cancellationToken = default(CancellationToken))
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (7)
InteractiveSessionReferencesTests.cs (7)
51var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 52var s2 = s1.ContinueWith("Process.GetCurrentProcess()"); 64var s1 = s0.ContinueWithAsync(@"Process.GetCurrentProcess()", newOptions); 74var s1 = s0.ContinueWithAsync($@" 90var s = 454var s0 = CSharpScript.RunAsync("var x = new { a = 3 }; x", ScriptOptions); 455var s1 = s0.ContinueWith<Type>("System.Type.GetType(x.GetType().AssemblyQualifiedName, true)");
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (36)
InteractiveSessionTests.cs (31)
423var s0 = CSharpScript.RunAsync("", ScriptOptions.AddReferences(HostAssembly)); 425var state = s0. 465var state = CSharpScript.RunAsync("Environment.ProcessorCount", options); 476var state1 = CSharpScript.RunAsync("internal class C1 { } protected int X; 1", ScriptOptions); 485var state2 = state1.ContinueWith("internal class C2 : C1 { } 2"); 496var state3 = state2.ContinueWith("private class C3 : C2 { } 3"); 518var state = CSharpScript.RunAsync("", ScriptOptions); 682var state0 = CSharpScript.RunAsync("", ScriptOptions); 761var state = CSharpScript.RunAsync(@" 794var state = CSharpScript.RunAsync(@" 858var s = CSharpScript.RunAsync(@" 916var s = CSharpScript.RunAsync(@" 1058Assert.Equal(1, ((Task<int>)result).Result); 1082var task = CSharpScript.EvaluateAsync<object>("await System.Threading.Tasks.Task.Run(() => { })", ScriptOptions); 1381var s1 = CSharpScript.RunAsync("new int[] { 1, 2, 3 }.First()", options); 1384var s2 = s1.ContinueWith("new List<int>()", options.AddImports("System.Collections.Generic")); 1531var s0 = CSharpScript.RunAsync<int>("x + Y + Z()", options: ScriptOptions, globals: c); 1534var s1 = s0.ContinueWith<int>("x"); 1537var s2 = s1.ContinueWith<int>("int x = 20;"); 1539var s3 = s2.ContinueWith<int>("x"); 1547var result = CSharpScript.EvaluateAsync<string>("G()", options: ScriptOptions, globals: m); 1592var result = CSharpScript.EvaluateAsync<int>("Z()", options: ScriptOptions, globals: c, globalsType: typeof(I)); 1599var s0 = CSharpScript.RunAsync("static int goo = StaticField;", options: ScriptOptions, globals: new C()); 1600var s1 = s0.ContinueWith("static int bar { get { return goo; } }"); 1601var s2 = s1.ContinueWith("class C { public static int baz() { return bar; } }"); 1602var s3 = s2.ContinueWith("C.baz()"); 1618var s0 = CSharpScript.RunAsync("int goo(double a) { return 2; }", options: ScriptOptions, globals: new D()); 1619var s1 = s0.ContinueWith("goo(1)"); 1622var s2 = s1.ContinueWith("goo(1.0)"); 1630var r0 = CSharpScript.EvaluateAsync<int>("X + Y + Z", options: ScriptOptions, globals: obj); 1634var r1 = CSharpScript.EvaluateAsync<int>("X", options: ScriptOptions, globals: obj);
ScriptTests.cs (5)
223var state = CSharpScript.RunAsync(@"if (true) 241var state = CSharpScript.RunAsync(@"if (true) 249var state = CSharpScript.RunAsync(@"System.Console.WriteLine(true) ", options: ScriptOptions, globals: new ScriptTests()); 256var state = CSharpScript.RunAsync(@" 270var state = CSharpScript.RunAsync(@"if (e) a = b
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
3225script = CreateSubmission("return await System.Threading.Tasks.Task.FromResult(42);", returnType: typeof(Task<int>));
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
LanguageServices\FixAllSpanMappingService\CSharpFixAllSpanMappingService.cs (1)
28protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
OrganizeImports\CSharpOrganizeImportsService.cs (1)
20public async Task<Document> OrganizeImportsAsync(Document document, OrganizeImportsOptions options, CancellationToken cancellationToken)
Rename\CSharpRenameRewriterLanguageService.cs (2)
779public override async Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync( 948public override async Task<ImmutableArray<Location>> ComputeImplicitReferenceConflictsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
422public async Task<ISymbol?> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
113public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
52protected override async Task<bool> TypesAreCompatibleAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
37public override async Task<Document> RemoveUnnecessaryImportsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
36public async Task<SyntaxNode> ReplaceAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
116public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree tree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1726if (name.Equals(nameof(Task<int>.ConfigureAwait)) && 1732else if (name.Equals(nameof(Task<int>.ContinueWith)))
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\CSharpInitializeParameterService.cs (1)
109protected override Task<Solution> TryAddAssignmentForPrimaryConstructorAsync(Document document, IParameterSymbol parameter, ISymbol fieldOrProperty, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
33public static async Task<Solution> AddAssignmentForPrimaryConstructorAsync(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (6)
CodeGeneration\AddImportsTests.cs (1)
28private static async Task<Document> GetDocument(string code, bool withAnnotations)
CodeGeneration\SymbolEditorTests.cs (5)
48private static async Task<IEnumerable<ISymbol>> GetSymbolsAsync(Solution solution, string name) 54private static async Task<string> GetActualAsync(Document document) 874var newSymbolC = editor.SetBaseTypeAsync(symbol, g => g.IdentifierName("A")); 1038var newProperty = editor.EditOneDeclarationAsync(property, (e, d) => 1046var newIProperty = editor.EditOneDeclarationAsync(iproperty, (e, d) =>
Microsoft.CodeAnalysis.EditorFeatures (269)
AutomaticCompletion\BraceCompletionSessionProvider.BraceCompletionSession.cs (1)
92private async Task<bool> TryStartAsync(CancellationToken cancellationToken)
BackgroundWorkIndicator\BackgroundWorkIndicatorContext.cs (1)
172public async Task<IAsyncDisposable> SuppressAutoCancelAsync()
BackgroundWorkIndicator\IBackgroundWorkIndicatorContext.cs (1)
17Task<IAsyncDisposable> SuppressAutoCancelAsync();
BraceMatching\BraceHighlightingViewTaggerProvider.cs (1)
92private static async Task<(BraceMatchingResult? leftOfPosition, BraceMatchingResult? rightOfPosition)> GetAllMatchingBracesAsync(
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (1)
57private static async Task<bool> ExecuteCommandAsync(ITextView textView, ITextBuffer subjectBuffer, CommandExecutionContext context)
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (1)
138private async Task<bool> TryClassifyContainingMemberSpanAsync(
CodeActions\CodeActionEditHandlerService.cs (3)
42public async Task<SolutionPreviewResult?> GetPreviewsAsync( 92public async Task<bool> ApplyAsync( 260private async Task<bool> ProcessOperationsAsync(
CodeActions\ICodeActionEditHandlerService.cs (2)
17Task<SolutionPreviewResult?> GetPreviewsAsync( 20Task<bool> ApplyAsync(
CodeDefinitionWindow\DefinitionContextTracker.cs (2)
141internal async Task<ImmutableArray<CodeDefinitionWindowLocation>> GetContextFromPointAsync( 197private static async Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync(Document document, int position, CancellationToken cancellationToken)
CodeDefinitionWindow\ICodeDefinitionWindowService.cs (1)
13Task<bool> IsWindowOpenAsync(CancellationToken cancellationToken);
CodeLens\ICodeLensContext.cs (4)
20Task<ImmutableDictionary<Guid, string>> GetProjectVersionsAsync(ImmutableArray<Guid> projectGuids, CancellationToken cancellationToken); 25Task<ReferenceCount?> GetReferenceCountAsync( 31Task<(string projectVersion, ImmutableArray<ReferenceLocationDescriptor> references)?> FindReferenceLocationsAsync( 37Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(
DocumentationComments\CopilotGenerateDocumentationCommentManager.cs (2)
58private async Task<CopilotGenerateDocumentationCommentProvider?> CreateProviderAsync(Document document, ITextView textView, SyntaxNode? memberNode, CancellationToken cancellationToken) 75private static async Task<ICopilotCodeAnalysisService?> IsGenerateDocumentationAvailableAsync(Document document, SyntaxNode? memberNode, CancellationToken cancellationToken)
DocumentationComments\CopilotGenerateDocumentationCommentProvider.cs (2)
74Func<CancellationToken, Task<ProposalBase?>> generateProposal = async (cancellationToken) => 184private static async Task<IReadOnlyList<ProposedEdit>> GetProposedEditsAsync(
DocumentationComments\DocumentationCommentSuggestion.cs (4)
71Func<CancellationToken, Task<ProposalBase?>> generateProposal, CancellationToken cancellationToken) 96private async Task<bool> StartSuggestionSessionAsync(CancellationToken cancellationToken) 160private async Task<T> RunWithEnqueueActionAsync<T>(string description, Func<Task<T>> action, CancellationToken cancellationToken)
EditorConfigSettings\DataProvider\CombinedProvider.cs (1)
15public async Task<SourceText> GetChangedEditorConfigAsync(SourceText sourceText)
EditorConfigSettings\DataProvider\ISettingsProvider.cs (1)
15Task<SourceText> GetChangedEditorConfigAsync(SourceText sourceText);
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (1)
76public async Task<SourceText> GetChangedEditorConfigAsync(SourceText sourceText)
EditorConfigSettings\ISettingsEditorViewModel.cs (1)
13Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText);
EditorConfigSettings\Updater\ISettingUpdater.cs (2)
14Task<SourceText?> GetChangedEditorConfigAsync(SourceText sourceText, CancellationToken token); 15Task<bool> HasAnyChangesAsync();
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (4)
50public async Task<SourceText?> GetChangedEditorConfigAsync(AnalyzerConfigDocument? analyzerConfigDocument, CancellationToken token) 72public async Task<IReadOnlyList<TextChange>?> GetChangedEditorConfigAsync(CancellationToken token) 88public async Task<SourceText?> GetChangedEditorConfigAsync(SourceText originalText, CancellationToken token) 106public async Task<bool> HasAnyChangesAsync()
EndConstructGeneration\IEndConstructGenerationService.cs (1)
15Task<bool> TryDoAsync(ITextView textView, ITextBuffer subjectBuffer, char typedChar, CancellationToken cancellationToken);
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (4)
27protected abstract Task<bool> TryNavigateToItemAsync(Document document, WrappedNavigationBarItem item, ITextView textView, ITextVersion textVersion, CancellationToken cancellationToken); 29public async Task<ImmutableArray<NavigationBarItem>> GetItemsAsync( 41public Task<bool> TryNavigateToItemAsync(Document document, NavigationBarItem item, ITextView textView, ITextVersion textVersion, CancellationToken cancellationToken) 70internal virtual Task<(DocumentId documentId, int position, int virtualSpace)> GetNavigationLocationAsync(
Extensibility\NavigationBar\INavigationBarItemService.cs (2)
16Task<ImmutableArray<NavigationBarItem>> GetItemsAsync( 27Task<bool> TryNavigateToItemAsync(
ExternalAccess\IntelliCode\Api\IIntelliCodeArgumentDefaultsSource.cs (1)
56Task<ImmutableArray<string>> GetArgumentDefaultsAsync(ITextView view);
ExternalAccess\IntelliCode\Api\IIntentSourceProvider.cs (1)
22Task<ImmutableArray<IntentSource>> ComputeIntentsAsync(IntentRequestContext context, CancellationToken cancellationToken = default);
ExternalAccess\IntelliCode\IntentProcessor.cs (3)
37public async Task<ImmutableArray<IntentSource>> ComputeIntentsAsync(IntentRequestContext intentRequestContext, CancellationToken cancellationToken) 85private static async Task<IntentSource?> ConvertToIntelliCodeResultAsync( 109private static async Task<ImmutableArray<TextChange>?> GetTextChangesForDocumentAsync(
ExternalAccess\UnitTestGenerator\Api\UnitTestGeneratorAddMissingImportsFeatureServiceAccessor.cs (3)
23internal async Task<Document> AddMissingImportsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) 33internal async Task<WrappedMissingImportsAnalysisResult> AnalyzeAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) 42internal async Task<Document> AddMissingImportsAsync(Document document, WrappedMissingImportsAnalysisResult analysisResult, CancellationToken cancellationToken)
ExternalAccess\UnitTestGenerator\Api\UnitTestGeneratorOrganizeImportsAccessor.cs (1)
22public async Task<Document> OrganizeImportsAsync(Document document, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\UnitTestingReferencesService.cs (1)
21internal static async Task<IEnumerable<(string MethodFullyQualifedName, string MethodFilePath, string MethodOutputFilePath)>> GetCallerMethodsAsync(
ExternalAccess\VSTypeScript\Api\AbstractVSTypeScriptRequestHandler.cs (2)
48public Task<TResponseType> HandleRequestAsync(TRequestType request, RequestContext context, CancellationToken cancellationToken) 57protected abstract Task<TResponseType> HandleRequestAsync(TRequestType request, TypeScriptRequestContext context, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptBlockStructureServiceImplementation.cs (1)
12Task<VSTypeScriptBlockStructure> GetBlockStructureAsync(Document document, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptBreakpointResolutionServiceImplementation.cs (2)
14Task<VSTypeScriptBreakpointResolutionResultWrapper> ResolveBreakpointAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken = default); 16Task<IEnumerable<VSTypeScriptBreakpointResolutionResultWrapper>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptEditorInlineRenameService.cs (1)
17public abstract Task<VSTypeScriptInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptFindUsagesContext.cs (5)
46public abstract Task<bool> CanNavigateToAsync(Workspace workspace, CancellationToken cancellationToken); 47public abstract Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken); 68public override async Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken) 111public async Task<bool> CanNavigateToAsync(Workspace workspace, CancellationToken cancellationToken) 114public async Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\IVSTypeScriptFormattingInteractionService.cs (4)
31Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, TextSpan? textSpan, DocumentOptionSet? documentOptions, CancellationToken cancellationToken); 36Task<ImmutableArray<TextChange>> GetFormattingChangesOnPasteAsync(Document document, TextSpan textSpan, DocumentOptionSet? documentOptions, CancellationToken cancellationToken); 43Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, char typedChar, int position, DocumentOptionSet? documentOptions, CancellationToken cancellationToken); 48Task<ImmutableArray<TextChange>> GetFormattingChangesOnReturnAsync(Document document, int position, DocumentOptionSet? documentOptions, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptInlineRenameLocationSet.cs (2)
34public abstract Task<VSTypeScriptInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, CancellationToken cancellationToken); 36async Task<IInlineRenameReplacementInfo> IInlineRenameLocationSet.GetReplacementsAsync(string replacementText, SymbolRenameOptions options, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\IVSTypeScriptLanguageDebugInfoServiceImplementation.cs (2)
12Task<VSTypeScriptDebugLocationInfoWrapper> GetLocationInfoAsync(Document document, int position, CancellationToken cancellationToken); 20Task<VSTypeScriptDebugDataTipInfoWrapper> GetDataTipInfoAsync(Document document, int position, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptNavigationBarItemService.cs (1)
13Task<ImmutableArray<VSTypescriptNavigationBarItem>> GetItemsAsync(Document document, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\VSTypeScriptInlineRenameInfo.cs (2)
26public abstract Task<VSTypeScriptInlineRenameLocationSet> FindRenameLocationsAsync(bool renameInStrings, bool renameInComments, CancellationToken cancellationToken); 40async Task<IInlineRenameLocationSet> IInlineRenameInfo.FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptBlockStructureService.cs (1)
24public override async Task<BlockStructure> GetBlockStructureAsync(Document document, BlockStructureOptions options, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptBreakpointResolutionService.cs (2)
26public async Task<BreakpointResolutionResult?> ResolveBreakpointAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken = default) 29public async Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default)
ExternalAccess\VSTypeScript\VSTypeScriptEditorInlineRenameService.cs (2)
39public Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 44public async Task<IInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptFormattingInteractionService.cs (4)
33public Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, TextSpan? textSpan, CancellationToken cancellationToken) 36public Task<ImmutableArray<TextChange>> GetFormattingChangesOnPasteAsync(Document document, ITextBuffer textBuffer, TextSpan textSpan, CancellationToken cancellationToken) 39public Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, char typedChar, int position, CancellationToken cancellationToken) 42public Task<ImmutableArray<TextChange>> GetFormattingChangesOnReturnAsync(Document document, int position, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptLanguageDebugInfoService.cs (2)
23public async Task<DebugDataTipInfo> GetDataTipInfoAsync(Document document, int position, bool includeKind, CancellationToken cancellationToken) 26public async Task<DebugLocationInfo> GetLocationInfoAsync(Document document, int position, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptNavigationBarItemService.cs (3)
32public Task<ImmutableArray<NavigationBarItem>> GetItemsAsync( 39async Task<ImmutableArray<NavigationBarItem>> INavigationBarItemService.GetItemsAsync( 53public async Task<bool> TryNavigateToItemAsync(
ExtractMethod\ExtractMethodCommandHandler.cs (1)
216private async Task<ExtractMethodResult?> NotifyUserIfNecessaryAsync(
FindUsages\BufferedFindUsagesContext.cs (4)
63public async Task<string?> GetMessageAsync(CancellationToken cancellationToken) 70public async Task<string?> GetInformationalMessageAsync(CancellationToken cancellationToken) 77public async Task<string?> GetSearchTitleAsync(CancellationToken cancellationToken) 84public async Task<ImmutableArray<DefinitionItem>> GetDefinitionsAsync(CancellationToken cancellationToken)
Formatting\IFormattingInteractionService.cs (4)
31Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, TextSpan? textSpan, CancellationToken cancellationToken); 36Task<ImmutableArray<TextChange>> GetFormattingChangesOnPasteAsync(Document document, ITextBuffer textBuffer, TextSpan textSpan, CancellationToken cancellationToken); 43Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, char typedChar, int position, CancellationToken cancellationToken); 48Task<ImmutableArray<TextChange>> GetFormattingChangesOnReturnAsync(Document document, int position, CancellationToken cancellationToken);
GoToDefinition\GoToDefinitionHelpers.cs (2)
16public static async Task<bool> TryNavigateToLocationAsync( 30public static async Task<INavigableLocation?> GetDefinitionLocationAsync(
Host\IStreamingFindReferencesPresenter.cs (2)
66public static async Task<bool> TryPresentLocationOrNavigateIfOneAsync( 84public static async Task<INavigableLocation?> GetStreamingLocationAsync(
InlineHints\InlineHintsTag.cs (1)
95public async Task<ImmutableArray<object>> CreateDescriptionAsync(CancellationToken cancellationToken)
InlineRename\AbstractEditorInlineRenameService.cs (3)
25public async Task<IInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken) 35public virtual Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 45protected static async Task<TextSpan?> TryGetSurroundingNodeSpanAsync<T>(
InlineRename\AbstractEditorInlineRenameService.FailureInlineRenameInfo.cs (1)
46public Task<IInlineRenameLocationSet> FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken) => Task.FromResult<IInlineRenameLocationSet>(null);
InlineRename\AbstractEditorInlineRenameService.InlineRenameLocationSet.cs (1)
41public async Task<IInlineRenameReplacementInfo> GetReplacementsAsync(
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
132public async Task<IInlineRenameLocationSet> FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken)
InlineRename\IEditorInlineRenameService.cs (4)
149Task<IInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, SymbolRenameOptions options, CancellationToken cancellationToken); 225Task<IInlineRenameLocationSet> FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken); 262Task<IInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken); 270Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(
InlineRename\InlineRenameService.cs (2)
62public async Task<InlineRenameSessionInfo> StartInlineSessionAsync( 122static async Task<InlineRenameSessionInfo?> IsReadOnlyOrCannotNavigateToSpanAsync(
InlineRename\InlineRenameSession.cs (3)
588private async Task<(IInlineRenameReplacementInfo replacementInfo, LinkedFileMergeSessionResult mergeResult)> ComputeMergeResultAsync(IInlineRenameReplacementInfo replacementInfo, CancellationToken cancellationToken) 783private async Task<bool> CommitWorkerAsync(bool previewChanges, bool canUseBackgroundWorkIndicator, IUIThreadOperationContext editorUIOperationContext) 931async Task<ImmutableArray<(DocumentId documentId, string newName, SyntaxNode newRoot, SourceText newText)>> CalculateFinalDocumentChangesAsync(
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
540private static async Task<IEnumerable<TextChange>> GetTextChangesFromTextDifferencingServiceAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken = default) 583private async Task<ImmutableArray<InlineRenameReplacement>> GetMergedReplacementInfosAsync(
IntelliSense\AsyncCompletion\CompletionSessionData.cs (1)
28public Task<(CompletionContext, RoslynCompletionList)>? ExpandedItemsTask { get; set; }
IntelliSense\AsyncCompletion\CompletionSource.cs (5)
201public async Task<VSCompletionContext> GetCompletionContextAsync( 315public async Task<VSCompletionContext> GetExpandedCompletionContextAsync( 336var task = sessionData.ExpandedItemsTask; 370private async Task<(VSCompletionContext, CompletionList)> GetCompletionContextWorkerAsync( 457public async Task<object?> GetDescriptionAsync(IAsyncCompletionSession session, VSCompletionItem item, CancellationToken cancellationToken)
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (2)
127public async Task<FilteredCompletionModel?> UpdateCompletionListAsync(IAsyncCompletionSession session, CancellationToken cancellationToken) 152var highlightAndFilterTask = Task.Run(
IntelliSense\AsyncCompletion\ItemManager.cs (4)
44public Task<ImmutableArray<VSCompletionItem>> SortCompletionListAsync( 53public Task<CompletionList<VSCompletionItem>> SortCompletionItemListAsync( 92public async Task<FilteredCompletionModel?> UpdateCompletionListAsync( 120var task = sessionData.ExpandedItemsTask;
IntelliSense\ModelComputation.cs (6)
45private Task<TModel> _lastTask; 73public Task<TModel> ModelTask 100Func<TModel, CancellationToken, Task<TModel>> transformModelAsync, 113var nextTask = TransformModelAsync(_lastTask);// transformModelAsync(_lastTask, _stopCancellationToken); 147async Task<TModel> TransformModelAsync(Task<TModel> lastTask)
IntelliSense\QuickInfo\IntellisenseQuickInfoBuilder.cs (1)
18internal static async Task<IntellisenseQuickInfoItem> BuildItemAsync(
IntelliSense\QuickInfo\QuickInfoSourceProvider.QuickInfoSource.cs (1)
49public async Task<IntellisenseQuickInfoItem> GetQuickInfoItemAsync(IAsyncQuickInfoSession session, CancellationToken cancellationToken)
Intents\DeleteParameterIntentProvider.cs (1)
24public async Task<ImmutableArray<IntentProcessorResult>> ComputeIntentAsync(
Intents\RenameIntentProvider.cs (1)
30public async Task<ImmutableArray<IntentProcessorResult>> ComputeIntentAsync(
Interactive\InteractiveDocumentNavigationService.cs (2)
27public override Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 30public override async Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken)
Interactive\InteractiveEvaluator.cs (4)
189async Task<ExecutionResult> IInteractiveEvaluator.InitializeAsync() 204async Task<ExecutionResult> IInteractiveEvaluator.ResetAsync(bool initialize) 226public async Task<ExecutionResult> ExecuteCodeAsync(string text) 243var commandTask = commands.TryExecuteCommand();
Interactive\InteractiveSession.cs (2)
335internal async Task<bool> ExecuteCodeAsync(string text) 356internal async Task<bool> ResetAsync(InteractiveHostOptions options)
Interactive\InteractiveWindowResetCommand.cs (1)
68public Task<ExecutionResult> Execute(IInteractiveWindow window, string arguments)
Interactive\ResetInteractive.cs (2)
127protected abstract Task<IEnumerable<string>> GetNamespacesToImportAsync(IEnumerable<string> namespacesToImport, IInteractiveWindow interactiveWindow); 144protected abstract Task<bool> BuildProjectAsync();
IWpfDifferenceViewerExtensions.cs (1)
44private async Task<IProjectionSnapshot> GetInlineBufferSnapshotAsync(CancellationToken cancellationToken)
LanguageServer\AbstractInProcLanguageClient.cs (3)
118public async Task<Connection?> ActivateAsync(CancellationToken cancellationToken) 203internal async Task<AbstractLanguageServer<RequestContext>> CreateAsync<TRequestContext>( 262public Task<InitializationFailureContext?> OnServerInitializeFailedAsync(ILanguageClientInitializationInfo initializationState)
LanguageServer\AbstractLanguageClientMiddleLayer.cs (2)
18public abstract Task<JsonElement> HandleRequestAsync(string methodName, JsonElement methodParam, Func<JsonElement, Task<JsonElement>> sendRequest);
Lightup\ISmartRenameSessionWrapper.cs (6)
37private static readonly Func<object, CancellationToken, Task<IReadOnlyList<string>>> s_getSuggestionsAsync; 38private static readonly Func<object, object, CancellationToken, Task<IReadOnlyList<string>>>? s_getSuggestionsAsync_WithContext; 74s_getSuggestionsAsync_WithContext = LightupHelpers.CreateFunctionAccessor<object, object, CancellationToken, Task<IReadOnlyList<string>>>(s_wrappedType, 81s_getSuggestionsAsync = LightupHelpers.CreateFunctionAccessor<object, CancellationToken, Task<IReadOnlyList<string>>>(s_wrappedType, nameof(GetSuggestionsAsync), typeof(CancellationToken), SpecializedTasks.EmptyReadOnlyList<string>()); 126public Task<IReadOnlyList<string>> GetSuggestionsAsync(CancellationToken cancellationToken) 129public Task<IReadOnlyList<string>> GetSuggestionsAsync(ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>> context, CancellationToken cancellationToken)
NavigableSymbols\NavigableSymbolService.NavigableSymbolSource.cs (1)
29public async Task<INavigableSymbol?> GetNavigableSymbolAsync(SnapshotSpan triggerSpan, CancellationToken cancellationToken)
NavigateTo\DefaultNavigateToLinkService.cs (1)
24public Task<bool> TryNavigateToLinkAsync(Uri uri, CancellationToken cancellationToken)
NavigateTo\INavigateToLinkService.cs (1)
14Task<bool> TryNavigateToLinkAsync(Uri uri, CancellationToken cancellationToken);
Navigation\AbstractDefinitionLocationService.cs (4)
29private static Task<INavigableLocation?> GetNavigableLocationAsync( 40public async Task<DefinitionLocation?> GetDefinitionLocationAsync(Document document, int position, CancellationToken cancellationToken) 128private async Task<INavigableLocation?> GetAlternativeLocationIfAlreadyOnDefinitionAsync( 276private static async Task<bool> IsThirdPartyNavigationAllowedAsync(
Navigation\IDocumentNavigationServiceExtensions.cs (8)
15public static async Task<bool> TryNavigateToAsync( 30public static async Task<bool> TryNavigateToSpanAsync( 37public static async Task<bool> TryNavigateToSpanAsync( 44public static async Task<bool> TryNavigateToSpanAsync( 51public static async Task<bool> TryNavigateToPositionAsync( 58public static Task<bool> TryNavigateToPositionAsync( 64public static async Task<bool> TryNavigateToPositionAsync( 72public static async Task<bool> TryNavigateToLineAndOffsetAsync(
NavigationBar\NavigationBarController.cs (1)
335public Task<NavigationBarModel?> GetModelAsync()
NavigationBar\NavigationBarController_ModelComputation.cs (1)
103async Task<NavigationBarModel?> ComputeModelAsync()
Organizing\OrganizeDocumentCommandHandler.cs (4)
97Func<ITextSnapshot, IUIThreadOperationContext, Task<Document?>> getCurrentDocumentAsync, 98Func<Document, CancellationToken, Task<Document>> getChangedDocumentAsync) 113Func<ITextSnapshot, IUIThreadOperationContext, Task<Document?>> getCurrentDocumentAsync, 114Func<Document, CancellationToken, Task<Document>> getChangedDocumentAsync)
Peek\DefinitionPeekableItem.cs (1)
67private async Task<bool> FindResultsAsync(IPeekResultCollection resultCollection, IFindPeekResultsCallback callback, CancellationToken cancellationToken)
Peek\IPeekableItemFactory.cs (1)
23Task<IEnumerable<IPeekableItem>> GetPeekableItemsAsync(ISymbol symbol, Project project, IPeekResultFactory peekResultFactory, CancellationToken cancellationToken);
Peek\PeekableItemFactory.cs (1)
45public async Task<IEnumerable<IPeekableItem>> GetPeekableItemsAsync(
Preview\AbstractPreviewFactoryService.cs (16)
249public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedDocumentPreviewViewAsync(Document document, CancellationToken cancellationToken) 273private async Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedTextDocumentPreviewViewAsync<TDocument>( 297public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedDocumentPreviewViewAsync(Document document, double zoomLevel, CancellationToken cancellationToken) 305public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedAdditionalDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 313public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedAnalyzerConfigDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 321public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedDocumentPreviewViewAsync(Document document, CancellationToken cancellationToken) 345private async Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedTextDocumentPreviewViewAsync<TDocument>( 379public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedDocumentPreviewViewAsync(Document document, double zoomLevel, CancellationToken cancellationToken) 387public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedAdditionalDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 395public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedAnalyzerConfigDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 403public Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedDocumentPreviewViewAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken) 406public async Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedDocumentPreviewViewAsync(Document oldDocument, Document newDocument, double zoomLevel, CancellationToken cancellationToken) 510private async Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedAdditionalOrAnalyzerConfigDocumentPreviewViewAsync( 566public Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedAdditionalDocumentPreviewViewAsync(TextDocument oldDocument, TextDocument newDocument, double zoomLevel, CancellationToken cancellationToken) 572public Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedAnalyzerConfigDocumentPreviewViewAsync(TextDocument oldDocument, TextDocument newDocument, double zoomLevel, CancellationToken cancellationToken) 672protected abstract Task<TDifferenceViewer> CreateDifferenceViewAsync(IDifferenceBuffer diffBuffer, ITextViewRoleSet previewRoleSet, DifferenceViewMode mode, double zoomLevel, CancellationToken cancellationToken);
Preview\PreviewFactoryService.cs (1)
64protected override async Task<IWpfDifferenceViewer> CreateDifferenceViewAsync(IDifferenceBuffer diffBuffer, ITextViewRoleSet previewRoleSet, DifferenceViewMode mode, double zoomLevel, CancellationToken cancellationToken)
Preview\SolutionPreviewItem.cs (2)
21internal sealed class SolutionPreviewItem(ProjectId? projectId, DocumentId? documentId, Func<CancellationToken, Task<object?>> lazyPreview) 25public readonly Func<CancellationToken, Task<object?>> LazyPreview = lazyPreview;
Preview\SolutionPreviewResult.cs (1)
33public async Task<IReadOnlyList<object>?> GetPreviewsAsync(DocumentId? preferredDocumentId = null, ProjectId? preferredProjectId = null, CancellationToken cancellationToken = default)
QuickInfo\Extensions.cs (1)
48public static async Task<ITextBuffer> CloneTextBufferAsync(this Document document, CancellationToken cancellationToken)
Remote\SolutionChecksumUpdater.cs (1)
191async Task<bool?> DispatchSynchronizeTextChangesHelperAsync()
RenameTracking\RenameTrackingTaggerProvider.cs (1)
127Task<TriggerIdentifierKind> isRenamableIdentifierTask, out TriggerIdentifierKind identifierKind)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (3)
58protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 69protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 115internal override async Task<bool> TryApplyAsync(
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (6)
57public async Task<(NotificationSeverity severity, string message)?> TryCommitAsync(CancellationToken cancellationToken) 75public async Task<RenameTrackingSolutionSet> RenameSymbolAsync(CancellationToken cancellationToken) 78private async Task<RenameTrackingSolutionSet> RenameSymbolWorkerAsync(CancellationToken cancellationToken) 100private async Task<(NotificationSeverity, string)?> TryApplyChangesToWorkspaceAsync(CancellationToken cancellationToken) 182private async Task<Solution> CreateSolutionWithOriginalNameAsync( 205private async Task<ISymbol> TryGetSymbolAsync(Solution solutionWithOriginalName, DocumentId documentId, CancellationToken cancellationToken)
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (6)
41private static readonly Task<TriggerIdentifierKind> s_notRenamableTask = Task.FromResult(TriggerIdentifierKind.NotRenamable); 42private readonly Task<TriggerIdentifierKind> _isRenamableIdentifierTask; 48private Task<bool> _newIdentifierBindsTask = SpecializedTasks.False; 137async Task<bool> DetermineIfNewIdentifierBindsAsync(Task<TriggerIdentifierKind> isRenamableIdentifierTask) 161private async Task<TriggerIdentifierKind> DetermineIfRenamableIdentifierAsync(SnapshotSpan snapshotSpan, bool initialCheck)
Shared\Extensions\ITextSnapshotExtensions.cs (1)
60public static async Task<Document?> GetFullyLoadedOpenDocumentInCurrentContextWithChangesAsync(
Shared\Utilities\WorkspaceThreadingService.cs (1)
23public TResult Run<TResult>(Func<Task<TResult>> asyncMethod)
SignatureHelp\Controller.Session_ComputeModel.cs (1)
43private async Task<Model> ComputeModelInBackgroundAsync(
SpellCheck\RoslynSpellCheckFixerProvider.cs (3)
43private async Task<(FunctionId functionId, string? message)?> RenameWordAsync( 75private async Task<(FunctionId functionId, string? message)?> TryRenameAsync(SnapshotSpan span, string replacement, CancellationToken cancellationToken) 123public Task<(FunctionId functionId, string? message)?> TryRenameAsync(SnapshotSpan span, string replacement, CancellationToken cancellationToken)
Suggestions\FixAll\FixMultipleOccurrencesService.cs (3)
26public Task<Solution> GetFixAsync( 44public Task<Solution> GetFixAsync( 62private static async Task<Solution> GetFixedSolutionAsync(
Suggestions\PreviewChanges\PreviewChangesCodeAction.cs (3)
22private readonly Func<CancellationToken, Task<SolutionPreviewResult?>> _getPreviewResultAsync; 24public PreviewChangesCodeAction(Workspace workspace, CodeAction originalCodeAction, Func<CancellationToken, Task<SolutionPreviewResult?>> getPreviewResultAsync) 33private protected override async Task<ImmutableArray<CodeActionOperation>> GetOperationsCoreAsync(
Suggestions\RefineUsingCopilot\RefineUsingCopilotCodeAction.cs (3)
36protected override Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 42protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 95internal override async Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
Suggestions\RefineUsingCopilot\RefineUsingCopilotSuggestedAction.cs (1)
38public static async Task<SuggestedAction?> TryCreateAsync(SuggestedActionWithNestedFlavors suggestedAction, CancellationToken cancellationToken)
Suggestions\SuggestedActions\SuggestedAction.cs (6)
77protected async Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync( 85protected async Task<IEnumerable<CodeActionOperation>> GetOperationsAsync( 93protected async Task<ImmutableArray<CodeActionOperation>> GetPreviewOperationsAsync(CancellationToken cancellationToken) 227protected async Task<SolutionPreviewResult> GetPreviewResultAsync(CancellationToken cancellationToken) 237public virtual Task<object> GetPreviewAsync(CancellationToken cancellationToken) 242public virtual Task<IEnumerable<SuggestedActionSet>> GetActionSetsAsync(CancellationToken cancellationToken)
Suggestions\SuggestedActionsSource.cs (6)
97public Task<bool> HasSuggestedActionsAsync( 131public async Task<ISuggestedActionCategorySet?> GetSuggestedActionCategoriesAsync( 165var errorTask = GetFixLevelAsync(document, range, cancellationToken); 188private async Task<string?> GetFixLevelAsync( 217async Task<string?> GetFixCategoryAsync(ICodeActionRequestPriorityProvider priorityProvider) 242private async Task<string?> TryGetRefactoringSuggestedActionCategoryAsync(
Suggestions\SuggestedActionsSource_Async.cs (4)
211var fixesTask = GetCodeFixesAsync(); 212var refactoringsTask = GetRefactoringsAsync(); 227async Task<ImmutableArray<UnifiedSuggestedActionSet>> GetCodeFixesAsync() 243async Task<ImmutableArray<UnifiedSuggestedActionSet>> GetRefactoringsAsync()
Suggestions\SuggestedActionWithNestedActions.cs (1)
57public sealed override Task<IEnumerable<SuggestedActionSet>> GetActionSetsAsync(CancellationToken cancellationToken)
Suggestions\SuggestedActionWithNestedFlavors.cs (4)
65public sealed override async Task<IEnumerable<SuggestedActionSet>> GetActionSetsAsync(CancellationToken cancellationToken) 90private async Task<ImmutableArray<SuggestedActionSet>> CreateAllFlavorsAsync(CancellationToken cancellationToken) 105private async Task<SuggestedActionSet> GetPrimarySuggestedActionSetAsync(CancellationToken cancellationToken) 142public override async Task<object> GetPreviewAsync(CancellationToken cancellationToken)
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (2)
241private async Task<(ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> oldTagTrees, ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>> newTagTrees, TResult)> 282private async Task<ImmutableDictionary<ITextBuffer, TagSpanIntervalTree<TTag>>?> RecomputeTagsAsync(
TextDiffing\EditorTextDifferencingService.cs (2)
27public Task<ImmutableArray<TextChange>> GetTextChangesAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken) 30public async Task<ImmutableArray<TextChange>> GetTextChangesAsync(Document oldDocument, Document newDocument, TextDifferenceTypes preferredDifferenceType, CancellationToken cancellationToken)
Workspaces\ITextBufferVisibilityTracker.cs (1)
68var taskOfTask = delayTask.ContinueWith(
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (32)
BraceHighlighting\MultiCharacterBraceHighlightingTests.cs (1)
31public async Task<BraceMatchingResult?> GetMatchingBracesAsync(
Classification\AbstractClassifierTests.cs (4)
27protected abstract Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string text, ImmutableArray<TextSpan> spans, ParseOptions? parseOptions, TestHost testHost); 268protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 279protected static async Task<ImmutableArray<ClassifiedSpan>> GetSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 289protected static async Task<ImmutableArray<ClassifiedSpan>> GetAllClassificationsAsync(Document document, ImmutableArray<TextSpan> spans)
Completion\AbstractCompletionProviderTests.cs (4)
95protected static async Task<bool> CanUseSpeculativeSemanticModelAsync(Document document, int position) 133internal Task<CompletionList> GetCompletionListAsync( 363protected async Task<CompletionList> GetCompletionListAsync(string markup, string workspaceKind = null) 1349protected async Task<IReadOnlyList<RoslynCompletion.CompletionItem>> GetCompletionItemsAsync(
ExtractInterface\ExtractInterfaceTestState.cs (3)
76public Task<ExtractInterfaceTypeAnalysisResult> GetTypeAnalysisResultAsync(TypeDiscoveryRule typeDiscoveryRule) 85public Task<ExtractInterfaceResult> ExtractViaCommandAsync() 98public async Task<Solution> ExtractViaCodeAction()
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
55protected async Task<int?> GetTargetPositionAsync(string code, bool next)
NavigateTo\NavigateToTestAggregator.Callback.cs (1)
43public Task<IEnumerable<NavigateToItem>> GetItemsAsync()
NavigateTo\NavigateToTestAggregator.cs (1)
34public Task<IEnumerable<NavigateToItem>> GetItemsAsync(string searchValue)
QuickInfo\AbstractSemanticQuickInfoSourceTests.cs (1)
153protected static async Task<bool> CanUseSpeculativeSemanticModelAsync(Document document, int position)
RefactoringHelpers\RefactoringHelpersTestBase.cs (1)
102private async Task<TNode?> GetNodeForSelectionAsync<TNode>(string text, TextSpan selection, Func<TNode, bool> predicate, bool allowEmptyNodes = false) where TNode : SyntaxNode
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
117private static async Task<bool> CanUseSpeculativeSemanticModelAsync(Document document, int position) 158private static async Task<SignatureHelpState?> GetArgumentStateAsync(int cursorPosition, Document document, ISignatureHelpProvider signatureHelpProvider, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options)
Squiggles\SquiggleUtilities.cs (1)
29internal static async Task<ImmutableArray<TagSpan<TTag>>> GetTagSpansAsync<TProvider, TTag>(
Squiggles\TestDiagnosticTagProducer.cs (1)
19internal static Task<ImmutableArray<TagSpan<TTag>>> GetTagSpansAsync(
Structure\AbstractSyntaxNodeStructureProviderTests.cs (1)
22internal sealed override async Task<ImmutableArray<BlockSpan>> GetBlockSpansWorkerAsync(Document document, BlockStructureOptions options, int position)
Structure\AbstractSyntaxStructureProviderTests.cs (2)
32private Task<ImmutableArray<BlockSpan>> GetBlockSpansAsync(Document document, BlockStructureOptions options, int position) 35internal abstract Task<ImmutableArray<BlockSpan>> GetBlockSpansWorkerAsync(Document document, BlockStructureOptions options, int position);
Structure\AbstractSyntaxTriviaStructureProviderTests.cs (1)
19internal sealed override async Task<ImmutableArray<BlockSpan>> GetBlockSpansWorkerAsync(Document document, BlockStructureOptions options, int position)
Threading\TaskJoinExtensions.cs (2)
27/// Joins a <see cref="Task{TResult}"/> to the current thread with a <see cref="Dispatcher"/> message pump in 30public static TResult JoinUsingDispatcher<TResult>(this Task<TResult> task, CancellationToken cancellationToken)
Threading\WpfTestCase.cs (1)
29public override Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
Threading\WpfTestRunner.cs (1)
53protected override Task<decimal> InvokeTestMethodAsync(ExceptionAggregator aggregator)
Threading\WpfTheoryTestCase.cs (1)
29public override Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
TypeInferrer\TypeInferrerTestBase.cs (1)
26private static async Task<bool> CanUseSpeculativeSemanticModelAsync(Document document, int position)
Workspaces\NoCompilationDocumentDiagnosticAnalyzer.cs (1)
23public override Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument document, SyntaxTree tree, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (29)
CodeFixes\CodeFixServiceTests.cs (5)
278private static Task<ImmutableArray<CodeFixCollection>> GetAddedFixesWithExceptionValidationAsync(CodeFixProvider codefix) 281private static async Task<ImmutableArray<CodeFixCollection>> GetAddedFixesAsync(CodeFixProvider codefix, DiagnosticAnalyzer diagnosticAnalyzer, bool exception = false, bool throwExceptionInFixerCreation = false) 574public override Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument document, SyntaxTree? tree, CancellationToken cancellationToken) 580public override Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument document, SyntaxTree? tree, CancellationToken cancellationToken) 743private static async Task<ImmutableArray<CodeFixCollection>> GetNuGetAndVsixCodeFixersCoreAsync(
CodeGeneration\CodeGenerationTests.cs (1)
889public static async Task<TestContext> CreateAsync(string initial, string expected, string forceLanguage = null, bool ignoreResult = false)
Completion\CompletionServiceTests.cs (3)
119public override Task<CompletionDescription> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 124public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 129private static async Task<TextSpan> GetTextChangeSpanAsync(Document document, TextSpan startSpan, CancellationToken cancellationToken)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
894public override Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument document, SyntaxTree tree, CancellationToken cancellationToken)
LanguageServer\VSTypeScriptHandlerTests.cs (3)
96private async Task<VSTypeScriptTestLspServer> CreateTsTestLspServerAsync(string workspaceXml, InitializationOptions? options = null) 133public static async Task<VSTypeScriptTestLspServer> CreateAsync(LspTestWorkspace testWorkspace, InitializationOptions options, AbstractLspLogger logger) 175protected override Task<int> HandleRequestAsync(TSRequest request, TypeScriptRequestContext context, CancellationToken cancellationToken)
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (4)
85public Task<MetadataAsSourceFile> GenerateSourceAsync(ISymbol symbol, Project? project = null, bool signaturesOnly = true) 94public async Task<MetadataAsSourceFile> GenerateSourceAsync( 167public async Task<ISymbol?> ResolveSymbolAsync(string symbolMetadataName, Compilation? compilation = null) 312internal async Task<ISymbol> GetNavigationSymbolAsync()
RenameTracking\RenameTrackingTaggerProviderTests.cs (1)
876var notRenamable = Task.FromResult(RenameTrackingTaggerProvider.TriggerIdentifierKind.NotRenamable);
RenameTracking\RenameTrackingTestState.cs (1)
165public async Task<CodeAction> TryGetCodeActionAsync(TextSpan? textSpan = null)
Structure\BlockStructureServiceTests.cs (1)
112private static async Task<ImmutableArray<BlockSpan>> GetSpansFromWorkspaceAsync(
Structure\StructureTaggerTests.cs (1)
395private static async Task<List<IContainerStructureTag>> GetTagsFromWorkspaceAsync(EditorTestWorkspace workspace)
SymbolFinder\FindSymbolAtPositionTests.cs (1)
18private static Task<ISymbol> FindSymbolAtPositionAsync(TestWorkspace workspace)
UnusedReferences\UnusedReferencesRemoverTests.cs (3)
166private static async Task<ImmutableArray<ReferenceUpdate>> ApplyReferenceUpdatesAsync(params ReferenceUpdate[] referenceUpdates) 211public Task<ImmutableArray<ReferenceInfo>> GetProjectReferencesAsync(string projectPath, CancellationToken cancellationToken) 216public Task<bool> TryUpdateReferenceAsync(string projectPath, ReferenceUpdate referenceUpdate, CancellationToken cancellationToken)
ValueTracking\AbstractBaseValueTrackingTests.cs (4)
26internal static async Task<ImmutableArray<ValueTrackedItem>> GetTrackedItemsAsync(TestWorkspace testWorkspace, CancellationToken cancellationToken = default) 36internal static async Task<ImmutableArray<ValueTrackedItem>> GetTrackedItemsAsync(TestWorkspace testWorkspace, ValueTrackedItem item, CancellationToken cancellationToken = default) 42internal static async Task<ImmutableArray<ValueTrackedItem>> ValidateItemsAsync(TestWorkspace testWorkspace, (int line, string text)[] itemInfo, CancellationToken cancellationToken = default) 55internal static async Task<ImmutableArray<ValueTrackedItem>> ValidateChildrenAsync(TestWorkspace testWorkspace, ValueTrackedItem item, (int line, string text)[] childInfo, CancellationToken cancellationToken = default)
Microsoft.CodeAnalysis.Extensions.Package (7)
Compilation\CompilationExtensions.cs (1)
151=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (3)
AddPackage\AspNetCoreAddPackageCodeAction.cs (3)
38public static async Task<CodeAction?> TryCreateCodeActionAsync( 55private static async Task<ImmutableArray<TextChange>> GetTextChangesAsync( 76private static async Task<Document> AddImportAsync(Document document, int position, SyntaxGenerator generator, SyntaxNode importDirective, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (44)
Analyzer\CopilotUtilities.cs (1)
30public static async Task<SyntaxNode?> GetContainingMethodDeclarationAsync(Document document, int position, bool useFullSpan, CancellationToken cancellationToken)
Analyzer\IExternalCSharpCopilotCodeAnalysisService.cs (5)
15Task<bool> IsAvailableAsync(CancellationToken cancellation); 16Task<ImmutableArray<string>> GetAvailablePromptTitlesAsync(Document document, CancellationToken cancellationToken); 17Task<ImmutableArray<Diagnostic>> AnalyzeDocumentAsync(Document document, TextSpan? span, string promptTitle, CancellationToken cancellationToken); 18Task<ImmutableArray<Diagnostic>> GetCachedDiagnosticsAsync(Document document, string promptTitle, CancellationToken cancellationToken); 20Task<bool> IsFileExcludedAsync(string filePath, CancellationToken cancellationToken);
CodeMapper\ICSharpCopilotMapCodeService.cs (1)
15Task<ImmutableArray<TextChange>?> MapCodeAsync(
GenerateDocumentation\IExternalCSharpCopilotGenerateDocumentationService.cs (1)
13Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(CopilotDocumentationCommentProposalWrapper proposal, CancellationToken cancellationToken);
GenerateImplementation\IExternalCSharpCopilotGenerateImplementationService.cs (1)
15Task<ImmutableDictionary<SyntaxNode, ImplementationDetailsWrapper>> ImplementNotImplementedExceptionsAsync(
Internal\Analyzer\AbstractCopilotCodeAnalysisService.cs (20)
40protected abstract Task<bool> IsAvailableCoreAsync(CancellationToken cancellationToken); 41protected abstract Task<ImmutableArray<string>> GetAvailablePromptTitlesCoreAsync(Document document, CancellationToken cancellationToken); 42protected abstract Task<ImmutableArray<Diagnostic>> AnalyzeDocumentCoreAsync(Document document, TextSpan? span, string promptTitle, CancellationToken cancellationToken); 43protected abstract Task<ImmutableArray<Diagnostic>> GetCachedDiagnosticsCoreAsync(Document document, string promptTitle, CancellationToken cancellationToken); 45protected abstract Task<string> GetOnTheFlyDocsPromptCoreAsync(OnTheFlyDocsInfo onTheFlyDocsInfo, CancellationToken cancellationToken); 46protected abstract Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseCoreAsync(string prompt, CancellationToken cancellationToken); 47protected abstract Task<bool> IsFileExcludedCoreAsync(string filePath, CancellationToken cancellationToken); 48protected abstract Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentCoreAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken); 49protected abstract Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsCoreAsync(Document document, ImmutableDictionary<SyntaxNode, ImmutableArray<ReferencedSymbol>> methodOrProperties, CancellationToken cancellationToken); 52public Task<bool> IsAvailableAsync(CancellationToken cancellationToken) 55public async Task<ImmutableArray<string>> GetAvailablePromptTitlesAsync(Document document, CancellationToken cancellationToken) 66private static async Task<bool> ShouldSkipAnalysisAsync(Document document, CancellationToken cancellationToken) 135public async Task<ImmutableArray<Diagnostic>> GetCachedDocumentDiagnosticsAsync(Document document, TextSpan? span, ImmutableArray<string> promptTitles, CancellationToken cancellationToken) 169protected virtual Task<ImmutableArray<Diagnostic>> GetDiagnosticsIntersectWithSpanAsync(Document document, IReadOnlyList<Diagnostic> diagnostics, TextSpan span, CancellationToken cancellationToken) 183public async Task<string> GetOnTheFlyDocsPromptAsync(OnTheFlyDocsInfo onTheFlyDocsInfo, CancellationToken cancellationToken) 187public async Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseAsync(string prompt, CancellationToken cancellationToken) 195public async Task<bool> IsFileExcludedAsync(string filePath, CancellationToken cancellationToken) 203public async Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken) 211public async Task<bool> IsImplementNotImplementedExceptionsAvailableAsync(CancellationToken cancellationToken) 217public async Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsAsync(
Internal\Analyzer\CSharp\CSharpCopilotCodeAnalysisService.cs (10)
62protected override Task<ImmutableArray<Diagnostic>> AnalyzeDocumentCoreAsync(Document document, TextSpan? span, string promptTitle, CancellationToken cancellationToken) 70protected override Task<ImmutableArray<string>> GetAvailablePromptTitlesCoreAsync(Document document, CancellationToken cancellationToken) 78protected override Task<ImmutableArray<Diagnostic>> GetCachedDiagnosticsCoreAsync(Document document, string promptTitle, CancellationToken cancellationToken) 86protected override Task<bool> IsAvailableCoreAsync(CancellationToken cancellationToken) 102protected override Task<string> GetOnTheFlyDocsPromptCoreAsync(OnTheFlyDocsInfo onTheFlyDocsInfo, CancellationToken cancellationToken) 110protected override Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseCoreAsync(string prompt, CancellationToken cancellationToken) 118protected override async Task<ImmutableArray<Diagnostic>> GetDiagnosticsIntersectWithSpanAsync( 138protected override Task<bool> IsFileExcludedCoreAsync(string filePath, CancellationToken cancellationToken) 146protected override Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentCoreAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken) 159protected override async Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsCoreAsync(
Internal\CodeMapper\CopilotCSharpMapCodeService.cs (1)
30public Task<ImmutableArray<TextChange>?> MapCodeAsync(Document document, ImmutableArray<string> contents, ImmutableArray<(Document, TextSpan)> focusLocations, CancellationToken cancellationToken)
Internal\SemanticSearch\CopilotSemanticSearchQueryExecutor.cs (1)
72public async Task<CopilotSemanticSearchQueryResults> ExecuteAsync(string query, int resultCountLimit, CancellationToken cancellationToken)
OnTheFlyDocs\IExternalCSharpOnTheFlyDocsService.cs (2)
12Task<string> GetOnTheFlyDocsPromptAsync(CopilotOnTheFlyDocsInfoWrapper onTheFlyDocsInfo, CancellationToken cancellationToken); 13Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseAsync(string prompt, CancellationToken cancellationToken);
SemanticSearch\ICopilotSemanticSearchQueryExecutor.cs (1)
13Task<CopilotSemanticSearchQueryResults> ExecuteAsync(string query, int resultCountLimit, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.Extensions (5)
External\IExtensionDocumentMessageHandler.cs (1)
42Task<TResponse> ExecuteAsync(TMessage message, ExtensionMessageContext context, Document document, CancellationToken cancellationToken);
External\IExtensionWorkspaceMessageHandler.cs (1)
41Task<TResponse> ExecuteAsync(TMessage message, ExtensionMessageContext context, CancellationToken cancellationToken);
Internal\ExtensionMessageHandlerWrapper.cs (3)
30_responseTaskResultProperty = typeof(Task<>).MakeGenericType(ResponseType).GetProperty(nameof(Task<int>.Result)); 41public async Task<object?> ExecuteAsync(object? message, TArgument argument, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (81)
Completion\FSharpFileSystemCompletionHelper.cs (1)
37public Task<ImmutableArray<CompletionItem>> GetItemsAsync(string directoryPath, CancellationToken cancellationToken)
Completion\IFSharpCommonCompletionProvider.cs (2)
21public abstract Task<TextChange?> GetTextChangeAsync( 22Func<CompletionItem, char?, CancellationToken, Task<TextChange?>> baseGetTextChangeAsync,
Diagnostics\IFSharpDocumentDiagnosticAnalyzer.cs (2)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(Document document, CancellationToken cancellationToken); 17Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(Document document, CancellationToken cancellationToken);
Diagnostics\IFSharpSimplifyNameDiagnosticAnalyzer.cs (1)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken);
Diagnostics\IFSharpUnusedDeclarationsDiagnosticAnalyzer.cs (1)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken);
Diagnostics\IFSharpUnusedOpensDiagnosticAnalyzer.cs (1)
15Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken);
DocumentHighlighting\IFSharpDocumentHighlightsService.cs (1)
52Task<ImmutableArray<FSharpDocumentHighlights>> GetDocumentHighlightsAsync(
Editor\IFSharpBraceMatcher.cs (1)
28Task<FSharpBraceMatchingResult?> FindBracesAsync(Document document, int position, CancellationToken cancellationToken = default);
Editor\IFSharpEditorFormattingService.cs (4)
29Task<IList<TextChange>> GetFormattingChangesAsync(Document document, TextSpan? textSpan, CancellationToken cancellationToken); 34Task<IList<TextChange>> GetFormattingChangesOnPasteAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken); 41Task<IList<TextChange>?> GetFormattingChangesAsync(Document document, char typedChar, int position, CancellationToken cancellationToken); 46Task<IList<TextChange>?> GetFormattingChangesOnReturnAsync(Document document, int position, CancellationToken cancellationToken);
Editor\IFSharpEditorInlineRenameService.cs (3)
56Task<IFSharpInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, OptionSet optionSet, CancellationToken cancellationToken); 128Task<IFSharpInlineRenameLocationSet> FindRenameLocationsAsync(OptionSet optionSet, CancellationToken cancellationToken); 149Task<IFSharpInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken);
Editor\IFSharpGoToDefinitionService.cs (1)
19Task<IEnumerable<FSharpNavigableItem>> FindDefinitionsAsync(Document document, int position, CancellationToken cancellationToken);
Editor\IFSharpNavigationBarItemService.cs (1)
15Task<IList<FSharpNavigationBarItem>> GetItemsAsync(Document document, CancellationToken cancellationToken);
Editor\Implementation\Debugging\IFSharpBreakpointResolutionService.cs (2)
14Task<FSharpBreakpointResolutionResult?> ResolveBreakpointAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken = default); 16Task<IEnumerable<FSharpBreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default);
Editor\Implementation\Debugging\IFSharpLanguageDebugInfoService.cs (2)
12Task<FSharpDebugLocationInfo> GetLocationInfoAsync(Document document, int position, CancellationToken cancellationToken); 20Task<FSharpDebugDataTipInfo> GetDataTipInfoAsync(Document document, int position, CancellationToken cancellationToken);
Editor\InlineRename\FSharpInlineRenameInfo.cs (2)
29public abstract Task<FSharpInlineRenameLocationSet> FindRenameLocationsAsync(bool renameInStrings, bool renameInComments, CancellationToken cancellationToken); 43async Task<IInlineRenameLocationSet> IInlineRenameInfo.FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken)
Editor\InlineRename\FSharpInlineRenameLocationSet.cs (2)
34public abstract Task<FSharpInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, CancellationToken cancellationToken); 36async Task<IInlineRenameReplacementInfo> IInlineRenameLocationSet.GetReplacementsAsync(string replacementText, SymbolRenameOptions options, CancellationToken cancellationToken)
Editor\InlineRename\FSharpInlineRenameServiceImplementation.cs (1)
12public abstract Task<FSharpInlineRenameInfo?> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken);
GoToDefinition\IFSharpFindDefinitionService.cs (1)
17Task<ImmutableArray<FSharpNavigableItem>> FindDefinitionsAsync(Document document, int position, CancellationToken cancellationToken);
InlineHints\FSharpInlineHint.cs (3)
20private readonly Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? _getDescriptionAsync; 25Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null) 39public Task<ImmutableArray<TaggedText>> GetDescriptionAsync(Document document, CancellationToken cancellationToken)
InlineHints\IFSharpInlineHintsService.cs (1)
17Task<ImmutableArray<FSharpInlineHint>> GetInlineHintsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken);
Internal\Completion\FSharpInternalCommonCompletionProvider.cs (1)
31protected override Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (4)
32public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(Document document, CancellationToken cancellationToken) 37public Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(Document document, CancellationToken cancellationToken) 70public override async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree tree, CancellationToken cancellationToken) 78public override async Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument textDocument, SyntaxTree tree, CancellationToken cancellationToken)
Internal\Diagnostics\FSharpSimplifyNameDiagnosticAnalyzer.cs (2)
32public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken) 54public override async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree tree, CancellationToken cancellationToken)
Internal\Diagnostics\FSharpUnusedDeclarationsAnalyzer.cs (2)
32public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken) 56public override async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree tree, CancellationToken cancellationToken)
Internal\Diagnostics\FSharpUnusedOpensDiagnosticAnalyzer.cs (2)
32public Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(DiagnosticDescriptor descriptor, Document document, CancellationToken cancellationToken) 52public override async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree tree, CancellationToken cancellationToken)
Internal\DocumentHighlighting\FSharpDocumentHighlightsService.cs (1)
70public async Task<ImmutableArray<DocumentHighlights>> GetDocumentHighlightsAsync(Document document, int position, IImmutableSet<Document> documentsToSearch, HighlightingOptions options, CancellationToken cancellationToken)
Internal\Editor\FSharpBraceMatcher.cs (1)
29public async Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken)
Internal\Editor\FSharpDefinitionLocationService.cs (1)
22public Task<DefinitionLocation?> GetDefinitionLocationAsync(Document document, int position, CancellationToken cancellationToken)
Internal\Editor\FSharpEditorFormattingService.cs (8)
44public Task<IList<TextChange>> GetFormattingChangesAsync(Document document, TextSpan? textSpan, CancellationToken cancellationToken) 49public Task<IList<TextChange>?> GetFormattingChangesAsync(Document document, char typedChar, int position, CancellationToken cancellationToken) 54public Task<IList<TextChange>> GetFormattingChangesOnPasteAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) 59public Task<IList<TextChange>?> GetFormattingChangesOnReturnAsync(Document document, int position, CancellationToken cancellationToken) 79async Task<ImmutableArray<TextChange>> IFormattingInteractionService.GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, TextSpan? textSpan, CancellationToken cancellationToken) 85async Task<ImmutableArray<TextChange>> IFormattingInteractionService.GetFormattingChangesAsync(Document document, ITextBuffer textBuffer, char typedChar, int position, CancellationToken cancellationToken) 91async Task<ImmutableArray<TextChange>> IFormattingInteractionService.GetFormattingChangesOnPasteAsync(Document document, ITextBuffer textBuffer, TextSpan textSpan, CancellationToken cancellationToken) 97async Task<ImmutableArray<TextChange>> IFormattingInteractionService.GetFormattingChangesOnReturnAsync(Document document, int position, CancellationToken cancellationToken)
Internal\Editor\FSharpEditorInlineRenameService.cs (4)
98public async Task<IInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, SymbolRenameOptions options, CancellationToken cancellationToken) 141public async Task<IInlineRenameLocationSet> FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken) 205public Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 210public async Task<IInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken)
Internal\Editor\FSharpNavigationBarItemService.cs (3)
42public Task<ImmutableArray<NavigationBarItem>> GetItemsAsync(Document document, ITextVersion textVersion, CancellationToken cancellationToken) 48async Task<ImmutableArray<NavigationBarItem>> INavigationBarItemService.GetItemsAsync( 64public async Task<bool> TryNavigateToItemAsync(
Internal\Editor\Implementation\Debugging\FSharpBreakpointResolutionService.cs (2)
31public async Task<BreakpointResolutionResult?> ResolveBreakpointAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken = default) 34public async Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default)
Internal\Editor\Implementation\Debugging\FSharpLanguageDebugInfoService.cs (2)
24public async Task<DebugDataTipInfo> GetDataTipInfoAsync(Document document, int position, bool includeKind, CancellationToken cancellationToken) 27public async Task<DebugLocationInfo> GetLocationInfoAsync(Document document, int position, CancellationToken cancellationToken)
Internal\InlineHints\FSharpInlineHintsService.cs (1)
30public async Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
Internal\Navigation\FSharpCrossLanguageSymbolNavigationService.cs (1)
33public async Task<INavigableLocation?> TryGetNavigableLocationAsync(
Internal\Navigation\FSharpFindDefinitionService.cs (2)
21public async Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync(Document document, int position, CancellationToken cancellationToken) 27public Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync(Document document, int position, bool forSymbolType, CancellationToken cancellationToken)
Internal\SignatureHelp\FSharpSignatureHelpProvider.cs (1)
46public async Task<SignatureHelpItems?> GetItemsAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
Internal\Structure\FSharpBlockStructureService.cs (1)
32public override async Task<BlockStructure> GetBlockStructureAsync(Document document, BlockStructureOptions options, CancellationToken cancellationToken)
NavigateTo\IFSharpNavigateToSearchService.cs (2)
17Task<ImmutableArray<FSharpNavigateToSearchResult>> SearchProjectAsync(Project project, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, CancellationToken cancellationToken); 18Task<ImmutableArray<FSharpNavigateToSearchResult>> SearchDocumentAsync(Document document, string searchPattern, IImmutableSet<string> kinds, CancellationToken cancellationToken);
Navigation\IFSharpCrossLanguageSymbolNavigationService.cs (2)
15Task<IFSharpNavigableLocation?> TryGetNavigableLocationAsync( 27Task<bool> NavigateToAsync(FSharpNavigationOptions2 options, CancellationToken cancellationToken);
SignatureHelp\AbstractFSharpSignatureHelpProvider.cs (1)
28public abstract Task<FSharpSignatureHelpItems> GetItemsAsync(Document document, int position, FSharpSignatureHelpTriggerInfo triggerInfo, CancellationToken cancellationToken);
SignatureHelp\IFSharpSignatureHelpProvider.cs (1)
31Task<FSharpSignatureHelpItems> GetItemsAsync(Document document, int position, FSharpSignatureHelpTriggerInfo triggerInfo, CancellationToken cancellationToken);
Structure\IFSharpBlockStructureService.cs (1)
14Task<FSharpBlockStructure> GetBlockStructureAsync(Document document, CancellationToken cancellationToken);
TaskList\FSharpTaskListService.cs (1)
28public async Task<ImmutableArray<TaskListItem>> GetTaskListItemsAsync(Document document, ImmutableArray<TaskListItemDescriptor> descriptors, CancellationToken cancellationToken)
TaskList\IFSharpTaskListService.cs (1)
13Task<ImmutableArray<FSharpTaskListItem>> GetTaskListItemsAsync(Document document, ImmutableArray<FSharpTaskListDescriptor> descriptors, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (13)
Completion\OmniSharpCompletionService.cs (2)
28public static Task<CompletionList> GetCompletionsAsync( 40public static Task<CompletionDescription?> GetDescriptionAsync(
Formatting\OmniSharpFormatter.cs (2)
17public static Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, OmniSharpSyntaxFormattingOptionsWrapper options, CancellationToken cancellationToken) 20public static async Task<Document> OrganizeImportsAsync(Document document, OmniSharpOrganizeImportsOptionsWrapper options, CancellationToken cancellationToken)
GoToDefinition\OmniSharpFindDefinitionService.cs (1)
16internal static async Task<ImmutableArray<OmniSharpNavigableItem>> FindDefinitionsAsync(Document document, int position, CancellationToken cancellationToken)
InlineHints\OmniSharpInlineHintsService.cs (4)
17public static async Task<ImmutableArray<OmniSharpInlineHint>> GetInlineHintsAsync(Document document, TextSpan textSpan, OmniSharpInlineHintsOptions options, CancellationToken cancellationToken) 34private readonly Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>> _getDescriptionAsync; 41Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>> getDescriptionAsync) 55public Task<ImmutableArray<TaggedText>> GetDescriptionAsync(Document document, CancellationToken cancellationToken)
MetadataAsSource\OmniSharpMetadataAsSourceHelpers.cs (1)
19public static Task<Location> GetLocationInGeneratedSourceAsync(ISymbol symbol, Document generatedDocument, CancellationToken cancellationToken)
MetadataAsSource\OmniSharpMetadataAsSourceService.cs (1)
26public static Task<Document> AddSourceToAsync(Document document, Compilation symbolCompilation, ISymbol symbol, OmniSharpSyntaxFormattingOptionsWrapper formattingOptions, CancellationToken cancellationToken)
Rename\OmniSharpRenamer.cs (1)
17public static async Task<RenameResult> RenameSymbolAsync(
Structure\OmniSharpBlockStructureService.cs (1)
14public static async Task<OmniSharpBlockStructure?> GetBlockStructureAsync(Document document, OmniSharpBlockStructureOptions options, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Razor.Features (47)
AbstractRazorRequestHandler.cs (2)
18Task<TResponseType> IRequestHandler<TRequestType, TResponseType, RequestContext>.HandleRequestAsync(TRequestType request, RequestContext context, CancellationToken cancellationToken) 28protected abstract Task<TResponseType> HandleRequestAsync(TRequestType request, RazorRequestContext context, CancellationToken cancellationToken);
Cohost\AbstractRazorRequestHandler.cs (2)
18Task<TResponseType> IRequestHandler<TRequestType, TResponseType, RequestContext>.HandleRequestAsync(TRequestType request, RequestContext context, CancellationToken cancellationToken) 28protected abstract Task<TResponseType> HandleRequestAsync(TRequestType request, RazorCohostRequestContext context, CancellationToken cancellationToken);
Cohost\Handlers\CodeActions.cs (4)
18public static Task<CodeAction[]> GetCodeActionsAsync( 32public static async Task<CodeAction> ResolveCodeActionAsync(Document document, CodeAction codeAction, ResourceOperationKind[] resourceOperations, CancellationToken cancellationToken) 75public static Task<string> GetFormattedNewFileContentAsync(Document document, CancellationToken cancellationToken) 78public static Task<TextEdit[]> GetSimplifiedEditsAsync(Document document, TextEdit textEdit, CancellationToken cancellationToken)
Cohost\Handlers\Completion.cs (3)
27public static async Task<LSP.VSInternalCompletionList?> GetCompletionListAsync( 54public static Task<LSP.CompletionItem> ResolveCompletionItemAsync( 70public static Task<LSP.VSInternalInlineCompletionItem?> GetInlineCompletionItemsAsync(
Cohost\Handlers\Diagnostics.cs (1)
18public static async Task<ImmutableArray<LSP.Diagnostic>> GetDocumentDiagnosticsAsync(Document document, bool supportsVisualStudioExtensions, CancellationToken cancellationToken)
Cohost\Handlers\DocumentHighlights.cs (1)
17public static Task<DocumentHighlight[]?> GetHighlightsAsync(Document document, LinePosition linePosition, CancellationToken cancellationToken)
Cohost\Handlers\DocumentSpellCheck.cs (1)
20public static async Task<ImmutableArray<SpellCheckSpan>> GetSpellCheckSpansAsync(Document document, CancellationToken cancellationToken)
Cohost\Handlers\DocumentSymbols.cs (1)
14public static Task<SumType<DocumentSymbol[], SymbolInformation[]>> GetDocumentSymbolsAsync(
Cohost\Handlers\FindAllReferences.cs (1)
20public static async Task<SumType<VSInternalReferenceItem, Location>[]?> FindReferencesAsync(Workspace workspace, Document document, LinePosition linePosition, bool supportsVSExtensions, CancellationToken cancellationToken)
Cohost\Handlers\FoldingRanges.cs (1)
15public static Task<FoldingRange[]> GetFoldingRangesAsync(Document document, CancellationToken cancellationToken)
Cohost\Handlers\GoToDefinition.cs (1)
18public static Task<Location[]?> GetDefinitionsAsync(Workspace workspace, Document document, bool typeOnly, LinePosition linePosition, CancellationToken cancellationToken)
Cohost\Handlers\GoToImplementation.cs (1)
18public static Task<Location[]> FindImplementationsAsync(Document document, LinePosition linePosition, bool supportsVisualStudioExtensions, CancellationToken cancellationToken)
Cohost\Handlers\Hover.cs (1)
16public static Task<LSP.Hover?> GetHoverAsync(
Cohost\Handlers\InlayHints.cs (2)
21public static Task<InlayHint[]?> GetInlayHintsAsync(Document document, TextDocumentIdentifier textDocumentIdentifier, Range range, bool displayAllOverride, CancellationToken cancellationToken) 34public static Task<InlayHint> ResolveInlayHintAsync(Document document, InlayHint request, CancellationToken cancellationToken)
Cohost\Handlers\OnAutoInsert.cs (1)
20public static Task<VSInternalDocumentOnAutoInsertResponseItem?> GetOnAutoInsertResponseAsync(Document document, LinePosition linePosition, string character, FormattingOptions formattingOptions, CancellationToken cancellationToken)
Cohost\Handlers\Rename.cs (2)
15public static Task<Range?> GetRenameRangeAsync(Document document, LinePosition linePosition, CancellationToken cancellationToken) 18public static Task<WorkspaceEdit?> GetRenameEditAsync(Document document, LinePosition linePosition, string newName, CancellationToken cancellationToken)
Cohost\Handlers\SemanticTokensRange.cs (2)
16public static Task<int[]> GetSemanticTokensAsync( 22var tokens = SemanticTokensHelpers.HandleRequestHelperAsync(
Cohost\Handlers\SignatureHelp.cs (1)
16public static Task<LSP.SignatureHelp?> GetSignatureHelpAsync(Document document, LinePosition linePosition, bool supportsVisualStudioExtensions, CancellationToken cancellationToken)
Cohost\Handlers\ValidateBreakableRange.cs (1)
15public static async Task<LinePositionSpan?> GetBreakableRangeAsync(Document document, LinePositionSpan span, CancellationToken cancellationToken)
IRazorClientLanguageServerManager.cs (1)
16Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken);
IRazorDocumentExcerptService.cs (1)
13Task<RazorExcerptResult?> TryExcerptAsync(Document document, TextSpan span, RazorExcerptMode mode, RazorClassificationOptionsWrapper options, CancellationToken cancellationToken);
IRazorDynamicFileInfoProvider.cs (1)
23Task<RazorDynamicFileInfo?> GetDynamicFileInfoAsync(ProjectId projectId, string? projectFilePath, string filePath, CancellationToken cancellationToken);
IRazorMappingService.cs (2)
15Task<ImmutableArray<RazorMappedSpanResult>> MapSpansAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken); 16Task<ImmutableArray<RazorMappedEditResult>> MapTextChangesAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken);
IRazorRequestWrapper.cs (1)
12Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken);
IRazorSpanMappingService.cs (1)
15Task<ImmutableArray<RazorMappedSpanResult>> MapSpansAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken);
RazorClassifierAccessor.cs (1)
16public static async Task<IEnumerable<ClassifiedSpan>> GetClassifiedSpansAsync(Document document, TextSpan textSpan, RazorClassificationOptionsWrapper options, CancellationToken cancellationToken)
RazorClientLanguageServerManager.cs (1)
13public Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken)
RazorCSharpFormattingInteractionService.cs (2)
27public static Task<ImmutableArray<TextChange>> GetFormattingChangesAsync( 50public static async Task<ImmutableArray<TextChange>> GetFormattingChangesAsync(
RazorDocumentExcerptServiceWrapper.cs (1)
20public async Task<ExcerptResult?> TryExcerptAsync(Document document, TextSpan span, ExcerptMode mode, ClassificationOptions classificationOptions, CancellationToken cancellationToken)
RazorLspDynamicFileInfoProvider.cs (1)
13public abstract Task<RazorDynamicFileInfo?> GetDynamicFileInfoAsync(Workspace workspace, ProjectId projectId, string? projectFilePath, string filePath, CancellationToken cancellationToken);
RazorMappingServiceWrapper.cs (2)
22public async Task<ImmutableArray<(string mappedFilePath, TextChange mappedTextChange)>> GetMappedTextChangesAsync( 50public async Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(
Remote\RazorRemoteHostClient.cs (1)
26public static async Task<RazorRemoteHostClient?> TryGetClientAsync(HostWorkspaceServices services, RazorServiceDescriptorsWrapper serviceDescriptors, RazorRemoteServiceCallbackDispatcherRegistry callbackDispatchers, CancellationToken cancellationToken = default)
Testing\TestSolutionStore.cs (1)
15internal async Task<RazorPinnedSolutionInfoWrapper> AddAsync(Solution solution, CancellationToken cancellationToken)
TextDocumentExtensions.cs (1)
21public static async Task<ChecksumWrapper> GetChecksumAsync(this TextDocument document, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.ExternalAccess.Xaml (12)
External\IClientRequestManager.cs (1)
15Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken);
External\IDescriptionService.cs (1)
20Task<IEnumerable<TaggedText>> GetDescriptionAsync(ISymbol symbol, Project project, CancellationToken cancellationToken);
External\ILocationService.cs (2)
19Task<FileLinePositionSpan[]> GetSymbolLocationsAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 24Task<FileLinePositionSpan?> GetLocationAsync(TextDocument document, TextSpan textSpan, CancellationToken cancellationToken);
External\IXamlDiagnosticSource.cs (1)
13Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(
External\IXamlRequestHandler.cs (1)
12Task<TResponse> HandleRequestAsync(TRequest request, XamlRequestContext context, CancellationToken cancellationToken);
External\XamlRequestHandlerBase.cs (1)
32public Task<TResponse> HandleRequestAsync(TRequest request, RequestContext context, CancellationToken cancellationToken)
Internal\DescriptionService.cs (1)
34public async Task<IEnumerable<TaggedText>> GetDescriptionAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Internal\LocationService.cs (2)
33public async Task<FileLinePositionSpan?> GetLocationAsync(TextDocument document, TextSpan textSpan, CancellationToken cancellationToken) 45public async Task<FileLinePositionSpan[]> GetSymbolLocationsAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
Internal\OnInitializedServiceFactory.cs (1)
79public Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken)
Internal\XamlDiagnosticSource.cs (1)
25async Task<ImmutableArray<DiagnosticData>> IDiagnosticSource.GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (1261)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
47protected override Task<Solution?> GetChangedSolutionAsync(
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (2)
54private static async Task<AddConstructorParameterResult?> AddConstructorParametersFromMembersAsync( 162public async Task<ImmutableArray<IntentProcessorResult>> ComputeIntentAsync(
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.State.cs (4)
29public static async Task<State?> GenerateAsync( 44private async Task<bool> TryInitializeAsync( 77private static async Task<ImmutableArray<ConstructorCandidate>> GetConstructorCandidatesInfoAsync( 98private static async Task<bool> IsApplicableConstructorAsync(IMethodSymbol constructor, Document document, ImmutableArray<string> parameterNamesForSelectedMembers, CancellationToken cancellationToken)
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (3)
66private static async Task<(TTypeDeclarationSyntax type, CodeActionPriority priority)?> GetRelevantTypeFromHeaderAsync(CodeRefactoringContext context) 75private static async Task<(TTypeDeclarationSyntax type, CodeActionPriority priority)?> GetRelevantTypeFromMethodAsync(CodeRefactoringContext context) 113private async Task<Document> ApplyAsync(Document document, TTypeDeclarationSyntax type, INamedTypeSymbol debuggerAttributeTypeSymbol, CancellationToken cancellationToken)
AddFileBanner\AbstractAddFileBannerCodeRefactoringProvider.cs (1)
122private async Task<ImmutableArray<SyntaxTrivia>> TryGetBannerAsync(
AddFileBanner\AbstractAddFileBannerNewDocumentFormattingProvider.cs (1)
22public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
AddFileBanner\AddFileBannerHelpers.cs (1)
19public static async Task<Document> CopyBannerAsync(
AddImport\AbstractAddImportFeatureService.cs (9)
56protected abstract Task<Document> AddImportAsync(SyntaxNode contextNode, INamespaceOrTypeSymbol symbol, Document document, AddImportPlacementOptions options, CancellationToken cancellationToken); 57protected abstract Task<Document> AddImportAsync(SyntaxNode contextNode, IReadOnlyList<string> nameSpaceParts, Document document, AddImportPlacementOptions options, CancellationToken cancellationToken); 64public async Task<ImmutableArray<AddImportFixData>> GetFixesAsync( 88private async Task<ImmutableArray<AddImportFixData>> GetFixesInCurrentProcessAsync( 131private async Task<ImmutableArray<Reference>> FindResultsAsync( 169private async Task<ImmutableArray<Reference>> FindResultsAsync( 514public async Task<ImmutableArray<(Diagnostic Diagnostic, ImmutableArray<AddImportFixData> Fixes)>> GetFixesForDiagnosticsAsync( 537public async Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsync( 561private async Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsyncInCurrentProcessAsync(
AddImport\CodeActions\AddImportCodeAction.cs (1)
59protected async Task<Document> GetUpdatedDocumentAsync(CancellationToken cancellationToken)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (4)
32protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 35protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 38private async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(bool isPreview, CancellationToken cancellationToken) 80internal override Task<bool> TryApplyAsync(
AddImport\CodeActions\InstallPackageAndAddImportCodeAction.cs (4)
49protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 62private async Task<Solution> GetUpdatedSolutionAsync(CancellationToken cancellationToken) 81protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 107internal override async Task<bool> TryApplyAsync(
AddImport\CodeActions\InstallWithPackageManagerCodeAction.cs (1)
25protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(
AddImport\CodeActions\MetadataSymbolReferenceCodeAction.cs (1)
28protected override Task<CodeActionOperation?> UpdateProjectAsync(Project project, bool isPreview, CancellationToken cancellationToken)
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (2)
40protected override Task<CodeActionOperation?> UpdateProjectAsync(Project project, bool isPreview, CancellationToken cancellationToken) 71internal override Task<bool> TryApplyAsync(
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (4)
32protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 38protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 50private async Task<CodeActionOperation?> GetChangeSolutionOperationAsync(bool isPreview, CancellationToken cancellationToken) 61protected abstract Task<CodeActionOperation?> UpdateProjectAsync(Project project, bool isPreview, CancellationToken cancellationToken);
AddImport\IAddImportFeatureService.cs (3)
22Task<ImmutableArray<AddImportFixData>> GetFixesAsync( 31Task<ImmutableArray<(Diagnostic Diagnostic, ImmutableArray<AddImportFixData> Fixes)>> GetFixesForDiagnosticsAsync( 50Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsync(
AddImport\References\AssemblyReference.cs (1)
25public override async Task<AddImportFixData> TryGetFixDataAsync(
AddImport\References\PackageReference.cs (1)
28public override async Task<AddImportFixData> TryGetFixDataAsync(
AddImport\References\Reference.cs (3)
77protected async Task<(SyntaxNode, Document)> ReplaceNameNodeAsync( 100public abstract Task<AddImportFixData> TryGetFixDataAsync( 103protected async Task<ImmutableArray<TextChange>> GetTextChangesAsync(
AddImport\References\SymbolReference.cs (2)
48private async Task<ImmutableArray<TextChange>> GetTextChangesAsync( 75public sealed override async Task<AddImportFixData> TryGetFixDataAsync(
AddImport\SearchScopes\AllSymbolsProjectSearchScope.cs (1)
24protected override async Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(
AddImport\SearchScopes\MetadataSymbolsSearchScope.cs (1)
35protected override async Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(
AddImport\SearchScopes\SearchScope.cs (2)
36protected abstract Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(SymbolFilter filter, SearchQuery query, CancellationToken cancellationToken); 40public async Task<ImmutableArray<SymbolResult<ISymbol>>> FindDeclarationsAsync(
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (1)
29protected override async Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(
AddImport\SymbolReferenceFinder.cs (16)
96internal Task<ImmutableArray<SymbolReference>> FindInAllSymbolsInStartingProjectAsync(bool exact, CancellationToken cancellationToken) 99internal Task<ImmutableArray<SymbolReference>> FindInSourceSymbolsInProjectAsync(ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol>> projectToAssembly, Project project, bool exact, CancellationToken cancellationToken) 102internal Task<ImmutableArray<SymbolReference>> FindInMetadataSymbolsAsync(IAssemblySymbol assembly, Project assemblyProject, PortableExecutableReference metadataReference, bool exact, CancellationToken cancellationToken) 105private async Task<ImmutableArray<SymbolReference>> DoAsync(SearchScope searchScope, CancellationToken cancellationToken) 116using var _1 = ArrayBuilder<Task<ImmutableArray<SymbolReference>>>.GetInstance(out var tasks); 177private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingTypesAsync( 262private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingNamespacesAsync( 289private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingFieldsAndPropertiesAsync( 353private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingExtensionMethodsAsync( 412private async Task<ImmutableArray<SymbolReference>> GetReferencesForCollectionInitializerMethodsAsync( 443private async Task<ImmutableArray<SymbolReference>> GetReferencesForQueryPatternsAsync( 467private async Task<ImmutableArray<SymbolReference>> GetReferencesForGetAwaiterAsync( 492private async Task<ImmutableArray<SymbolReference>> GetReferencesForGetEnumeratorAsync( 517private async Task<ImmutableArray<SymbolReference>> GetReferencesForGetAsyncEnumeratorAsync( 542private async Task<ImmutableArray<SymbolReference>> GetReferencesForDeconstructAsync( 564private async Task<ImmutableArray<SymbolReference>> GetReferencesForExtensionMethodAsync(
AddMissingReference\AbstractAddMissingReferenceCodeFixProvider.cs (2)
43private static async Task<ImmutableArray<CodeAction>> GetAddReferencesCodeActionsAsync(CodeFixContext context, ISet<AssemblyIdentity> uniqueIdentities) 56private static async Task<ISet<AssemblyIdentity>> GetUniqueIdentitiesAsync(CodeFixContext context)
AddMissingReference\AddMissingReferenceCodeAction.cs (2)
29public static async Task<CodeAction> CreateAsync(Project project, AssemblyIdentity missingAssemblyIdentity, CancellationToken cancellationToken) 73protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(
AddPackage\AbstractAddPackageCodeFixProvider.cs (2)
28protected async Task<ImmutableArray<CodeAction>> GetAddPackagesCodeActionsAsync( 71private static async Task<ImmutableArray<PackageWithAssemblyResult>> FindMatchingPackagesAsync(
AddPackage\InstallPackageDirectlyCodeAction.cs (1)
33protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
AddPackage\InstallPackageDirectlyCodeActionOperation.cs (1)
67internal override Task<bool> TryApplyAsync(
AddPackage\InstallWithPackageManagerCodeAction.cs (1)
22protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(
BraceMatching\AbstractBraceMatcher.cs (1)
58public async Task<BraceMatchingResult?> FindBracesAsync(
BraceMatching\AbstractDirectiveTriviaBraceMatcher.cs (1)
29public async Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken)
BraceMatching\AbstractEmbeddedLanguageBraceMatcher.cs (1)
31public async Task<BraceMatchingResult?> FindBracesAsync(
BraceMatching\BraceMatchingService.cs (1)
24public async Task<BraceMatchingResult?> GetMatchingBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken)
BraceMatching\IBraceMatcher.cs (1)
29Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken);
BraceMatching\IBraceMatchingService.cs (1)
14Task<BraceMatchingResult?> GetMatchingBracesAsync(Document document, int position, BraceMatchingOptions options, CancellationToken cancellationToken);
BraceMatching\IBraceMatchingServiceExtensions.cs (1)
13public static async Task<TextSpan?> FindMatchingSpanAsync(
ChangeSignature\AbstractChangeSignatureService.cs (8)
41public abstract Task<(ISymbol? symbol, int selectedIndex)> GetInvocationSymbolAsync(Document document, int position, bool restrictToDeclarations, CancellationToken cancellationToken); 49public abstract Task<ImmutableArray<ISymbol>> DetermineCascadedSymbolsFromDelegateInvokeAsync( 94public async Task<ImmutableArray<ChangeSignatureCodeAction>> GetChangeSignatureCodeActionAsync(Document document, TextSpan span, CancellationToken cancellationToken) 103internal async Task<ChangeSignatureAnalyzedContext> GetChangeSignatureContextAsync( 190internal async Task<ChangeSignatureResult> ChangeSignatureWithContextAsync(ChangeSignatureAnalyzedContext context, ChangeSignatureOptionsResult? options, CancellationToken cancellationToken) 199async Task<ChangeSignatureResult> GetChangeSignatureResultAsync(ChangeSignatureAnalysisSucceededContext context, ChangeSignatureOptionsResult? options, CancellationToken cancellationToken) 225private static async Task<ImmutableArray<ReferencedSymbol>> FindChangeSignatureReferencesAsync( 246private async Task<(Solution updatedSolution, string? confirmationMessage)> CreateUpdatedSolutionAsync(
ChangeSignature\ChangeSignatureCodeAction.cs (1)
30protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
ChangeSignature\ChangeSignatureCodeActionOperation.cs (1)
30internal sealed override Task<bool> TryApplyAsync(
ClassifiedSpansAndHighlightSpanFactory.cs (4)
18public static async Task<ClassifiedSpansAndHighlightSpan> ClassifyAsync( 31private static async Task<ClassifiedSpansAndHighlightSpan> ClassifyAsync( 56private static async Task<ClassifiedSpansAndHighlightSpan> GetTaggedTextForDocumentRegionAsync( 68private static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
CodeFixes\Configuration\ConfigurationUpdater.cs (8)
107public static Task<Solution> ConfigureSeverityAsync( 126public static Task<Solution> ConfigureSeverityAsync( 157public static Task<Solution> BulkConfigureSeverityAsync( 172public static Task<Solution> BulkConfigureSeverityAsync( 180private static Task<Solution> BulkConfigureSeverityCoreAsync( 197public static Task<Solution> ConfigureCodeStyleOptionAsync( 209private static async Task<Solution> ConfigureCodeStyleOptionsAsync( 261private async Task<Solution> ConfigureAsync(CancellationToken cancellationToken)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (2)
55public Task<ImmutableArray<CodeFix>> GetFixesAsync(TextDocument document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 58public Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.cs (2)
47public Task<ImmutableArray<CodeFix>> GetFixesAsync(TextDocument document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 50public Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
19Task<Solution> GetFixAsync( 34Task<Solution> GetFixAsync(
CodeFixes\Service\CodeFixService.cs (11)
98public async Task<CodeFixCollection?> GetMostSevereFixAsync( 143var errorFixTask = GetFirstFixAsync(spanToErrorDiagnostics, cancellationToken); 144var otherFixTask = GetFirstFixAsync(spanToOtherDiagnostics, linkedToken); 154async Task<CodeFixCollection?> GetFirstFixAsync( 251private static async Task<ImmutableArray<DiagnosticData>> GetCopilotDiagnosticsAsync( 287public Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync( 291public async Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync( 338public async Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>( 629private static async Task<ImmutableArray<CodeFix>> GetCodeFixesAsync( 744private async Task<CodeFixCollection?> TryGetFixesOrConfigurationsAsync<TCodeFixProvider>( 751Func<ImmutableArray<Diagnostic>, Task<ImmutableArray<CodeFix>>> getFixes,
CodeFixes\Service\CodeFixService.FixAllDiagnosticProvider.cs (4)
44public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 53public override async Task<IEnumerable<Diagnostic>> GetDocumentSpanDiagnosticsAsync(Document document, TextSpan fixAllSpan, CancellationToken cancellationToken) 66public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 75public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
CodeFixes\Service\CodeFixService.FixAllPredefinedDiagnosticProvider.cs (3)
22public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 25public override Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 28public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
CodeFixes\Service\ICodeFixService.cs (5)
25Task<CodeFixCollection?> GetMostSevereFixAsync(TextDocument document, TextSpan range, ICodeActionRequestPriorityProvider priorityProvider, CancellationToken cancellationToken); 27Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync(TextDocument document, TextSpan textSpan, string diagnosticId, DiagnosticSeverity severity, CancellationToken cancellationToken); 28Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>(TDocument document, string diagnosticId, DiagnosticSeverity severity, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 38public static Task<ImmutableArray<CodeFixCollection>> GetFixesAsync(this ICodeFixService service, TextDocument document, TextSpan range, CancellationToken cancellationToken) 41public static Task<ImmutableArray<CodeFixCollection>> GetFixesAsync(this ICodeFixService service, TextDocument document, TextSpan textSpan, ICodeActionRequestPriorityProvider priorityProvider, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionBatchFixAllProvider.cs (8)
30public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 44private async Task<CodeAction?> GetFixAsync( 74private async Task<ImmutableArray<(Diagnostic diagnostic, CodeAction action)>> GetDiagnosticsAndCodeActionsAsync( 134private async Task<CodeAction?> GetFixAsync( 207public virtual async Task<CodeAction?> TryGetMergedFixAsync( 225private static async Task<Solution> TryMergeFixesAsync( 248private static async Task<IReadOnlyDictionary<DocumentId, ConcurrentBag<(CodeAction, Document)>>> GetDocumentIdToChangedDocumentsAsync( 270private static async Task<ImmutableArray<(DocumentId documentId, SourceText newText)>> GetDocumentIdToFinalTextAsync(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (3)
33protected sealed override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 45protected abstract Task<Document> GetChangedSuppressionDocumentAsync(CancellationToken cancellationToken); 66protected async Task<Document> GetOrCreateSuppressionsDocumentAsync(CancellationToken c)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (6)
140public Task<ImmutableArray<CodeFix>> GetFixesAsync( 149internal async Task<ImmutableArray<PragmaWarningCodeAction>> GetPragmaSuppressionsAsync(Document document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 155private async Task<ImmutableArray<CodeFix>> GetSuppressionsAsync( 168public async Task<ImmutableArray<CodeFix>> GetFixesAsync( 184private async Task<ImmutableArray<CodeFix>> GetSuppressionsAsync( 262private async Task<SuppressionTargetInfo> GetSuppressionTargetInfoAsync(Document document, TextSpan span, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.FixAllProvider.cs (1)
26public override async Task<CodeAction> GetFixAsync(FixAllContext fixAllContext)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs (1)
23protected override async Task<Document> GetChangedSuppressionDocumentAsync(CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (7)
57Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 60protected override Task<Document> PostProcessChangesAsync(Document document, CancellationToken cancellationToken) 67private static async Task<Solution> CreateChangedSolutionAsync( 96private static async Task<Solution> CreateChangedSolutionAsync( 128protected override async Task<Document> GetChangedSuppressionDocumentAsync(CancellationToken cancellationToken) 152private static async Task<IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>> CreateDiagnosticsBySymbolAsync(AbstractSuppressionCodeFixProvider fixer, IEnumerable<KeyValuePair<Document, ImmutableArray<Diagnostic>>> diagnosticsByDocument, CancellationToken cancellationToken) 173private static async Task<IEnumerable<KeyValuePair<ISymbol, ImmutableArray<Diagnostic>>>> CreateDiagnosticsBySymbolAsync(Project project, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.IPragmaBasedCodeAction.cs (1)
17Task<Document> GetChangedDocumentAsync(bool includeStartTokenChange, bool includeEndTokenChange, CancellationToken cancellationToken);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.LocalSuppressMessageCodeAction.cs (1)
28protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (2)
41private static async Task<Document> BatchPragmaFixesAsync( 119private static async Task<IEnumerable<TextChange>> GetTextChangesAsync(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (1)
24internal static async Task<Document> GetChangeDocumentWithPragmaAdjustedAsync(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningCodeAction.cs (2)
57protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 60public async Task<Document> GetChangedDocumentAsync(bool includeStartTokenChange, bool includeEndTokenChange, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.BatchFixer.cs (2)
105public override async Task<CodeAction> TryGetMergedFixAsync( 159private static async Task<ImmutableArray<SyntaxNode>> GetAttributeNodesToFixAsync(ImmutableArray<AttributeRemoveAction> attributeRemoveFixes, CancellationToken cancellationToken)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction.cs (1)
23public static async Task<RemoveSuppressionCodeAction> CreateAsync(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Attribute.cs (2)
52public async Task<SyntaxNode> GetAttributeToRemoveAsync(CancellationToken cancellationToken) 60protected override async Task<Solution> GetChangedSolutionAsync(
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (3)
64protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 67public async Task<Document> GetChangedDocumentAsync(bool includeStartTokenChange, bool includeEndTokenChange, CancellationToken cancellationToken) 201private async Task<bool> IsDiagnosticSuppressedBeforeLeadingPragmaAsync(int indexOfPragma, CancellationToken cancellationToken)
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (2)
54protected sealed override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 68protected sealed override Task<Solution?> GetChangedSolutionAsync(
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (4)
25public async Task<Solution?> GetFixAllChangedSolutionAsync(IFixAllContext fixAllContext) 37public async Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync( 50protected async Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync( 156private static async Task<CodeAction?> GetFixAllCodeActionAsync(IFixAllContext fixAllContext)
CodeFixesAndRefactorings\IFixAllGetFixesService.cs (2)
19Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync(IFixAllContext fixAllContext, bool showPreviewChangesDialog); 24Task<Solution?> GetFixAllChangedSolutionAsync(IFixAllContext fixAllContext);
CodeLens\CodeLensReferencesService.cs (9)
42private static async Task<T?> FindAsync<T>(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, 43Func<CodeLensFindReferencesProgress, Task<T>> onResults, Func<CodeLensFindReferencesProgress, Task<T>> onCapped, 89public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, int maxSearchResults, CancellationToken cancellationToken) 101private static async Task<ReferenceLocationDescriptor> GetDescriptorOfEnclosingSymbolAsync(Solution solution, Location location, CancellationToken cancellationToken) 202public async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 245private static async Task<ReferenceMethodDescriptor> TryGetMethodDescriptorAsync(Location commonLocation, Solution solution, CancellationToken cancellationToken) 259public Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 275public async Task<string> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
CodeLens\ICodeLensMemberFinder.cs (1)
18Task<ImmutableArray<CodeLensMember>> GetCodeLensMembersAsync(Document document, CancellationToken cancellationToken);
CodeLens\ICodeLensReferencesService.cs (4)
23Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, CancellationToken cancellationToken); 28Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken); 33Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken); 38Task<string?> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken);
CodeRefactorings\AddAwait\AbstractAddAwaitCodeRefactoringProvider.cs (1)
108private static Task<Document> AddAwaitAsync(
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (4)
34public async Task<ImmutableArray<AddImportFixData>> AnalyzeAsync( 70public async Task<Document> AddMissingImportsAsync( 137private async Task<Document> CleanUpNewLinesAsync(Document document, IEnumerable<TextSpan> insertSpans, SyntaxFormattingOptions formattingOptions, CancellationToken cancellationToken) 150private async Task<Document> CleanUpNewLinesAsync(Document document, TextSpan insertSpan, SyntaxFormattingOptions options, CancellationToken cancellationToken)
CodeRefactorings\AddMissingImports\IAddMissingImportsFeatureService.cs (3)
20Task<ImmutableArray<AddImportFixData>> AnalyzeAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken); 26Task<Document> AddMissingImportsAsync(Document document, ImmutableArray<AddImportFixData> analysisResult, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken); 35public static async Task<Document> AddMissingImportsAsync(
CodeRefactorings\CodeRefactoringService.cs (3)
121public async Task<bool> HasRefactoringsAsync( 180public async Task<ImmutableArray<CodeRefactoring>> GetRefactoringsAsync( 237private Task<CodeRefactoring?> GetRefactoringFromProviderAsync(
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (4)
53private static async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync( 69private static async Task<CodeAction> ExtractMethodAsync( 94private static async Task<CodeAction> ExtractLocalFunctionAsync( 126private static async Task<Document> AddRenameAnnotationAsync(Document document, SyntaxToken? invocationNameToken, CancellationToken cancellationToken)
CodeRefactorings\ICodeRefactoringService.cs (3)
15Task<bool> HasRefactoringsAsync(TextDocument document, TextSpan textSpan, CancellationToken cancellationToken); 17Task<ImmutableArray<CodeRefactoring>> GetRefactoringsAsync(TextDocument document, TextSpan textSpan, CodeActionRequestPriority? priority, CancellationToken cancellationToken); 22public static Task<ImmutableArray<CodeRefactoring>> GetRefactoringsAsync(this ICodeRefactoringService service, TextDocument document, TextSpan state, CancellationToken cancellationToken)
CodeRefactorings\MoveType\AbstractMoveTypeService.cs (6)
29public abstract Task<Solution> GetModifiedSolutionAsync(Document document, TextSpan textSpan, MoveTypeOperationKind operationKind, CancellationToken cancellationToken); 30public abstract Task<ImmutableArray<CodeAction>> GetRefactoringAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken); 41protected abstract Task<TTypeDeclarationSyntax?> GetRelevantNodeAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken); 48public override async Task<ImmutableArray<CodeAction>> GetRefactoringAsync( 56public override async Task<Solution> GetModifiedSolutionAsync(Document document, TextSpan textSpan, MoveTypeOperationKind operationKind, CancellationToken cancellationToken) 70private async Task<TTypeDeclarationSyntax?> GetTypeDeclarationAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken)
CodeRefactorings\MoveType\AbstractMoveTypeService.Editor.cs (2)
34public virtual async Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync() 43public abstract Task<Solution?> GetModifiedSolutionAsync();
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeCodeAction.cs (1)
50protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (5)
47public override async Task<Solution?> GetModifiedSolutionAsync() 78private async Task<Solution> RemoveUnnecessaryImportsAsync( 114private async Task<Document> AddNewDocumentWithSingleTypeDeclarationAsync(DocumentId newDocumentId) 202private async Task<SyntaxNode> AddFinalNewLineIfDesiredAsync(Document document, SyntaxNode modifiedRoot) 231private async Task<Solution> RemoveTypeFromSourceDocumentAsync(Document sourceDocument)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeNamespaceScopeEditor.cs (2)
30public override async Task<Solution?> GetModifiedSolutionAsync() 37private async Task<Solution?> GetNamespaceScopeChangedSolutionAsync(
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameFileEditor.cs (2)
24public override async Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync() 31public override Task<Solution?> GetModifiedSolutionAsync()
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameTypeEditor.cs (1)
24public override async Task<Solution?> GetModifiedSolutionAsync()
CodeRefactorings\MoveType\IMoveTypeService.cs (2)
16Task<ImmutableArray<CodeAction>> GetRefactoringAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken); 18Task<Solution> GetModifiedSolutionAsync(Document document, TextSpan textSpan, MoveTypeOperationKind operationKind, CancellationToken cancellationToken);
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (24)
39public abstract Task<bool> CanChangeNamespaceAsync(Document document, SyntaxNode container, CancellationToken cancellationToken); 41public abstract Task<Solution> ChangeNamespaceAsync(Document document, SyntaxNode container, string targetNamespace, CancellationToken cancellationToken); 43public abstract Task<Solution?> TryChangeTopLevelNamespacesAsync(Document document, string targetNamespace, CancellationToken cancellationToken); 93protected abstract Task<SyntaxNode?> TryGetApplicableContainerFromSpanAsync(Document document, TextSpan span, CancellationToken cancellationToken); 106protected abstract Task<ImmutableArray<(DocumentId id, SyntaxNode container)>> GetValidContainersFromAllLinkedDocumentsAsync(Document document, SyntaxNode container, CancellationToken cancellationToken); 114public override async Task<bool> CanChangeNamespaceAsync(Document document, SyntaxNode container, CancellationToken cancellationToken) 125public override async Task<Solution?> TryChangeTopLevelNamespacesAsync( 170static async Task<ImmutableArray<SyntaxNode>> GetTopLevelNamespacesAsync(Document document, CancellationToken cancellationToken) 181public override async Task<Solution> ChangeNamespaceAsync( 268protected async Task<ImmutableArray<(DocumentId, SyntaxNode)>> TryGetApplicableContainersFromAllDocumentsAsync( 311protected static async Task<Solution> AnnotateContainersAsync(Solution solution, ImmutableArray<(DocumentId, SyntaxNode)> containers, CancellationToken cancellationToken) 323protected async Task<bool> ContainsPartialTypeWithMultipleDeclarationsAsync( 366private async Task<ImmutableArray<ISymbol>> GetDeclaredSymbolsInContainerAsync( 427private async Task<(Solution, ImmutableArray<DocumentId>)> ChangeNamespaceInSingleDocumentAsync( 506private static async Task<ImmutableArray<LocationForAffectedSymbol>> FindReferenceLocationsForSymbolAsync( 540private static async Task<ImmutableArray<ReferencedSymbol>> FindReferencesAsync(ISymbol symbol, Document document, CancellationToken cancellationToken) 551private async Task<Document> FixDeclarationDocumentAsync( 672private static async Task<Document> FixReferencingDocumentAsync( 707private static async Task<Document> SimplifyTypeNamesAsync( 729private static async Task<(Document, ImmutableArray<SyntaxNode>)> FixReferencesAsync( 800private static async Task<Solution> RemoveUnnecessaryImportsAsync( 834async static Task<Document> RemoveUnnecessaryImportsWorkerAsync( 854private static async Task<Document> AddImportsInContainersAsync( 890private static async Task<Solution> MergeDiffAsync(Solution oldSolution, Solution newSolution, CancellationToken cancellationToken)
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.cs (1)
30protected abstract Task<SyntaxNode?> TryGetApplicableInvocationNodeAsync(Document document, TextSpan span, CancellationToken cancellationToken);
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
36protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.State.cs (1)
66public static async Task<State?> CreateAsync(
Completion\CommonCompletionProvider.cs (7)
56public sealed override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 64internal override async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 75private async Task<ImmutableArray<TaggedText>> TryAddSnippetInvocationPartAsync( 102internal virtual Task<CompletionDescription> GetDescriptionWorkerAsync( 110public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 117public virtual Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken) 120protected virtual Task<TextChange?> GetTextChangeAsync(CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\CommonCompletionUtilities.cs (2)
85public static async Task<CompletionDescription> CreateDescriptionAsync( 150public static Task<CompletionDescription> CreateDescriptionAsync(
Completion\CompletionContext.cs (1)
217internal Task<SyntaxContext> GetSyntaxContextWithExistingSpeculativeModelAsync(Document document, CancellationToken cancellationToken)
Completion\CompletionProvider.cs (4)
57internal virtual async Task<bool> IsSyntacticTriggerCharacterAsync(Document document, int caretPosition, CompletionTrigger trigger, CompletionOptions options, CancellationToken cancellationToken) 63public virtual Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 66internal virtual Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 78public virtual Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\CompletionService.cs (4)
191public Task<CompletionDescription?> GetDescriptionAsync( 209internal virtual async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default) 238public virtual async Task<CompletionChange> GetChangeAsync( 409public async Task<CompletionContext> GetContextAsync(
Completion\CompletionService_GetCompletions.cs (5)
37public Task<CompletionList> GetCompletionsAsync( 62internal virtual async Task<CompletionList> GetCompletionsAsync( 152static async Task<ImmutableArray<CompletionProvider>> GetAugmentingProvidersAsync( 231private static async Task<ImmutableArray<CompletionContext>> ComputeNonEmptyCompletionContextsAsync( 319private static async Task<CompletionContext> GetContextAsync(
Completion\FileSystemCompletionHelper.cs (1)
118public Task<ImmutableArray<CompletionItem>> GetItemsAsync(string directoryPath, CancellationToken cancellationToken)
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (2)
106public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 109internal override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractAwaitCompletionProvider.cs (1)
163public sealed override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\Providers\AbstractCrefCompletionProvider.cs (2)
16internal override async Task<CompletionDescription> GetDescriptionWorkerAsync( 45protected abstract Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync(
Completion\Providers\AbstractDocCommentCompletionProvider.cs (2)
91protected abstract Task<IEnumerable<CompletionItem>?> GetItemsWorkerAsync(Document document, int position, CompletionTrigger trigger, CancellationToken cancellationToken); 274public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitChar = null, CancellationToken cancellationToken = default)
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (6)
119private static async Task<bool> CheckTypeInfoOfAttributeAsync(Document document, SyntaxNode attributeNode, CancellationToken cancellationToken) 174private async Task<IImmutableSet<string>> GetAllInternalsVisibleToAssemblyNamesOfProjectAsync(CompletionContext completionContext, CancellationToken cancellationToken) 227private async Task<string> GetAssemblyNameFromInternalsVisibleToAttributeAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 248private static async Task<TextSpan> GetTextChangeSpanAsync(Document document, TextSpan startSpan, CancellationToken cancellationToken) 268public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 284private static async Task<string> GetPublicKeyOfProjectAsync(Project project, CancellationToken cancellationToken)
Completion\Providers\AbstractKeywordCompletionProvider.cs (3)
43private async Task<ImmutableArray<CompletionItem>> RecommendCompletionItemsAsync(Document document, CompletionContext context, CancellationToken cancellationToken) 51private async Task<ImmutableArray<RecommendedKeyword>> RecommendKeywordsAsync( 73public sealed override Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem item, char? ch, CancellationToken cancellationToken)
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (6)
39protected abstract Task<ISymbol> GenerateMemberAsync( 48public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 60private async Task<(Document, TextSpan? caretPosition)> DetermineNewDocumentAsync( 118private async Task<Document?> GenerateMemberAndUsingsAsync( 171private async Task<(Document Document, TextSpan? Selection)> RemoveDestinationNodeAsync( 256internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\AbstractObjectCreationCompletionProvider.cs (1)
47protected override Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync(
Completion\Providers\AbstractObjectInitializerCompletionProvider.cs (2)
84internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 87protected abstract Task<bool> IsExclusiveAsync(Document document, int position, CancellationToken cancellationToken);
Completion\Providers\AbstractOverrideCompletionProvider.BaseItemGetter.cs (1)
54public abstract Task<ImmutableArray<CompletionItem>> GetItemsAsync();
Completion\Providers\AbstractOverrideCompletionProvider.cs (1)
33protected override Task<ISymbol> GenerateMemberAsync(
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (2)
33public static async Task<ItemGetter> CreateAsync( 46public override async Task<ImmutableArray<CompletionItem>> GetItemsAsync()
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (2)
62protected override async Task<ISymbol> GenerateMemberAsync( 82protected async Task<IEnumerable<CompletionItem>?> CreatePartialItemsAsync(
Completion\Providers\AbstractPartialTypeCompletionProvider.cs (2)
110internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 113public override Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (7)
22protected abstract Task<bool> ShouldPreselectInferredTypesAsync(CompletionContext? completionContext, int position, CompletionOptions options, CancellationToken cancellationToken); 23protected abstract Task<bool> ShouldProvideAvailableSymbolsInCurrentContextAsync(CompletionContext? completionContext, TSyntaxContext context, int position, CompletionOptions options, CancellationToken cancellationToken); 32protected sealed override async Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync( 199internal sealed override async Task<CompletionDescription> GetDescriptionWorkerAsync( 227async Task<CompletionDescription?> TryGetDescriptionAsync(DocumentId documentId) 263protected sealed override async Task<bool> IsSemanticTriggerCharacterAsync(Document document, int characterPosition, CancellationToken cancellationToken) 269protected async Task<bool?> IsTriggerOnDotAsync(Document document, int characterPosition, CancellationToken cancellationToken)
Completion\Providers\AbstractSuggestionModeCompletionProvider.cs (1)
14protected abstract Task<CompletionItem?> GetSuggestionModeItemAsync(Document document, int position, TextSpan span, CompletionTrigger triggerInfo, CancellationToken cancellationToken);
Completion\Providers\AbstractSymbolCompletionProvider.cs (7)
30protected abstract Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync( 298internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 338private async Task<ImmutableArray<CompletionItem>> GetItemsAsync( 381protected virtual Task<bool> IsSemanticTriggerCharacterAsync(Document document, int characterPosition, CancellationToken cancellationToken) 409private async Task<ImmutableArray<(DocumentId documentId, TSyntaxContext syntaxContext, ImmutableArray<SymbolAndSelectionInfo> symbols)>> GetPerContextSymbolsAsync( 437protected async Task<ImmutableArray<SymbolAndSelectionInfo>> TryGetSymbolsForContextAsync( 468public sealed override Task<TextChange?> GetTextChangeAsync(Document document, CompletionItem selectedItem, char? ch, CancellationToken cancellationToken)
Completion\Providers\EmbeddedLanguageCompletionProvider.cs (2)
24public abstract Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken); 25public abstract Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken);
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (5)
25protected abstract Task<bool> ShouldProvideParenthesisCompletionAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken); 115public override async Task<CompletionChange> GetChangeAsync( 170async Task<bool> ShouldCompleteWithFullyQualifyTypeNameAsync() 203private async Task<bool> IsInImportsDirectiveAsync(Document document, int position, CancellationToken cancellationToken) 219internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (3)
50public async Task<(ImmutableArray<ImmutableArray<CompletionItem>>, bool)> GetAllTopLevelTypesAsync( 85private async Task<(ImmutableArray<TypeImportCompletionCacheEntry> results, bool isPartial)> GetCacheEntriesAsync(Project currentProject, Compilation originCompilation, bool forceCacheCreation, CancellationToken cancellationToken) 179private async Task<TypeImportCompletionCacheEntry> GetUpToDateCacheForProjectAsync(Project project, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (3)
57public static async Task<ImmutableArray<SerializableImportCompletionItem>> GetUnimportedExtensionMethodsAsync( 95public static async Task<ImmutableArray<SerializableImportCompletionItem>> GetUnimportedExtensionMethodsInCurrentProcessAsync( 234private static async Task<ExtensionMethodImportCompletionCacheEntry> GetUpToDateCacheEntryAsync(
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (2)
80public async Task<ImmutableArray<IMethodSymbol>> GetExtensionMethodSymbolsAsync(bool forceCacheCreation, bool hideAdvancedMembers, CancellationToken cancellationToken) 193var cachedInfoTask = SymbolTreeInfo.TryGetCachedInfoForMetadataReferenceIgnoreChecksumAsync(peReference, cancellationToken);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
137public static async Task<CompletionDescription> GetCompletionDescriptionAsync(Document document, CompletionItem item, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\ImportCompletionProviderHelpers.cs (1)
21public static async Task<ImmutableArray<TextChange>> GetAddImportTextChangesAsync(
Completion\Providers\ImportCompletionProvider\ITypeImportCompletionService.cs (1)
24Task<(ImmutableArray<ImmutableArray<CompletionItem>>, bool)> GetAllTopLevelTypesAsync(
Completion\Providers\MemberInsertingCompletionItem.cs (1)
38public static Task<CompletionDescription> GetDescriptionAsync(CompletionItem item, Document document, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Completion\Providers\Scripting\GlobalAssemblyCacheCompletionHelper.cs (1)
29public Task<ImmutableArray<CompletionItem>> GetItemsAsync(string directoryPath, CancellationToken cancellationToken)
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (3)
22public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 102internal override async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 120private static async Task<(Document, int)> GetDocumentWithoutInvokingTextAsync(Document document, int position, CancellationToken cancellationToken)
Completion\Providers\SymbolCompletionItem.cs (4)
132public static async Task<ImmutableArray<ISymbol>> GetSymbolsAsync(CompletionItem item, Document document, CancellationToken cancellationToken) 184public static async Task<CompletionDescription> GetDescriptionAsync( 191public static async Task<CompletionDescription> GetDescriptionForSymbolsAsync( 389public static async Task<CompletionDescription> GetDescriptionAsync(
Completion\SharedSyntaxContextsWithSpeculativeModel.cs (1)
31public Task<SyntaxContext> GetSyntaxContextAsync(Document document, CancellationToken cancellationToken)
Completion\Utilities.cs (1)
52public static async Task<SyntaxContext> CreateSyntaxContextWithExistingSpeculativeModelAsync(Document document, int position, CancellationToken cancellationToken)
ConvertAnonymousType\AbstractConvertAnonymousTypeCodeRefactoringProvider.cs (1)
17protected static async Task<(TAnonymousObjectCreationExpressionSyntax?, INamedTypeSymbol?)> TryGetAnonymousObjectAsync(
ConvertAnonymousType\AbstractConvertAnonymousTypeToClassCodeRefactoringProvider.cs (2)
79private async Task<Document> ConvertAsync(Document document, TextSpan span, bool isRecord, CancellationToken cancellationToken) 242private static async Task<INamedTypeSymbol> GenerateFinalNamedTypeAsync(
ConvertAnonymousType\AbstractConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
97private async Task<Document> FixInCurrentMemberAsync(
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (4)
25protected abstract Task<string> GetFieldNameAsync(Document document, IPropertySymbol propertySymbol, CancellationToken cancellationToken); 32protected abstract Task<Document> ExpandToFieldPropertyAsync(Document document, TPropertyDeclarationNode property, CancellationToken cancellationToken); 76private static async Task<TPropertyDeclarationNode?> GetPropertyAsync(CodeRefactoringContext context) 85private async Task<Document> ExpandToFullPropertyAsync(
ConvertCast\AbstractConvertCastCodeRefactoringProvider.cs (1)
68private async Task<Document> ConvertAsync(
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
413private async Task<Document> ConvertForeachToForAsync(
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (1)
309private async Task<Document> ConvertForToForEachAsync(
ConvertIfToSwitch\AbstractConvertIfToSwitchCodeRefactoringProvider.Rewriting.cs (1)
28private async Task<Document> UpdateDocumentAsync(
ConvertLinq\AbstractConvertLinqQueryToForEachProvider.cs (1)
29protected abstract Task<TQueryExpression> FindNodeToRefactorAsync(CodeRefactoringContext context);
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (1)
145private Task<Document> ApplyConversionAsync(
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (1)
121static Task<Document> ReplaceTokenAsync(Document document, SyntaxNode root, SyntaxToken numericToken, long value, string text, string suffix)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (2)
117private async Task<Document> UpdateDocumentAsync( 127protected async Task<SyntaxNode> CreateInterpolatedStringAsync(
ConvertToInterpolatedString\AbstractConvertPlaceholderToInterpolatedStringRefactoringProvider.cs (2)
142async Task<(TInvocationExpressionSyntax? invocation, TArgumentSyntax? placeholderArgument)> TryFindInvocationAsync() 296private static async Task<Document> CreateInterpolatedStringAsync(
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
106private static Task<Document> UpdateDocumentAsync(Document document, SyntaxNode root, SyntaxToken token)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (13)
182private static async Task<(SyntaxNode, INamedTypeSymbol)> TryGetTupleInfoAsync( 215public async Task<Solution> ConvertToStructAsync( 248private static async Task<Solution> AddRenameTokenAsync( 261private async Task<Solution> ConvertToStructInCurrentProcessAsync( 417private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateAsync( 434private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateForDependentProjectAsync( 476private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateForContainingProjectAsync( 516private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateForContainingTypeAsync( 582private static async Task<Solution> ApplyChangesAsync( 612private async Task<bool> ReplaceTupleExpressionsAndTypesInDocumentAsync( 632private async Task<bool> ReplaceMatchingTupleExpressionsAsync( 746private static async Task<bool> ReplaceMatchingTupleTypesAsync( 797private static async Task<INamedTypeSymbol> GenerateFinalNamedTypeAsync(
ConvertTupleToStruct\IConvertTupleToStructCodeRefactoringProvider.cs (1)
14Task<Solution> ConvertToStructAsync(
Copilot\Extensions.cs (1)
16public static async Task<ImmutableArray<DiagnosticData>> GetCachedCopilotDiagnosticsAsync(this TextDocument document, TextSpan? span, CancellationToken cancellationToken)
Copilot\ICopilotChangeAnalysisService.cs (7)
37Task<CopilotChangeAnalysis> AnalyzeChangeAsync( 51public async Task<CopilotChangeAnalysis> AnalyzeChangeAsync( 80private async Task<CopilotChangeAnalysis> AnalyzeChangeInCurrentProcessAsync( 173private static Task<ImmutableArray<CopilotDiagnosticAnalysis>> ComputeAllDiagnosticAnalysesAsync( 213static Task<ImmutableArray<DiagnosticData>> ComputeDiagnosticsAsync( 244private async Task<CopilotCodeFixAnalysis> ComputeCodeFixAnalysisAsync( 349Task<ImmutableArray<CodeFixCollection>> ComputeCodeFixCollectionsAsync()
Copilot\ICopilotCodeAnalysisService.cs (9)
26Task<bool> IsAvailableAsync(CancellationToken cancellationToken); 36Task<ImmutableArray<string>> GetAvailablePromptTitlesAsync(Document document, CancellationToken cancellationToken); 57Task<ImmutableArray<Diagnostic>> GetCachedDocumentDiagnosticsAsync(Document document, TextSpan? span, ImmutableArray<string> promptTitles, CancellationToken cancellationToken); 72Task<string> GetOnTheFlyDocsPromptAsync(OnTheFlyDocsInfo onTheFlyDocsInfo, CancellationToken cancellationToken); 78Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseAsync(string prompt, CancellationToken cancellationToken); 83Task<bool> IsFileExcludedAsync(string filePath, CancellationToken cancellationToken); 89Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken); 94Task<bool> IsImplementNotImplementedExceptionsAvailableAsync(CancellationToken cancellationToken); 100Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsAsync(
Copilot\ICopilotOptionsService.cs (5)
21Task<bool> IsRefineOptionEnabledAsync(); 26Task<bool> IsCodeAnalysisOptionEnabledAsync(); 31Task<bool> IsOnTheFlyDocsOptionEnabledAsync(); 36Task<bool> IsGenerateDocumentationCommentOptionEnabledAsync(); 41Task<bool> IsImplementNotImplementedExceptionEnabledAsync();
Debugging\AbstractBreakpointResolver.cs (3)
89public async Task<IEnumerable<BreakpointResolutionResult>> DoAsync(CancellationToken cancellationToken) 122private async Task<IEnumerable<ISymbol>> FindMembersAsync( 224private async Task<IEnumerable<INamedTypeSymbol>> GetAllTypesAsync(CancellationToken cancellationToken)
Debugging\IBreakpointResolutionService.cs (2)
15Task<BreakpointResolutionResult?> ResolveBreakpointAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken = default); 17Task<IEnumerable<BreakpointResolutionResult>> ResolveBreakpointsAsync(Solution solution, string name, CancellationToken cancellationToken = default);
Debugging\ILanguageDebugInfoService.cs (2)
13Task<DebugLocationInfo> GetLocationInfoAsync(Document document, int position, CancellationToken cancellationToken); 22Task<DebugDataTipInfo> GetDataTipInfoAsync(Document document, int position, bool includeKind, CancellationToken cancellationToken);
Debugging\IProximityExpressionsService.cs (2)
14Task<IList<string>> GetProximityExpressionsAsync(Document document, int position, CancellationToken cancellationToken); 15Task<bool> IsValidAsync(Document document, int position, string expressionValue, CancellationToken cancellationToken);
DecompiledSource\IDecompiledSourceService.cs (1)
27Task<Document?> AddSourceToAsync(Document document, Compilation symbolCompilation, ISymbol symbol, MetadataReference? metadataReference, string? assemblyLocation, SyntaxFormattingOptions? formattingOptions, CancellationToken cancellationToken);
DesignerAttribute\DesignerAttributeDiscoveryService.cs (5)
80static async Task<bool> HasDesignerCategoryTypeAsync( 103static async Task<bool> ComputeHasDesignerCategoryTypeAsync( 220private async Task<ImmutableArray<(DesignerAttributeData data, VersionStamp version)>> ComputeChangedDataAsync( 266async Task<DesignerAttributeData> ComputeDesignerAttributeDataAsync( 284public static async Task<string?> ComputeDesignerAttributeCategoryAsync(
Diagnostics\IDiagnosticAnalyzerService.cs (6)
30Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken); 53Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken); 70Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync(Project project, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken); 80Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 96public static Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(this IDiagnosticAnalyzerService service, 113public static Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(this IDiagnosticAnalyzerService service,
Diagnostics\Service\DiagnosticAnalyzerService.cs (6)
80public static Task<VersionStamp> GetDiagnosticVersionAsync(Project project, CancellationToken cancellationToken) 101public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 117public Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 120public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync( 126public Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync( 139public Task<ImmutableArray<DiagnosticAnalyzer>> GetAnalyzersAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Service\DocumentAnalysisExecutor.cs (7)
71public async Task<IEnumerable<DiagnosticData>> ComputeDiagnosticsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 152private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetAnalysisResultAsync(DocumentAnalysisScope analysisScope, CancellationToken cancellationToken) 169private async Task<ImmutableArray<DiagnosticData>> GetCompilerAnalyzerDiagnosticsAsync(DiagnosticAnalyzer analyzer, TextSpan? span, CancellationToken cancellationToken) 188private async Task<ImmutableArray<DiagnosticData>> GetSyntaxDiagnosticsAsync(DiagnosticAnalyzer analyzer, bool isCompilerAnalyzer, CancellationToken cancellationToken) 223private async Task<ImmutableArray<DiagnosticData>> GetSemanticDiagnosticsAsync(DiagnosticAnalyzer analyzer, bool isCompilerAnalyzer, CancellationToken cancellationToken) 258async Task<TextSpan?> GetAdjustedSpanForCompilerAnalyzerAsync() 347private static async Task<ImmutableArray<DiagnosticData>> RemapDiagnosticLocationsIfRequiredAsync(
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
80public static async Task<ImmutableArray<Diagnostic>> ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.CompilationManager.cs (1)
28private static async Task<CompilationWithAnalyzersPair?> GetOrCreateCompilationWithAnalyzersAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
48public Task<ImmutableArray<DiagnosticAnalyzer>> GetAnalyzersForTestingPurposesOnlyAsync(Project project, CancellationToken cancellationToken)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.Executor.cs (4)
28private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticAnalysisResultsAsync( 53async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync( 88async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticsForAnalyzersAsync( 118async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> MergeProjectDiagnosticAnalyzerDiagnosticsAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (2)
48public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDiagnosticsAsync( 184private async Task<(SyntaxNode changedMember, int changedMemberId, ImmutableArray<TextSpan> memberSpans, Document lastDocument)?> TryGetChangedMemberAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer_MemberSpans.cs (2)
29private async Task<ImmutableArray<TextSpan>> GetOrCreateMemberSpansAsync(Document document, VersionStamp version, CancellationToken cancellationToken) 46static async Task<ImmutableArray<TextSpan>> CreateMemberSpansAsync(Document document, VersionStamp version, CancellationToken cancellationToken)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.cs (2)
46public async Task<ImmutableArray<DiagnosticAnalyzer>> GetOrCreateAnalyzersAsync( 54public async Task<HostAnalyzerInfo> GetOrCreateHostAnalyzerInfoAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer.StateManager.ProjectStates.cs (2)
57private async Task<ProjectAnalyzerInfo> GetOrCreateProjectAnalyzerInfoAsync(SolutionState solution, ProjectState project, CancellationToken cancellationToken) 88private async Task<ProjectAnalyzerInfo> UpdateProjectAnalyzerInfoAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (4)
21public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync(Project project, DocumentId? documentId, ImmutableHashSet<string>? diagnosticIds, Func<DiagnosticAnalyzer, bool>? shouldIncludeAnalyzer, bool includeLocalDocumentDiagnostics, bool includeNonLocalDocumentDiagnostics, CancellationToken cancellationToken) 35public Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync( 51private async Task<ImmutableArray<DiagnosticData>> ProduceProjectDiagnosticsAsync( 108async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetOrComputeDiagnosticAnalysisResultsAsync(
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnosticsForSpan.cs (5)
26private static async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreAsync( 40private static async Task<ImmutableArray<DiagnosticData>> ComputeDocumentDiagnosticsForAnalyzerCoreAsync( 51public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 263async Task<bool> TryDeprioritizeAnalyzerAsync( 310async Task<bool> IsCandidateForDeprioritizationBasedOnRegisteredActionsAsync(DiagnosticAnalyzer analyzer)
Diagnostics\Service\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (2)
37public async Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(Project project, CancellationToken cancellationToken) 75async Task<(Checksum checksum, ImmutableArray<DiagnosticAnalyzer> analyzers, ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult> diagnosticAnalysisResults)> ComputeForceAnalyzeProjectAsync()
Diagnostics\Service\EngineV2\InProcOrRemoteHostAnalyzerRunner.cs (6)
36public Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeDocumentAsync( 44public Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeProjectAsync( 52private async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeAsync( 64async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeCoreAsync() 80private async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeInProcAsync( 157private static async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeOutOfProcAsync(
DocumentHighlighting\AbstractDocumentHighlightsService.cs (7)
36public async Task<ImmutableArray<DocumentHighlights>> GetDocumentHighlightsAsync( 63private async Task<ImmutableArray<DocumentHighlights>> GetDocumentHighlightsInCurrentProcessAsync( 111private async Task<ImmutableArray<DocumentHighlights>> GetTagsForReferencedSymbolAsync( 161private async Task<ImmutableArray<DocumentHighlights>> FilterAndCreateSpansAsync( 195protected virtual Task<ImmutableArray<Location>> GetAdditionalReferencesAsync( 201private static async Task<ImmutableArray<DocumentHighlights>> CreateSpansAsync( 299private static async Task<DocumentSpan?> GetLocationSpanAsync(
DocumentHighlighting\IDocumentHighlightsService.cs (1)
50Task<ImmutableArray<DocumentHighlights>> GetDocumentHighlightsAsync(
DocumentIdSpan.cs (1)
28public async Task<DocumentSpan?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
DocumentSpanExtensions.cs (2)
22public static Task<INavigableLocation?> GetNavigableLocationAsync(this DocumentSpan documentSpan, CancellationToken cancellationToken) 29public static async Task<bool> IsHiddenAsync(
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (2)
504public async Task<DocumentAnalysisResults> AnalyzeDocumentAsync( 2554private async Task<ImmutableArray<SemanticEditInfo>> AnalyzeSemanticsAsync(
EditAndContinue\CommittedSolution.cs (2)
165public async Task<(Document? Document, DocumentState State)> GetDocumentAndStateAsync(Document currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false) 378internal static async Task<IEnumerable<KeyValuePair<DocumentId, DocumentState>>> GetMatchingDocumentsAsync(
EditAndContinue\DebuggingSession.cs (1)
275internal Task<(Guid Mvid, Diagnostic? Error)> GetProjectModuleIdAsync(Project project, CancellationToken cancellationToken)
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (1)
105private async Task<ImmutableArray<ActiveStatementLineSpan>> GetLatestUnmappedActiveStatementSpansAsync(Document? oldDocument, Document? newDocument, ActiveStatementSpanProvider newActiveStatementSpanProvider, CancellationToken cancellationToken)
EditAndContinue\EditSession.cs (5)
122private async Task<Diagnostic?> GetUnsupportedChangesDiagnosticAsync(EmitDifferenceResult emitResult, CancellationToken cancellationToken) 155public async Task<string?> ReportModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, ArrayBuilder<Diagnostic> diagnostics, CancellationToken cancellationToken) 229private async Task<EditAndContinueCapabilities> GetCapabilitiesAsync(CancellationToken cancellationToken) 242private async Task<ActiveStatementsMap> GetBaseActiveStatementsAsync(CancellationToken cancellationToken) 548private async Task<(ImmutableArray<DocumentAnalysisResults> results, bool hasOutOfSyncDocument)> AnalyzeDocumentsAsync(
EditAndContinue\IEditAndContinueAnalyzer.cs (1)
16Task<DocumentAnalysisResults> AnalyzeDocumentAsync(
EmbeddedLanguages\DateAndTime\DateAndTimeEmbeddedCompletionProvider.cs (2)
215public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 230public override Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeEmbeddedLanguage.cs (1)
26public async Task<SyntaxToken?> TryGetDateAndTimeTokenAtPositionAsync(
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedCompletionProvider.cs (2)
445public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken) 460public override Task<CompletionDescription> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedLanguage.cs (1)
33internal async Task<(RegexTree tree, SyntaxToken token)> TryGetTreeAndTokenAtPositionAsync(
EncapsulateField\AbstractEncapsulateFieldService.cs (10)
40protected abstract Task<SyntaxNode> RewriteFieldNameAndAccessibilityAsync(string originalFieldName, bool makePrivate, Document document, SyntaxAnnotation declarationAnnotation, CancellationToken cancellationToken); 41protected abstract Task<ImmutableArray<IFieldSymbol>> GetFieldsAsync(Document document, TextSpan span, CancellationToken cancellationToken); 44public async Task<EncapsulateFieldResult?> EncapsulateFieldsInSpanAsync(Document document, TextSpan span, bool useDefaultBehavior, CancellationToken cancellationToken) 57public async Task<ImmutableArray<CodeAction>> GetEncapsulateFieldCodeActionsAsync(Document document, TextSpan span, CancellationToken cancellationToken) 109public async Task<Solution> EncapsulateFieldsAsync( 140private async Task<Solution> EncapsulateFieldsInCurrentProcessAsync(Document document, ImmutableArray<IFieldSymbol> fields, bool updateReferences, CancellationToken cancellationToken) 166private async Task<Solution?> EncapsulateFieldAsync( 229private async Task<Solution> UpdateReferencesAsync( 274private static async Task<Solution> RenameAsync( 315protected static async Task<Document> AddPropertyAsync(
EncapsulateField\EncapsulateFieldResult.cs (2)
12internal sealed class EncapsulateFieldResult(string name, Glyph glyph, Func<CancellationToken, Task<Solution>> getSolutionAsync) 18public Task<Solution> GetSolutionAsync(CancellationToken cancellationToken)
EncapsulateField\IEncapsulateFieldService.cs (3)
16Task<ImmutableArray<CodeAction>> GetEncapsulateFieldCodeActionsAsync(Document document, TextSpan span, CancellationToken cancellationToken); 18Task<Solution> EncapsulateFieldsAsync(Document document, ImmutableArray<IFieldSymbol> fields, bool updateReferences, CancellationToken cancellationToken); 19Task<EncapsulateFieldResult?> EncapsulateFieldsInSpanAsync(Document document, TextSpan span, bool useDefaultBehavior, CancellationToken cancellationToken);
Extensions\ExtensionFolder.cs (1)
57private async Task<AssemblyMessageHandlers> CreateAssemblyHandlersAsync(
Extensions\IExtensionMessageHandlerWrapper.cs (1)
50Task<object?> ExecuteAsync(object? message, TArgument argument, CancellationToken cancellationToken);
ExternalAccess\Pythia\Api\PythiaCompletionProviderBase.cs (3)
51public static Task<CompletionDescription> GetDescriptionAsync(CompletionItem item, Document document, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 59internal sealed override async Task<CompletionDescription> GetDescriptionWorkerAsync( 78public override Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default)
ExternalAccess\Razor\Api\IRazorDocumentOptionsService.cs (1)
12Task<IRazorDocumentOptions> GetOptionsForDocumentAsync(Document document, CancellationToken cancellationToken);
ExternalAccess\UnitTesting\API\IUnitTestingStackTraceServiceAccessor.cs (3)
14Task<ImmutableArray<UnitTestingParsedFrameWrapper>> TryParseAsync(string input, Workspace workspace, CancellationToken cancellationToken); 15Task<UnitTestingDefinitionItemWrapper?> TryFindMethodDefinitionAsync(Workspace workspace, UnitTestingParsedFrameWrapper parsedFrame, CancellationToken cancellationToken); 18Task<bool> TryNavigateToAsync(Workspace workspace, UnitTestingDefinitionItemWrapper definitionItem, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken);
ExternalAccess\UnitTesting\API\UnitTestingHotReloadService.cs (1)
92public async Task<(ImmutableArray<Update> updates, ImmutableArray<Diagnostic> diagnostics)> EmitSolutionUpdateAsync(Solution solution, bool commitUpdates, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\API\UnitTestingSearchHelpers.cs (4)
25public static async Task<UnitTestingDocumentSpan?> GetSourceLocationAsync( 48public static async Task<ImmutableArray<UnitTestingDocumentSpan>> GetSourceLocationsAsync( 140private static async Task<UnitTestingDocumentSpan?> GetSourceLocationInProcessAsync( 152private static async Task<ImmutableArray<UnitTestingDocumentSpan>> GetSourceLocationsInProcessAsync(
ExternalAccess\UnitTesting\IRemoteUnitTestingSearchService.cs (1)
29public async Task<UnitTestingDocumentSpan?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\SolutionCrawler\IUnitTestingWorkCoordinatorPriorityService.cs (1)
18Task<bool> IsLowPriorityAsync(Document document, CancellationToken cancellationToken);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingIdleProcessor.cs (1)
94protected async Task<bool> WaitForIdleAsync(IExpeditableDelaySource expeditableDelaySource)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingIncrementalAnalyzerProcessor.cs (2)
213private static async Task<TResult?> GetOrDefaultAsync<TData, TResult>(TData value, Func<TData, CancellationToken, Task<TResult?>> funcAsync, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (3)
94private async Task<bool> TryEnqueueFromHintAsync(UnitTestingData data) 121private async Task<bool> TryEnqueueFromTypeAsync(Document document, ISymbol symbol) 146private async Task<bool> TryEnqueueFromMemberAsync(Document document, ISymbol symbol)
ExternalAccess\UnitTesting\UnitTestingFeaturesReferencesService.cs (3)
17Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync( 23Task<TResult> InvokeAsync<TResult>(string targetName, IReadOnlyList<object?> arguments, CancellationToken cancellationToken); 31public static async Task<ImmutableArray<(string MethodFullyQualifedName, string MethodOutputFilePath)>> GetCallerMethodsAsync(
ExternalAccess\UnitTesting\UnitTestingStackTraceServiceAccessor.cs (3)
36public async Task<UnitTestingDefinitionItemWrapper?> TryFindMethodDefinitionAsync(Workspace workspace, UnitTestingParsedFrameWrapper parsedFrame, CancellationToken cancellationToken) 44public async Task<ImmutableArray<UnitTestingParsedFrameWrapper>> TryParseAsync(string input, Workspace workspace, CancellationToken cancellationToken) 50public async Task<bool> TryNavigateToAsync(Workspace workspace, UnitTestingDefinitionItemWrapper definitionItem, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\Api\IVSTypeScriptCommentSlectionServiceImplementation.cs (2)
17Task<VSTypeScriptCommentSelectionInfo> GetInfoAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken); 19Task<Document> FormatAsync(Document document, ImmutableArray<TextSpan> changes, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptFormattingServiceImplementation.cs (1)
19Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, VSTypeScriptIndentationOptions options, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptNavigateToSearchService.cs (2)
16Task<ImmutableArray<IVSTypeScriptNavigateToSearchResult>> SearchProjectAsync(Project project, ImmutableArray<Document> priorityDocuments, string searchPattern, IImmutableSet<string> kinds, CancellationToken cancellationToken); 17Task<ImmutableArray<IVSTypeScriptNavigateToSearchResult>> SearchDocumentAsync(Document document, string searchPattern, IImmutableSet<string> kinds, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\Api\IVSTypeScriptTodoCommentDataServiceImplementation.cs (1)
36Task<ImmutableArray<VSTypeScriptTaskListItem>> GetTaskListItemsAsync(
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentHighlightsServiceBase.cs (2)
18protected abstract Task<ImmutableArray<DocumentHighlights>> GetDocumentHighlightsAsync( 21Task<ImmutableArray<DocumentHighlights>> IDocumentHighlightsService.GetDocumentHighlightsAsync(
ExternalAccess\VSTypeScript\Api\VSTypeScriptSignatureHelpProviderBase.cs (2)
51Task<SignatureHelpItems?> ISignatureHelpProvider.GetItemsAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken) 64protected abstract Task<SignatureHelpItems?> GetItemsAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, CancellationToken cancellationToken);
ExternalAccess\VSTypeScript\VSTypeScriptFormattingService.cs (1)
24public Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions? syntaxFormattingOptions, CancellationToken cancellationToken)
ExternalAccess\VSTypeScript\VSTypeScriptTaskListService.cs (1)
24public async Task<ImmutableArray<TaskListItem>> GetTaskListItemsAsync(Document document, ImmutableArray<TaskListItemDescriptor> descriptors, CancellationToken cancellationToken)
ExtractClass\AbstractExtractClassRefactoringProvider.cs (4)
22protected abstract Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context); 23protected abstract Task<SyntaxNode?> GetSelectedClassDeclarationAsync(CodeRefactoringContext context); 52private async Task<(ExtractClassWithDialogCodeAction? action, bool hasBaseType)> TryGetMemberActionAsync(CodeRefactoringContext context, IExtractClassOptionsService optionsService) 111private async Task<ExtractClassWithDialogCodeAction?> TryGetClassActionAsync(CodeRefactoringContext context, IExtractClassOptionsService optionsService)
ExtractClass\ExtractClassWithDialogCodeAction.cs (4)
62protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 138private async Task<Solution> PullMembersUpAsync( 213private static async Task<INamedTypeSymbol> GetNewTypeSymbolAsync(Document document, SyntaxAnnotation typeAnnotation, CancellationToken cancellationToken) 222private static async Task<Solution> GetSolutionWithBaseAddedAsync(
ExtractInterface\AbstractExtractInterfaceService.cs (11)
29protected abstract Task<SyntaxNode> GetTypeDeclarationAsync( 35protected abstract Task<Solution> UpdateMembersWithExplicitImplementationsAsync( 48public async Task<ImmutableArray<ExtractInterfaceCodeAction>> GetExtractInterfaceCodeActionAsync(Document document, TextSpan span, CancellationToken cancellationToken) 57public async Task<ExtractInterfaceResult> ExtractInterfaceAsync( 78public async Task<ExtractInterfaceTypeAnalysisResult> AnalyzeTypeAtPositionAsync( 109public async Task<ExtractInterfaceResult> ExtractInterfaceFromAnalyzedTypeAsync( 133public async Task<ExtractInterfaceResult> ExtractInterfaceFromAnalyzedTypeAsync( 173private async Task<ExtractInterfaceResult> ExtractInterfaceToNewFileAsync( 215private async Task<ExtractInterfaceResult> ExtractInterfaceToSameFileAsync( 277private static async Task<Solution> GetFormattedSolutionAsync(Solution unformattedSolution, IEnumerable<DocumentId> documentIds, CancellationToken cancellationToken) 307private async Task<Solution> GetSolutionWithOriginalTypeUpdatedAsync(
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
35protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
ExtractMethod\AbstractExtractMethodService.cs (1)
29public async Task<ExtractMethodResult> ExtractMethodAsync(
ExtractMethod\ExtractMethodResult.cs (3)
30Func<CancellationToken, Task<(Document document, SyntaxToken? invocationNameToken)>>? getDocumentAsync) 45Func<CancellationToken, Task<(Document document, SyntaxToken? invocationNameToken)>> getDocumentAsync) 50public Task<(Document document, SyntaxToken? invocationNameToken)> GetDocumentAsync(CancellationToken cancellationToken)
ExtractMethod\ExtractMethodService.cs (1)
14public static Task<ExtractMethodResult> ExtractMethodAsync(Document document, TextSpan textSpan, bool localFunction, ExtractMethodGenerationOptions options, CancellationToken cancellationToken)
ExtractMethod\IExtractMethodService.cs (1)
14Task<ExtractMethodResult> ExtractMethodAsync(Document document, TextSpan textSpan, bool localFunction, ExtractMethodGenerationOptions options, CancellationToken cancellationToken);
ExtractMethod\MethodExtractor.AnalyzerResult.cs (1)
55/// <see cref="Task{TResult}"/> for async methods.
ExtractMethod\MethodExtractor.CodeGenerator.cs (8)
53public abstract Task<SemanticDocument> GenerateAsync(CancellationToken cancellationToken); 96protected abstract Task<SyntaxNode> GenerateBodyForCallSiteContainerAsync(SyntaxNode insertionPointNode, SyntaxNode outermostCallSiteContainer, CancellationToken cancellationToken); 105protected abstract Task<TNodeUnderContainer> GetStatementOrInitializerContainingInvocationToExtractedMethodAsync(CancellationToken cancellationToken); 132protected abstract Task<SemanticDocument> UpdateMethodAfterGenerationAsync( 135protected abstract Task<SemanticDocument> PerformFinalTriviaFixupAsync( 143public sealed override async Task<SemanticDocument> GenerateAsync(CancellationToken cancellationToken) 164private async Task<SemanticDocument> InsertMethodAndUpdateCallSiteAsync( 289protected async Task<ImmutableArray<TStatementSyntax>> AddInvocationAtCallSiteAsync(
ExtractMethod\MethodExtractor.cs (4)
38protected abstract Task<TriviaResult> PreserveTriviaAsync(SyntaxNode root, CancellationToken cancellationToken); 44protected abstract Task<(Document document, SyntaxToken invocationNameToken)> InsertNewLineBeforeLocalFunctionIfNecessaryAsync( 138private async Task<(Document document, SyntaxToken? invocationNameToken)> GetFormattedDocumentAsync( 165private static async Task<SemanticDocument> GetAnnotatedDocumentAndInsertionPointAsync(
ExtractMethod\MethodExtractor.TriviaResult.cs (1)
35public async Task<SemanticDocument> ApplyAsync(SemanticDocument document, CancellationToken cancellationToken)
ExtractMethod\SelectionValidator.cs (2)
35protected abstract Task<SelectionResult> CreateSelectionResultAsync(FinalSelectionInfo selectionInfo, CancellationToken cancellationToken); 37public async Task<(SelectionResult?, OperationStatus)> GetValidSelectionAsync(CancellationToken cancellationToken)
FindUsages\AbstractFindUsagesService_FindImplementations.cs (3)
93private static async Task<ImmutableArray<ISymbol>> FindSourceImplementationsAsync( 140private static async Task<ImmutableArray<ISymbol>> FindImplementationsWorkerAsync( 168private static async Task<ImmutableArray<ISymbol>> FindSourceAndMetadataImplementationsAsync(
FindUsages\AbstractFindUsagesService_FindReferences.cs (2)
65private static async Task<ImmutableArray<DefinitionItem>> GetThirdPartyDefinitionsAsync( 170private static async Task<bool> TryFindLiteralReferencesAsync(
FindUsages\DefaultExternalDefinitionItemProvider.cs (1)
23public Task<DefinitionItem?> GetThirdPartyDefinitionItemAsync(Solution solution, DefinitionItem definitionItem, CancellationToken cancellationToken)
FindUsages\DefinitionItem.cs (3)
146public Task<bool> TryNavigateToAsync(Workspace workspace, bool showInPreviewTab, bool activateTab, CancellationToken cancellationToken) 150public async Task<bool> TryNavigateToAsync(Workspace workspace, NavigationOptions options, CancellationToken cancellationToken) 157public abstract Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken);
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
37public override async Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
FindUsages\DefinitionItem.DetachedDefinitionItem.cs (1)
77public async Task<DefaultDefinitionItem?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
FindUsages\DefinitionItemFactory.cs (1)
283public static async Task<SourceReferenceItem?> TryCreateSourceReferenceItemAsync(
FindUsages\FindUsagesHelpers.cs (2)
22public static Task<(ISymbol symbol, Project project)?> GetRelevantSymbolAndProjectAtPositionAsync( 35public static async Task<(ISymbol symbol, Project project)?> GetRelevantSymbolAndProjectAtPositionAsync(
FindUsages\IExternalDefinitionItemProvider.cs (1)
13Task<DefinitionItem?> GetThirdPartyDefinitionItemAsync(
FindUsages\IRemoteFindUsagesService.cs (1)
305public async Task<SourceReferenceItem> RehydrateAsync(Solution solution, DefinitionItem definition, CancellationToken cancellationToken)
Formatting\AbstractNewDocumentFormattingService.cs (1)
35public async Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
Formatting\INewDocumentFormattingProvider.cs (1)
14Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken);
Formatting\INewDocumentFormattingService.cs (1)
20Task<Document> FormatNewDocumentAsync(Document document, Document? hintDocument, CodeCleanupOptions options, CancellationToken cancellationToken);
FullyQualify\AbstractFullyQualifyService.cs (5)
37protected abstract Task<SyntaxNode> ReplaceNodeAsync(TSimpleNameSyntax simpleName, string containerName, bool resultingSymbolIsType, CancellationToken cancellationToken); 39public async Task<FullyQualifyFixData?> GetFixDataAsync( 59private async Task<FullyQualifyFixData?> GetFixDataInCurrentProcessAsync( 112async Task<ImmutableArray<ISymbol>> FindAsync(string name, bool ignoreCase, SymbolFilter filter) 218private async Task<IEnumerable<TextChange>> ProcessNodeAsync(Document document, TSimpleNameSyntax simpleName, string containerName, INamespaceOrTypeSymbol originalSymbol, CancellationToken cancellationToken)
FullyQualify\IFullyQualifyService.cs (1)
35Task<FullyQualifyFixData?> GetFixDataAsync(Document document, TextSpan span, CancellationToken cancellationToken);
GenerateComparisonOperators\GenerateComparisonOperatorsCodeRefactoringProvider.cs (1)
131private static async Task<Document> GenerateComparisonOperatorsAsync(
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (1)
32protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (6)
76public async Task<ImmutableArray<IntentProcessorResult>> ComputeIntentAsync( 108static async Task<IntentProcessorResult?> GetIntentProcessorResultAsync( 126static async Task<ImmutableArray<CodeActionOperation>> GetCodeActionOperationsAsync( 189private async Task<(CodeAction CodeAction, TextSpan ApplicableToSpan)?> HandleNonSelectionAsync( 264public async Task<ImmutableArray<CodeAction>> GenerateConstructorFromMembersAsync( 292private static async Task<Document> AddNavigationAnnotationAsync(Document document, CancellationToken cancellationToken)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.FieldDelegatingCodeAction.cs (1)
32protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (1)
51protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (2)
36public static async Task<State?> TryGenerateAsync( 52private async Task<bool> TryInitializeAsync(
GenerateEqualsAndGetHashCodeFromMembers\AbstractGenerateEqualsAndGetHashCodeService.cs (5)
27public async Task<Document> FormatDocumentAsync(Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken) 38public async Task<IMethodSymbol> GenerateEqualsMethodAsync( 50public async Task<IMethodSymbol> GenerateIEquatableEqualsMethodAsync( 61public async Task<IMethodSymbol> GenerateEqualsMethodThroughIEquatableEqualsAsync( 117public async Task<IMethodSymbol> GenerateGetHashCodeMethodAsync(
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeAction.cs (6)
47protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 96private async Task<INamedTypeSymbol?> GetConstructedTypeToImplementAsync(CancellationToken cancellationToken) 115private async Task<Document> UpdateDocumentAndAddImportsAsync(SyntaxNode oldType, SyntaxNode newType, CancellationToken cancellationToken) 187private Task<IMethodSymbol> CreateGetHashCodeMethodAsync(CancellationToken cancellationToken) 193private Task<IMethodSymbol> CreateEqualsMethodAsync(CancellationToken cancellationToken) 201private async Task<IMethodSymbol> CreateIEquatableEqualsMethodAsync(INamedTypeSymbol constructedEquatableType, CancellationToken cancellationToken)
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (6)
169public async Task<ImmutableArray<CodeAction>> GenerateEqualsAndGetHashCodeFromMembersAsync( 200private async Task<ImmutableArray<CodeAction>> CreateActionsAsync( 204using var _ = ArrayBuilder<Task<CodeAction>>.GetInstance(out var tasks); 240private Task<CodeAction> CreateCodeActionAsync( 257private async Task<CodeAction> CreateCodeActionWithDialogAsync( 294private static async Task<CodeAction> CreateCodeActionWithoutDialogAsync(
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
50protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
GenerateEqualsAndGetHashCodeFromMembers\IGenerateEqualsAndGetHashCodeService.cs (5)
23Task<Document> FormatDocumentAsync(Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken); 29Task<IMethodSymbol> GenerateEqualsMethodAsync(Document document, INamedTypeSymbol namedType, ImmutableArray<ISymbol> members, string? localNameOpt, CancellationToken cancellationToken); 35Task<IMethodSymbol> GenerateEqualsMethodThroughIEquatableEqualsAsync(Document document, INamedTypeSymbol namedType, CancellationToken cancellationToken); 41Task<IMethodSymbol> GenerateIEquatableEqualsMethodAsync(Document document, INamedTypeSymbol namedType, ImmutableArray<ISymbol> members, INamedTypeSymbol constructedEquatableType, CancellationToken cancellationToken); 50Task<IMethodSymbol> GenerateGetHashCodeMethodAsync(Document document, INamedTypeSymbol namedType, ImmutableArray<ISymbol> members, CancellationToken cancellationToken);
GenerateEqualsAndGetHashCodeFromMembers\IGenerateEqualsAndGetHashCodeServiceExtensions.cs (1)
13public static Task<IMethodSymbol> GenerateEqualsMethodAsync(
GenerateFromMembers\GenerateFromMembersHelpers.cs (1)
22public static async Task<SelectedMemberInfo?> GetSelectedMemberInfoAsync(
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (2)
50protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 89private Task<ISymbol> GenerateOverrideAsync(
GenerateType\AbstractGenerateTypeService.CodeAction.cs (2)
65protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 172protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
GenerateType\AbstractGenerateTypeService.cs (4)
56internal abstract Task<Solution> TryAddUsingsOrImportToDocumentAsync( 63public abstract Task<(INamespaceSymbol, INamespaceOrTypeSymbol, Location)> GetOrGenerateEnclosingNamespaceSymbolAsync(INamedTypeSymbol namedTypeSymbol, string[] containers, Document selectedDocument, SyntaxNode selectedDocumentRoot, CancellationToken cancellationToken); 65public async Task<ImmutableArray<CodeAction>> GenerateTypeAsync( 271protected static async Task<bool> IsWithinTheImportingNamespaceAsync(Document document, int triggeringPosition, string includeUsingsOrImports, CancellationToken cancellationToken)
GenerateType\AbstractGenerateTypeService.Editor.cs (7)
86public async Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync() 260private async Task<ImmutableArray<CodeActionOperation>> GetGenerateInNewFileOperationsAsync( 336private async Task<ImmutableArray<CodeActionOperation>> CreateAddDocumentAndUpdateUsingsOrImportsOperationsAsync( 385private async Task<ImmutableArray<CodeActionOperation>> GetGenerateIntoContainingNamespaceOperationsAsync(INamedTypeSymbol namedType) 402private async Task<ImmutableArray<CodeActionOperation>> GetGenerateIntoExistingDocumentAsync( 547private async Task<ImmutableArray<CodeActionOperation>> GetGenerateIntoTypeOperationsAsync(INamedTypeSymbol namedType) 581private async Task<bool> FindExistingOrCreateNewMemberAsync(
GenerateType\AbstractGenerateTypeService.GenerateNamedType.cs (3)
27private async Task<INamedTypeSymbol> GenerateNamedTypeAsync() 41private async Task<INamedTypeSymbol> GenerateNamedTypeAsync(GenerateTypeOptionsResult options) 104private async Task<ImmutableArray<ISymbol>> DetermineMembersAsync(GenerateTypeOptionsResult options = null)
GenerateType\IGenerateTypeService.cs (2)
15Task<ImmutableArray<CodeAction>> GenerateTypeAsync(Document document, SyntaxNode node, CancellationToken cancellationToken); 16Task<(INamespaceSymbol, INamespaceOrTypeSymbol, Location)> GetOrGenerateEnclosingNamespaceSymbolAsync(INamedTypeSymbol namedTypeSymbol, string[] containers, Document selectedDocument, SyntaxNode selectedDocumentRoot, CancellationToken cancellationToken);
GoToBase\AbstractGoToBaseService.cs (1)
17protected abstract Task<IMethodSymbol?> FindNextConstructorInChainAsync(
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (3)
18protected abstract Task<ISymbol> FindRelatedExplicitlyDeclaredSymbolAsync(Project project, ISymbol symbol, CancellationToken cancellationToken); 22public async Task<(ISymbol? symbol, Project project, TextSpan boundSpan)> GetSymbolProjectAndBoundSpanAsync( 64public async Task<(int? targetPosition, TextSpan tokenSpan)> GetTargetIfControlFlowAsync(
GoToDefinition\GoToDefinitionFeatureHelpers.cs (1)
52public static async Task<ImmutableArray<DefinitionItem>> GetDefinitionsAsync(
GoToDefinition\IGoToDefinitionSymbolService.cs (2)
14Task<(ISymbol? symbol, Project project, TextSpan boundSpan)> GetSymbolProjectAndBoundSpanAsync( 21Task<(int? targetPosition, TextSpan tokenSpan)> GetTargetIfControlFlowAsync(
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (4)
125private async Task<ImmutableArray<InheritanceMarginItem>> GetInheritanceMarginItemsInProcessAsync( 157private async Task<ImmutableArray<InheritanceMarginItem>> GetGlobalImportsItemsAsync( 624private static async Task<ImmutableArray<ISymbol>> GetImplementingSymbolsForTypeMemberAsync( 678private static async Task<ImmutableArray<INamedTypeSymbol>> GetDerivedTypesAndImplementationsAsync(
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (9)
67protected override async Task<ImmutableArray<CodeAction>> GetRefactoringsForAllParametersAsync( 98protected override async Task<ImmutableArray<CodeAction>> GetRefactoringsForSingleParameterAsync( 172private async Task<Document> UpdateDocumentForRefactoringAsync( 540private async Task<Document> AddNullCheckAsync( 563private async Task<Document> AddStringCheckAsync( 579private async Task<Document> AddNumericCheckAsync( 595private static async Task<Document> AddCheckStatementAsync( 629private static async Task<Document> AddEnumIsDefinedCheckStatementAsync( 884private async Task<Document?> TryAddNullCheckToAssignmentAsync(
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (7)
49protected sealed override Task<ImmutableArray<CodeAction>> GetRefactoringsForAllParametersAsync( 57protected sealed override async Task<ImmutableArray<CodeAction>> GetRefactoringsForSingleParameterAsync( 102private async Task<ImmutableArray<CodeAction>> HandleNoExistingFieldOrPropertyAsync( 356private async Task<Solution> AddAllSymbolInitializationsAsync( 420private async Task<Solution> AddSingleSymbolInitializationAsync( 469private static async Task<(Document documentWithMemberAdded, IParameterSymbol? currentParameter, ISymbol? currentFieldOrProperty)> AddMissingFieldOrPropertyAsync( 614private async Task<(ISymbol?, bool isThrowNotImplementedProperty)> TryFindMatchingUninitializedFieldOrPropertySymbolAsync(
InitializeParameter\AbstractInitializeParameterCodeRefactoringProvider.cs (2)
36protected abstract Task<ImmutableArray<CodeAction>> GetRefactoringsForAllParametersAsync( 45protected abstract Task<ImmutableArray<CodeAction>> GetRefactoringsForSingleParameterAsync(
InlineHints\AbstractInlineHintsService.cs (1)
16public async Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
35public async Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
InlineHints\AbstractInlineTypeHintsService.cs (1)
31public async Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
InlineHints\IInlineHintsService.cs (1)
15Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
InlineHints\IInlineParameterNameHintsService.cs (1)
20Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
InlineHints\IInlineTypeHintsService.cs (1)
20Task<ImmutableArray<InlineHint>> GetInlineHintsAsync(
InlineHints\InlineHint.cs (5)
20private readonly Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? _getDescriptionAsync; 25Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null) 34Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null) 44Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? getDescriptionAsync = null) 60public Task<ImmutableArray<TaggedText>> GetDescriptionAsync(Document document, CancellationToken cancellationToken)
InlineHints\InlineHintHelpers.cs (2)
19public static Func<Document, CancellationToken, Task<ImmutableArray<TaggedText>>>? GetDescriptionFunction(int position, SymbolKey symbolKey, SymbolDescriptionOptions options) 22private static async Task<ImmutableArray<TaggedText>> GetDescriptionAsync(Document document, int position, SymbolKey symbolKey, SymbolDescriptionOptions options, CancellationToken cancellationToken)
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
288private async Task<Solution> InlineMethodAsync(Document document, 363private async Task<SyntaxNode> GetChangedCallerAsync(Document document,
InlineMethod\AbstractInlineMethodRefactoringProvider.InlineContext.cs (2)
42private async Task<InlineMethodContext> GetInlineMethodContextAsync( 285private static async Task<TExpressionSyntax> ReplaceAllSyntaxNodesForSymbolAsync(
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (3)
153private async Task<MethodParametersInfo> GetMethodParametersInfoAsync( 430private static async Task<ImmutableArray<IArgumentOperation>> GetArgumentsReadOnlyOnceAsync( 480private async Task<bool> ShouldMergeInlineContentAndVariableDeclarationArgumentAsync(
InlineTemporary\AbstractInlineTemporaryCodeRefactoringProvider.cs (1)
24protected static async Task<ImmutableArray<TIdentifierNameSyntax>> GetReferenceLocationsAsync(
Intents\IIntentProvider.cs (1)
14Task<ImmutableArray<IntentProcessorResult>> ComputeIntentAsync(
IntroduceParameter\AbstractIntroduceParameterCodeRefactoringProvider.cs (4)
144private async Task<(ImmutableArray<CodeAction> actions, ImmutableArray<CodeAction> actionsAllOccurrences)?> GetActionsAsync(Document document, 201private static async Task<(bool shouldDisplay, bool containsClassExpression)> ShouldExpressionDisplayCodeActionAsync( 241private async Task<Solution> IntroduceParameterAsync(Document originalDocument, TExpressionSyntax expression, 274protected static async Task<Dictionary<Document, List<TExpressionSyntax>>> FindCallSitesAsync(
IntroduceParameter\IntroduceParameterDocumentRewriter.cs (10)
43public async Task<SyntaxNode> RewriteDocumentAsync(Compilation compilation, Document document, List<TExpressionSyntax> invocations, CancellationToken cancellationToken) 62private async Task<Dictionary<TIdentifierNameSyntax, IParameterSymbol>> MapExpressionToParametersAsync(CancellationToken cancellationToken) 84private async Task<string> GetNewParameterNameAsync(CancellationToken cancellationToken) 219private async Task<SyntaxNode> ModifyDocumentInvocationsTrampolineOverloadAndIntroduceParameterAsync(Compilation compilation, Document currentDocument, 344private async Task<ITypeSymbol> GetTypeOfExpressionAsync(CancellationToken cancellationToken) 388private async Task<SyntaxNode> ExtractMethodAsync(ImmutableArray<IParameterSymbol> validParameters, string newMethodIdentifier, SyntaxGenerator generator, CancellationToken cancellationToken) 420private async Task<SyntaxNode> GenerateNewMethodOverloadAsync(int insertionIndex, SyntaxGenerator generator, CancellationToken cancellationToken) 441private async Task<SyntaxNode> CreateMethodDeclarationAsync(SyntaxNode newStatement, ImmutableArray<IParameterSymbol>? validParameters, 481private async Task<SyntaxNode> ModifyDocumentInvocationsAndIntroduceParameterAsync(Compilation compilation, Document document, int insertionIndex, 666private async Task<IEnumerable<TExpressionSyntax>> FindMatchesAsync(CancellationToken cancellationToken)
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (3)
146private async Task<Document> IntroduceUsingStatementAsync( 205private async Task<Document> IntroduceUsingStatementAsync( 239private async Task<Document> ReplaceWithUsingStatementAsync(
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (5)
29protected abstract Task<TExpressionStatementSyntax> CreateTupleDeconstructionAsync( 70protected async Task<TExpressionStatementSyntax?> GetExpressionStatementAsync(CodeRefactoringContext context) 78private async Task<Document> IntroduceLocalAsync( 107async Task<TStatementSyntax> CreateLocalDeclarationAsync() 126protected static async Task<SyntaxToken> GenerateUniqueNameAsync(
IntroduceVariable\AbstractIntroduceVariableService.cs (3)
54protected abstract Task<Document> IntroduceFieldAsync(SemanticDocument document, TExpressionSyntax expression, bool allOccurrences, bool isConstant, CancellationToken cancellationToken); 62public async Task<CodeAction> IntroduceVariableAsync( 419protected static async Task<(SemanticDocument newSemanticDocument, ISet<TExpressionSyntax> newMatches)> ComplexifyParentingStatementsAsync(
IntroduceVariable\AbstractIntroduceVariableService.IntroduceVariableCodeAction.cs (2)
52protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 59private async Task<Document> GetChangedDocumentCoreAsync(CancellationToken cancellationToken)
IntroduceVariable\AbstractIntroduceVariableService.State.cs (2)
44public static async Task<State> GenerateAsync( 60private async Task<bool> TryInitializeAsync(
IntroduceVariable\IIntroduceVariableService.cs (1)
16Task<CodeAction> IntroduceVariableAsync(Document document, TextSpan textSpan, CodeCleanupOptions options, CancellationToken cancellationToken);
InvertConditional\AbstractInvertConditionalCodeRefactoringProvider.cs (2)
39private static async Task<TConditionalExpressionSyntax?> FindConditionalAsync( 43private static async Task<Document> InvertConditionalAsync(
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (1)
288private async Task<Document> InvertIfAsync(
InvertLogical\AbstractInvertLogicalCodeRefactoringProvider.cs (3)
82private static async Task<Document> InvertLogicalAsync( 99private static async Task<Document> InvertInnerExpressionAsync( 113private static async Task<Document> InvertOuterExpressionAsync(
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (5)
110protected abstract Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync(ISymbol symbol); 281public async Task<ImmutableArray<SymbolDisplayPart>> BuildDescriptionAsync( 291public async Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> BuildDescriptionSectionsAsync(ImmutableArray<ISymbol> symbolGroup) 558private async Task<ImmutableArray<SymbolDisplayPart>> GetFieldPartsAsync(IFieldSymbol symbol) 590private async Task<ImmutableArray<SymbolDisplayPart>> GetLocalPartsAsync(ILocalSymbol symbol)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (4)
26public Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 29public async Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 35public async Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 46public async Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> ToDescriptionGroupsAsync(
LanguageServices\SymbolDisplayService\ISymbolDisplayService.cs (4)
15Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 16Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 17Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 18Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> ToDescriptionGroupsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken = default);
LineSeparators\ILineSeparatorService.cs (1)
15Task<ImmutableArray<TextSpan>> GetLineSeparatorsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken);
MapCode\IMapCodeService.cs (1)
30Task<ImmutableArray<TextChange>?> MapCodeAsync(
MetadataAsSource\AbstractMetadataAsSourceService.cs (4)
21public async Task<Document> AddSourceToAsync( 67protected abstract Task<Document> AddNullableRegionsAsync(Document document, CancellationToken cancellationToken); 86protected abstract Task<Document> AddAssemblyInfoRegionAsync(Document document, Compilation symbolCompilation, ISymbol symbol, CancellationToken cancellationToken); 88protected abstract Task<Document> ConvertDocCommentsToRegularCommentsAsync(Document document, IDocumentationCommentFormattingService docCommentFormattingService, CancellationToken cancellationToken);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (3)
62public async Task<MetadataAsSourceFile?> GetGeneratedFileAsync( 252private async Task<Location> RelocateSymbol_NoLockAsync(Solution solution, MetadataAsSourceGeneratedFileInfo fileInfo, SymbolKey symbolId, CancellationToken cancellationToken) 366private static async Task<UniqueDocumentKey> GetUniqueDocumentKeyAsync(Project project, INamedTypeSymbol topLevelNamedType, bool signaturesOnly, CancellationToken cancellationToken)
MetadataAsSource\IMetadataAsSourceFileProvider.cs (1)
19Task<MetadataAsSourceFile?> GetGeneratedFileAsync(
MetadataAsSource\IMetadataAsSourceFileService.cs (1)
26Task<MetadataAsSourceFile> GetGeneratedFileAsync(
MetadataAsSource\IMetadataAsSourceService.cs (1)
26Task<Document> AddSourceToAsync(Document document, Compilation symbolCompilation, ISymbol symbol, SyntaxFormattingOptions? formattingOptions, CancellationToken cancellationToken);
MetadataAsSource\MetadataAsSourceFileService.cs (2)
69public async Task<MetadataAsSourceFile> GetGeneratedFileAsync( 246internal async Task<SymbolMappingResult?> MapSymbolAsync(Document document, SymbolKey symbolId, CancellationToken cancellationToken)
MetadataAsSource\MetadataAsSourceHelpers.cs (1)
70public static async Task<Location> GetLocationInGeneratedSourceAsync(SymbolKey symbolId, Document generatedDocument, CancellationToken cancellationToken)
MetadataAsSource\SymbolMappingServiceFactory.cs (2)
32public Task<SymbolMappingResult?> MapSymbolAsync(Document document, SymbolKey symbolId, CancellationToken cancellationToken) 40public Task<SymbolMappingResult?> MapSymbolAsync(Document document, ISymbol symbol, CancellationToken cancellationToken)
MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceCodeRefactoringProvider.cs (1)
46private static async Task<Document> MoveDeclarationNearReferenceAsync(
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
18protected abstract Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context);
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (6)
43protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 159private static async Task<Solution> RefactorAndMoveAsync( 216private static async Task<Solution> RefactorReferencesAsync( 251private static async Task<SyntaxNode> FixReferencesSingleDocumentAsync( 344private static async Task<ImmutableArray<(ReferenceLocation location, bool isExtension)>> FindMemberReferencesAsync( 353using var _ = ArrayBuilder<Task<IEnumerable<ReferencedSymbol>>>.GetInstance(out var tasks);
MoveToNamespace\AbstractMoveToNamespaceService.cs (13)
25Task<ImmutableArray<MoveToNamespaceCodeAction>> GetCodeActionsAsync(Document document, TextSpan span, CancellationToken cancellationToken); 26Task<MoveToNamespaceAnalysisResult> AnalyzeTypeAtPositionAsync(Document document, int position, CancellationToken cancellationToken); 27Task<MoveToNamespaceResult> MoveToNamespaceAsync(MoveToNamespaceAnalysisResult analysisResult, string targetNamespace, CancellationToken cancellationToken); 45public async Task<ImmutableArray<MoveToNamespaceCodeAction>> GetCodeActionsAsync( 63public async Task<MoveToNamespaceAnalysisResult> AnalyzeTypeAtPositionAsync( 87private async Task<MoveToNamespaceAnalysisResult?> TryAnalyzeNamespaceAsync( 112private async Task<MoveToNamespaceAnalysisResult> TryAnalyzeNamedTypeAsync( 170public Task<MoveToNamespaceResult> MoveToNamespaceAsync( 186private static async Task<ImmutableArray<ISymbol>> GetMemberSymbolsAsync(Document document, SyntaxNode container, CancellationToken cancellationToken) 214private static async Task<MoveToNamespaceResult> MoveItemsInNamespaceAsync( 237private static async Task<MoveToNamespaceResult> MoveTypeToNamespaceAsync( 275private static async Task<Solution> PropagateChangeToLinkedDocumentsAsync(Document document, SyntaxFormattingOptions formattingOptions, CancellationToken cancellationToken) 305private static async Task<IEnumerable<string>> GetNamespacesAsync(Document document, CancellationToken cancellationToken)
MoveToNamespace\MoveToNamespaceCodeAction.cs (1)
42protected sealed override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
NameTupleElement\AbstractNameTupleElementCodeRefactoringProvider.cs (2)
40private static async Task<(SyntaxNode root, TArgumentSyntax argument, string argumentName)> TryGetArgumentInfoAsync( 82private async Task<Document> AddNamedElementAsync(Document document, TextSpan span, CancellationToken cancellationToken)
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
160private static Task<TopLevelSyntaxTreeIndex?> GetIndexAsync(
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
100async Task<ImmutableArray<(Document document, NormalizedTextSpanCollection? spans)>> GetRelatedDocumentsAsync()
NavigateTo\RoslynNavigateToItem.cs (1)
70public async Task<INavigateToSearchResult?> TryCreateSearchResultAsync(
Navigation\AbstractNavigableItemsService.cs (3)
17public Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync( 23public async Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync( 43async Task<(ISymbol symbol, Solution solution)?> GetSymbolAsync(Document document)
Navigation\DefaultSymbolNavigationService.cs (3)
15public Task<INavigableLocation?> GetNavigableLocationAsync(ISymbol symbol, Project project, CancellationToken cancellationToken) 18public Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken) 21public Task<(string filePath, LinePosition linePosition)?> GetExternalNavigationSymbolLocationAsync(DefinitionItem definitionItem, CancellationToken cancellationToken)
Navigation\ICrossLanguageSymbolNavigationService.cs (1)
23Task<INavigableLocation?> TryGetNavigableLocationAsync(
Navigation\IDefinitionLocationService.cs (3)
29Task<DefinitionLocation?> GetDefinitionLocationAsync( 46public static async Task<DefinitionLocation?> GetDefinitionLocationFromLegacyImplementationsAsync( 47Document document, int position, Func<CancellationToken, Task<IEnumerable<(Document document, TextSpan sourceSpan)>?>> getNavigableItems, CancellationToken cancellationToken)
Navigation\IDocumentNavigationService.cs (12)
19Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken); 25Task<bool> CanNavigateToPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken); 27Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken); 28Task<INavigableLocation?> GetLocationForPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken); 33public virtual Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 36public virtual Task<bool> CanNavigateToPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken) 39public virtual Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 42public virtual Task<INavigableLocation?> GetLocationForPositionAsync(Workspace workspace, DocumentId documentId, int position, int virtualSpace, bool allowInvalidPosition, CancellationToken cancellationToken) 48public static Task<bool> CanNavigateToSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 51public static Task<bool> CanNavigateToPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken) 54public static Task<INavigableLocation?> GetLocationForSpanAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, TextSpan textSpan, CancellationToken cancellationToken) 57public static Task<INavigableLocation?> GetLocationForPositionAsync(this IDocumentNavigationService service, Workspace workspace, DocumentId documentId, int position, CancellationToken cancellationToken)
Navigation\INavigableItemsService.cs (2)
23Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync(Document document, int position, CancellationToken cancellationToken); 28Task<ImmutableArray<INavigableItem>> GetNavigableItemsAsync(Document document, int position, bool forSymbolType, CancellationToken cancellationToken);
Navigation\INavigableLocation.cs (5)
20Task<bool> NavigateToAsync(NavigationOptions options, CancellationToken cancellationToken); 23internal sealed class NavigableLocation(Func<NavigationOptions, CancellationToken, Task<bool>> callback) : INavigableLocation 25private readonly Func<NavigationOptions, CancellationToken, Task<bool>> _callback = callback; 27public Task<bool> NavigateToAsync(NavigationOptions options, CancellationToken cancellationToken) 36public static Task<INavigableLocation?> Create(bool value)
Navigation\ISymbolNavigationService.cs (3)
22Task<INavigableLocation?> GetNavigableLocationAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 26Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 30Task<(string filePath, LinePosition linePosition)?> GetExternalNavigationSymbolLocationAsync(
NavigationBar\AbstractNavigationBarItemService.cs (2)
19protected abstract Task<ImmutableArray<RoslynNavigationBarItem>> GetItemsInCurrentProcessAsync(Document document, bool supportsCodeGeneration, CancellationToken cancellationToken); 21public async Task<ImmutableArray<RoslynNavigationBarItem>> GetItemsAsync(Document document, bool supportsCodeGeneration, bool frozenPartialSemantics, CancellationToken cancellationToken)
NavigationBar\INavigationBarItemService.cs (1)
14Task<ImmutableArray<RoslynNavigationBarItem>> GetItemsAsync(Document document, bool supportsCodeGeneration, bool frozenPartialSemantics, CancellationToken cancellationToken);
OrganizeImports\OrganizeImportsCodeRefactoringProvider.cs (1)
35private static async Task<(SyntaxNode oldRoot, SyntaxNode newRoot)> RemoveImportsAsync(
Organizing\AbstractOrganizingService.cs (2)
26protected abstract Task<Document> ProcessAsync(Document document, IEnumerable<ISyntaxOrganizer> organizers, CancellationToken cancellationToken); 28public Task<Document> OrganizeAsync(Document document, IEnumerable<ISyntaxOrganizer> organizers, CancellationToken cancellationToken)
Organizing\IOrganizingService.cs (1)
26Task<Document> OrganizeAsync(Document document, IEnumerable<ISyntaxOrganizer> organizers, CancellationToken cancellationToken);
Organizing\OrganizingService.cs (1)
22public static Task<Document> OrganizeAsync(Document document, IEnumerable<ISyntaxOrganizer> organizers = null, CancellationToken cancellationToken = default)
PdbSourceDocument\IPdbFileLocatorService.cs (1)
13Task<DocumentDebugInfoReader?> GetDocumentDebugInfoReaderAsync(string dllPath, bool useDefaultSymbolServers, TelemetryMessage telemetry, CancellationToken cancellationToken);
PdbSourceDocument\IPdbSourceDocumentLoaderService.cs (1)
15Task<SourceFileInfo?> LoadSourceDocumentAsync(string tempFilePath, SourceDocument sourceDocument, Encoding encoding, TelemetryMessage telemetry, bool useExtendedTimeout, CancellationToken cancellationToken);
PdbSourceDocument\ISourceLinkService.cs (2)
13Task<SourceFilePathResult?> GetSourceFilePathAsync(string url, string relativePath, CancellationToken cancellationToken); 15Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken);
PdbSourceDocument\PdbFileLocatorService.cs (2)
30public async Task<DocumentDebugInfoReader?> GetDocumentDebugInfoReaderAsync(string dllPath, bool useDefaultSymbolServers, TelemetryMessage telemetry, CancellationToken cancellationToken) 70var pdbResultTask = _sourceLinkService.GetPdbFilePathAsync(dllPath, peReader, useDefaultSymbolServers, cancellationToken);
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (3)
37public async Task<SourceFileInfo?> LoadSourceDocumentAsync(string tempFilePath, SourceDocument sourceDocument, Encoding encoding, TelemetryMessage telemetry, bool useExtendedTimeout, CancellationToken cancellationToken) 124private async Task<SourceFileInfo?> TryGetSourceLinkFileAsync(SourceDocument sourceDocument, Encoding encoding, TelemetryMessage telemetry, bool useExtendedTimeout, CancellationToken cancellationToken) 135var sourceFileTask = _sourceLinkService.Value.GetSourceFilePathAsync(sourceDocument.SourceLinkUrl, relativePath, cancellationToken);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
78public async Task<MetadataAsSourceFile?> GetGeneratedFileAsync(
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
22protected abstract Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context);
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
37protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
PullMemberUp\MembersPuller.cs (4)
58public static Task<Solution> PullMembersUpAsync( 90private static async Task<Solution> PullMembersIntoInterfaceAsync( 265private static async Task<Solution> PullMembersIntoClassAsync( 467private static async Task<ImmutableDictionary<ISymbol, ImmutableArray<SyntaxNode>>> InitializeSymbolToDeclarationsMapAsync(
QuickInfo\AbstractEmbeddedLanguageQuickInfoProvider.cs (2)
29protected override async Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token) 48protected override Task<QuickInfoItem?> BuildQuickInfoAsync(CommonQuickInfoContext context, SyntaxToken token)
QuickInfo\CommonQuickInfoProvider.cs (7)
14protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token); 15protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(CommonQuickInfoContext context, SyntaxToken token); 17public override async Task<QuickInfoItem?> GetQuickInfoAsync(QuickInfoContext context) 33public async Task<QuickInfoItem?> GetQuickInfoAsync(CommonQuickInfoContext context) 47protected async Task<ImmutableArray<SyntaxToken>> GetTokensAsync(SyntaxTree tree, int position, System.Threading.CancellationToken cancellationToken) 69private async Task<QuickInfoItem?> GetQuickInfoAsync( 82private async Task<QuickInfoItem?> GetQuickInfoAsync(
QuickInfo\CommonSemanticQuickInfoProvider.cs (6)
23protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 38protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 50private async Task<(TokenInformation tokenInformation, SupportedPlatformData? supportedPlatforms)> ComputeQuickInfoDataAsync( 67private async Task<(TokenInformation, SupportedPlatformData supportedPlatforms)> ComputeFromLinkedDocumentsAsync( 154protected static Task<QuickInfoItem> CreateContentAsync( 186protected virtual Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoAsync(QuickInfoContext context, CancellationToken cancellationToken)
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
32public static async Task<QuickInfoContainerElement> BuildInteractiveContentAsync(
QuickInfo\QuickInfoProvider.cs (1)
19public abstract Task<QuickInfoItem?> GetQuickInfoAsync(QuickInfoContext context);
QuickInfo\QuickInfoService.cs (2)
34public Task<QuickInfoItem?> GetQuickInfoAsync( 43internal virtual Task<QuickInfoItem?> GetQuickInfoAsync(
QuickInfo\QuickInfoServiceWithProviders.cs (2)
48internal override async Task<QuickInfoItem?> GetQuickInfoAsync(Document document, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken) 72internal async Task<QuickInfoItem?> GetQuickInfoAsync(SemanticModel semanticModel, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken)
QuickInfo\QuickInfoUtilities.cs (2)
26public static Task<QuickInfoItem> CreateQuickInfoItemAsync(SolutionServices services, SemanticModel semanticModel, TextSpan span, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken) 29public static async Task<QuickInfoItem> CreateQuickInfoItemAsync(
Rename\SymbolicRenameInfo.cs (3)
113public static async Task<SymbolicRenameInfo> GetRenameInfoAsync( 123private static async Task<SyntaxToken> GetTriggerTokenAsync(Document document, int position, CancellationToken cancellationToken) 131private static async Task<SymbolicRenameInfo> GetRenameInfoAsync(
ReplaceConditionalWithStatements\AbstractReplaceConditionalWithStatementsCodeRefactoringProvider.cs (2)
194private static async Task<Document> ReplaceConditionalExpressionInSingleStatementAsync( 218private async Task<Document> ReplaceConditionalExpressionInLocalDeclarationStatementAsync(
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
157private static async Task<Document> ReplaceTextAsync(
ReplaceMethodWithProperty\AbstractReplaceMethodWithPropertyService.cs (1)
16public async Task<SyntaxNode?> GetMethodDeclarationAsync(CodeRefactoringContext context)
ReplaceMethodWithProperty\IReplaceMethodWithPropertyService.cs (1)
16Task<SyntaxNode> GetMethodDeclarationAsync(CodeRefactoringContext context);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (8)
151private static async Task<Solution> ReplaceMethodsWithPropertyAsync( 188private static async Task<Solution> UpdateReferencesAsync(Solution updatedSolution, string propertyName, bool nameChanged, ILookup<Document, ReferenceLocation> getReferencesByDocument, ILookup<Document, ReferenceLocation> setReferencesByDocument, CancellationToken cancellationToken) 205private static async Task<Solution> UpdateReferencesInDocumentAsync( 311private static async Task<Solution> ReplaceGetMethodsAndRemoveSetMethodsAsync( 339private static async Task<Solution> ReplaceGetMethodsAndRemoveSetMethodsAsync( 397private static async Task<ImmutableArray<GetAndSetMethods>> GetGetSetPairsAsync( 433private static async Task<SyntaxNode?> GetMethodDeclarationAsync(IMethodSymbol? method, CancellationToken cancellationToken) 445private static async Task<MultiDictionary<DocumentId, IMethodSymbol>> GetDefinitionsByDocumentIdAsync(
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (2)
30public abstract Task<ImmutableArray<SyntaxNode>> GetReplacementMembersAsync( 37public async Task<SyntaxNode?> GetPropertyDeclarationAsync(CodeRefactoringContext context)
ReplacePropertyWithMethods\IReplacePropertyWithMethodsService.cs (2)
16Task<SyntaxNode?> GetPropertyDeclarationAsync(CodeRefactoringContext context); 25Task<ImmutableArray<SyntaxNode>> GetReplacementMembersAsync(
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (8)
71private async Task<Solution> ReplacePropertyWithMethodsAsync( 191private async Task<Solution> UpdateReferencesAsync( 210private async Task<Solution> UpdateReferencesInDocumentAsync( 289private static async Task<Solution> ReplaceDefinitionsWithMethodsAsync( 311private static async Task<MultiDictionary<DocumentId, IPropertySymbol>> GetDefinitionsByDocumentIdAsync( 339private static async Task<Solution> ReplaceDefinitionsWithMethodsAsync( 389private static async Task<ImmutableArray<(IPropertySymbol property, SyntaxNode declaration)>> GetCurrentPropertiesAsync( 411private static async Task<SyntaxNode?> GetPropertyDeclarationAsync(
SemanticSearch\ISemanticSearchService.cs (1)
35Task<ExecuteQueryResult> ExecuteQueryAsync(
SemanticSearch\SearchCompilationFailureDefinitionItem.cs (1)
36public override Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
SemanticSearch\SearchExceptionDefinitionItem.cs (1)
40public override Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
SemanticSearch\SemanticSearchWorkspace.cs (1)
22public async Task<Document> UpdateQueryDocumentAsync(string? query, CancellationToken cancellationToken)
SemanticSearch\Tools\SemanticModelGetter.cs (1)
16public Task<SemanticModel> GetSemanticModelAsync(SyntaxTree tree)
Shared\Extensions\DocumentExtensions.cs (8)
19public static async Task<Document> ReplaceNodeAsync<TNode>(this Document document, TNode oldNode, TNode newNode, CancellationToken cancellationToken) 41public static async Task<Document> ReplaceNodesAsync(this Document document, 51public static async Task<ImmutableArray<T>> GetUnionItemsFromDocumentAndLinkedDocumentsAsync<T>( 54Func<Document, Task<ImmutableArray<T>>> getItemsWorker) 70public static async Task<bool> IsValidContextForDocumentOrLinkedDocumentsAsync( 72Func<Document, CancellationToken, Task<bool>> contextChecker, 93public static async Task<NamingRule> GetApplicableNamingRuleAsync(this Document document, ISymbol symbol, CancellationToken cancellationToken) 105public static async Task<NamingRule> GetApplicableNamingRuleAsync(
Shared\Utilities\AnnotatedSymbolMapping.cs (1)
47public static async Task<AnnotatedSymbolMapping> CreateAsync(
Shared\Utilities\ExtractTypeHelpers.cs (2)
29public static async Task<(Document containingDocument, SyntaxAnnotation typeAnnotation)> AddTypeToExistingFileAsync(Document document, INamedTypeSymbol newType, AnnotatedSymbolMapping symbolMapping, CancellationToken cancellationToken) 50public static async Task<(Document containingDocument, SyntaxAnnotation typeAnnotation)> AddTypeToNewFileAsync(
SignatureHelp\AbstractSignatureHelpProvider.cs (3)
38protected abstract Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken); 243public async Task<SignatureHelpItems?> GetItemsAsync( 306private static async Task<ImmutableArray<Document>> FindActiveRelatedDocumentsAsync(int position, Document document, CancellationToken cancellationToken)
SignatureHelp\CommonSignatureHelpUtilities.cs (1)
147public static async Task<ImmutableArray<IMethodSymbol>> GetCollectionInitializerAddMethodsAsync(
SignatureHelp\ISignatureHelpProvider.cs (1)
28Task<SignatureHelpItems?> GetItemsAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken);
SignatureHelp\SignatureHelpService.cs (2)
42public Task<(ISignatureHelpProvider? provider, SignatureHelpItems? bestItems)> GetSignatureHelpAsync( 60public static async Task<(ISignatureHelpProvider? provider, SignatureHelpItems? bestItems)> GetSignatureHelpAsync(
Snippets\RoslynLSPSnippetConverter.cs (2)
22public static async Task<string> GenerateLSPSnippetAsync(Document document, int caretPosition, ImmutableArray<SnippetPlaceholder> placeholders, TextChange textChange, int triggerLocation, CancellationToken cancellationToken) 108private static async Task<TextChange> ExtendSnippetTextChangeAsync(Document document, TextChange textChange, ImmutableArray<SnippetPlaceholder> placeholders, int caretPosition, int triggerLocation, CancellationToken cancellationToken)
Snippets\SnippetFunctionService.cs (7)
32public abstract Task<string?> GetContainingClassNameAsync(Document document, int position, CancellationToken cancellationToken); 38public static async Task<string?> GetSimplifiedTypeNameAsync(Document document, TextSpan fieldSpan, string fullyQualifiedTypeName, SimplifierOptions simplifierOptions, CancellationToken cancellationToken) 56public async Task<string?> GetSwitchExpansionAsync(Document document, TextSpan caseGenerationLocation, TextSpan switchExpressionLocation, SimplifierOptions simplifierOptions, CancellationToken cancellationToken) 120protected abstract Task<ITypeSymbol?> GetEnumSymbolAsync(Document document, TextSpan switchExpressionSpan, CancellationToken cancellationToken); 122protected abstract Task<(Document, TextSpan)> GetDocumentWithEnumCaseAsync(Document document, string fullyQualifiedTypeName, string firstEnumMemberName, TextSpan caseGenerationLocation, CancellationToken cancellationToken); 124private async Task<string?> GetSimplifiedEnumNameAsync( 140private static async Task<string?> GetSimplifiedTypeNameAtSpanAsync(Document documentWithFullyQualifiedTypeName, TextSpan fullyQualifiedTypeSpan, SimplifierOptions simplifierOptions, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (2)
39protected sealed override async Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken) 73protected sealed override async Task<SyntaxNode> AnnotateNodesToReformatAsync(
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (1)
59protected sealed override async Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractLockSnippetProvider.cs (1)
15protected sealed override Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractMainMethodSnippetProvider.cs (1)
24protected sealed override Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractPropertySnippetProvider.cs (2)
19protected abstract Task<TPropertyDeclarationSyntax> GenerateSnippetSyntaxAsync(Document document, int position, CancellationToken cancellationToken); 21protected sealed override async Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractSingleChangeSnippetProvider.cs (2)
15protected abstract Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken); 17protected sealed override async Task<ImmutableArray<TextChange>> GenerateSnippetTextChangesAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractSnippetProvider.cs (9)
41protected abstract Task<ImmutableArray<TextChange>> GenerateSnippetTextChangesAsync(Document document, int position, CancellationToken cancellationToken); 70public async Task<SnippetChange> GetSnippetChangeAsync(Document document, int position, CancellationToken cancellationToken) 139private static async Task<Document> CleanupDocumentAsync( 167private async Task<Document> GetDocumentWithSnippetAndTriviaAsync(Document snippetDocument, int position, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken) 188private static async Task<Document> GetDocumentWithSnippetAsync(Document document, ImmutableArray<TextChange> snippets, CancellationToken cancellationToken) 198private async Task<Document> AddFormatAnnotationAsync(Document document, int position, CancellationToken cancellationToken) 208protected virtual async Task<SyntaxNode> AnnotateNodesToReformatAsync( 227private async Task<Document> AddIndentationToDocumentAsync(Document document, CancellationToken cancellationToken) 238protected virtual Task<Document> AddIndentationToDocumentAsync(Document document, TSnippetSyntax snippet, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (4)
18protected abstract Task<TTypeDeclarationSyntax> GenerateTypeDeclarationAsync(Document document, int position, CancellationToken cancellationToken); 19protected abstract Task<TextChange?> GetAccessibilityModifiersChangeAsync(Document document, int position, CancellationToken cancellationToken); 21protected sealed override async Task<ImmutableArray<TextChange>> GenerateSnippetTextChangesAsync(Document document, int position, CancellationToken cancellationToken) 42protected static async Task<bool> AreAccessibilityModifiersRequiredAsync(Document document, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractUsingSnippetProvider.cs (1)
17protected sealed override async Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\ISnippetProvider.cs (1)
36Task<SnippetChange> GetSnippetChangeAsync(Document document, int position, CancellationToken cancellationToken);
SolutionCrawler\AbstractDocumentDifferenceService.cs (1)
19public async Task<SyntaxNode?> GetChangedMemberAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken)
SolutionCrawler\IDocumentDifferenceService.cs (1)
13Task<SyntaxNode?> GetChangedMemberAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (2)
200private static async Task<string> GetInsertionTextAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 220private async Task<Document> UpdateAsync(Document document, SyntaxToken nameToken, string newName, CancellationToken cancellationToken)
SpellCheck\AbstractSpellCheckSpanService.cs (1)
23public async Task<ImmutableArray<SpellCheckSpan>> GetSpansAsync(Document document, CancellationToken cancellationToken)
SpellCheck\ISpellCheckingSpanService.cs (1)
17Task<ImmutableArray<SpellCheckSpan>> GetSpansAsync(Document document, CancellationToken cancellationToken);
SplitOrMergeIfStatements\AbstractMergeIfStatementsCodeRefactoringProvider.cs (4)
25Func<CancellationToken, Task<Document>> createChangedDocument, MergeDirection direction, string ifKeywordText); 27protected abstract Task<bool> CanBeMergedUpAsync( 30protected abstract Task<bool> CanBeMergedDownAsync( 64private async Task<Document> RefactorAsync(Document document, TextSpan upperIfOrElseIfSpan, TextSpan lowerIfOrElseIfSpan, CancellationToken cancellationToken)
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (3)
23protected abstract CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText); 25protected abstract Task<SyntaxNode> GetChangedRootAsync( 60private async Task<Document> RefactorAsync(Document document, TextSpan tokenSpan, TextSpan ifOrElseIfSpan, CancellationToken cancellationToken)
SplitOrMergeIfStatements\Consecutive\AbstractMergeConsecutiveIfStatementsCodeRefactoringProvider.cs (6)
48protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, MergeDirection direction, string ifKeywordText) 55protected sealed override Task<bool> CanBeMergedUpAsync( 68protected sealed override Task<bool> CanBeMergedDownAsync( 158private static Task<bool> CanBeMergedWithPreviousStatementAsync( 172private static Task<bool> CanBeMergedWithNextStatementAsync( 186private static async Task<bool> CanStatementsBeMergedAsync(
SplitOrMergeIfStatements\Consecutive\AbstractSplitIntoConsecutiveIfStatementsCodeRefactoringProvider.cs (3)
47protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText) 53protected sealed override async Task<SyntaxNode> GetChangedRootAsync( 115private static async Task<bool> CanBeSeparateStatementsAsync(
SplitOrMergeIfStatements\Nested\AbstractMergeNestedIfStatementsCodeRefactoringProvider.cs (4)
36protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, MergeDirection direction, string ifKeywordText) 43protected sealed override Task<bool> CanBeMergedUpAsync( 56protected sealed override Task<bool> CanBeMergedDownAsync( 144private static async Task<bool> CanBeMergedAsync(
SplitOrMergeIfStatements\Nested\AbstractSplitIntoNestedIfStatementsCodeRefactoringProvider.cs (2)
34protected sealed override CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText) 40protected sealed override Task<SyntaxNode> GetChangedRootAsync(
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
389private static async Task<(ImmutableArray<Diagnostic> reportedDiagnostics, ImmutableArray<string> unhandledIds)> GetReportedDiagnosticsForIdsAsync( 732private async Task<bool> ProcessSuppressMessageAttributesAsync(
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
52private async Task<TAnonymousObjectMemberDeclaratorSyntax?> GetMemberDeclaratorAsync(
src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
57private static async Task<INamedTypeSymbol?> GetObsoleteAttributeAsync(Document document, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\AddParameter\AbstractAddParameterCodeFixProvider.cs (4)
345? new Func<CancellationToken, Task<Solution>>(cancellationToken => FixAsync(document, methodToUpdate, argumentToInsert, arguments, fixAllReferences: true, cancellationToken)) 373private async Task<Solution> FixAsync( 401private async Task<(ITypeSymbol, RefKind)> GetArgumentTypeAndRefKindAsync(Document invocationDocument, TArgumentSyntax argument, CancellationToken cancellationToken) 410private static async Task<(string argumentNameSuggestion, bool isNamed)> GetNameSuggestionForArgumentAsync(
src\Analyzers\Core\CodeFixes\AddParameter\AddParameterService.cs (4)
77public static async Task<Solution> AddParameterAsync<TExpressionSyntax>( 158async Task<Solution> AddConstructorAssignmentsAsync(Solution rewrittenSolution) 164async Task<Solution?> TryAddConstructorAssignmentsAsync(Solution rewrittenSolution) 214private static async Task<ImmutableArray<IMethodSymbol>> FindMethodDeclarationReferencesAsync(
src\Analyzers\Core\CodeFixes\AddParameter\CodeFixData.cs (4)
13Func<CancellationToken, Task<Solution>> createChangedSolutionNonCascading, 14Func<CancellationToken, Task<Solution>>? createChangedSolutionCascading) 25public Func<CancellationToken, Task<Solution>> CreateChangedSolutionNonCascading { get; } = createChangedSolutionNonCascading ?? throw new ArgumentNullException(nameof(createChangedSolutionNonCascading)); 30public Func<CancellationToken, Task<Solution>>? CreateChangedSolutionCascading { get; } = createChangedSolutionCascading;
src\Analyzers\Core\CodeFixes\ConflictMarkerResolution\AbstractConflictMarkerCodeFixProvider.cs (6)
300static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Document>> action, string equivalenceKey) 313private static async Task<Document> AddEditsAsync( 379private static Task<Document> TakeTopAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 382private static Task<Document> TakeBottomAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 385private static Task<Document> TakeBothAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 391private async Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
19protected abstract Task<string> GetDescriptionAsync(Diagnostic diagnostic, SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 20protected abstract Task<(SyntaxTree syntaxTree, SyntaxNode root)?> GetRootInOtherSyntaxTreeAsync(SyntaxNode node, SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken); 52private async Task<CodeAction?> GetCodeActionAsync(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
57protected async Task<Document> AddParamTagAsync(
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
58private async Task<Document> RemoveDuplicateParamTagAsync(
src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
45private async Task<Document> GetTransformedDocumentAsync(Document document, CancellationToken cancellationToken) 48private async Task<SyntaxNode> GetTransformedSyntaxRootAsync(Document document, CancellationToken cancellationToken) 57internal static async Task<SyntaxNode> GetTransformedSyntaxRootAsync(ISyntaxFacts syntaxFacts, AbstractFileHeaderHelper fileHeaderHelper, SyntaxTrivia newLineTrivia, Document document, string? fileHeaderTemplate, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
62private async Task<Document> FixOneAsync(CodeFixContext context, Diagnostic diagnostic, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
80public async Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (7)
65public static async Task<State?> GenerateAsync( 82private async Task<bool> TryInitializeAsync( 140private async Task<bool> TryInitializeDelegatedConstructorAsync(CancellationToken cancellationToken) 403public async Task<Document> GetChangedDocumentAsync( 419private async Task<Document?> GenerateThisOrBaseDelegatingConstructorAsync( 455private async Task<(ImmutableArray<ISymbol>, ImmutableArray<SyntaxNode>)> GenerateMembersAndAssignmentsAsync( 477private async Task<Document> GenerateMemberDelegatingConstructorAsync(
src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
130public static async Task<
src\Analyzers\Core\CodeFixes\GenerateConstructor\IGenerateConstructorService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
30protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\IGenerateDefaultConstructorsService.cs (1)
16Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
22protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
27public static async Task<State?> GenerateAsync(
src\Analyzers\Core\CodeFixes\GenerateEnumMember\IGenerateEnumMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
26protected abstract Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (1)
27public async Task<ImmutableArray<CodeAction>> GenerateConversionAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (2)
18public static async Task<State> GenerateConversionStateAsync( 33private Task<bool> TryInitializeConversionAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
23public async Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (2)
25public static async Task<State> GenerateDeconstructMethodStateAsync( 41private async Task<bool> TryInitializeMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28public async Task<ImmutableArray<CodeAction>> GenerateMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
25public static async Task<State> GenerateMethodStateAsync( 40private Task<bool> TryInitializeMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
62protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
58protected async Task<bool> TryFinishInitializingStateAsync(TService service, SemanticDocument document, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateConversionService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConversionAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateDeconstructMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateParameterizedMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateMethodAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
123private async Task<ISet<INamedTypeSymbol>> GetDerivedAndImplementedTypesAsync(
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
47protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (2)
32public async Task<ImmutableArray<CodeAction>> GenerateVariableAsync( 115private static async Task<bool> NameIsHighlyUnlikelyToWarrantSymbolAsync(
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateLocalCodeAction.cs (2)
37protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 45private async Task<SyntaxNode> GetNewRootAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
42protected override Task<Solution?> GetChangedSolutionAsync(
src\Analyzers\Core\CodeFixes\GenerateVariable\IGenerateVariableService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateVariableAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (3)
40public static async Task<ImplementAbstractClassData?> TryGetDataAsync( 72public static async Task<Document?> TryImplementAbstractClassAsync( 82public async Task<Document> ImplementAbstractClassAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceService.cs (3)
42public async Task<Document> ImplementInterfaceAsync( 62public async Task<ImplementInterfaceInfo?> AnalyzeAsync(Document document, SyntaxNode interfaceType, CancellationToken cancellationToken) 91public async Task<Document> ImplementInterfaceAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\IImplementInterfaceService.cs (3)
24Task<Document> ImplementInterfaceAsync(Document document, ImplementTypeOptions options, SyntaxNode node, CancellationToken cancellationToken); 26Task<ImplementInterfaceInfo?> AnalyzeAsync(Document document, SyntaxNode interfaceType, CancellationToken cancellationToken); 28Task<Document> ImplementInterfaceAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
56public Task<Document> ImplementInterfaceAsync(CancellationToken cancellationToken) 69private async Task<Document> ImplementInterfaceAsync(
src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
39private async Task<Document> ImplementDisposePatternAsync( 88private async Task<Document> AddFinalizerCommentAsync( 227private static async Task<IFieldSymbol> CreateDisposedValueFieldAsync(
src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
17protected abstract Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (3)
101private async Task<Solution> FixNodeAsync( 153private async Task<Solution> RenameThenAddAsyncTokenAsync( 183private async Task<Solution> AddAsyncTokenAsync(
src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (6)
51private async Task<Solution> FixNodeAsync( 73private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 96private async Task<Solution> RemoveAsyncTokenAsync( 119private static async Task<Solution> RemoveAwaitFromCallersAsync( 154private static async Task<Solution> RemoveAwaitFromCallersAsync( 170private static async Task<Solution> RemoveAwaitFromCallersAsync(
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
42private static async Task<Solution> FixAllInDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (3)
28public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 51static async Task<ImmutableArray<Diagnostic>> GetSolutionDiagnosticsAsync(FixAllContext fixAllContext) 65private static async Task<Solution> FixAllByDocumentAsync(
src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (2)
16public static async Task<NamingRule> GetApplicableNamingRuleAsync( 34public static async Task<ImmutableArray<NamingRule>> GetNamingRulesAsync(
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (5)
103private static async Task<Solution> FixAsync( 120private readonly Func<CancellationToken, Task<Solution>> _createChangedSolutionAsync; 137Func<CancellationToken, Task<Solution>> createChangedSolutionAsync, 150protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 153protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\NewLines\ConsecutiveStatementPlacement\ConsecutiveStatementPlacementCodeFixProvider.cs (2)
41private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 44public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
41private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 44private static async Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (2)
103private Task<Document> FixAsync( 112private Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
42private static Task<Document> RemoveUnnecessaryImportsAsync(
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (9)
272private static async Task<Document> PreprocessDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 292private async Task<SyntaxNode> GetNewRootAsync( 744private async Task<SyntaxNode> PostProcessDocumentAsync( 773private static async Task<SyntaxNode> PostProcessDocumentCoreAsync( 774Func<SyntaxNode, Document, SyntaxFormattingOptions, CancellationToken, Task<SyntaxNode>> processMemberDeclarationAsync, 805private async Task<SyntaxNode> ReplaceDiscardDeclarationsWithAssignmentsAsync(SyntaxNode memberDeclaration, Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken) 821private async Task<SyntaxNode> AdjustLocalDeclarationsAsync( 890async Task<bool> TryRemoveUnusedLocalAsync(TLocalDeclarationStatementSyntax newDecl, TLocalDeclarationStatementSyntax originalDecl) 914private static async Task<bool> IsLocalDeclarationWithNoReferencesAsync(
src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
57private static async Task<Solution> UnsealDeclarationsAsync(
src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (3)
127private ProjectOptionsChangeAction(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 132public static ProjectOptionsChangeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 135protected override Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
55protected abstract Task<(SyntaxNode oldNode, SyntaxNode newNode)> GetReplacementNodesAsync(
src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
84protected async Task<TExpressionSyntax> CreateConditionalExpressionAsync( 144private static async Task<bool> MakeMultiLineAsync(
StackTraceExplorer\AbstractStackTraceSymbolResolver.cs (1)
15public abstract Task<IMethodSymbol?> TryGetBestMatchAsync(
StackTraceExplorer\IStackTraceExplorerService.cs (1)
20Task<DefinitionItem?> TryFindDefinitionAsync(Solution solution, ParsedFrame frame, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken);
StackTraceExplorer\StackFrameLocalMethodResolver.cs (1)
17public override async Task<IMethodSymbol?> TryGetBestMatchAsync(
StackTraceExplorer\StackFrameMethodSymbolResolver.cs (1)
15public override Task<IMethodSymbol?> TryGetBestMatchAsync(Project project,
StackTraceExplorer\StackTraceAnalyzer.cs (1)
26public static Task<StackTraceAnalysisResult> AnalyzeAsync(string callstack, CancellationToken cancellationToken)
StackTraceExplorer\StackTraceExplorerService.cs (1)
43public async Task<DefinitionItem?> TryFindDefinitionAsync(Solution solution, ParsedFrame frame, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken)
StackTraceExplorer\StackTraceExplorerUtilities.cs (2)
24public static async Task<DefinitionItem?> GetDefinitionAsync(Solution solution, StackFrameCompilationUnit compilationUnit, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken) 110private static async Task<IMethodSymbol?> TryGetBestMatchAsync(Project project, string fullyQualifiedTypeName, StackFrameSimpleNameNode methodNode, StackFrameParameterList methodArguments, StackFrameTypeArgumentList? methodTypeArguments, CancellationToken cancellationToken)
StringIndentation\IStringIndentationService.cs (1)
15Task<ImmutableArray<StringIndentationRegion>> GetStringIndentationRegionsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken);
Structure\BlockStructureService.cs (1)
27public abstract Task<BlockStructure> GetBlockStructureAsync(Document document, BlockStructureOptions options, CancellationToken cancellationToken);
Structure\BlockStructureServiceWithProviders.cs (1)
46public override async Task<BlockStructure> GetBlockStructureAsync(
SymbolMapping\ISymbolMappingService.cs (2)
22Task<SymbolMappingResult?> MapSymbolAsync(Document document, SymbolKey symbolId, CancellationToken cancellationToken = default); 33Task<SymbolMappingResult?> MapSymbolAsync(Document document, ISymbol symbol, CancellationToken cancellationToken = default);
SymbolMapping\SymbolMappingServiceFactory.cs (2)
24public async Task<SymbolMappingResult> MapSymbolAsync(Document document, SymbolKey symbolId, CancellationToken cancellationToken) 36public Task<SymbolMappingResult> MapSymbolAsync(Document document, ISymbol symbol, CancellationToken cancellationToken)
SymbolSearch\Windows\IFileDownloaderFactory.cs (1)
21public Task<Stream?> ReadFileAsync();
SymbolSearch\Windows\SymbolSearchUpdateEngine.Update.cs (11)
164private async Task<TimeSpan> UpdateDatabaseInBackgroundWorkerAsync(CancellationToken cancellationToken) 227private async Task<TimeSpan> DownloadFullDatabaseAsync(FileInfo databaseFileInfo, CancellationToken cancellationToken) 233private async Task<(bool succeeded, TimeSpan delay)> DownloadFullDatabaseWorkerAsync(FileInfo databaseFileInfo, CancellationToken cancellationToken) 249private async Task<(bool succeeded, TimeSpan delay)> ProcessFullDatabaseXElementAsync( 388private async Task<TimeSpan> PatchLocalDatabaseAsync(FileInfo databaseFileInfo, CancellationToken cancellationToken) 466private async Task<TimeSpan> ProcessPatchXElementAsync( 490private async Task<TimeSpan?> TryProcessPatchXElementAsync( 571private async Task<XElement> DownloadFileAsync(string serverPath, CancellationToken cancellationToken) 611private async Task<(XElement? element, TimeSpan delay)> TryDownloadFileAsync(IFileDownloader fileDownloader, CancellationToken cancellationToken) 686private async Task<(bool succeeded, byte[]? contentBytes)> TryParseDatabaseElementAsync(XElement element, CancellationToken cancellationToken) 720private static async Task<byte[]> ConvertContentAttributeAsync(XAttribute contentsAttribute, CancellationToken cancellationToken)
SyncNamespaces\AbstractSyncNamespacesService.cs (9)
32public async Task<Solution> SyncNamespacesAsync( 58private static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetDiagnosticsByProjectAsync( 75private static async Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync( 95private static async Task<FixAllContext> GetFixAllContextAsync( 136private static async Task<Solution> ApplyCodeFixAsync( 154private static readonly Task<IEnumerable<Diagnostic>> EmptyDiagnosticResult = Task.FromResult(Enumerable.Empty<Diagnostic>()); 163public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 168public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 176public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
SyncNamespaces\ISyncNamespacesService.cs (1)
19Task<Solution> SyncNamespacesAsync(
TaskList\AbstractTaskListService.cs (2)
26public async Task<ImmutableArray<TaskListItem>> GetTaskListItemsAsync( 48private async Task<ImmutableArray<TaskListItem>> GetTaskListItemsInProcessAsync(
Testing\AbstractTestMethodFinder.cs (2)
33public async Task<ImmutableArray<SyntaxNode>> GetPotentialTestMethodsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) 86private async Task<ImmutableArray<SyntaxNode>> GetPotentialTestNodesAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken)
Testing\ITestMethodFinder.cs (1)
19Task<ImmutableArray<SyntaxNode>> GetPotentialTestMethodsAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken);
UnusedReferences\IReferenceCleanupService.cs (2)
18Task<ImmutableArray<ReferenceInfo>> GetProjectReferencesAsync( 27Task<bool> TryUpdateReferenceAsync(
UnusedReferences\IUnusedReferenceAnalysisService.cs (1)
14Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync(
UnusedReferences\UnusedReferencesRemover.cs (1)
24public static async Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync(
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (5)
55protected abstract Task<SyntaxNode> UpdatePropertyAsync( 88private async Task<Solution> ProcessResultAsync( 101private async Task<Solution> ProcessResultWorkerAsync( 290private async Task<(IFieldSymbol? fieldSymbol, IPropertySymbol? propertySymbol)> MapDiagnosticToCurrentSolutionAsync( 370private async Task<SyntaxNode> FormatAsync(
UseAutoProperty\UseAutoPropertyFixAllProvider.cs (2)
26public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 30private async Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalContext, ImmutableArray<FixAllContext> contexts)
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
135private Task<Document> AddNamedArgumentsAsync(
ValueTracking\IValueTrackingService.cs (2)
15Task<ImmutableArray<ValueTrackedItem>> TrackValueSourceAsync(TextSpan selection, Document document, CancellationToken cancellationToken); 16Task<ImmutableArray<ValueTrackedItem>> TrackValueSourceAsync(Solution solution, ValueTrackedItem previousTrackedItem, CancellationToken cancellationToken);
ValueTracking\ValueTracker.cs (2)
255private static async Task<(ISymbol?, SyntaxNode?)> GetSelectedSymbolAsync(TextSpan textSpan, Document document, CancellationToken cancellationToken) 321private static async Task<ISymbol?> GetSymbolAsync(ValueTrackedItem? item, Solution solution, CancellationToken cancellationToken)
ValueTracking\ValueTracker.OperationCollector.cs (1)
88private async Task<bool> TryVisitChildrenAsync(IOperation operation, CancellationToken cancellationToken)
ValueTracking\ValueTrackingProgressCollector.cs (1)
40internal async Task<bool> TryReportAsync(Solution solution, Location location, ISymbol symbol, CancellationToken cancellationToken = default)
ValueTracking\ValueTrackingService.cs (2)
27public async Task<ImmutableArray<ValueTrackedItem>> TrackValueSourceAsync( 57public async Task<ImmutableArray<ValueTrackedItem>> TrackValueSourceAsync(
Workspace\CompileTimeSolutionProvider.cs (1)
171internal static async Task<Document?> TryGetCompileTimeDocumentAsync(
Wrapping\AbstractCodeActionComputer.cs (8)
80protected abstract Task<ImmutableArray<WrappingGroup>> ComputeWrappingGroupsAsync(CancellationToken cancellationToken); 82protected Task<string> GetSmartIndentationAfterAsync(SyntaxNodeOrToken nodeOrToken, CancellationToken cancellationToken) 85protected async Task<string> GetIndentationAfterAsync( 119protected async Task<WrapItemsAction?> TryCreateCodeActionAsync( 162private async Task<Document> FormatDocumentAsync( 171private async Task<(SyntaxNode root, SyntaxNode rewrittenRoot, TextSpan spanToFormat)> RewriteTreeAsync( 220private async Task<(SyntaxNode root, SyntaxNode rewrittenRoot, TextSpan spanToFormat)> RewriteTreeAsync( 270public async Task<ImmutableArray<CodeAction>> GetTopLevelCodeActionsAsync(CancellationToken cancellationToken)
Wrapping\AbstractWrapper.cs (2)
34public abstract Task<ICodeActionComputer?> TryCreateComputerAsync( 37protected static async Task<bool> ContainsUnformattableContentAsync(
Wrapping\BinaryExpression\AbstractBinaryExpressionWrapper.cs (1)
43public sealed override async Task<ICodeActionComputer?> TryCreateComputerAsync(
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (4)
69protected override async Task<ImmutableArray<WrappingGroup>> ComputeWrappingGroupsAsync(CancellationToken cancellationToken) 78private async Task<WrapItemsAction> GetWrapCodeActionAsync(bool align, CancellationToken cancellationToken) 83private Task<WrapItemsAction> GetUnwrapCodeActionAsync(CancellationToken cancellationToken) 86private async Task<ImmutableArray<Edit>> GetWrapEditsAsync(bool align, CancellationToken cancellationToken)
Wrapping\ChainedExpression\AbstractChainedExpressionWrapper.cs (1)
73public sealed override async Task<ICodeActionComputer?> TryCreateComputerAsync(
Wrapping\ChainedExpression\ChainedExpressionCodeActionComputer.cs (2)
93protected override async Task<ImmutableArray<WrappingGroup>> ComputeWrappingGroupsAsync(CancellationToken cancellationToken) 129private async Task<ImmutableArray<Edit>> GetWrapEditsAsync(int wrappingColumn, bool align, CancellationToken cancellationToken)
Wrapping\ICodeActionComputer.cs (1)
17Task<ImmutableArray<CodeAction>> GetTopLevelCodeActionsAsync(CancellationToken cancellationToken);
Wrapping\ISyntaxWrapper.cs (1)
26Task<ICodeActionComputer?> TryCreateComputerAsync(
Wrapping\SeparatedSyntaxList\AbstractSeparatedSyntaxListWrapper.cs (1)
52public override async Task<ICodeActionComputer?> TryCreateComputerAsync(
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (13)
112private Task<string> GetSingleIndentationAsync(CancellationToken cancellationToken) 122private async Task<SyntaxTrivia> GetIndentationTriviaAsync(WrappingStyle wrappingStyle, CancellationToken cancellationToken) 129private Task<string> GetBraceTokenIndentationAsync(CancellationToken cancellationToken) 137protected override async Task<ImmutableArray<WrappingGroup>> ComputeWrappingGroupsAsync(CancellationToken cancellationToken) 154private async Task<WrappingGroup> GetUnwrapGroupAsync(CancellationToken cancellationToken) 191private async Task<WrapItemsAction?> GetUnwrapAllCodeActionAsync( 202private async Task<ImmutableArray<Edit>> GetUnwrapAllEditsAsync(WrappingStyle wrappingStyle, CancellationToken cancellationToken) 229private async Task<WrappingGroup> GetWrapLongGroupAsync(CancellationToken cancellationToken) 276private async Task<WrapItemsAction?> GetWrapLongLineCodeActionAsync( 288private async Task<ImmutableArray<Edit>> GetWrapLongLinesEditsAsync( 364private async Task<WrappingGroup> GetWrapEveryGroupAsync(CancellationToken cancellationToken) 403private async Task<WrapItemsAction?> GetWrapEveryNestedCodeActionAsync( 423private async Task<ImmutableArray<Edit>> GetWrapEachEditsAsync(
Wrapping\WrapItemsAction.cs (3)
20internal sealed class WrapItemsAction(string title, string parentTitle, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument) 37protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 44protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features.Test.Utilities (3)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (3)
168internal async Task<DebuggingSession> StartDebuggingSessionAsync( 222internal static async Task<(ModuleUpdates updates, ImmutableArray<DiagnosticData> diagnostics)> EmitSolutionUpdateAsync( 495public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\EditSessionActiveStatementsTests.cs (1)
68private static async Task<Solution> AddDefaultTestSolutionAsync(TestWorkspace workspace, string[] markedSources)
EditAndContinue\WatchHotReloadServiceTests.cs (1)
30private static Task<SourceText> GetCommittedDocumentTextAsync(WatchHotReloadService service, DocumentId documentId)
Microsoft.CodeAnalysis.InteractiveHost (76)
Interactive\Core\InteractiveHost.cs (11)
96internal async Task<RemoteService?> TryGetServiceAsync() 217private async Task<InitializedRemoteService> TryGetOrCreateRemoteServiceAsync() 270private async Task<RemoteExecutionResult> ExecuteRemoteAsync(string targetName, params object?[] arguments) 273private async Task<TResult> InvokeRemoteAsync<TResult>(string targetName, params object?[] arguments) 284private static async Task<RemoteExecutionResult> ExecuteRemoteAsync(RemoteService remoteService, string targetName, params object?[] arguments) 287private static async Task<TResult> InvokeRemoteAsync<TResult>(RemoteService remoteService, string targetName, params object?[] arguments) 331public async Task<RemoteExecutionResult> ResetAsync(InteractiveHostOptions options) 363public Task<RemoteExecutionResult> ExecuteAsync(string code) 378public Task<RemoteExecutionResult> ExecuteFileAsync(string path) 392public Task<bool> AddReferenceAsync(string reference) 401public Task<RemoteExecutionResult> SetPathsAsync(ImmutableArray<string> referenceSearchPaths, ImmutableArray<string> sourceSearchPaths, string baseDirectory)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (3)
56internal Task<InitializedRemoteService> GetInitializedServiceAsync() 62private async Task<InitializedRemoteService> TryStartAndInitializeProcessAsync(CancellationToken cancellationToken) 135private async Task<RemoteService?> TryStartProcessAsync(string hostPath, CultureInfo culture, CultureInfo uiCulture, CancellationToken cancellationToken)
Interactive\Core\InteractiveHost.Service.cs (25)
42private Task<EvaluationState> _lastTask; 163public Task<InteractiveHostPlatformInfo.Data> InitializeAsync(string replServiceProviderTypeName) 243public async Task<RemoteExecutionResult.Data> SetPathsAsync( 257private async Task<EvaluationState> SetPathsAsync( 258Task<EvaluationState> lastTask, 291public async Task<RemoteExecutionResult.Data> InitializeContextAsync(string? initializationFilePath, bool isRestarting) 305public async Task<bool> AddReferenceAsync(string reference) 316private async Task<EvaluationState> AddReferenceAsync(Task<EvaluationState> lastTask, TaskCompletionSource<bool> completionSource, string reference) 348public async Task<RemoteExecutionResult.Data> ExecuteAsync(string text) 359private async Task<EvaluationState> ExecuteAsync(TaskCompletionSource<RemoteExecutionResult> completionSource, Task<EvaluationState> lastTask, string text) 406public async Task<RemoteExecutionResult.Data> ExecuteFileAsync(string path) 467private static async Task<EvaluationState> ReportUnhandledExceptionIfAnyAsync(Task<EvaluationState> lastTask) 496private async Task<EvaluationState> InitializeContextAsync( 497Task<EvaluationState> lastTask, 678private async Task<EvaluationState> ExecuteFileAsync( 680Task<EvaluationState> lastTask, 704private async Task<ScriptState<object>?> TryExecuteFileAsync(EvaluationState state, string fullPath) 750private Task<ScriptState<object>> ExecuteOnUIThreadAsync(Script<object> script, ScriptState<object>? state, bool displayResult) 752return (Task<ScriptState<object>>)_invokeOnMainThread((Func<Task<ScriptState<object>>>)(async () => 756var task = (state == null) 843public Task<string> GetRuntimeDirectoryAsync()
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
334public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 339public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (15)
19public abstract Task<T> GetValueAsync(CancellationToken cancellationToken); 22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 62private Task<T>? _cachedResult; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 326public override Task<T> GetValueAsync(CancellationToken cancellationToken) 335var cachedResult = _cachedResult; 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction; 409var task = computationToStart.AsynchronousComputeFunction(_data, cancellationToken); 454private void CompleteWithTask(Task<T> task, CancellationToken cancellationToken) 486private Task<T> GetCachedValueAndCacheThisValueIfNoneCached_NoLock(Task<T> task) 569public void CompleteFromTask(Task<T> task)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (3)
17public static T WaitAndGetResult<T>(this Task<T> task, CancellationToken cancellationToken) 45public static T WaitAndGetResult_CanCallOnBackground<T>(this Task<T> task, CancellationToken cancellationToken) 83public static TResult VerifyCompleted<TResult>(this Task<TResult> task)
Microsoft.CodeAnalysis.LanguageServer (37)
BrokeredServices\BrokeredServiceContainer.cs (1)
36internal static async Task<BrokeredServiceContainer> CreateAsync(ExportProvider exportProvider, CancellationToken cancellationToken)
BrokeredServices\MefServiceBrokerOfExportedServices.cs (2)
15private Task<GlobalBrokeredServiceContainer>? _containerTask; 28protected override Task<GlobalBrokeredServiceContainer> GetBrokeredServiceContainerAsync(CancellationToken cancellationToken)
DotnetCliHelper.cs (2)
36private async Task<string> GetDotnetSdkFolderFromDotnetExecutableAsync(string projectOutputDirectory, CancellationToken cancellationToken) 115public async Task<string> GetVsTestConsolePathAsync(string projectOutputDirectory, CancellationToken cancellationToken)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (1)
132protected override async Task<RemoteProjectLoadResult?> TryLoadProjectInMSBuildHostAsync(
FileBasedPrograms\VirtualProjectXmlProvider.cs (1)
26internal async Task<(string VirtualProjectXml, ImmutableArray<SimpleDiagnostic> Diagnostics)?> GetVirtualProjectContentAsync(string documentFilePath, ILogger logger, CancellationToken cancellationToken)
HostWorkspace\LanguageServerProjectLoader.cs (3)
187protected abstract Task<RemoteProjectLoadResult?> TryLoadProjectInMSBuildHostAsync( 191private async Task<bool> ReloadProjectAsync(ProjectToLoad projectToLoad, ToastErrorReporter toastErrorReporter, BuildHostProcessManager buildHostProcessManager, CancellationToken cancellationToken) 315async Task<(LoadedProject, bool alreadyExists)> GetOrCreateProjectTargetAsync(ImmutableArray<LoadedProject> previousProjectTargets, ProjectFileInfo loadedProjectInfo)
HostWorkspace\LanguageServerProjectSystem.cs (1)
82protected override async Task<RemoteProjectLoadResult?> TryLoadProjectInMSBuildHostAsync(
HostWorkspace\ProjectInitializationHandler.cs (1)
65private async Task<bool> TrySubscribeAsync(CancellationToken cancellationToken)
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
134private static async Task<string> GetProjectIdAsync(ProjectToLoad projectToLoad)
HostWorkspace\Razor\RazorDynamicFileInfoProvider.cs (1)
31public async Task<DynamicFileInfo?> GetDynamicFileInfoAsync(ProjectId projectId, string? projectFilePath, string filePath, CancellationToken cancellationToken)
HostWorkspace\WorkspaceProject.cs (1)
209public async Task<IWorkspaceProjectBatch> StartBatchAsync(CancellationToken cancellationToken)
HostWorkspace\WorkspaceProjectFactoryService.cs (2)
43public async Task<IWorkspaceProject> CreateAndAddProjectAsync(WorkspaceProjectCreationInfo creationInfo, CancellationToken _) 73public Task<IReadOnlyCollection<string>> GetSupportedBuildSystemPropertiesAsync(CancellationToken _)
LanguageServer\Handler\CopilotCompletion\CopilotCompletionResolveContextHandler.cs (1)
32public async Task<IContextItem[]> HandleRequestAsync(ContextResolveParam param, RequestContext context, CancellationToken cancellationToken)
LanguageServer\Handler\DebugConfiguration\WorkspaceDebugConfigurationHandler.cs (1)
31public Task<ProjectDebugConfiguration[]> HandleRequestAsync(WorkspaceDebugConfigurationParams request, RequestContext context, CancellationToken cancellationToken)
LanguageServer\Handler\Restore\RestorableProjectsHandler.cs (1)
28public Task<string[]> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken)
LanguageServer\Handler\Restore\RestoreHandler.cs (2)
31public async Task<RestorePartialResult[]> HandleRequestAsync(RestoreParams request, RequestContext context, CancellationToken cancellationToken) 63private async Task<bool> RestoreAsync(ImmutableArray<string> pathsToRestore, BufferedProgress<RestorePartialResult> progress, CancellationToken cancellationToken)
LanguageServerExportProviderBuilder.cs (2)
33public static async Task<ExportProvider> CreateExportProviderAsync( 84protected override Task<ExportProvider> CreateExportProviderAsync(CancellationToken cancellationToken)
Services\StarredCompletions\StarredCompletionProvider.cs (2)
29public override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default) 36internal override async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Services\StarredCompletions\StarredCompletionsAssemblyHelper.cs (4)
62internal static async Task<CompletionProvider?> GetCompletionProviderAsync(CancellationToken cancellationToken) 138private static async Task<CompletionProvider> CreateCompletionProviderAsync(MethodInfo createCompletionProviderMethodInfo, IServiceBroker serviceBroker, string modelBasePath, ILogger logger) 145var completionProvider = (Task<CompletionProvider>)completionProviderObj;
Testing\RunTestsHandler.cs (2)
36public async Task<RunTestsPartialResult[]> HandleRequestAsync(RunTestsParams request, RequestContext context, CancellationToken cancellationToken) 170private async Task<string?> GetRunSettingsAsync(string? runSettingsPath, BufferedProgress<RunTestsPartialResult> progress, CancellationToken cancellationToken)
Testing\TestDiscoverer.cs (3)
33public async Task<ImmutableArray<TestCase>> DiscoverTestsAsync( 79async Task<ImmutableArray<SyntaxNode>> GetPotentialTestMethodsAsync(LSP.Range range, Document document, ITestMethodFinder testMethodFinder, CancellationToken cancellationToken) 89private async Task<ImmutableArray<TestCase>> MatchDiscoveredTestsToTestsInRangeAsync(ImmutableArray<TestCase> discoveredTests, ImmutableArray<SyntaxNode> testMethods, ITestMethodFinder testMethodFinder, Document document, CancellationToken cancellationToken)
Testing\TestRunner.DebugTestHostLauncher.cs (2)
52var task = Task.Run(async () => await AttachDebuggerAsync(processId, cancellationToken), cancellationToken); 56private async Task<bool> AttachDebuggerAsync(int processId, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol (198)
Extensions\Extensions.cs (1)
203public static async Task<int> GetPositionFromLinePositionAsync(this TextDocument document, LinePosition linePosition, CancellationToken cancellationToken)
Extensions\ProtocolConversions.cs (10)
124public static async Task<Completion.CompletionTrigger> LSPToRoslynCompletionTriggerAsync( 176static async Task<char> GetInsertionCharacterAsync(Document document, int position, CancellationToken cancellationToken) 371public static Task<LSP.Location?> DocumentSpanToLocationAsync(DocumentSpan documentSpan, CancellationToken cancellationToken) 374public static async Task<LSP.VSInternalLocation?> DocumentSpanToLocationWithTextAsync( 392public static async Task<LSP.TextDocumentEdit[]> ChangedDocumentsToTextDocumentEditsAsync<T>(IEnumerable<DocumentId> changedDocuments, Func<DocumentId, T> getNewDocumentFunc, 457public static Task<LSP.Location?> TextSpanToLocationAsync( 466public static async Task<LSP.Location?> TextSpanToLocationAsync( 505static async Task<LSP.Location> ConvertTextSpanToLocationAsync( 852public static async Task<SyntaxFormattingOptions> GetFormattingOptionsAsync( 1011private static async Task<ImmutableArray<MappedSpanResult>?> GetMappedSpanResultAsync(TextDocument textDocument, ImmutableArray<TextSpan> textSpans, CancellationToken cancellationToken)
ExternalAccess\Razor\FormatNewFileHandler.cs (2)
40public async Task<string?> HandleRequestAsync(FormatNewFileParams request, RequestContext context, CancellationToken cancellationToken) 68internal static async Task<string> GetFormattedNewFileContentAsync(Document document, CancellationToken cancellationToken)
ExternalAccess\Razor\SemanticTokensRangesHandler.cs (1)
35public async Task<SemanticTokens> HandleRequestAsync(
ExternalAccess\Razor\SimplifyMethodHandler.cs (2)
36public async Task<TextEdit[]?> HandleRequestAsync( 51internal static async Task<TextEdit[]> GetSimplifiedEditsAsync(Document originalDocument, TextEdit textEdit, CancellationToken cancellationToken)
Features\CodeCleanup\AbstractCodeCleanupService.cs (7)
31public async Task<Document> CleanupAsync( 103private static async Task<Document> RemoveSortUsingsAsync( 129private async Task<Document> ApplyCodeFixesAsync( 149private async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdsAsync( 168private async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync( 190private async Task<ImmutableArray<(string diagnosticId, string? title)>> GetThirdPartyDiagnosticIdsAndTitlesAsync( 216private async Task<Document> ApplyThirdPartyCodeFixesAsync(
Features\CodeCleanup\ICodeCleanupService.cs (1)
14Task<Document> CleanupAsync(Document document, EnabledDiagnosticOptions enabledDiagnostics, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken);
Features\DecompiledSource\AssemblyResolver.cs (2)
52public Task<MetadataFile> ResolveAsync(IAssemblyReference name) 57public Task<MetadataFile> ResolveModuleAsync(MetadataFile mainModule, string moduleName)
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
24public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Features\EditAndContinue\EditAndContinueDiagnosticSource_Workspace.cs (2)
25public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken) 34public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Features\Options\IndentationOptionsStorage.cs (1)
14public static async Task<IndentationOptions> GetIndentationOptionsAsync(this Document document, IGlobalOptionService globalOptions, CancellationToken cancellationToken)
Features\UnifiedSuggestions\UnifiedSuggestedActionsSource.cs (9)
64private static async Task<ImmutableArray<UnifiedSuggestedActionSet>> OrganizeFixesAsync( 120Task<UnifiedSuggestedActionSet?> GetFixAllSuggestedActionSetAsync(CodeAction codeAction) 133Func<CodeAction, Task<UnifiedSuggestedActionSet?>> getFixAllSuggestedActionSetAsync, 145async Task<IUnifiedSuggestedAction> GetUnifiedSuggestedActionAsync(Solution originalSolution, CodeAction action, CodeFix fix) 208private static async Task<UnifiedSuggestedActionSet?> GetUnifiedFixAllSuggestedActionSetAsync( 433public static async Task<ImmutableArray<UnifiedSuggestedActionSet>> GetFilterAndOrderCodeRefactoringsAsync( 504private static async Task<UnifiedSuggestedActionSet> OrganizeRefactoringsAsync( 539async Task<IUnifiedSuggestedAction> GetUnifiedSuggestedActionSetAsync(CodeAction codeAction, TextSpan? applicableToSpan, TextSpan selection, CancellationToken cancellationToken) 577private static async Task<UnifiedSuggestedActionSet?> GetUnifiedFixAllSuggestedActionSetAsync(
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (2)
31public Task<LSP.Range?> HandleRequestAsync(LSP.VSInternalValidateBreakableRangeParams request, RequestContext context, CancellationToken cancellationToken) 34public static async Task<LSP.Range?> GetBreakableRangeAsync(Document document, LSP.Range range, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionFixAllResolveHandler.cs (1)
38public async Task<RoslynFixAllCodeAction> HandleRequestAsync(RoslynFixAllCodeAction request, RequestContext context, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionHelpers.cs (2)
34public static async Task<LSP.CodeAction[]> GetVSCodeActionsAsync( 311public static async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
Handler\CodeActions\CodeActionResolveHandler.cs (1)
55public async Task<LSP.CodeAction> HandleRequestAsync(LSP.CodeAction codeAction, RequestContext context, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionResolveHelper.cs (2)
23public static Task<LSP.WorkspaceEdit> GetCodeActionResolveEditsAsync(RequestContext context, CodeActionResolveData data, ImmutableArray<CodeActionOperation> operations, CancellationToken cancellationToken) 37public static async Task<LSP.WorkspaceEdit> GetCodeActionResolveEditsAsync(Solution solution, CodeActionResolveData data, ImmutableArray<CodeActionOperation> operations, ResourceOperationKind[] resourceOperations, Action<string> logFunction, CancellationToken cancellationToken)
Handler\CodeActions\CodeActionsHandler.cs (1)
53public async Task<LSP.CodeAction[]> HandleRequestAsync(LSP.CodeActionParams request, RequestContext context, CancellationToken cancellationToken)
Handler\CodeLens\CodeLensHandler.cs (1)
45public async Task<LSP.CodeLens[]?> HandleRequestAsync(LSP.CodeLensParams request, RequestContext context, CancellationToken cancellationToken)
Handler\CodeLens\CodeLensResolveHandler.cs (1)
36public async Task<LSP.CodeLens> HandleRequestAsync(LSP.CodeLens request, RequestContext context, CancellationToken cancellationToken)
Handler\Commands\AbstractExecuteWorkspaceCommandHandler.cs (1)
20public abstract Task<object> HandleRequestAsync(ExecuteCommandParams request, RequestContext context, CancellationToken cancellationToken);
Handler\Completion\CompletionHandler.cs (4)
45public async Task<LSP.CompletionList?> HandleRequestAsync( 69public static async Task<LSP.VSInternalCompletionList?> GetCompletionListAsync( 111private static async Task<(CompletionList CompletionList, bool IsIncomplete, bool isHardSelection, long ResultId)?> GetFilteredCompletionListAsync( 165private static async Task<(CompletionList CompletionList, long ResultId)?> CalculateListAsync(
Handler\Completion\CompletionResolveHandler.cs (3)
47public Task<LSP.CompletionItem> HandleRequestAsync(LSP.CompletionItem completionItem, RequestContext context, CancellationToken cancellationToken) 65public static Task<LSP.CompletionItem> ResolveCompletionItemAsync( 83private static async Task<LSP.CompletionItem> ResolveCompletionItemAsync(
Handler\Completion\CompletionResultFactory.cs (10)
36public static async Task<LSP.VSInternalCompletionList> ConvertToLspCompletionListAsync( 115async Task<LSP.CompletionItem> CreateLSPCompletionItemAsync(CompletionItem item, string typedText) 315private static async Task<LSP.CompletionItem> CreateItemAndPopulateTextEditAsync( 365private static async Task<LSP.CompletionItem> CreateVsItemAndPopulateTextEditAsync( 526public static async Task<LSP.TextEdit[]?> GenerateAdditionalTextEditForImportCompletionAsync( 552private static async Task<CompletionChange> GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(CompletionService completionService, Document document, CompletionItem completionItem, CancellationToken cancellationToken) 565public static Task<LSP.CompletionItem> ResolveAsync( 581private static async Task<LSP.CompletionItem> DefaultResolveAsync( 631private static async Task<LSP.CompletionItem> VsResolveAsync( 671public static async Task<(LSP.TextEdit edit, bool isSnippetString, int? newPosition)> GenerateComplexTextEditAsync(
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (1)
119private async Task<ImmutableArray<string?>> GetConfigurationsAsync(CancellationToken cancellationToken)
Handler\DataTips\DataTipRangeHandler.cs (1)
29public async Task<VSInternalDataTip?> HandleRequestAsync(TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken)
Handler\Definitions\AbstractGoToDefinitionHandler.cs (3)
36public abstract Task<LSP.Location[]?> HandleRequestAsync(TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken); 38protected Task<LSP.Location[]?> GetDefinitionAsync(LSP.TextDocumentPositionParams request, bool forSymbolType, RequestContext context, CancellationToken cancellationToken) 50internal static async Task<LSP.Location[]?> GetDefinitionsAsync(IGlobalOptionService globalOptions, IMetadataAsSourceFileService? metadataAsSourceFileService, Workspace workspace, Document document, bool forSymbolType, LinePosition linePosition, CancellationToken cancellationToken)
Handler\Definitions\GoToDefinitionHandler.cs (1)
27public override Task<LSP.Location[]?> HandleRequestAsync(LSP.TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken)
Handler\Definitions\GoToTypeDefinitionHandler.cs (1)
27public override Task<LSP.Location[]?> HandleRequestAsync(LSP.TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken)
Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (2)
100public async Task<TReturn?> HandleRequestAsync( 246static async Task<ProjectOrDocumentId?> GetIdForPreviousResultAsync(TextDocumentIdentifier textDocumentIdentifier, Solution solution, CancellationToken cancellationToken)
Handler\Diagnostics\BuildOnlyDiagnosticIdsHandler.cs (1)
40public Task<BuildOnlyDiagnosticIdsResult> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSourceProviders\DiagnosticSourceManager.cs (1)
150public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (1)
21public abstract Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (3)
27public abstract Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken); 46public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync( 75public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (2)
41public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync( 103public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (1)
24public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\IDiagnosticSource.cs (1)
34Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (1)
22public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (1)
35public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticsPullCache.cs (3)
36public override async Task<(int globalStateVersion, VersionStamp? dependentVersion)> ComputeCheapVersionAsync(DiagnosticsRequestState state, CancellationToken cancellationToken) 41public override async Task<(int globalStateVersion, Checksum dependentChecksum)> ComputeExpensiveVersionAsync(DiagnosticsRequestState state, CancellationToken cancellationToken) 47public override async Task<ImmutableArray<DiagnosticData>> ComputeDataAsync(DiagnosticsRequestState state, CancellationToken cancellationToken)
Handler\DocumentChanges\DidChangeHandler.cs (1)
29public Task<object?> HandleRequestAsync(DidChangeTextDocumentParams request, RequestContext context, CancellationToken cancellationToken)
Handler\EditAndContinue\RegisterSolutionSnapshotHandler.cs (1)
33public Task<LspSolutionSnapshotId> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken)
Handler\Extensions\ActivateExtensionHandler.cs (1)
23public async Task<ActivateExtensionResponse> HandleRequestAsync(ActivateExtensionParams request, RequestContext context, CancellationToken cancellationToken)
Handler\Extensions\DispatchDocumentExtensionMessageHandler.cs (1)
27public async Task<DispatchExtensionMessageResponse> HandleRequestAsync(DispatchDocumentExtensionMessageParams request, RequestContext context, CancellationToken cancellationToken)
Handler\Extensions\DispatchWorkspaceExtensionMessageHandler.cs (1)
23public async Task<DispatchExtensionMessageResponse> HandleRequestAsync(DispatchWorkspaceExtensionMessageParams request, RequestContext context, CancellationToken cancellationToken)
Handler\FoldingRanges\FoldingRangesHandler.cs (3)
39public Task<FoldingRange[]?> HandleRequestAsync(FoldingRangeParams request, RequestContext context, CancellationToken cancellationToken) 48internal static Task<FoldingRange[]> GetFoldingRangesAsync( 68public static async Task<FoldingRange[]> GetFoldingRangesAsync(
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (2)
25protected static async Task<LSP.TextEdit[]?> GetTextEditsAsync( 64public abstract Task<ResponseType> HandleRequestAsync(RequestType request, RequestContext context, CancellationToken cancellationToken);
Handler\Formatting\FormatDocumentHandler.cs (1)
25public override Task<LSP.TextEdit[]?> HandleRequestAsync(
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
37public async Task<TextEdit[]?> HandleRequestAsync(
Handler\Formatting\FormatDocumentRangeHandler.cs (1)
25public override Task<TextEdit[]?> HandleRequestAsync(
Handler\Highlights\DocumentHighlightHandler.cs (4)
43public Task<DocumentHighlight[]?> HandleRequestAsync(TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken) 53internal static async Task<DocumentHighlight[]?> GetHighlightsAsync(IGlobalOptionService globalOptions, IHighlightingService highlightingService, Document document, LinePosition linePosition, CancellationToken cancellationToken) 76private static async Task<ImmutableArray<DocumentHighlight>> GetKeywordHighlightsAsync(IHighlightingService highlightingService, Document document, SourceText text, int position, CancellationToken cancellationToken) 90private static async Task<ImmutableArray<DocumentHighlight>> GetReferenceHighlightsAsync(IGlobalOptionService globalOptions, Document document, SourceText text, int position, CancellationToken cancellationToken)
Handler\Hover\HoverHandler.cs (6)
42public Task<Hover?> HandleRequestAsync(TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken) 55internal static Task<Hover?> GetHoverAsync( 68internal static async Task<Hover?> GetHoverAsync( 86private static async Task<Hover?> GetHoverAsync( 106private static async Task<VSInternalHover> CreateVsHoverAsync( 132private static async Task<Hover> CreateDefaultHoverAsync(
Handler\InlayHint\InlayHintHandler.cs (3)
41public Task<LSP.InlayHint[]?> HandleRequestAsync(InlayHintParams request, RequestContext context, CancellationToken cancellationToken) 50internal static async Task<LSP.InlayHint[]?> GetInlayHintsAsync(Document document, TextDocumentIdentifier textDocumentIdentifier, LSP.Range range, InlineHintsOptions options, bool displayAllOverride, InlayHintCache inlayHintCache, CancellationToken cancellationToken) 97internal static async Task<ImmutableArray<InlineHint>> CalculateInlayHintsAsync(Document document, LSP.Range range, InlineHintsOptions options, bool displayAllOverride, CancellationToken cancellationToken)
Handler\InlayHint\InlayHintResolveHandler.cs (2)
32public Task<LSP.InlayHint> HandleRequestAsync(LSP.InlayHint request, RequestContext context, CancellationToken cancellationToken) 41internal static async Task<LSP.InlayHint> ResolveInlayHintAsync(
Handler\InlineCompletions\InlineCompletionsHandler.cs (4)
104public async Task<VSInternalInlineCompletionList?> HandleRequestAsync(VSInternalInlineCompletionRequest request, RequestContext context, CancellationToken cancellationToken) 118internal static async Task<VSInternalInlineCompletionItem?> GetInlineCompletionItemsAsync(ILspLogger logger, Document document, LinePosition linePosition, LSP.FormattingOptions options, XmlSnippetParser xmlSnippetParser, CancellationToken cancellationToken) 172private static async Task<string> GetFormattedLspSnippetAsync( 252private static async Task<(string ReplacedSnippetText, ImmutableDictionary<SnippetFieldPart, ImmutableArray<TextSpan>> Fields, TextSpan? CaretSpan)> GetReplacedSnippetTextAsync(
Handler\InlineCompletions\XmlSnippetParser.ParsedXmlSnippet.cs (1)
44public async Task<SnippetFunctionPart> WithSnippetFunctionResultAsync(Document documentWithSnippet, TextSpan fieldSpan, SimplifierOptions simplifierOptions, CancellationToken cancellationToken)
Handler\LanguageServerNotificationManager.cs (1)
26public Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken)
Handler\MapCode\MapCodeHandler.cs (3)
35public async Task<WorkspaceEdit?> HandleRequestAsync(VSInternalMapCodeParams request, RequestContext context, CancellationToken cancellationToken) 80async Task<(DocumentUri, LSP.TextEdit[])?> MapCodeAsync(LSP.VSInternalMapCodeMapping codeMapping) 115async Task<ImmutableArray<(Document, TextSpan)>> ConvertFocusLocationsToDocumentAndSpansAsync(
Handler\OnAutoInsert\OnAutoInsertHandler.cs (6)
44public Task<LSP.VSInternalDocumentOnAutoInsertResponseItem?> HandleRequestAsync( 63internal static async Task<LSP.VSInternalDocumentOnAutoInsertResponseItem?> GetOnAutoInsertResponseAsync( 113private static async Task<LSP.VSInternalDocumentOnAutoInsertResponseItem?> GetDocumentationCommentResponseAsync( 144private static async Task<LSP.VSInternalDocumentOnAutoInsertResponseItem?> GetBraceCompletionAfterReturnResponseAsync( 224static async Task<TextChange> GetCollapsedChangeAsync(ImmutableArray<TextChange> textChanges, Document oldDocument, CancellationToken cancellationToken) 241private static async Task<(IBraceCompletionService Service, BraceCompletionContext Context)?> GetBraceCompletionContextAsync(ImmutableArray<IBraceCompletionService> servicesForDocument, int caretLocation, Document document, CancellationToken cancellationToken)
Handler\ProjectContext\GetTextDocumentWithContextHandler.cs (1)
29public Task<VSProjectContextList?> HandleRequestAsync(VSGetProjectContextsParams request, RequestContext context, CancellationToken cancellationToken)
Handler\PullHandlers\VersionedPullCache.CacheItem.cs (1)
54public async Task<(string, TComputedData)?> UpdateCacheItemAsync(
Handler\PullHandlers\VersionedPullCache.cs (5)
44public abstract Task<TCheapVersion> ComputeCheapVersionAsync(TState state, CancellationToken cancellationToken); 52public abstract Task<TExpensiveVersion> ComputeExpensiveVersionAsync(TState state, CancellationToken cancellationToken); 60public abstract Task<TComputedData> ComputeDataAsync(TState state, CancellationToken cancellationToken); 71public async Task<(string ResultId, TComputedData Data)?> GetOrComputeNewDataAsync( 95private static async Task<bool> IsFullyLoadedAsync(Solution solution, CancellationToken cancellationToken)
Handler\References\FindAllReferencesHandler.cs (1)
48public async Task<SumType<VSInternalReferenceItem, LSP.Location>[]?> HandleRequestAsync(
Handler\References\FindImplementationsHandler.cs (2)
37public Task<LSP.Location[]> HandleRequestAsync(LSP.TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken) 47internal static async Task<LSP.Location[]> FindImplementationsAsync(Document document, LinePosition linePosition, OptionsProvider<ClassificationOptions> classificationOptions, bool supportsVisualStudioExtensions, CancellationToken cancellationToken)
Handler\References\FindUsagesLSPContext.cs (3)
178private async Task<SumType<VSInternalReferenceItem, LSP.Location>?> GenerateVSReferenceItemAsync( 245private async Task<LSP.Location?> ComputeLocationAsync(DocumentSpan? documentSpan, CancellationToken cancellationToken) 296private async Task<ClassifiedTextElement?> ComputeTextAsync(
Handler\RelatedDocuments\RelatedDocumentsHandler.cs (1)
41public async Task<VSInternalRelatedDocumentReport[]?> HandleRequestAsync(
Handler\Rename\PrepareRenameHandler.cs (2)
28public Task<LSP.Range?> HandleRequestAsync(LSP.PrepareRenameParams request, RequestContext context, CancellationToken cancellationToken) 31internal static async Task<LSP.Range?> GetRenameRangeAsync(Document document, LinePosition linePosition, CancellationToken cancellationToken)
Handler\Rename\RenameHandler.cs (2)
31public Task<WorkspaceEdit?> HandleRequestAsync(RenameParams request, RequestContext context, CancellationToken cancellationToken) 34internal static async Task<WorkspaceEdit?> GetRenameEditAsync(Document document, LinePosition linePosition, string newName, CancellationToken cancellationToken)
Handler\RequestContext.cs (1)
228public static async Task<RequestContext> CreateAsync(
Handler\RequestContextFactory.cs (1)
22public override Task<RequestContext> CreateRequestContextAsync<TRequestParam>(IQueueItem<RequestContext> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken)
Handler\SemanticTokens\SemanticTokensFullHandler.cs (1)
31public async Task<LSP.SemanticTokens> HandleRequestAsync(
Handler\SemanticTokens\SemanticTokensHelpers.cs (3)
28internal static async Task<int[]> HandleRequestHelperAsync( 59public static async Task<int[]> HandleRequestHelperAsync( 83public static async Task<int[]> ComputeSemanticTokensDataAsync(
Handler\SemanticTokens\SemanticTokensRangeHandler.cs (1)
30public async Task<LSP.SemanticTokens> HandleRequestAsync(
Handler\ServerLifetime\InitializeHandler.cs (1)
24public Task<InitializeResult> HandleRequestAsync(InitializeParams request, RequestContext context, CancellationToken cancellationToken)
Handler\SignatureHelp\SignatureHelpHandler.cs (2)
32public Task<LSP.SignatureHelp?> HandleRequestAsync(LSP.TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken) 43internal static async Task<LSP.SignatureHelp?> GetSignatureHelpAsync(SignatureHelpService signatureHelpService, Document document, LinePosition linePosition, bool supportsVisualStudioExtensions, CancellationToken cancellationToken)
Handler\SourceGenerators\SourceGeneratedDocumentCache.cs (3)
19public override async Task<(SourceGeneratorExecutionVersion, VersionStamp)> ComputeCheapVersionAsync(SourceGeneratedDocumentGetTextState state, CancellationToken cancellationToken) 28public override Task<object?> ComputeExpensiveVersionAsync(SourceGeneratedDocumentGetTextState state, CancellationToken cancellationToken) 38public override async Task<SourceText?> ComputeDataAsync(SourceGeneratedDocumentGetTextState state, CancellationToken cancellationToken)
Handler\SourceGenerators\SourceGeneratedDocumentGetTextHandler.cs (1)
29public async Task<SourceGeneratedDocumentText> HandleRequestAsync(SourceGeneratorGetTextParams request, RequestContext context, CancellationToken cancellationToken)
Handler\SpellCheck\AbstractSpellCheckingHandler.cs (2)
62public async Task<TReport[]?> HandleRequestAsync( 135private static async Task<Dictionary<Document, PreviousPullResult>> GetDocumentToPreviousParamsAsync(
Handler\SpellCheck\SpellCheckPullCache.cs (3)
21public override async Task<(Checksum parseOptionsChecksum, Checksum textChecksum)?> ComputeCheapVersionAsync(SpellCheckState state, CancellationToken cancellationToken) 38public override async Task<ImmutableArray<SpellCheckSpan>> ComputeDataAsync(SpellCheckState state, CancellationToken cancellationToken) 44public override Task<object?> ComputeExpensiveVersionAsync(SpellCheckState state, CancellationToken cancellationToken)
Handler\Symbols\DocumentSymbolsHandler.cs (2)
41public Task<SumType<DocumentSymbol[], SymbolInformation[]>> HandleRequestAsync( 52internal static async Task<SumType<DocumentSymbol[], SymbolInformation[]>> GetDocumentSymbolsAsync(
Handler\Symbols\WorkspaceSymbolsHandler.cs (1)
50public async Task<SumType<SymbolInformation[], WorkspaceSymbol[]>?> HandleRequestAsync(WorkspaceSymbolParams request, RequestContext context, CancellationToken cancellationToken)
Handler\WorkspaceCommand\ExecuteWorkspaceCommandHandler.cs (1)
30public async Task<object?> HandleRequestAsync(ExecuteCommandParams request, RequestContext context, CancellationToken cancellationToken)
IClientLanguageServerManager.cs (1)
17Task<TResponse> SendRequestAsync<TParams, TResponse>(string methodName, TParams @params, CancellationToken cancellationToken);
ILspServiceLoggerFactory.cs (1)
14Task<AbstractLspLogger> CreateLoggerAsync(string serverTypeName, JsonRpc jsonRpc, CancellationToken cancellationToken);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (1)
207protected async Task<object?> InvokeAsync(
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractRequestContextFactory.cs (1)
36public abstract Task<TRequestContext> CreateRequestContextAsync<TRequestParam>(IQueueItem<TRequestContext> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\Handlers\InitializeHandler.cs (1)
26public Task<TResponse> HandleRequestAsync(TRequest request, TRequestContext context, CancellationToken cancellationToken)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IQueueItem.cs (1)
38Task<(TRequestContext, TRequest)?> CreateRequestContextAsync<TRequest>(IMethodHandler handler, RequestHandlerMetadata requestHandlerMetadata, AbstractLanguageServer<TRequestContext> languageServer, CancellationToken cancellationToken);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IRequestExecutionQueue.cs (1)
24Task<object?> ExecuteAsync(object? serializedRequest, string methodName, ILspServices lspServices, CancellationToken cancellationToken);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\IRequestHandler.cs (2)
21Task<TResponse> HandleRequestAsync(TRequest request, TRequestContext context, CancellationToken cancellationToken); 32Task<TResponse> HandleRequestAsync(TRequestContext context, CancellationToken cancellationToken);
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\NewtonsoftLanguageServer.cs (1)
74private async Task<JToken?> ExecuteRequestAsync(JToken? request = null, CancellationToken cancellationToken = default)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\QueueItem.cs (2)
69public static (IQueueItem<TRequestContext>, Task<object?>) Create( 86public async Task<(TRequestContext, TRequest)?> CreateRequestContextAsync<TRequest>(IMethodHandler handler, RequestHandlerMetadata requestHandlerMetadata, AbstractLanguageServer<TRequestContext> languageServer, CancellationToken cancellationToken)
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\RequestExecutionQueue.cs (2)
156public virtual Task<object?> ExecuteAsync( 481public async Task<bool> AreAllItemsCancelledUnsafeAsync()
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\SystemTextJsonLanguageServer.cs (2)
74private Task<JsonElement?> ExecuteRequest0Async(CancellationToken cancellationToken = default) 82private async Task<JsonElement?> ExecuteRequestAsync(JsonElement? request, CancellationToken cancellationToken = default)
Workspaces\LspWorkspaceManager.cs (5)
227public async Task<(Workspace?, Solution?)> GetLspSolutionInfoAsync(CancellationToken cancellationToken) 245public async Task<(Workspace?, Solution?, TextDocument?)> GetLspDocumentInfoAsync(TextDocumentIdentifier textDocumentIdentifier, CancellationToken cancellationToken) 312private async Task<ImmutableArray<(Workspace workspace, Solution Solution, bool IsForked)>> GetLspSolutionsAsync(CancellationToken cancellationToken) 337async Task<(Solution Solution, bool IsForked)> GetLspSolutionForWorkspaceAsync(Workspace workspace, CancellationToken cancellationToken) 492private async Task<bool> DoesAllTextMatchWorkspaceSolutionAsync(ImmutableDictionary<DocumentUri, ImmutableArray<TextDocument>> documentsInWorkspace, CancellationToken cancellationToken)
Workspaces\SourceTextLoader.cs (1)
26public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (103)
CodeActions\CodeActionResolveTests.cs (1)
501private static async Task<LSP.VSInternalCodeAction> RunGetCodeActionResolveAsync(
CodeActions\CodeActionsTests.cs (2)
303private static async Task<VSInternalCodeAction[]> RunGetCodeActionsAsync( 312private static async Task<VSInternalCodeAction> RunGetCodeActionResolveAsync(
CodeActions\RunCodeActionsTests.cs (1)
61private static async Task<bool> ExecuteRunCodeActionCommandAsync(
CodeLens\AbstractCodeLensTests.cs (1)
22private protected static async Task<LSP.CodeLens[]?> GetCodeLensAsync(TestLspServer testLspServer)
CodeLens\CSharpCodeLensTests.cs (1)
398var firstDocumentResult2 = Assert.ThrowsAsync<StreamJsonRpc.RemoteInvocationException>(async () => await testLspServer.ExecuteRequestAsync<LSP.CodeLens, LSP.CodeLens>(LSP.Methods.CodeLensResolveName, firstCodeLens, CancellationToken.None));
Commands\ExecuteWorkspaceCommandTests.cs (1)
69public override Task<object> HandleRequestAsync(ExecuteCommandParams request, RequestContext context, CancellationToken cancellationToken)
Completion\CompletionFeaturesTests.cs (3)
593internal override async Task<CodeAnalysis.Completion.CompletionList> GetCompletionsAsync( 886internal override async Task<CodeAnalysis.Completion.CompletionList> GetCompletionsAsync( 896public override Task<CompletionChange> GetChangeAsync(Document document, CodeAnalysis.Completion.CompletionItem item, char? commitCharacter = null, CancellationToken cancellationToken = default)
Completion\CompletionResolveTests.cs (6)
377private static async Task<LSP.CompletionItem> RunResolveCompletionItemAsync(TestLspServer testLspServer, LSP.CompletionItem completionItem) 440private static async Task<T> GetCompletionItemToResolveAsync<T>( 459private static async Task<LSP.CompletionList> RunGetCompletionsAsync( 489internal override Task<CodeAnalysis.Completion.CompletionList> GetCompletionsAsync(Document document, 497public override Task<CompletionChange> GetChangeAsync( 517internal override Task<CompletionDescription> GetDescriptionAsync(Document document, CodeAnalysis.Completion.CompletionItem item, CodeAnalysis.Completion.CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default)
Completion\CompletionTests.cs (1)
1530internal static Task<LSP.CompletionList> RunGetCompletionsAsync(TestLspServer testLspServer, LSP.CompletionParams completionParams)
DataTips\DataTipRangeHandlerTests.cs (1)
18private static async Task<LSP.VSInternalDataTip?> RunAsync(TestLspServer testLspServer, LSP.Location caret)
Definitions\GoToDefinitionTests.cs (1)
325private static async Task<LSP.Location[]> RunGotoDefinitionAsync(TestLspServer testLspServer, LSP.Location caret)
Definitions\GoToTypeDefinitionTests.cs (2)
277private static async Task<LSP.Location[]> RunGotoTypeDefinitionAsync(TestLspServer testLspServer, LSP.Location caret) 283private static async Task<Workspace> GetWorkspaceForDocument(TestLspServer testLspServer, DocumentUri fileUri)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (9)
58private protected static async Task<ImmutableArray<TestDiagnosticResult>> RunGetWorkspacePullDiagnosticsAsync( 80private protected static async Task<ImmutableArray<TestDiagnosticResult>> RunVSGetWorkspacePullDiagnosticsAsync( 114private protected static async Task<ImmutableArray<TestDiagnosticResult>> RunPublicGetWorkspacePullDiagnosticsAsync( 232private protected static Task<ImmutableArray<TestDiagnosticResult>> RunGetDocumentPullDiagnosticsAsync( 243private protected static async Task<ImmutableArray<TestDiagnosticResult>> RunGetDocumentPullDiagnosticsAsync( 317private protected Task<TestLspServer> CreateTestWorkspaceWithDiagnosticsAsync(string markup, bool mutatingLspWorkspace, BackgroundAnalysisScope analyzerDiagnosticsScope, bool useVSDiagnostics, CompilerDiagnosticsScope? compilerDiagnosticsScope = null, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) 320private protected Task<TestLspServer> CreateTestWorkspaceWithDiagnosticsAsync(string[] markups, bool mutatingLspWorkspace, BackgroundAnalysisScope analyzerDiagnosticsScope, bool useVSDiagnostics, CompilerDiagnosticsScope? compilerDiagnosticsScope = null, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) 323private protected Task<TestLspServer> CreateTestWorkspaceFromXmlAsync(string xmlMarkup, bool mutatingLspWorkspace, BackgroundAnalysisScope analyzerDiagnosticsScope, bool useVSDiagnostics, CompilerDiagnosticsScope? compilerDiagnosticsScope = null, IEnumerable<DiagnosticAnalyzer>? additionalAnalyzers = null) 379public override Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument document, SyntaxTree? tree, CancellationToken cancellationToken)
Diagnostics\DiagnosticsPullCacheTests.cs (1)
120public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Diagnostics\PullDiagnosticTests.cs (5)
2035var resultTask = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, triggerConnectionClose: false); 2063var resultTask = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, triggerConnectionClose: false); 2092var resultTask = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, triggerConnectionClose: false); 2119var resultTaskOne = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, category: PullDiagnosticCategories.WorkspaceDocumentsAndProject, triggerConnectionClose: false); 2120var resultTaskTwo = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, category: PullDiagnosticCategories.EditAndContinue, triggerConnectionClose: false);
DocumentChanges\DocumentChangesTests.cs (1)
452private async Task<(TestLspServer, LSP.Location, string)> GetTestLspServerAndLocationAsync(string source, bool mutatingLspWorkspace)
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (1)
102private static async Task<Solution> GetLSPSolutionAsync(TestLspServer testLspServer, DocumentUri uri)
FoldingRanges\FoldingRangesTests.cs (1)
85private static async Task<LSP.FoldingRange[]> RunGetFoldingRangeAsync(TestLspServer testLspServer)
FormatNewFile\FormatNewFileTests.cs (1)
68private static async Task<string?> RunHandlerAsync(TestLspServer testLspServer, string newFilePath, string input)
Formatting\FormatDocumentRangeTests.cs (1)
79private static async Task<LSP.TextEdit[]> RunFormatDocumentRangeAsync(
Formatting\FormatDocumentTests.cs (1)
333private static async Task<LSP.TextEdit[]?> RunFormatDocumentAsync(
HandlerTests.cs (11)
159var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 187var response = Task.FromException<TestConfigurableResponse>(new StreamJsonRpc.LocalRpcException(nameof(HandlerTests)) { ErrorCode = LspErrorCodes.ContentModified }); 215var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 245var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 273var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 322public Task<string> HandleRequestAsync(TestRequestTypeOne request, RequestContext context, CancellationToken cancellationToken) 344public Task<string> HandleRequestAsync(TestRequestTypeOne request, RequestContext context, CancellationToken cancellationToken) 361public Task<string> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken) 444public Task<string> HandleRequestAsync(TestRequestTypeOne request, RequestContext context, CancellationToken cancellationToken) 468public Task<string> HandleRequestAsync(TestRequestTypeTwo request, RequestContext context, CancellationToken cancellationToken) 487public Task<string> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken)
Highlights\DocumentHighlightTests.cs (1)
95private static async Task<LSP.DocumentHighlight[]> RunGetDocumentHighlightAsync(TestLspServer testLspServer, LSP.Location caret)
Hover\HoverTests.cs (1)
630private static async Task<LSP.Hover> RunGetHoverAsync(
Initialize\LocaleTests.cs (1)
96public Task<Response> HandleRequestAsync(Request request, RequestContext context, CancellationToken cancellationToken)
InlineCompletions\InlineCompletionsTests.cs (1)
286private static async Task<LSP.VSInternalInlineCompletionList> GetInlineCompletionsAsync(
MapCode\MapCodeTests.cs (1)
34public async Task<ImmutableArray<TextChange>?> MapCodeAsync(
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
124private static async Task<Workspace> GetWorkspaceForDocument(TestLspServer testLspServer, DocumentUri fileUri)
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (1)
342private static async Task<LSP.Hover> RunGetHoverAsync(TestLspServer testLspServer, LSP.Location caret)
OnAutoInsert\OnAutoInsertTests.cs (2)
389Task<TestLspServer> testLspServerTask; 428private static async Task<LSP.VSInternalDocumentOnAutoInsertResponseItem?> RunOnAutoInsertAsync(
Ordering\FailingMutatingRequestHandler.cs (1)
30public async Task<TestResponse> HandleRequestAsync(TestRequest request, RequestContext context, CancellationToken cancellationToken)
Ordering\FailingRequestHandler.cs (1)
30public async Task<TestResponse> HandleRequestAsync(TestRequest request, RequestContext context, CancellationToken cancellationToken)
Ordering\LongRunningNonMutatingRequestHandler.cs (1)
31public Task<TestResponse> HandleRequestAsync(TestRequest request, RequestContext context, CancellationToken cancellationToken)
Ordering\MutatingRequestHandler.cs (1)
30public async Task<TestResponse> HandleRequestAsync(TestRequest request, RequestContext context, CancellationToken cancellationToken)
Ordering\NonLSPSolutionRequestHandlerProvider.cs (1)
30public Task<TestResponse> HandleRequestAsync(TestRequest request, RequestContext context, CancellationToken cancellationToken)
Ordering\NonMutatingRequestHandler.cs (1)
30public async Task<TestResponse> HandleRequestAsync(TestRequest request, RequestContext context, CancellationToken cancellationToken)
Ordering\RequestOrderingTests.cs (5)
154var longRunningWaitable = waitables[0]; 268private static async Task<Solution?> GetLSPSolution(TestLspServer testLspServer, string methodName) 283private static async Task<TestResponse[]> TestAsync(TestLspServer testLspServer, TestRequest[] requests) 297private static List<Task<TestResponse?>> StartTestRun(TestLspServer testLspServer, TestRequest[] requests, CancellationToken cancellationToken = default) 299var waitables = new List<Task<TestResponse?>>();
ProjectContext\GetTextDocumentWithContextHandlerTests.cs (1)
101internal static async Task<LSP.VSProjectContextList?> RunGetProjectContext(TestLspServer testLspServer, DocumentUri uri)
ProtocolConversionsTests.cs (1)
338internal static async Task<TextDocument?> GetTextDocumentAsync(TestLspServer testLspServer, DocumentUri uri)
References\FindAllReferencesHandlerTests.cs (2)
336internal static async Task<LSP.VSInternalReferenceItem[]> RunFindAllReferencesAsync(TestLspServer testLspServer, LSP.Location caret, BufferedProgress<object>? progress = null) 353internal static async Task<LSP.Location[]> RunFindAllReferencesNonVSAsync(TestLspServer testLspServer, LSP.Location caret, BufferedProgress<object>? progress = null)
References\FindImplementationsTests.cs (1)
153private static async Task<LSP.Location[]> RunFindImplementationAsync(TestLspServer testLspServer, LSP.Location caret)
RelatedDocuments\RelatedDocumentsTests.cs (1)
22private static async Task<VSInternalRelatedDocumentReport[]> RunGetRelatedDocumentsAsync(
Rename\PrepareRenameTests.cs (1)
94private static async Task<LSP.Range?> RunPrepareRenameAsync(TestLspServer testLspServer, LSP.PrepareRenameParams prepareRenameParams)
Rename\RenameTests.cs (1)
197private static async Task<WorkspaceEdit> RunRenameAsync(TestLspServer testLspServer, LSP.RenameParams renameParams)
SemanticTokens\AbstractSemanticTokensTests.cs (3)
30private protected static async Task<LSP.SemanticTokens> RunGetSemanticTokensFullAsync(TestLspServer testLspServer, LSP.Location caret) 38private protected static async Task<LSP.SemanticTokens> RunGetSemanticTokensRangeAsync(TestLspServer testLspServer, LSP.Location location) 46private protected static async Task<LSP.SemanticTokens> RunGetSemanticTokensRangesAsync(TestLspServer testLspServer, LSP.Location caret, Range[] ranges)
SignatureHelp\SignatureHelpTests.cs (1)
106private static async Task<LSP.SignatureHelp?> RunGetSignatureHelpAsync(TestLspServer testLspServer, LSP.Location caret)
SimplifyMethod\SimplifyMethodTests.cs (1)
49private static async Task<TextEdit[]?> RunRenameAsync(TestLspServer testLspServer, SimplifyMethodParams @params)
SpellCheck\SpellCheckTests.cs (2)
579private static async Task<VSInternalSpellCheckableRangeReport[]> RunGetDocumentSpellCheckSpansAsync( 602private static async Task<VSInternalWorkspaceSpellCheckableReport[]> RunGetWorkspaceSpellCheckSpansAsync(
Symbols\DocumentSymbolsTests.cs (1)
221private static async Task<TReturn?> RunGetDocumentSymbolsAsync<TReturn>(TestLspServer testLspServer)
Symbols\WorkspaceSymbolsTests.cs (4)
26private Task<TestLspServer> CreateTestLspServerAsync(string markup, bool mutatingLspWorkspace) 29private Task<TestLspServer> CreateVisualBasicTestLspServerAsync(string markup, bool mutatingLspWorkspace) 32private Task<TestLspServer> CreateTestLspServerAsync(string[] markups, bool mutatingLspWorkspace) 234private static Task<LSP.SymbolInformation[]?> RunGetWorkspaceSymbolsAsync(TestLspServer testLspServer, string query, IProgress<LSP.SumType<LSP.SymbolInformation[], LSP.WorkspaceSymbol[]>>? progress = null)
TestConfigurableDocumentHandler.cs (4)
32private Task<TestConfigurableResponse>? _response; 37public void ConfigureHandler(bool mutatesSolutionState, bool requiresLspSolution, Task<TestConfigurableResponse> response) 54public Task<TestConfigurableResponse> HandleRequestAsync(TestRequestWithDocument request, RequestContext context, CancellationToken cancellationToken) 60public static void ConfigureHandler(TestLspServer server, bool mutatesSolutionState, bool requiresLspSolution, Task<TestConfigurableResponse> response)
UriTests.cs (1)
386public Task<ResolvedDocumentInfo> HandleRequestAsync(CustomResolveParams request, RequestContext context, CancellationToken cancellationToken)
ValidateBreakableRange\ValidateBreakableRangeTests.cs (1)
259private static async Task<LSP.Range?> RunAsync(TestLspServer testLspServer, LSP.Location caret)
Workspaces\LspWorkspaceManagerTests.cs (3)
754private static async Task<Document> OpenDocumentAndVerifyLspTextAsync(DocumentUri documentUri, TestLspServer testLspServer, string openText = "LSP text") 770private static async Task<(Workspace? workspace, Document? document)> GetLspWorkspaceAndDocumentAsync(DocumentUri uri, TestLspServer testLspServer) 776private static Task<(Workspace?, Solution?)> GetLspHostWorkspaceAndSolutionAsync(TestLspServer testLspServer)
Workspaces\SourceGeneratedDocumentTests.cs (1)
282private async Task<TestLspServer> CreateTestLspServerWithGeneratorAsync(bool mutatingLspWorkspace, string generatedDocumentText)
Microsoft.CodeAnalysis.LanguageServer.UnitTests (14)
TelemetryReporterTests.cs (1)
15private async Task<ITelemetryReporter> CreateReporterAsync()
Utilities\AbstractLanguageServerClientTests.cs (1)
32private protected async Task<TestLspClient> CreateCSharpLanguageServerAsync(
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (2)
35internal static async Task<TestLspClient> CreateAsync( 192public async Task<TResponseType?> ExecuteRequestAsync<TRequestType, TResponseType>(string methodName, TRequestType request, CancellationToken cancellationToken) where TRequestType : class
Utilities\AbstractLanguageServerHostTests.cs (3)
30protected Task<TestLspServer> CreateLanguageServerAsync(bool includeDevKitComponents = true) 47internal static async Task<TestLspServer> CreateAsync(ClientCapabilities clientCapabilities, ILoggerFactory loggerFactory, string cacheDirectory, bool includeDevKitComponents = true, string[]? extensionPaths = null) 90public async Task<TResponseType?> ExecuteRequestAsync<TRequestType, TResponseType>(string methodName, TRequestType request, CancellationToken cancellationToken) where TRequestType : class
Utilities\BrokeredServiceProxy.cs (1)
71public async Task<T> GetServiceAsync()
Utilities\ILspClient.cs (1)
9Task<TResponseType?> ExecuteRequestAsync<TRequestType, TResponseType>(string methodName, TRequestType request, CancellationToken cancellationToken) where TRequestType : class;
Utilities\LanguageServerTestComposition.cs (1)
13public static async Task<(ExportProvider exportProvider, IAssemblyLoader assemblyLoader)> CreateExportProviderAsync(
Utilities\LspClientExtensions.cs (3)
17public static async Task<InitializeResult?> Initialize(this ILspClient lspClient, ClientCapabilities clientCapabilities) 27public static async Task<VSInternalCodeAction[]> RunGetCodeActionsAsync( 36public static async Task<VSInternalCodeAction> RunGetCodeActionResolveAsync(
VirtualProjectXmlProviderTests.cs (1)
46private async Task<VirtualProjectXmlProvider> GetProjectXmlProviderAsync()
Microsoft.CodeAnalysis.PublicApiAnalyzers (23)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (12)
AnnotatePublicApiFix.cs (3)
71static async Task<Solution?> GetFixAsync(TextDocument publicSurfaceAreaDocument, string oldSymbolName, string newSymbolName, CancellationToken cancellationToken) 117protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 201public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
DeclarePublicApiFix.cs (6)
97private static async Task<Solution?> GetFixAsync(TextDocument? surfaceAreaDocument, bool isPublic, Project project, string newSymbolName, ImmutableHashSet<string> siblingSymbolNamesToRemove, CancellationToken cancellationToken) 202private readonly Func<CancellationToken, Task<Solution?>> _createChangedAdditionalDocument; 204public AdditionalDocumentChangeAction(string title, DocumentId? apiDocId, bool isPublic, Func<CancellationToken, Task<Solution?>> createChangedAdditionalDocument) 215protected override Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 239protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 352public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
NullableEnablePublicApiFix.cs (3)
56private static async Task<Solution?> GetFixAsync(TextDocument surfaceAreaDocument, CancellationToken cancellationToken) 85protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 121public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
Microsoft.CodeAnalysis.Remote.ServiceHub (44)
Host\RemoteDocumentDifferenceService.cs (1)
36public Task<SyntaxNode?> GetChangedMemberAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken)
Host\RemoteExportProviderBuilder.cs (1)
46public static async Task<string?> InitializeAsync(string localSettingsDirectory, CancellationToken cancellationToken)
Host\RemoteWorkspace.cs (7)
117async ValueTask<(InFlightSolution inFlightSolution, Task<Solution> solutionTask)> AcquireSolutionAndIncrementInFlightCountAsync() 141async ValueTask<(Solution solution, T result)> ProcessSolutionAsync(InFlightSolution inFlightSolution, Task<Solution> solutionTask) 205private async Task<Solution> GetOrCreateSolutionToUpdateAsync( 220async Task<bool> IsIncrementalUpdateAsync() 251private async Task<Solution> ComputeDisconnectedSolutionAsync( 285private async Task<Solution> UpdateWorkspaceCurrentSolutionAsync( 333public Task<Solution> UpdateWorkspaceCurrentSolutionAsync(Solution newSolution)
Host\RemoteWorkspace.InFlightSolution.cs (6)
36private readonly Task<Solution> _disconnectedSolutionTask; 43private Task<Solution>? _primaryBranchTask; 55Func<CancellationToken, Task<Solution>> computeDisconnectedSolutionAsync) 84public Task<Solution> PreferredSolutionTask_NoLock 103public void TryKickOffPrimaryBranchWork_NoLock(Func<Solution, CancellationToken, Task<Solution>> updatePrimaryBranchAsync) 133async Task<Solution> ComputePrimaryBranchAsync(CancellationToken cancellationToken)
Host\RemoteWorkspace.SolutionCreator.cs (8)
34public async Task<Solution> CreateSolutionAsync(Checksum newSolutionChecksum, CancellationToken cancellationToken) 147private async Task<Solution> UpdateProjectsAsync( 231private async Task<Solution> UpdateProjectsAsync( 339private async Task<Solution> UpdateProjectAsync(Project project, ProjectStateChecksums oldProjectChecksums, ProjectStateChecksums newProjectChecksums, CancellationToken cancellationToken) 424private async Task<Project> UpdateDocumentsAsync<TDocumentState>( 471private async Task<Project> UpdateDocumentsAsync( 535private async Task<Project> UpdateDocumentAsync( 567private async Task<TextDocument> UpdateDocumentInfoAsync(TextDocument document, Checksum infoChecksum, CancellationToken cancellationToken)
Host\TestUtils.cs (4)
101async Task<List<KeyValuePair<Checksum, object>>> GetAssetFromAssetServiceAsync(IEnumerable<Checksum> checksums) 114async Task<HashSet<Checksum>> GetAllChildrenChecksumsAsync(Checksum solutionChecksum) 158public static async Task<Dictionary<Checksum, object>> GetAssetMapAsync(this Solution solution, ProjectId? projectConeId, CancellationToken cancellationToken) 169public static async Task<Dictionary<Checksum, object>> GetAssetMapAsync(this Project project, CancellationToken cancellationToken)
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (2)
79async Task<bool> SynchronizeTextChangesHelperAsync() 106async static Task<SourceText?> TryGetSourceTextAsync(
Services\BrokeredServiceBase.FactoryBase.cs (1)
47public Task<object> CreateAsync(
Services\ClientOptionsProvider.cs (1)
25private Task<TOptions> GetRemoteOptionsAsync(LanguageServices languageServices, CancellationToken cancellationToken)
Services\ConvertTupleToStructCodeRefactoringProvider\RemoteConvertTupleToStructCodeRefactoringService.cs (2)
54private static async Task<(DocumentId, TextSpan)> GetRenamedTokenAsync( 73private static async Task<Solution> CleanupAsync(Solution oldSolution, Solution newSolution, CancellationToken cancellationToken)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (7)
84public static Task<SerializableDiagnosticAnalysisResults> GetDiagnosticsAsync( 125private async Task<SerializableDiagnosticAnalysisResults> GetDiagnosticsAsync( 174private async Task<SerializableDiagnosticAnalysisResults> AnalyzeAsync( 327private async Task<(CompilationWithAnalyzersPair? compilationWithAnalyzers, BidirectionalMap<string, DiagnosticAnalyzer> analyzerToIdMap)> GetOrCreateCompilationWithAnalyzersAsync(CancellationToken cancellationToken) 332async Task<CompilationWithAnalyzersCacheEntry> GetOrCreateCacheEntryAsync() 360private async Task<CompilationWithAnalyzersCacheEntry> CreateCompilationWithAnalyzersCacheEntryAsync(CancellationToken cancellationToken) 431private async Task<CompilationWithAnalyzersPair> CreateCompilationWithAnalyzerAsync(ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken)
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (2)
221private async Task<ImmutableArray<ClassifiedSpan>> TryGetOrReadCachedSemanticClassificationsAsync( 284private async Task<ImmutableArray<ClassifiedSpan>> TryReadCachedSemanticClassificationsAsync(
src\VisualStudio\Core\Def\Storage\FileDownloader.cs (1)
33public Task<Stream?> ReadFileAsync()
src\VisualStudio\Core\Def\UnusedReferences\ProjectAssets\ProjectAssetsFileReader.cs (1)
18public static async Task<ImmutableArray<ReferenceInfo>> ReadReferencesAsync(
Microsoft.CodeAnalysis.Remote.Workspaces (20)
AbstractAssetProvider.cs (11)
29public async Task<SolutionInfo> CreateSolutionInfoAsync( 42using var _1 = ArrayBuilder<Task<ProjectInfo>>.GetInstance(solutionChecksums.Projects.Length, out var projectsTasks); 73public async Task<ProjectInfo> CreateProjectInfoAsync( 89var projectReferencesTask = this.GetAssetsArrayAsync<ProjectReference>(new(AssetPathKind.ProjectProjectReferences, projectId), projectChecksums.ProjectReferences, cancellationToken); 90var metadataReferencesTask = this.GetAssetsArrayAsync<MetadataReference>(new(AssetPathKind.ProjectMetadataReferences, projectId), projectChecksums.MetadataReferences, cancellationToken); 91var analyzerReferencesTask = this.GetAssetsArrayAsync<AnalyzerReference>(new(AssetPathKind.ProjectAnalyzerReferences, projectId), projectChecksums.AnalyzerReferences, cancellationToken); 97var documentInfosTask = CreateDocumentInfosAsync(projectChecksums.Documents); 98var additionalDocumentInfosTask = CreateDocumentInfosAsync(projectChecksums.AdditionalDocuments); 99var analyzerConfigDocumentInfosTask = CreateDocumentInfosAsync(projectChecksums.AnalyzerConfigDocuments); 120async Task<ImmutableArray<DocumentInfo>> CreateDocumentInfosAsync(DocumentChecksumsAndIds checksumsAndIds) 163public async Task<DocumentInfo> CreateDocumentInfoAsync(
AbstractAssetProviderExtensions.cs (1)
49public static async Task<ImmutableArray<T>> GetAssetsArrayAsync<T>(
ExportProviderBuilder.cs (2)
38protected virtual async Task<ExportProvider> CreateExportProviderAsync(CancellationToken cancellationToken) 50private async Task<IExportProviderFactory> GetCompositionConfigurationAsync(CancellationToken cancellationToken)
ExternalAccess\Pythia\Api\PythiaRemoteHostClient.cs (1)
26public static async Task<PythiaRemoteHostClient?> TryGetClientAsync(HostWorkspaceServices services, PythiaServiceDescriptorsWrapper serviceDescriptors, PythiaRemoteServiceCallbackDispatcherRegistry callbackDispatchers, CancellationToken cancellationToken = default)
ExternalAccess\UnitTesting\Api\UnitTestingRemoteHostClient.cs (1)
26public static async Task<UnitTestingRemoteHostClient?> TryGetClientAsync(HostWorkspaceServices services, UnitTestingServiceDescriptorsWrapper serviceDescriptors, UnitTestingRemoteServiceCallbackDispatcherRegistry callbackDispatchers, CancellationToken cancellationToken = default)
ProjectSystem\IWorkspaceProject.cs (1)
43Task<IWorkspaceProjectBatch> StartBatchAsync(CancellationToken cancellationToken);
ProjectSystem\IWorkspaceProjectFactoryService.cs (2)
13Task<IWorkspaceProject> CreateAndAddProjectAsync(WorkspaceProjectCreationInfo creationInfo, CancellationToken cancellationToken); 20Task<IReadOnlyCollection<string>> GetSupportedBuildSystemPropertiesAsync(CancellationToken cancellationToken);
ServiceHubRemoteHostClient.cs (1)
54public static async Task<RemoteHostClient> CreateAsync(
Microsoft.CodeAnalysis.ResxSourceGenerator (23)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Verifiers\CSharpSourceGeneratorVerifier`1+Test.cs (1)
82protected override async Task<(Compilation compilation, ImmutableArray<Diagnostic> generatorDiagnostics)> GetProjectCompilationAsync(Project project, IVerifier verifier, CancellationToken cancellationToken)
Verifiers\VisualBasicSourceGeneratorVerifier`1+Test.cs (1)
67protected override async Task<(Compilation compilation, ImmutableArray<Diagnostic> generatorDiagnostics)> GetProjectCompilationAsync(Project project, IVerifier verifier, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Scripting (34)
Hosting\CommandLine\CommandLineRunner.cs (1)
305var task = (state == null)
Script.cs (19)
165internal Task<object> EvaluateAsync(object globals = null, CancellationToken cancellationToken = default(CancellationToken)) 168internal abstract Task<object> CommonEvaluateAsync(object globals, CancellationToken cancellationToken); 179public Task<ScriptState> RunAsync(object globals, CancellationToken cancellationToken) 195public Task<ScriptState> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 198internal abstract Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken); 208public Task<ScriptState> RunFromAsync(ScriptState previousState, CancellationToken cancellationToken) 223public Task<ScriptState> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 226internal abstract Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken); 343private Func<object[], Task<T>> _lazyExecutor; 378internal override Task<object> CommonEvaluateAsync(object globals, CancellationToken cancellationToken) 381internal override Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken) 384internal override Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken) 388private Func<object[], Task<T>> GetExecutor(CancellationToken cancellationToken) 455internal new Task<T> EvaluateAsync(object globals = null, CancellationToken cancellationToken = default(CancellationToken)) 469public new Task<ScriptState<T>> RunAsync(object globals, CancellationToken cancellationToken) 487public new Task<ScriptState<T>> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 530public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, CancellationToken cancellationToken) 547public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 575private async Task<ScriptState<T>> RunSubmissionsAsync(
ScriptBuilder.cs (3)
78internal Func<object[], Task<T>> CreateExecutor<T>(ScriptCompiler compiler, Compilation compilation, bool emitDebugInformation, CancellationToken cancellationToken) 122private Func<object[], Task<T>> Build<T>( 163return runtimeEntryPoint.CreateDelegate<Func<object[], Task<T>>>();
ScriptExecutionState.cs (2)
68internal async Task<TResult> RunSubmissionsAsync<TResult>( 113result = await ((Task<TResult>)currentExecutor(_submissionStates)).ConfigureAwait(continueOnCapturedContext: false);
ScriptRunner.cs (1)
19public delegate Task<T> ScriptRunner<T>(object globals = null, CancellationToken cancellationToken = default(CancellationToken));
ScriptState.cs (4)
142public Task<ScriptState<object>> ContinueWithAsync(string code, ScriptOptions options, CancellationToken cancellationToken) 156public Task<ScriptState<object>> ContinueWithAsync(string code, ScriptOptions options = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 166public Task<ScriptState<TResult>> ContinueWithAsync<TResult>(string code, ScriptOptions options, CancellationToken cancellationToken) 180public Task<ScriptState<TResult>> ContinueWithAsync<TResult>(string code, ScriptOptions options = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken))
Utilities\TaskExtensions.cs (4)
14internal static async Task<T> CastAsync<S, T>(this Task<S> task) where S : T 19internal static async Task<T> GetEvaluationResultAsync<T>(this Task<ScriptState<T>> task)
Microsoft.CodeAnalysis.Scripting.TestUtilities (15)
ScriptingTestHelpers.cs (5)
24var task = script.RunAsync(); 37var task = script.EvaluateAsync(); 45public static void ContinueRunScriptWithOutput<T>(Task<ScriptState<T>> scriptState, string code, string expectedOutput) 59internal static void AssertCompilationError(Task<ScriptState> state, string code, params DiagnosticDescription[] expectedDiagnostics) 64internal static void AssertCompilationError<T>(Task<ScriptState<T>> state, string code, params DiagnosticDescription[] expectedDiagnostics)
ScriptTaskExtensions.cs (10)
15public static async Task<ScriptState<object>> ContinueWith(this Task<ScriptState> task, string code, ScriptOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) 20public static async Task<ScriptState<object>> ContinueWith(this Task<ScriptState<object>> task, string code, ScriptOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) 25public static async Task<ScriptState<T>> ContinueWith<T>(this Task<ScriptState> task, string code, ScriptOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) 30public static async Task<ScriptState<T>> ContinueWith<T>(this Task<ScriptState<object>> task, string code, ScriptOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) 35public static async Task<ScriptState<object>> ContinueWith<S>(this Task<ScriptState<S>> task, string code, ScriptOptions options = null, CancellationToken cancellationToken = default(CancellationToken))
Microsoft.CodeAnalysis.Test.Utilities (3)
Diagnostics\ThrowingDiagnosticAnalyzer.cs (1)
71public static async Task VerifyAnalyzerEngineIsSafeAgainstExceptionsAsync(Func<DiagnosticAnalyzer, Task<IEnumerable<Diagnostic>>> runAnalysis)
TempFiles\TempFile.cs (2)
82public async Task<TempFile> WriteAllTextAsync(string content, Encoding encoding) 92public Task<TempFile> WriteAllTextAsync(string content)
Microsoft.CodeAnalysis.Threading.Package (11)
AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.UnitTests (10)
AsyncQueueTests.cs (10)
28var task = queue.DequeueAsync(); 66var task = queue.DequeueAsync(); 77var list = new List<Task<int>>(); 86var task = list[i]; 97var task = queue.DequeueAsync(); 118var list = new List<Task<int>>(); 125foreach (var task in list) 167var task = queue.DequeueAsync(cts.Token); 179var task = queue.DequeueAsync(cts.Token); 196var task = queue.DequeueAsync(cts.Token);
Microsoft.CodeAnalysis.VisualBasic (1)
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
105Public Overrides Function GetRootAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of VisualBasicSyntaxNode)
Microsoft.CodeAnalysis.VisualBasic.Scripting (4)
VisualBasicScript.vb (4)
46Optional cancellationToken As CancellationToken = Nothing) As Task(Of ScriptState(Of T)) 56Optional cancellationToken As CancellationToken = Nothing) As Task(Of ScriptState(Of Object)) 66Optional cancellationToken As CancellationToken = Nothing) As Task(Of T) 76Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
Microsoft.CodeAnalysis.Workspaces (861)
CaseCorrection\AbstractCaseCorrectionService.cs (1)
22public async Task<Document> CaseCorrectAsync(Document document, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken)
CaseCorrection\CaseCorrector.cs (4)
26public static async Task<Document> CaseCorrectAsync(Document document, CancellationToken cancellationToken = default) 41public static async Task<Document> CaseCorrectAsync(Document document, SyntaxAnnotation annotation, CancellationToken cancellationToken = default) 55public static async Task<Document> CaseCorrectAsync(Document document, TextSpan span, CancellationToken cancellationToken = default) 63public static Task<Document> CaseCorrectAsync(Document document, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken = default)
CaseCorrection\ICaseCorrectionService.cs (1)
18Task<Document> CaseCorrectAsync(Document document, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken);
ChangeNamespace\IChangeNamespaceService.cs (3)
42Task<bool> CanChangeNamespaceAsync(Document document, SyntaxNode container, CancellationToken cancellationToken); 58Task<Solution> ChangeNamespaceAsync(Document document, SyntaxNode container, string targetNamespace, CancellationToken cancellationToken); 64Task<Solution?> TryChangeTopLevelNamespacesAsync(Document document, string targetNamespace, CancellationToken cancellationToken);
Classification\AbstractClassificationService.cs (1)
106private static async Task<bool> TryGetCachedClassificationsAsync(
Classification\Classifier.cs (2)
27public static async Task<IEnumerable<ClassifiedSpan>> GetClassifiedSpansAsync( 113internal static async Task<ImmutableArray<SymbolDisplayPart>> GetClassifiedSymbolDisplayPartsAsync(
Classification\ClassifierHelper.cs (2)
29public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync( 52public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
Classification\SemanticClassificationCacheUtilities.cs (1)
13public static async Task<(DocumentKey documentKey, Checksum checksum)> GetDocumentKeyAndChecksumAsync(
CodeActions\CodeAction.cs (46)
119static codeAction => new Func<CancellationToken, Task<IEnumerable<CodeActionOperation>>>(codeAction.ComputeOperationsAsync).Method.DeclaringType != typeof(CodeAction)); 127static codeAction => new Func<CancellationToken, Task<Solution?>>(codeAction.GetChangedSolutionAsync).Method.DeclaringType != typeof(CodeAction)); 228public Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync(CancellationToken cancellationToken) 234public Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync( 240private protected virtual async Task<ImmutableArray<CodeActionOperation>> GetOperationsCoreAsync( 256public Task<ImmutableArray<CodeActionOperation>> GetPreviewOperationsAsync(CancellationToken cancellationToken) 259internal async Task<ImmutableArray<CodeActionOperation>> GetPreviewOperationsAsync( 278protected virtual async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(CancellationToken cancellationToken) 294protected virtual async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 319protected virtual async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 328protected virtual async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 340protected virtual async Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 357internal async Task<Solution> GetRequiredChangedSolutionAsync(IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 376protected virtual Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 392protected virtual Task<Document> GetChangedDocumentAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 398internal async Task<Solution?> GetChangedSolutionInternalAsync( 410internal Task<Document> GetChangedDocumentInternalAsync(CancellationToken cancellation) 420protected Task<ImmutableArray<CodeActionOperation>> PostProcessAsync(IEnumerable<CodeActionOperation> operations, CancellationToken cancellationToken) 424internal static async Task<ImmutableArray<CodeActionOperation>> PostProcessAsync( 450protected Task<Solution> PostProcessChangesAsync(Solution changedSolution, CancellationToken cancellationToken) 454private static async Task<Solution> PostProcessChangesAsync( 476protected virtual async Task<Document> PostProcessChangesAsync(Document document, CancellationToken cancellationToken) 497public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey) 501internal static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey) 504/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?)"/> 507public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 510/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?, CodeActionPriority)"/> 512public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 531public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey) 542public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 545/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Solution}}, string?, CodeActionPriority)"/> 547public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 659private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> _createChangedDocument; 660private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>>? _createChangedDocumentPreview; 664Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 665Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>>? createChangedDocumentPreview, 677Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 686Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 691protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 700protected sealed override Task<Document> GetChangedDocumentAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 706private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution; 710Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 721Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 730Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 735protected sealed override Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 756protected sealed override Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
CodeActions\CodeAction_Cleanup.cs (7)
29private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_cleanupPasses = 47internal static async Task<Document> CleanupSyntaxAsync(Document document, CodeCleanupOptions options, CancellationToken cancellationToken) 73internal static async Task<Solution> CleanSyntaxAndSemanticsAsync( 88async Task<ImmutableArray<(DocumentId documentId, CodeCleanupOptions codeCleanupOptions)>> GetDocumentIdsAndOptionsToCleanAsync() 124private static async Task<Solution> RunAllCleanupPassesInOrderAsync( 139async Task<Solution> RunParallelCleanupPassAsync( 140Solution solution, Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> cleanupDocumentAsync)
CodeActions\CodeActionWithOptions.cs (6)
34public Task<IEnumerable<CodeActionOperation>?> GetOperationsAsync(object? options, CancellationToken cancellationToken) 37internal async Task<IEnumerable<CodeActionOperation>?> GetOperationsAsync( 53private protected sealed override async Task<ImmutableArray<CodeActionOperation>> GetOperationsCoreAsync( 66protected virtual Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(object options, CancellationToken cancellationToken) 74protected virtual Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(object options, IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 77protected override Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(CancellationToken cancellationToken)
CodeActions\Operations\ApplyChangesOperation.cs (1)
43internal sealed override Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
CodeActions\Operations\CodeActionOperation.cs (1)
34internal virtual Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
CodeActions\Operations\PreviewOperation.cs (1)
19public abstract Task<object?> GetPreviewAsync(CancellationToken cancellationToken);
CodeCleanup\AbstractCodeCleanerService.cs (4)
29public async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken) 73public async Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken) 454private async Task<Document> IterateAllCodeCleanupProvidersAsync( 535private async Task<SyntaxNode> IterateAllCodeCleanupProvidersAsync(
CodeCleanup\CodeCleaner.cs (6)
50public static async Task<Document> CleanupAsync(Document document, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 60public static async Task<Document> CleanupAsync(Document document, SyntaxAnnotation annotation, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 70public static Task<Document> CleanupAsync(Document document, TextSpan span, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 77public static async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 87public static Task<SyntaxNode> CleanupAsync(SyntaxNode root, TextSpan span, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default) 94public static Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers = default, CancellationToken cancellationToken = default)
CodeCleanup\ICodeCleanerService.cs (2)
30Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken); 37Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, ImmutableArray<ICodeCleanupProvider> providers, CancellationToken cancellationToken);
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (2)
20public async Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken) 32public Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken)
CodeCleanup\Providers\ICodeCleanupProvider.cs (2)
27Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken); 34Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken);
CodeCleanup\Providers\SimplificationCodeCleanupProvider.cs (2)
19public Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken) 22public Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (7)
33public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 37private async Task<Solution?> FixAllContextsAsync( 86private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> DetermineDiagnosticsAsync(FixAllContext fixAllContext, IProgress<CodeAnalysisProgress> progressTracker) 136private static async Task<ImmutableArray<Document>> GetAllChangedDocumentsInDiagnosticsOrderAsync( 144using var _1 = ArrayBuilder<Task<ImmutableArray<Document>>>.GetInstance(out var tasks); 185foreach (var task in tasks) 251private static async Task<Solution> ApplyChangesAsync(
CodeFixes\FixAllOccurrences\DocumentBasedFixAllProvider.cs (3)
58protected abstract Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics); 63public sealed override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 67private Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalFixAllContext, ImmutableArray<FixAllContext> fixAllContexts)
CodeFixes\FixAllOccurrences\FixAllContext.cs (12)
224public async Task<ImmutableArray<Diagnostic>> GetDocumentDiagnosticsAsync(Document document) 236var getDiagnosticsTask = State.DiagnosticProvider.GetDocumentDiagnosticsAsync(document, this.CancellationToken); 240private static async Task<ImmutableArray<Diagnostic>> GetFilteredDiagnosticsAsync( 241Task<IEnumerable<Diagnostic>> getDiagnosticsTask, 261internal async Task<ImmutableArray<Diagnostic>> GetDocumentSpanDiagnosticsAsync(Document document, TextSpan filterSpan) 273var getDiagnosticsTask = State.DiagnosticProvider is FixAllContext.SpanBasedDiagnosticProvider spanBasedDiagnosticProvider 282public Task<ImmutableArray<Diagnostic>> GetProjectDiagnosticsAsync(Project project) 296public Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(Project project) 311private async Task<ImmutableArray<Diagnostic>> GetProjectDiagnosticsAsync(Project project, bool includeAllDocumentDiagnostics) 320var getDiagnosticsTask = includeAllDocumentDiagnostics 346internal Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync() 349internal Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync()
CodeFixes\FixAllOccurrences\FixAllContext.DiagnosticProvider.cs (6)
30public abstract Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken); 35public abstract Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken); 41public abstract Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken); 43internal static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(FixAllContext fixAllContext) 50static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixWorkerAsync(FixAllContext fixAllContext) 67internal static async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync(
CodeFixes\FixAllOccurrences\FixAllContext.SpanBasedDiagnosticProvider.cs (1)
34public abstract Task<IEnumerable<Diagnostic>> GetDocumentSpanDiagnosticsAsync(Document document, TextSpan fixAllSpan, CancellationToken cancellationToken);
CodeFixes\FixAllOccurrences\FixAllContextHelper.cs (3)
21public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 108static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetSpanDiagnosticsAsync( 126private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
CodeFixes\FixAllOccurrences\FixAllProvider.cs (6)
45public abstract Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext); 58public static FixAllProvider Create(Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync) 78Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync, 94Task<CodeAction?> IFixAllProvider.GetFixAsync(IFixAllContext fixAllContext) 99Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync, 102protected override Task<Document?> FixAllAsync(FixAllContext context, Document document, ImmutableArray<Diagnostic> diagnostics)
CodeFixes\FixAllOccurrences\FixAllState.FixMultipleDiagnosticProvider.cs (3)
36public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 59public override Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 69public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\NoOpFixAllProvider.cs (1)
25public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
69public async Task<SourceText> GetFinalMergedTextAsync(CancellationToken cancellationToken)
CodeFixes\Supression\IConfigurationFixProvider.cs (2)
28Task<ImmutableArray<CodeFix>> GetFixesAsync(TextDocument document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken); 34Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken);
CodeFixesAndRefactorings\DefaultFixAllProviderHelpers.cs (8)
23public static async Task<CodeAction?> GetFixAsync<TFixAllContext>( 26Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 51private static Task<Solution?> GetDocumentFixesAsync<TFixAllContext>( 53Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 57private static Task<Solution?> GetProjectFixesAsync<TFixAllContext>( 59Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 63private static Task<Solution?> GetSolutionFixesAsync<TFixAllContext>( 65Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync)
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (2)
23public static async Task<Solution?> FixAllContextsAsync<TFixAllContext>( 63async Task<Solution> GetInitialUncleanedSolutionAsync(Solution originalSolution)
CodeFixesAndRefactorings\IFixAllProvider.cs (1)
18Task<CodeAction?> GetFixAsync(IFixAllContext fixAllContext);
CodeRefactorings\FixAllOccurences\DocumentBasedFixAllProvider.cs (3)
59protected abstract Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, Optional<ImmutableArray<TextSpan>> fixAllSpans); 64public sealed override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 68private Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalFixAllContext, ImmutableArray<FixAllContext> fixAllContexts)
CodeRefactorings\FixAllOccurences\FixAllContext.cs (1)
96public Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetFixAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (6)
40public abstract Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext); 43Task<CodeAction?> IFixAllProvider.GetFixAsync(IFixAllContext fixAllContext) 58public static FixAllProvider Create(Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync) 78Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync, 94Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync, 97protected override Task<Document?> FixAllAsync(FixAllContext context, Document document, Optional<ImmutableArray<TextSpan>> fixAllSpans)
CodeRefactorings\FixAllOccurences\FixAllState.cs (1)
90internal async Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetFixAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (3)
34protected Task<Document> FixAsync( 45protected Task<Document> FixAllAsync( 62internal static async Task<Document> FixAllWithEditorAsync(
Diagnostics\CompilationWithAnalyzersPair.cs (5)
53public Task<AnalyzerTelemetryInfo> GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 66public async Task<AnalysisResultPair?> GetAnalysisResultAsync(CancellationToken cancellationToken) 78public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 90public async Task<AnalysisResultPair?> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 102public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken)
Diagnostics\DiagnosticData.cs (1)
150public async Task<Diagnostic> ToDiagnosticAsync(Project project, CancellationToken cancellationToken)
Diagnostics\DocumentDiagnosticAnalyzer.cs (2)
19public virtual Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken) 22public virtual Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken)
Diagnostics\Extensions.cs (8)
29public static async Task<ImmutableArray<Diagnostic>> ToDiagnosticsAsync(this IEnumerable<DiagnosticData> diagnostics, Project project, CancellationToken cancellationToken) 106public static async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>> ToResultBuilderMapAsync( 320public static async Task<(AnalysisResultPair? analysisResult, ImmutableArray<Diagnostic> additionalDiagnostics)> GetAnalysisResultAsync( 333private static async Task<AnalysisResultPair?> GetAnalysisResultAsync( 368private static async Task<ImmutableArray<Diagnostic>> GetPragmaSuppressionAnalyzerDiagnosticsAsync( 465public static Task<Checksum> GetDiagnosticChecksumAsync(this Project? project, CancellationToken cancellationToken) 478static async Task<Checksum> ComputeDiagnosticChecksumAsync(Project project, CancellationToken cancellationToken) 510public static async Task<ImmutableArray<Diagnostic>> GetSourceGeneratorDiagnosticsAsync(Project project, CancellationToken cancellationToken)
Diagnostics\FileContentLoadAnalyzer.cs (1)
28public override async Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(
Diagnostics\GeneratorDiagnosticsPlaceholderAnalyzer.cs (1)
28public override async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken)
Editing\DocumentEditor.cs (1)
28public static async Task<DocumentEditor> CreateAsync(Document document, CancellationToken cancellationToken = default)
Editing\ImportAdder.cs (11)
33public static async Task<Document> AddImportsAsync(Document document, OptionSet? options = null, CancellationToken cancellationToken = default) 39public static Task<Document> AddImportsAsync(Document document, TextSpan span, OptionSet? options = null, CancellationToken cancellationToken = default) 45public static async Task<Document> AddImportsAsync(Document document, SyntaxAnnotation annotation, OptionSet? options = null, CancellationToken cancellationToken = default) 51public static Task<Document> AddImportsAsync(Document document, IEnumerable<TextSpan> spans, OptionSet? options = null, CancellationToken cancellationToken = default) 54private static async Task<Document> AddImportsFromSyntaxesAsync(Document document, IEnumerable<TextSpan> spans, OptionSet? _, CancellationToken cancellationToken) 70internal static async Task<Document> AddImportsFromSyntaxesAsync(Document document, AddImportPlacementOptions options, CancellationToken cancellationToken) 76internal static async Task<Document> AddImportsFromSyntaxesAsync(Document document, SyntaxAnnotation annotation, AddImportPlacementOptions options, CancellationToken cancellationToken) 82internal static Task<Document> AddImportsFromSyntaxesAsync(Document document, IEnumerable<TextSpan> spans, AddImportPlacementOptions options, CancellationToken cancellationToken) 88internal static async Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, AddImportPlacementOptions options, CancellationToken cancellationToken) 94internal static async Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, SyntaxAnnotation annotation, AddImportPlacementOptions options, CancellationToken cancellationToken) 97internal static Task<Document> AddImportsFromSymbolAnnotationAsync(Document document, IEnumerable<TextSpan> spans, AddImportPlacementOptions options, CancellationToken cancellationToken)
Editing\SolutionEditor.cs (1)
28public async Task<DocumentEditor> GetDocumentEditorAsync(DocumentId id, CancellationToken cancellationToken = default)
Editing\SymbolEditor.cs (13)
96public async Task<ISymbol> GetCurrentSymbolAsync(ISymbol symbol, CancellationToken cancellationToken = default) 145private static async Task<ISymbol> GetSymbolAsync(Solution solution, ProjectId projectId, string symbolId, CancellationToken cancellationToken) 183public async Task<IReadOnlyList<SyntaxNode>> GetCurrentDeclarationsAsync(ISymbol symbol, CancellationToken cancellationToken = default) 232public async Task<ISymbol> EditOneDeclarationAsync( 256public Task<ISymbol> EditOneDeclarationAsync( 279private async Task<ISymbol> EditDeclarationAsync( 319public Task<ISymbol> EditOneDeclarationAsync( 345public Task<ISymbol> EditOneDeclarationAsync( 362private async Task<ISymbol> EditOneDeclarationAsync( 395public async Task<ISymbol> EditOneDeclarationAsync( 428public Task<ISymbol> EditOneDeclarationAsync( 453public async Task<ISymbol> EditAllDeclarationsAsync( 511public Task<ISymbol> EditAllDeclarationsAsync(
Editing\SymbolEditorExtensions.cs (3)
19public static async Task<SyntaxNode> GetBaseOrInterfaceDeclarationReferenceAsync( 57public static async Task<ISymbol> SetBaseTypeAsync( 93public static Task<ISymbol> SetBaseTypeAsync(
ExtensionManager\IExtensionManagerExtensions.cs (3)
66public static async Task<T> PerformFunctionAsync<T>( 69Func<CancellationToken, Task<T>?> function, 78var task = function(cancellationToken);
ExternalAccess\Pythia\Api\PythiaDocumentExtensions.cs (1)
13public static Task<SemanticModel> GetSemanticModelForNodeAsync(this Document document, SyntaxNode? node, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\UnitTestingProjectExtensions.cs (1)
15public static Task<bool> HasSuccessfullyLoadedAsync(this Project project, CancellationToken cancellationToken)
ExternalAccess\UnitTesting\Api\UnitTestingSolutionExtensions.cs (1)
15public static async Task<UnitTestingChecksumWrapper> GetChecksumAsync(this Solution solution, CancellationToken cancellationToken)
FindSymbols\Declarations\DeclarationFinder_AllDeclarations.cs (3)
23public static async Task<ImmutableArray<ISymbol>> FindAllDeclarationsWithNormalQueryAsync( 59internal static async Task<ImmutableArray<ISymbol>> FindAllDeclarationsWithNormalQueryInCurrentProcessAsync( 158private static async Task<ImmutableArray<ISymbol>> RehydrateAsync(
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (10)
25public static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithNormalQueryAsync( 63public static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithNormalQueryAsync( 101public static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithPatternAsync( 134public static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithPatternAsync( 175internal static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithNormalQueryInCurrentProcessAsync( 190internal static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithNormalQueryInCurrentProcessAsync( 202private static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithPatternInCurrentProcessAsync( 203string pattern, Func<SearchQuery, Task<ImmutableArray<ISymbol>>> searchAsync) 237internal static Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithPatternInCurrentProcessAsync( 245internal static Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithPatternInCurrentProcessAsync(
FindSymbols\FindReferences\DependentProjectsFinder.cs (6)
40public static async Task<ImmutableArray<Project>> GetDependentProjectsAsync( 73private static async Task<ImmutableArray<Project>> GetDependentProjectsWorkerAsync( 134private static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsAsync( 162static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsWorkerAsync( 306private static async Task<bool> HasReferenceToAsync( 324private static async Task<bool> HasReferenceToAssemblyAsync(Project project, string assemblyName, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentTypeFinder.cs (2)
61private static async Task<ImmutableArray<INamedTypeSymbol>> DescendInheritanceTreeAsync( 399private static async Task<ISet<ProjectId>> GetProjectsThatCouldReferenceTypeAsync(
FindSymbols\FindReferences\DependentTypeFinder_DerivedClasses.cs (1)
15private static Task<ImmutableArray<INamedTypeSymbol>> FindDerivedClassesInCurrentProcessAsync(
FindSymbols\FindReferences\DependentTypeFinder_DerivedInterfaces.cs (1)
15private static Task<ImmutableArray<INamedTypeSymbol>> FindDerivedInterfacesInCurrentProcessAsync(
FindSymbols\FindReferences\DependentTypeFinder_ImplementingTypes.cs (1)
14private static async Task<ImmutableArray<INamedTypeSymbol>> FindImplementingTypesInCurrentProcessAsync(
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (2)
42public static async Task<ProjectIndex> GetIndexAsync( 67private static async Task<ProjectIndex> CreateIndexAsync(Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (4)
18public static async Task<ImmutableArray<INamedTypeSymbol>> FindTypesAsync( 52public static async Task<ImmutableArray<INamedTypeSymbol>> FindTypesInCurrentProcessAsync( 70var task = kind switch 82private static async Task<ImmutableArray<INamedTypeSymbol>> RehydrateAsync(Solution solution, ImmutableArray<SerializableSymbolAndProjectId> values, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (4)
27public abstract Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 812protected virtual Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 818public sealed override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 870protected static async Task<ImmutableArray<string>> GetAllMatchingGlobalAliasNamesAsync(
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
49protected override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(IMethodSymbol symbol, Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\ILanguageServiceReferenceFinder.cs (1)
19Task<ImmutableArray<ISymbol>> DetermineCascadedSymbolsAsync(
FindSymbols\FindReferences\Finders\IReferenceFinder.cs (1)
27Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
23protected override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(INamedTypeSymbol symbol, Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\NamespaceSymbolReferenceFinder.cs (1)
21protected override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync(INamespaceSymbol symbol, Project project, CancellationToken cancellationToken)
FindSymbols\FindReferences\FindReferenceCache.cs (1)
33static async Task<FindReferenceCache> ComputeCacheAsync(Document document, CancellationToken cancellationToken)
FindSymbols\FindReferences\FindReferencesSearchEngine.cs (2)
163private async Task<ImmutableArray<(ISymbol symbol, SymbolGroup group)>> ReportGroupsSeriallyAsync( 205private Task<ImmutableArray<Project>> GetProjectsToSearchAsync(
FindSymbols\FindReferences\FindReferencesSearchEngine.SymbolSet.cs (4)
58public static async Task<SymbolSet> CreateAsync( 146public static async Task<MetadataUnifyingSymbolHashSet> DetermineInitialSearchSymbolsAsync( 163private static async Task<MetadataUnifyingSymbolHashSet> DetermineInitialUpSymbolsAsync( 210async Task<ISymbol?> TryMapAndAddLinkedSymbolsAsync(ISymbol symbol)
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (2)
164static async Task<ImmutableArray<(SymbolGroup group, ISymbol symbol, ReferenceLocation location)>> ConvertLocationsAsync( 232async Task<bool> ComputeInheritanceRelationshipAsync(
FindSymbols\ReferenceLocationExtensions.cs (1)
16public static async Task<Dictionary<ISymbol, List<Location>>> FindReferencingSymbolsAsync(
FindSymbols\Shared\AbstractSyntaxIndex.cs (2)
79private static async Task<TIndex?> GetIndexWorkerAsync( 114private static async Task<TIndex> CreateIndexAsync(
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (5)
37protected static async Task<TIndex?> LoadAsync( 62protected static async Task<TIndex?> LoadAsync( 133private Task<bool> SaveAsync( 143public Task<bool> SaveAsync( 154private async Task<bool> SaveAsync(
FindSymbols\SymbolFinder.cs (8)
42public static Task<ISymbol> FindSymbolAtPositionAsync( 60internal static Task<ISymbol> FindSymbolAtPositionAsync( 76internal static async Task<ISymbol> FindSymbolAtPositionAsync( 93internal static async Task<TokenSemanticInfo> GetSemanticInfoAtPositionAsync( 110private static Task<SyntaxToken> GetTokenAtPositionAsync( 123public static async Task<ISymbol> FindSymbolAtPositionAsync( 139public static Task<ISymbol?> FindSourceDefinitionAsync(ISymbol? symbol, Solution solution, CancellationToken cancellationToken = default) 185internal static async Task<ImmutableArray<ISymbol>> FindLinkedSymbolsAsync(
FindSymbols\SymbolFinder_Callers.cs (3)
23public static Task<IEnumerable<SymbolCallerInfo>> FindCallersAsync( 32public static async Task<IEnumerable<SymbolCallerInfo>> FindCallersAsync( 75private static async Task<ImmutableArray<ReferencedSymbol>> FindCallReferencesAsync(
FindSymbols\SymbolFinder_Declarations_AllDeclarations.cs (2)
16public static async Task<IEnumerable<ISymbol>> FindDeclarationsAsync( 28public static async Task<IEnumerable<ISymbol>> FindDeclarationsAsync(
FindSymbols\SymbolFinder_Declarations_CustomQueries.cs (6)
28public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, CancellationToken cancellationToken = default) 34public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default) 43internal static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithCustomQueryAsync( 73public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, CancellationToken cancellationToken = default) 79public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, Func<string, bool> predicate, SymbolFilter filter, CancellationToken cancellationToken = default) 88internal static async Task<ImmutableArray<ISymbol>> FindSourceDeclarationsWithCustomQueryAsync(
FindSymbols\SymbolFinder_Declarations_SourceDeclarations.cs (8)
20public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Solution solution, string name, bool ignoreCase, CancellationToken cancellationToken = default) 26public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync( 40public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync(Project project, string name, bool ignoreCase, CancellationToken cancellationToken = default) 46public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsAsync( 67public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(Solution solution, string pattern, CancellationToken cancellationToken = default) 77public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync( 95public static Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(Project project, string pattern, CancellationToken cancellationToken = default) 105public static async Task<IEnumerable<ISymbol>> FindSourceDeclarationsWithPatternAsync(
FindSymbols\SymbolFinder_FindReferences_Legacy.cs (5)
25public static async Task<IEnumerable<ReferencedSymbol>> FindReferencesAsync( 38internal static async Task<ImmutableArray<ReferencedSymbol>> FindReferencesAsync( 58public static Task<IEnumerable<ReferencedSymbol>> FindReferencesAsync( 80public static async Task<IEnumerable<ReferencedSymbol>> FindReferencesAsync( 96internal static async Task<ImmutableArray<ReferencedSymbol>> FindReferencesAsync(
FindSymbols\SymbolFinder_FindRenamableReferences.cs (1)
15internal static async Task<ImmutableArray<ReferencedSymbol>> FindRenamableReferencesAsync(
FindSymbols\SymbolFinder_Hierarchy.cs (14)
26public static async Task<IEnumerable<ISymbol>> FindOverridesAsync( 36internal static async Task<ImmutableArray<ISymbol>> FindOverridesArrayAsync( 92public static async Task<IEnumerable<ISymbol>> FindImplementedInterfaceMembersAsync( 101internal static Task<ImmutableArray<ISymbol>> FindImplementedInterfaceMembersArrayAsync( 113internal static async Task<ImmutableArray<ISymbol>> FindImplementedInterfaceMembersArrayAsync( 212public static Task<IEnumerable<INamedTypeSymbol>> FindDerivedClassesAsync( 230public static async Task<IEnumerable<INamedTypeSymbol>> FindDerivedClassesAsync( 245internal static async Task<ImmutableArray<INamedTypeSymbol>> FindDerivedClassesArrayAsync( 266public static async Task<IEnumerable<INamedTypeSymbol>> FindDerivedInterfacesAsync( 281internal static async Task<ImmutableArray<INamedTypeSymbol>> FindDerivedInterfacesArrayAsync( 302public static async Task<IEnumerable<INamedTypeSymbol>> FindImplementationsAsync( 317internal static async Task<ImmutableArray<INamedTypeSymbol>> FindImplementationsArrayAsync( 331public static async Task<IEnumerable<ISymbol>> FindImplementationsAsync( 355internal static async Task<ImmutableArray<ISymbol>> FindMemberImplementationsArrayAsync(
FindSymbols\SymbolTree\SymbolTreeInfo.cs (5)
118public Task<ImmutableArray<ISymbol>> FindAsync( 129public async Task<ImmutableArray<ISymbol>> FindAsync( 142private Task<ImmutableArray<ISymbol>> FindCoreAsync( 167private async Task<ImmutableArray<ISymbol>> FuzzyFindAsync( 213private async Task<ImmutableArray<ISymbol>> FindAsync(
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (4)
143static async Task<SymbolTreeInfo> GetInfoForMetadataReferenceSlowAsync( 168static async Task<SymbolTreeInfo> CreateMetadataSymbolTreeInfoAsync( 201public static async Task<SymbolTreeInfo?> TryGetCachedInfoForMetadataReferenceIgnoreChecksumAsync(PortableExecutableReference reference, CancellationToken cancellationToken) 236public static Task<SymbolTreeInfo?> LoadAnyInfoForMetadataReferenceAsync(
FindSymbols\SymbolTree\SymbolTreeInfo_Serialization.cs (2)
28private static async Task<SymbolTreeInfo> LoadOrCreateAsync( 81private static async Task<SymbolTreeInfo?> LoadAsync(
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (4)
33public static Task<SymbolTreeInfo> GetInfoForSourceAssemblyAsync( 52public static async Task<SymbolTreeInfo?> LoadAnyInfoForSourceAssemblyAsync( 70public static Task<Checksum> GetSourceSymbolsChecksumAsync(Project project, CancellationToken cancellationToken) 81private static async Task<Checksum> ComputeSourceSymbolsChecksumAsync(ProjectState projectState, CancellationToken cancellationToken)
FindSymbols\SyntaxTree\SyntaxTreeIndex_Persistence.cs (1)
19public static Task<SyntaxTreeIndex?> LoadAsync(
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Persistence.cs (1)
15public static Task<TopLevelSyntaxTreeIndex?> LoadAsync(
Formatting\AbstractFormattingService.cs (1)
17public Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions? syntaxFormattingOptions, CancellationToken cancellationToken)
Formatting\Formatter.cs (11)
48public static Task<Document> FormatAsync(Document document, OptionSet? options = null, CancellationToken cancellationToken = default) 53internal static Task<Document> FormatAsync(Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken) 64public static Task<Document> FormatAsync(Document document, TextSpan span, OptionSet? options = null, CancellationToken cancellationToken = default) 69internal static Task<Document> FormatAsync(Document document, TextSpan span, SyntaxFormattingOptions options, CancellationToken cancellationToken) 80public static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, OptionSet? options = null, CancellationToken cancellationToken = default) 92internal static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, SyntaxFormattingOptions? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 108public static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, OptionSet? options = null, CancellationToken cancellationToken = default) 111internal static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 114internal static async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 121internal static async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, OptionSet? optionSet, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 355public static async Task<Document> OrganizeImportsAsync(Document document, CancellationToken cancellationToken = default)
Formatting\IFormattingService.cs (1)
24Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions? syntaxFormattingOptions, CancellationToken cancellationToken);
LanguageServices\FixAllSpanMappingService\AbstractFixAllSpanMappingService.cs (4)
19protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 22public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 31private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 71private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
LanguageServices\FixAllSpanMappingService\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
LinkedFileDiffMerging\DefaultDocumentTextDifferencingService.cs (2)
24public Task<ImmutableArray<TextChange>> GetTextChangesAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken) 27public async Task<ImmutableArray<TextChange>> GetTextChangesAsync(Document oldDocument, Document newDocument, TextDifferenceTypes preferredDifferenceType, CancellationToken cancellationToken)
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (3)
21internal async Task<LinkedFileMergeSessionResult> MergeDiffsAsync(CancellationToken cancellationToken) 90private async Task<LinkedFileMergeResult> MergeLinkedDocumentGroupAsync( 134private static async Task<ImmutableArray<TextChange>> AddDocumentMergeChangesAsync(
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (1)
30public async Task<ImmutableArray<TextSpan>> GetLocationsAsync(Document document, ImmutableArray<TextSpan> textSpans, CancellationToken cancellationToken)
ObsoleteSymbol\IObsoleteSymbolService.cs (1)
20Task<ImmutableArray<TextSpan>> GetLocationsAsync(Document document, ImmutableArray<TextSpan> textSpans, CancellationToken cancellationToken);
OrganizeImports\IOrganizeImportsService.cs (1)
13Task<Document> OrganizeImportsAsync(Document document, OrganizeImportsOptions options, CancellationToken cancellationToken);
Packaging\IPackageInstallerService.cs (1)
21Task<bool> TryInstallPackageAsync(
ReassignedVariable\AbstractReassignedVariableService.cs (1)
39public async Task<ImmutableArray<TextSpan>> GetLocationsAsync(
ReassignedVariable\IReassignedVariableService.cs (1)
20Task<ImmutableArray<TextSpan>> GetLocationsAsync(Document document, ImmutableArray<TextSpan> textSpans, CancellationToken cancellationToken);
Recommendations\Recommender.cs (2)
35public static Task<IEnumerable<ISymbol>> GetRecommendedSymbolsAtPositionAsync( 45public static async Task<ImmutableArray<ISymbol>> GetRecommendedSymbolsAtPositionAsync(
Remote\IRemoteHostClientProvider.cs (1)
19Task<RemoteHostClient?> TryGetRemoteHostClientAsync(CancellationToken cancellationToken);
Remote\IRemoteKeepAliveService.cs (2)
108public static Task<RemoteKeepAliveSession> CreateAsync(Solution solution, CancellationToken cancellationToken) 112public static async Task<RemoteKeepAliveSession> CreateAsync(
Remote\RemoteArguments.cs (1)
189private async Task<IAliasSymbol?> RehydrateAliasAsync(
Remote\RemoteHostClient.cs (3)
31public static Task<RemoteHostClient?> TryGetClientAsync(Project project, CancellationToken cancellationToken) 41public static Task<RemoteHostClient?> TryGetClientAsync(Workspace workspace, CancellationToken cancellationToken) 44public static Task<RemoteHostClient?> TryGetClientAsync(SolutionServices services, CancellationToken cancellationToken)
Remote\RemoteUtilities.cs (1)
48public static async Task<Solution> UpdateSolutionAsync(
Rename\ConflictEngine\ConflictResolver.cs (3)
51internal static async Task<ConflictResolution> ResolveLightweightConflictsAsync( 93internal static async Task<ConflictResolution> ResolveSymbolicLocationConflictsInCurrentProcessAsync( 113private static Task<MutableConflictResolution> ResolveMutableConflictsAsync(
Rename\ConflictEngine\ConflictResolver.Session.cs (7)
92public async Task<MutableConflictResolution> ResolveConflictsAsync() 301private async Task<bool> IdentifyConflictsAsync( 468private async Task<ImmutableHashSet<ISymbol>?> GetNonConflictSymbolsAsync(Project currentProject) 509private async Task<bool> CheckForConflictAsync( 675private async Task<ISymbol> GetRenamedSymbolInCurrentSolutionAsync(MutableConflictResolution conflictResolution) 699private async Task<(ImmutableHashSet<DocumentId> documentIds, ImmutableArray<string> possibleNameConflicts)> FindDocumentsAndPossibleNameConflictsAsync() 774private async Task<Solution> AnnotateAndRename_WorkerAsync(
Rename\ConflictEngine\MutableConflictResolution.cs (1)
63internal async Task<Solution> RemoveAllRenameAnnotationsAsync(
Rename\ConflictEngine\RenamedSpansTracker.cs (1)
146internal async Task<Solution> SimplifyAsync(Solution solution, IEnumerable<DocumentId> documentIds, bool replacementTextValid, AnnotationTable<RenameAnnotation> renameAnnotations, CancellationToken cancellationToken)
Rename\IRemoteRenamerService.cs (3)
116internal static async Task<SymbolicRenameLocations?> TryRehydrateAsync( 181public async Task<ConflictResolution> RehydrateAsync(Solution oldSolution, CancellationToken cancellationToken) 242public async Task<SerializableConflictResolution> DehydrateAsync(CancellationToken cancellationToken)
Rename\IRenameRewriterLanguageService.cs (4)
52Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync( 70Task<ImmutableArray<Location>> ComputeImplicitReferenceConflictsAsync( 124public abstract Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync(string replacementText, ISymbol renamedSymbol, ISymbol renameSymbol, IEnumerable<ISymbol> referencedSymbols, Solution baseSolution, Solution newSolution, IDictionary<Location, Location> reverseMappedLocations, CancellationToken cancellationToken); 125public abstract Task<ImmutableArray<Location>> ComputeImplicitReferenceConflictsAsync(ISymbol renameSymbol, ISymbol renamedSymbol, IEnumerable<ReferenceLocation> implicitReferenceLocations, CancellationToken cancellationToken);
Rename\LightweightRenameLocations.cs (3)
49public async Task<SymbolicRenameLocations?> ToSymbolicLocationsAsync(ISymbol symbol, CancellationToken cancellationToken) 72public static async Task<LightweightRenameLocations> FindRenameLocationsAsync( 117public Task<ConflictResolution> ResolveConflictsAsync(ISymbol symbol, string replacementText, ImmutableArray<SymbolKey> nonConflictSymbolKeys, CancellationToken cancellationToken)
Rename\Renamer.cs (7)
38public static Task<Solution> RenameSymbolAsync(Solution solution, ISymbol symbol, string newName, OptionSet? optionSet, CancellationToken cancellationToken = default) 41public static async Task<Solution> RenameSymbolAsync( 68public static Task<RenameDocumentActionSet> RenameDocumentAsync( 97public static async Task<RenameDocumentActionSet> RenameDocumentAsync( 139internal static Task<LightweightRenameLocations> FindRenameLocationsAsync(Solution solution, ISymbol symbol, SymbolRenameOptions options, CancellationToken cancellationToken) 142internal static async Task<ConflictResolution> RenameSymbolAsync( 187private static async Task<ConflictResolution> RenameSymbolInCurrentProcessAsync(
Rename\Renamer.RenameDocumentAction.cs (1)
43internal abstract Task<Solution> GetModifiedSolutionAsync(Document document, DocumentRenameOptions options, CancellationToken cancellationToken);
Rename\Renamer.RenameDocumentActionSet.cs (2)
58public Task<Solution> UpdateSolutionAsync(Solution solution, CancellationToken cancellationToken) 73public async Task<Solution> UpdateSolutionAsync(Solution solution, ImmutableArray<RenameDocumentAction> actions, CancellationToken cancellationToken)
Rename\Renamer.RenameSymbolDocumentAction.cs (4)
36internal override async Task<Solution> GetModifiedSolutionAsync(Document document, DocumentRenameOptions options, CancellationToken cancellationToken) 69private static async Task<SyntaxNode?> GetMatchingTypeDeclarationAsync(Document document, CancellationToken cancellationToken) 78public static async Task<RenameSymbolDocumentAction?> TryCreateAsync(Document document, string newName, CancellationToken cancellationToken) 87private static async Task<AnalysisResult?> AnalyzeAsync(Document document, string newDocumentName, CancellationToken cancellationToken)
Rename\Renamer.SyncNamespaceDocumentAction.cs (1)
39internal override async Task<Solution> GetModifiedSolutionAsync(Document document, DocumentRenameOptions options, CancellationToken cancellationToken)
Rename\RenameUtilities.cs (3)
210public static async Task<ISymbol?> TryGetPropertyFromAccessorOrAnOverrideAsync( 299public static async Task<ISymbol?> TryGetRenamableSymbolAsync( 315public static async Task<ISymbol> FindDefinitionSymbolAsync(
Rename\SymbolicRenameLocations.cs (3)
57public static async Task<SymbolicRenameLocations> FindLocationsInCurrentProcessAsync( 113private static async Task<ImmutableArray<SearchResult>> GetOverloadsAsync( 124private static async Task<SearchResult> AddLocationsReferenceSymbolsAsync(
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (5)
30private static async Task<bool> ShouldIncludeSymbolAsync( 135private static async Task<bool> IsPropertyAccessorOrAnOverrideAsync( 160public static async Task<ImmutableArray<RenameLocation>> GetRenamableDefinitionLocationsAsync( 244internal static async Task<IEnumerable<RenameLocation>> GetRenamableReferenceLocationsAsync(ISymbol referencedSymbol, ISymbol originalSymbol, ReferenceLocation location, Solution solution, CancellationToken cancellationToken) 319internal static async Task<(ImmutableArray<RenameLocation> strings, ImmutableArray<RenameLocation> comments)> GetRenamableLocationsInStringsAndCommentsAsync(
Serialization\SerializableSourceText.cs (1)
239public override async Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Shared\Extensions\ISolutionExtensions.cs (1)
18public static async Task<ImmutableArray<INamespaceSymbol>> GetGlobalNamespacesAsync(
Shared\Extensions\SyntaxGeneratorExtensions.cs (3)
37public static async Task<IPropertySymbol> OverridePropertyAsync( 193public static async Task<ISymbol> OverrideAsync( 229private static async Task<IMethodSymbol> OverrideMethodAsync(
Shared\TestHooks\AsynchronousOperationListener.cs (2)
44public Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken) 73static Task<bool> DelaySlowAsync(Task delayTask, CancellationTokenSource cancellationTokenSourceToDispose, CancellationToken cancellationToken)
Shared\TestHooks\AsynchronousOperationListenerProvider+NullOperationListener.cs (1)
23public Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken)
Shared\Utilities\IOUtilities.cs (2)
38public static async Task<T> PerformIOAsync<T>(Func<Task<T>> function, T defaultValue = default)
Shared\Utilities\IStreamingProgressTrackerExtensions.cs (1)
17public static async Task<IAsyncDisposable> AddSingleItemAsync(this IStreamingProgressTracker progressTracker, CancellationToken cancellationToken)
Shared\Utilities\IWorkspaceThreadingService.cs (1)
30TResult Run<TResult>(Func<Task<TResult>> asyncMethod);
Simplification\Simplifier.cs (12)
62public static async Task<TNode> ExpandAsync<TNode>(TNode node, Document document, Func<SyntaxNode, bool>? expandInsideNode = null, bool expandParameter = false, CancellationToken cancellationToken = default) where TNode : SyntaxNode 112public static async Task<SyntaxToken> ExpandAsync(SyntaxToken token, Document document, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default) 152public static async Task<Document> ReduceAsync(Document document, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 165internal static async Task<Document> ReduceAsync(Document document, SimplifierOptions options, CancellationToken cancellationToken) 175public static async Task<Document> ReduceAsync(Document document, SyntaxAnnotation annotation, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 193internal static async Task<Document> ReduceAsync(Document document, SyntaxAnnotation annotation, SimplifierOptions options, CancellationToken cancellationToken) 203public static Task<Document> ReduceAsync(Document document, TextSpan span, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 215internal static Task<Document> ReduceAsync(Document document, TextSpan span, SimplifierOptions options, CancellationToken cancellationToken) 222public static async Task<Document> ReduceAsync(Document document, IEnumerable<TextSpan> spans, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 240internal static Task<Document> ReduceAsync(Document document, IEnumerable<TextSpan> spans, SimplifierOptions options, CancellationToken cancellationToken) 244internal static async Task<Document> ReduceAsync( 255internal static async Task<SimplifierOptions> GetOptionsAsync(Document document, OptionSet? optionSet, CancellationToken cancellationToken)
src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
56private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 196if (CopyMap.TryGetValue(originalFilePath, out var copyTask)) 203var task = CopyMap.GetOrAdd(originalFilePath, tcs.Task);
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
334public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 339public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (10)
339public static Task<TRootNode> ReplaceNodesAsync<TRootNode>( 342Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>> computeReplacementAsync, 361public static Task<TRootNode> ReplaceTokensAsync<TRootNode>( 364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync, 374public static Task<TRoot> ReplaceTriviaAsync<TRoot>( 377Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>> computeReplacementAsync, 387public static async Task<TRoot> ReplaceSyntaxAsync<TRoot>( 390Func<SyntaxNode, SyntaxNode, CancellationToken, Task<SyntaxNode>>? computeReplacementNodeAsync, 392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync, 394Func<SyntaxTrivia, SyntaxTrivia, CancellationToken, Task<SyntaxTrivia>>? computeReplacementTriviaAsync,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
45public static Task<SyntaxToken> GetTouchingWordAsync( 55public static Task<SyntaxToken> GetTouchingTokenAsync( 64public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
33public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync( 37public Task<ImmutableArray<SyntaxNode>> GetSelectedMembersAsync( 41private async Task<ImmutableArray<SyntaxNode>> GetSelectedMembersAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (1)
130Task<ISymbol?> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy.cs (4)
13public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, Func<TArg, CancellationToken, T>? synchronousComputeFunction, TArg arg) 16public static AsyncLazy<T> Create<T, TArg>(Func<TArg, CancellationToken, Task<T>> asynchronousComputeFunction, TArg arg) 28public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction) 38public static AsyncLazy<T> Create<T>(Func<CancellationToken, Task<T>> asynchronousComputeFunction, Func<CancellationToken, T> synchronousComputeFunction)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncLazy`1.cs (15)
19public abstract Task<T> GetValueAsync(CancellationToken cancellationToken); 22Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 50private Func<TData, CancellationToken, Task<T>>? _asynchronousComputeFunction; 62private Task<T>? _cachedResult; 112Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 126Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, 326public override Task<T> GetValueAsync(CancellationToken cancellationToken) 335var cachedResult = _cachedResult; 386private readonly struct AsynchronousComputationToStart(Func<TData, CancellationToken, Task<T>> asynchronousComputeFunction, CancellationTokenSource cancellationTokenSource) 388public readonly Func<TData, CancellationToken, Task<T>> AsynchronousComputeFunction = asynchronousComputeFunction; 409var task = computationToStart.AsynchronousComputeFunction(_data, cancellationToken); 454private void CompleteWithTask(Task<T> task, CancellationToken cancellationToken) 486private Task<T> GetCachedValueAndCacheThisValueIfNoneCached_NoLock(Task<T> task) 569public void CompleteFromTask(Task<T> task)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\IAsyncEnumerableExtensions.cs (1)
36public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\ProducerConsumer.cs (13)
41private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 175public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 178Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 189public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 192Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 209public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 222public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 241private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 244Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 337private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 340Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 361var readTask = ReadFromChannelAndConsumeItemsAsync(); 366async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SpecializedTasks.cs (17)
18public static readonly Task<bool> True = Task.FromResult(true); 19public static readonly Task<bool> False = Task.FromResult(false); 26public static Task<T?> AsNullable<T>(this Task<T> task) where T : class 30public static Task<T?> Default<T>() 34public static Task<T?> Null<T>() where T : class 38public static Task<IReadOnlyList<T>> EmptyReadOnlyList<T>() 42public static Task<IList<T>> EmptyList<T>() 46public static Task<ImmutableArray<T>> EmptyImmutableArray<T>() 50public static Task<IEnumerable<T>> EmptyEnumerable<T>() 87public static async ValueTask<ImmutableArray<TResult>> WhenAll<TResult>(this IReadOnlyCollection<Task<TResult>> tasks) 92foreach (var task in tasks) 184public static readonly Task<T?> Default = Task.FromResult<T?>(default); 185public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 186public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 187public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 188public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\TaskExtensions.cs (3)
17public static T WaitAndGetResult<T>(this Task<T> task, CancellationToken cancellationToken) 45public static T WaitAndGetResult_CanCallOnBackground<T>(this Task<T> task, CancellationToken cancellationToken) 83public static TResult VerifyCompleted<TResult>(this Task<TResult> task)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
151=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
54protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 60private Task<Document> FixAllAsync( 69internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (10)
229private async Task<Document> GetEditAsync( 391public virtual Task<Document> AddEventAsync( 401public Task<Document> AddFieldAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 410public Task<Document> AddPropertyAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 419public Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 428public Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 437public Task<Document> AddNamespaceAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 446public Task<Document> AddMethodAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 455public Task<Document> AddMembersAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken) 464public Task<Document> AddNamespaceOrTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
29public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 36public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 43public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 50public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 57public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 64public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 71public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 78public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 85public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (9)
133Task<Document> AddEventAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken); 138Task<Document> AddFieldAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken); 143Task<Document> AddMethodAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken); 148Task<Document> AddPropertyAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken); 153Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken); 158Task<Document> AddNamedTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken); 163Task<Document> AddNamespaceAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken); 168Task<Document> AddNamespaceOrTypeAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken); 173Task<Document> AddMembersAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringContextExtensions.cs (7)
41public static Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this CodeRefactoringContext context) where TSyntaxNode : SyntaxNode 44public static async Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this CodeRefactoringContext context, bool allowEmptyNode) where TSyntaxNode : SyntaxNode 50public static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(this CodeRefactoringContext context) where TSyntaxNode : SyntaxNode 53public static async Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(this CodeRefactoringContext context, bool allowEmptyNodes) where TSyntaxNode : SyntaxNode 59public static async Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this Document document, TextSpan span, CancellationToken cancellationToken) where TSyntaxNode : SyntaxNode 75public static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>( 81public static async Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\ImportAdderService.cs (4)
30public async Task<Document> AddImportsAsync( 75private async Task<ISet<INamespaceSymbol>> GetSafeToAddImportsAsync( 109private async Task<Document> AddImportDirectivesFromSyntaxesAsync( 170private async Task<Document> AddImportDirectivesFromSymbolAnnotationsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
165public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 171public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 206public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
109public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\GeneratedCodeRecognition\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (5)
35protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 37public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 46private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 76public async Task<Document> MoveDeclarationNearReferenceAsync( 203private async Task<bool> CanMergeDeclarationAndAssignmentAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\IMoveDeclarationNearReferenceService.cs (2)
17Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode localDeclarationStatement, CancellationToken cancellationToken); 24Task<Document> MoveDeclarationNearReferenceAsync(Document document, SyntaxNode localDeclarationStatement, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsService.cs (3)
20public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 23public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 25protected async Task<HashSet<T>> GetCommonUnnecessaryImportsOfAllContextAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\RemoveUnnecessaryImports\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\ReplaceDiscardDeclarationsWithAssignments\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
266public Task<ISymbol> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
139private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 176private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 286private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
18public static new async Task<SemanticDocument> CreateAsync(Document document, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorage.Accessor.cs (3)
120public Task<bool> ChecksumMatchesAsync(TKey key, string name, Checksum checksum, CancellationToken cancellationToken) 137public Task<Stream?> ReadStreamAsync(TKey key, string name, Checksum? checksum, CancellationToken cancellationToken) 217public Task<bool> WriteStreamAsync(TKey key, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorage_DocumentSerialization.cs (3)
17protected override Task<bool> ChecksumMatchesAsync(DocumentKey documentKey, Document? document, string name, Checksum checksum, CancellationToken cancellationToken) 20protected override Task<Stream?> ReadStreamAsync(DocumentKey documentKey, Document? document, string name, Checksum? checksum, CancellationToken cancellationToken) 23protected override Task<bool> WriteStreamAsync(DocumentKey documentKey, Document? document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorage_ProjectSerialization.cs (3)
17protected override Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, Project? project, string name, Checksum checksum, CancellationToken cancellationToken) 20protected override Task<Stream?> ReadStreamAsync(ProjectKey projectKey, Project? project, string name, Checksum? checksum, CancellationToken cancellationToken) 23protected override Task<bool> WriteStreamAsync(ProjectKey projectKey, Project? project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorage_SolutionSerialization.cs (3)
17public override Task<bool> ChecksumMatchesAsync(string name, Checksum checksum, CancellationToken cancellationToken) 20public override Task<Stream?> ReadStreamAsync(string name, Checksum? checksum, CancellationToken cancellationToken) 23public override Task<bool> WriteStreamAsync(string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Storage\SQLite\v2\SQLitePersistentStorage_Threading.cs (4)
15private static async Task<TResult> PerformTaskAsync<TArg, TResult>( 24var task = Task.Factory.StartNew(boundFunction, cancellationToken, TaskCreationOptions.None, scheduler); 31private Task<TResult> PerformReadAsync<TArg, TResult>(Func<TArg, TResult> func, TArg arg, CancellationToken cancellationToken) where TArg : struct 46public Task<TResult> PerformWriteAsync<TArg, TResult>(Func<TArg, TResult> func, TArg arg, CancellationToken cancellationToken) where TArg : struct
TaskList\ITaskListService.cs (1)
18Task<ImmutableArray<TaskListItem>> GetTaskListItemsAsync(Document document, ImmutableArray<TaskListItemDescriptor> descriptors, CancellationToken cancellationToken);
TemporaryStorage\TemporaryStorageService.cs (3)
100async Task<ITemporaryStorageTextHandle> ITemporaryStorageServiceInternal.WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 129public async Task<TemporaryStorageTextHandle> WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 258public async Task<SourceText> ReadFromTemporaryStorageAsync(CancellationToken cancellationToken)
TemporaryStorage\TrivialTemporaryStorageService.cs (2)
34public Task<ITemporaryStorageTextHandle> WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 76public Task<SourceText> ReadFromTemporaryStorageAsync(CancellationToken cancellationToken)
Workspace\Host\DocumentService\AbstractSpanMappingService.cs (2)
18public abstract Task<ImmutableArray<(string mappedFilePath, TextChange mappedTextChange)>> GetMappedTextChangesAsync( 23public abstract Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(
Workspace\Host\DocumentService\IDocumentExcerptService.cs (1)
23Task<ExcerptResult?> TryExcerptAsync(Document document, TextSpan span, ExcerptMode mode, ClassificationOptions classificationOptions, CancellationToken cancellationToken);
Workspace\Host\DocumentService\ISpanMappingService.cs (2)
29Task<ImmutableArray<(string mappedFilePath, TextChange mappedTextChange)>> GetMappedTextChangesAsync( 47Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken);
Workspace\Host\PersistentStorage\AbstractPersistentStorage.cs (27)
46public abstract Task<bool> ChecksumMatchesAsync(string name, Checksum checksum, CancellationToken cancellationToken); 47public abstract Task<Stream?> ReadStreamAsync(string name, Checksum? checksum, CancellationToken cancellationToken); 48public abstract Task<bool> WriteStreamAsync(string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken); 50protected abstract Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, Project? project, string name, Checksum checksum, CancellationToken cancellationToken); 51protected abstract Task<bool> ChecksumMatchesAsync(DocumentKey documentKey, Document? document, string name, Checksum checksum, CancellationToken cancellationToken); 52protected abstract Task<Stream?> ReadStreamAsync(ProjectKey projectKey, Project? project, string name, Checksum? checksum, CancellationToken cancellationToken); 53protected abstract Task<Stream?> ReadStreamAsync(DocumentKey documentKey, Document? document, string name, Checksum? checksum, CancellationToken cancellationToken); 54protected abstract Task<bool> WriteStreamAsync(ProjectKey projectKey, Project? project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken); 55protected abstract Task<bool> WriteStreamAsync(DocumentKey documentKey, Document? document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken); 57public Task<bool> ChecksumMatchesAsync(ProjectKey projectKey, string name, Checksum checksum, CancellationToken cancellationToken) 60public Task<bool> ChecksumMatchesAsync(DocumentKey documentKey, string name, Checksum checksum, CancellationToken cancellationToken) 63public Task<Stream?> ReadStreamAsync(ProjectKey projectKey, string name, Checksum? checksum, CancellationToken cancellationToken) 66public Task<Stream?> ReadStreamAsync(DocumentKey documentKey, string name, Checksum? checksum, CancellationToken cancellationToken) 69public Task<bool> WriteStreamAsync(ProjectKey projectKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 72public Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 75public Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken) 78public Task<bool> ChecksumMatchesAsync(Document document, string name, Checksum checksum, CancellationToken cancellationToken) 81public Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken) 84public Task<Stream?> ReadStreamAsync(Document document, string name, Checksum? checksum, CancellationToken cancellationToken) 87public Task<Stream?> ReadStreamAsync(string name, CancellationToken cancellationToken) 90public Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken) 93public Task<Stream?> ReadStreamAsync(Document document, string name, CancellationToken cancellationToken) 96public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 99public Task<bool> WriteStreamAsync(Document document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 102public Task<bool> WriteStreamAsync(string name, Stream stream, CancellationToken cancellationToken) 105public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken) 108public Task<bool> WriteStreamAsync(Document document, string name, Stream stream, CancellationToken cancellationToken)
Workspace\Host\PersistentStorage\IChecksummedPersistentStorage.cs (15)
23Task<bool> ChecksumMatchesAsync(string name, Checksum checksum, CancellationToken cancellationToken = default); 29Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken = default); 35Task<bool> ChecksumMatchesAsync(Document document, string name, Checksum checksum, CancellationToken cancellationToken = default); 37Task<bool> ChecksumMatchesAsync(ProjectKey project, string name, Checksum checksum, CancellationToken cancellationToken = default); 38Task<bool> ChecksumMatchesAsync(DocumentKey document, string name, Checksum checksum, CancellationToken cancellationToken = default); 45Task<Stream?> ReadStreamAsync(string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 52Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 59Task<Stream?> ReadStreamAsync(Document document, string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 61Task<Stream?> ReadStreamAsync(ProjectKey project, string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 62Task<Stream?> ReadStreamAsync(DocumentKey document, string name, Checksum? checksum = null, CancellationToken cancellationToken = default); 73Task<bool> WriteStreamAsync(string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default); 84Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default); 95Task<bool> WriteStreamAsync(Document document, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default); 101Task<bool> WriteStreamAsync(ProjectKey projectKey, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default); 107Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum = null, CancellationToken cancellationToken = default);
Workspace\Host\PersistentStorage\IPersistentStorage.cs (6)
18Task<Stream?> ReadStreamAsync(string name, CancellationToken cancellationToken = default); 19Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken = default); 20Task<Stream?> ReadStreamAsync(Document document, string name, CancellationToken cancellationToken = default); 26Task<bool> WriteStreamAsync(string name, Stream stream, CancellationToken cancellationToken = default); 32Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken = default); 38Task<bool> WriteStreamAsync(Document document, string name, Stream stream, CancellationToken cancellationToken = default);
Workspace\Host\PersistentStorage\NoOpPersistentStorage.cs (21)
23public Task<bool> ChecksumMatchesAsync(string name, Checksum checksum, CancellationToken cancellationToken) 26public Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken) 29public Task<bool> ChecksumMatchesAsync(Document document, string name, Checksum checksum, CancellationToken cancellationToken) 32public Task<bool> ChecksumMatchesAsync(ProjectKey project, string name, Checksum checksum, CancellationToken cancellationToken) 35public Task<bool> ChecksumMatchesAsync(DocumentKey document, string name, Checksum checksum, CancellationToken cancellationToken) 38public Task<Stream?> ReadStreamAsync(Document document, string name, CancellationToken cancellationToken) 41public Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken) 44public Task<Stream?> ReadStreamAsync(string name, CancellationToken cancellationToken) 47public Task<Stream?> ReadStreamAsync(string name, Checksum? checksum, CancellationToken cancellationToken) 50public Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken) 53public Task<Stream?> ReadStreamAsync(Document document, string name, Checksum? checksum, CancellationToken cancellationToken) 56public Task<Stream?> ReadStreamAsync(ProjectKey project, string name, Checksum? checksum, CancellationToken cancellationToken) 59public Task<Stream?> ReadStreamAsync(DocumentKey document, string name, Checksum? checksum, CancellationToken cancellationToken) 62public Task<bool> WriteStreamAsync(Document document, string name, Stream stream, CancellationToken cancellationToken) 65public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken) 68public Task<bool> WriteStreamAsync(string name, Stream stream, CancellationToken cancellationToken) 71public Task<bool> WriteStreamAsync(string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 74public Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 77public Task<bool> WriteStreamAsync(Document document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 80public Task<bool> WriteStreamAsync(ProjectKey projectKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 83public Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken)
Workspace\Host\SourceFiles\IDynamicFileInfoProvider.cs (1)
26Task<DynamicFileInfo?> GetDynamicFileInfoAsync(ProjectId projectId, string? projectFilePath, string filePath, CancellationToken cancellationToken);
Workspace\Host\Status\DefaultWorkspaceStatusService.cs (1)
31public Task<bool> IsFullyLoadedAsync(CancellationToken cancellationToken)
Workspace\Host\Status\IWorkspaceStatusService.cs (1)
45Task<bool> IsFullyLoadedAsync(CancellationToken cancellationToken);
Workspace\Host\TemporaryStorage\ITemporaryStorage.cs (2)
17Task<SourceText> ReadTextAsync(CancellationToken cancellationToken = default); 26Task<Stream> ReadStreamAsync(CancellationToken cancellationToken = default);
Workspace\Host\TemporaryStorage\ITemporaryStorageService.cs (1)
57Task<ITemporaryStorageTextHandle> WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken);
Workspace\Host\TemporaryStorage\ITemporaryStorageTextHandle.cs (1)
16Task<SourceText> ReadFromTemporaryStorageAsync(CancellationToken cancellationToken);
Workspace\Host\TemporaryStorage\LegacyTemporaryStorageService.cs (2)
53public Task<Stream> ReadStreamAsync(CancellationToken cancellationToken = default) 95public Task<SourceText> ReadTextAsync(CancellationToken cancellationToken = default)
Workspace\IsolatedAnalyzerReferenceSet.Core.cs (1)
221Func<Task<ImmutableArray<AnalyzerReference>>> getReferencesAsync,
Workspace\IsolatedAnalyzerReferenceSet.cs (1)
39Func<Task<ImmutableArray<AnalyzerReference>>> getReferencesAsync,
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
668public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
284var isFullyLoadedTask = workspaceStatusService.IsFullyLoadedAsync(CancellationToken.None);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
99public async Task<ProjectSystemProject> CreateAndAddToWorkspaceAsync(string projectSystemName, string language, ProjectSystemProjectCreationInfo creationInfo, ProjectSystemHostInfo hostInfo)
Workspace\Solution\AnalyzerConfigDocumentState.cs (1)
82public Task<AnalyzerConfig> GetAnalyzerConfigAsync(CancellationToken cancellationToken)
Workspace\Solution\ConstantTextAndVersionSource.cs (1)
30public Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\Document.cs (13)
43private Task<SyntaxTree>? _syntaxTreeResultTask; 95var result = Task.FromResult(syntaxTree); 129public async Task<VersionStamp> GetSyntaxVersionAsync(CancellationToken cancellationToken = default) 168public Task<SyntaxTree?> GetSyntaxTreeAsync(CancellationToken cancellationToken = default) 226public async Task<SyntaxNode?> GetSyntaxRootAsync(CancellationToken cancellationToken = default) 284internal async Task<SemanticModel?> GetSemanticModelAsync(SemanticModelOptions options, CancellationToken cancellationToken = default) 313public Task<SemanticModel?> GetSemanticModelAsync(CancellationToken cancellationToken = default) 326private async Task<SemanticModel?> GetSemanticModelHelperAsync(bool disableNullableAnalysis, CancellationToken cancellationToken) 335async Task<SemanticModel> GetSemanticModelWorkerAsync() 441public async Task<IEnumerable<TextChange>> GetTextChangesAsync(Document oldDocument, CancellationToken cancellationToken = default) 454var result = GetTextChangesAsync(useAsync: false, oldDocument, cancellationToken); 458private async Task<ImmutableArray<TextChange>> GetTextChangesAsync( 589public Task<DocumentOptionSet> GetOptionsAsync(CancellationToken cancellationToken = default)
Workspace\Solution\DocumentState.cs (2)
127private static async Task<TreeAndVersion> FullyParseTreeAsync( 190private static async Task<TreeAndVersion> IncrementallyParseTreeAsync(
Workspace\Solution\DocumentState_LinkedFileReuse.cs (2)
45public Task<TreeAndVersion> GetValueAsync(CancellationToken cancellationToken) 233static async Task<TreeAndVersion> TryReuseSiblingTreeAsync(
Workspace\Solution\DocumentState_TreeTextSource.cs (1)
29public async Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\FileTextLoader.cs (2)
90public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 101public override async Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\IDocumentTextDifferencingService.cs (2)
22Task<ImmutableArray<TextChange>> GetTextChangesAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken); 32Task<ImmutableArray<TextChange>> GetTextChangesAsync(Document oldDocument, Document newDocument, TextDifferenceTypes preferredDifferenceType, CancellationToken cancellationToken);
Workspace\Solution\Project.cs (13)
402internal Task<bool> ContainsSymbolsWithNameAsync( 410internal Task<bool> ContainsSymbolsWithNameAsync( 419internal Task<bool> ContainsSymbolsWithNameAsync( 467private Task<bool> ContainsSymbolsAsync( 477private Task<bool> ContainsDeclarationAsync( 487private async Task<bool> ContainsAsync(Func<Document, Task<bool>> predicateAsync) 524public Task<Compilation?> GetCompilationAsync(CancellationToken cancellationToken = default) 531internal Task<bool> HasSuccessfullyLoadedAsync(CancellationToken cancellationToken) 555public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken = default) 561public Task<VersionStamp> GetDependentVersionAsync(CancellationToken cancellationToken = default) 568public Task<VersionStamp> GetDependentSemanticVersionAsync(CancellationToken cancellationToken = default) 575public Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\ProjectState.cs (5)
137private async Task<Dictionary<ImmutableArray<byte>, DocumentId>> ComputeContentHashToDocumentIdAsync(CancellationToken cancellationToken) 268private static async Task<VersionStamp> ComputeTopLevelChangeTextVersionAsync( 281private static async Task<VersionStamp> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 618public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken) 621public async Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\ProjectState_Checksum.cs (3)
21public Task<ProjectStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 24public Task<Checksum> GetChecksumAsync(CancellationToken cancellationToken) 41private async Task<ProjectStateChecksums> ComputeChecksumsAsync(CancellationToken cancellationToken)
Workspace\Solution\Solution.cs (2)
1503internal Task<Solution> WithFrozenPartialCompilationsAsync(CancellationToken cancellationToken) 1567internal async Task<Solution> WithMergedLinkedFileChangesAsync(
Workspace\Solution\SolutionCompilationState.cs (7)
1173public Task<VersionStamp> GetDependentVersionAsync(ProjectId projectId, CancellationToken cancellationToken) 1176public Task<VersionStamp> GetDependentSemanticVersionAsync(ProjectId projectId, CancellationToken cancellationToken) 1195private Task<Compilation?> GetCompilationAsync(ProjectId projectId, CancellationToken cancellationToken) 1208public Task<Compilation?> GetCompilationAsync(ProjectState project, CancellationToken cancellationToken) 1218public Task<bool> HasSuccessfullyLoadedAsync(ProjectState project, CancellationToken cancellationToken) 1278private async Task<MetadataReference?> GetMetadataReferenceAsync( 1323public Task<MetadataReference?> GetMetadataReferenceAsync(
Workspace\Solution\SolutionCompilationState.ICompilationTracker.cs (5)
40Task<Compilation> GetCompilationAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken); 54Task<VersionStamp> GetDependentVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken); 55Task<VersionStamp> GetDependentSemanticVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken); 71Task<bool> HasSuccessfullyLoadedAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken); 76Task<MetadataReference?> GetOrBuildSkeletonReferenceAsync(SolutionCompilationState compilationState, MetadataReferenceProperties properties, CancellationToken cancellationToken);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (15)
216public Task<Compilation> GetCompilationAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 235private async Task<Compilation> GetCompilationSlowAsync( 242private async Task<FinalCompilationTrackerState> GetOrBuildFinalStateAsync( 280async Task<FinalCompilationTrackerState> BuildFinalStateAsync() 360async Task<InProgressState> CollapseInProgressStateAsync(InProgressState initialState) 404async Task<(Compilation compilationWithoutGeneratedDocuments, Compilation? staleCompilationWithGeneratedDocuments, CompilationTrackerGeneratorInfo generatorInfo)> 451async Task<FinalCompilationTrackerState> FinalizeCompilationAsync(InProgressState inProgressState) 475async Task<FinalCompilationTrackerState> FinalizeCompilationWorkerAsync(InProgressState inProgressState) 670public Task<bool> HasSuccessfullyLoadedAsync( 678private async Task<bool> HasSuccessfullyLoadedSlowAsync( 920public Task<MetadataReference?> GetOrBuildSkeletonReferenceAsync(SolutionCompilationState compilationState, MetadataReferenceProperties properties, CancellationToken cancellationToken) 1021public Task<VersionStamp> GetDependentVersionAsync( 1038private async Task<VersionStamp> ComputeDependentVersionAsync( 1060public Task<VersionStamp> GetDependentSemanticVersionAsync( 1077private async Task<VersionStamp> ComputeDependentSemanticVersionAsync(
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
29private async Task<(Compilation compilationWithGeneratedFiles, CompilationTrackerGeneratorInfo nextGeneratorInfo)> AddExistingOrComputeNewGeneratorInfoAsync( 75private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments)?> TryComputeNewGeneratorInfoInRemoteProcessAsync( 228private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments, GeneratorDriver? generatorDriver)> ComputeNewGeneratorInfoInCurrentProcessAsync(
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (3)
140public async Task<MetadataReference?> GetOrBuildReferenceAsync( 158private async Task<SkeletonReferenceSet?> TryGetOrCreateReferenceSetAsync( 195private static async Task<SkeletonReferenceSet?> CreateSkeletonReferenceSetAsync(
Workspace\Solution\SolutionCompilationState.TranslationAction.cs (1)
34public abstract Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken);
Workspace\Solution\SolutionCompilationState.TranslationAction_Actions.cs (12)
31public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 85public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 120public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 140public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 173public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 207public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 242public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 265public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 288public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 319public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 339public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 358public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken)
Workspace\Solution\SolutionCompilationState.WithFrozenSourceGeneratedDocumentsCompilationTracker.cs (5)
109public async Task<Compilation> GetCompilationAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 152public Task<VersionStamp> GetDependentVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 155public Task<VersionStamp> GetDependentSemanticVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 190public Task<bool> HasSuccessfullyLoadedAsync( 234public Task<MetadataReference?> GetOrBuildSkeletonReferenceAsync(SolutionCompilationState compilationState, MetadataReferenceProperties properties, CancellationToken cancellationToken)
Workspace\Solution\SolutionCompilationState_Checksum.cs (5)
60public Task<SolutionCompilationStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 63public async Task<Checksum> GetChecksumAsync(CancellationToken cancellationToken) 70public async Task<(SolutionCompilationStateChecksums checksums, ProjectCone projectCone)> GetStateChecksumsAsync( 97public async Task<Checksum> GetChecksumAsync(ProjectId projectId, CancellationToken cancellationToken) 103private async Task<(SolutionCompilationStateChecksums checksums, ProjectCone? projectCone)> ComputeChecksumsAsync(
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (2)
104public async Task<bool> HasSourceGeneratorsAsync(ProjectId projectId, CancellationToken cancellationToken) 128static async Task<bool> ComputeHasSourceGeneratorsAsync(
Workspace\Solution\SolutionState_Checksum.cs (6)
53public Task<SolutionStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 56public async Task<Checksum> GetChecksumAsync(CancellationToken cancellationToken) 63public async Task<SolutionStateChecksums> GetStateChecksumsAsync( 86public async Task<Checksum> GetChecksumAsync(ProjectId projectId, CancellationToken cancellationToken) 94private async Task<SolutionStateChecksums> ComputeChecksumsAsync( 107using var _ = ArrayBuilder<Task<ProjectStateChecksums>>.GetInstance(out var projectChecksumTasks);
Workspace\Solution\TextDocument.cs (2)
75public Task<SourceText> GetTextAsync(CancellationToken cancellationToken = default) 92public async Task<VersionStamp> GetTextVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\TextDocumentState.cs (1)
198internal async Task<string?> GetFailedToLoadExceptionMessageAsync(CancellationToken cancellationToken)
Workspace\Solution\TextDocumentState_Checksum.cs (3)
21public Task<DocumentStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 24public Task<Checksum> GetChecksumAsync(CancellationToken cancellationToken) 33private async Task<DocumentStateChecksums> ComputeChecksumsAsync(CancellationToken cancellationToken)
Workspace\Solution\TextLoader.cs (6)
60public virtual Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 65_ => new StrongBox<bool>(new Func<Workspace, DocumentId, CancellationToken, Task<TextAndVersion>>(LoadTextAndVersionAsync).Method.DeclaringType != typeof(TextLoader))).Value) 83public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 98internal async Task<TextAndVersion> LoadTextAsync(LoadTextOptions options, CancellationToken cancellationToken) 203public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 226public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\VersionSource\ITextAndVersionSource.cs (1)
27Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken);
Workspace\Solution\VersionSource\ITreeAndVersionSource.cs (1)
17Task<TreeAndVersion> GetValueAsync(CancellationToken cancellationToken);
Workspace\Solution\VersionSource\LoadableTextAndVersionSource.cs (3)
37private Task<TextAndVersion> LoadAsync(CancellationToken cancellationToken) 69public async Task<TextAndVersion> GetValueAsync(CancellationToken cancellationToken) 132public Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\Solution\VersionSource\RecoverableTextAndVersion.cs (2)
126public async Task<TextAndVersion> GetValueAsync(LoadTextOptions options, CancellationToken cancellationToken) 171private async Task<SourceText> RecoverAsync(CancellationToken cancellationToken)
Workspace\Solution\VersionSource\RecoverableTextAndVersion.RecoverableText.cs (1)
108public async Task<SourceText> GetValueAsync(CancellationToken cancellationToken)
Workspace\Solution\VersionSource\SimpleTreeAndVersionSource.cs (2)
26public Task<TreeAndVersion> GetValueAsync(CancellationToken cancellationToken) 36Func<TArg, CancellationToken, Task<TreeAndVersion>> asynchronousComputeFunction,
Workspace\Workspace.cs (1)
617protected internal async Task<T> ScheduleTask<T>(Func<T> func, string? taskName = "Workspace.Task")
Microsoft.CodeAnalysis.Workspaces.MSBuild (35)
MSBuild\BuildHostProcessManager.cs (3)
48public async Task<RemoteBuildHost> GetBuildHostWithFallbackAsync(string projectFilePath, CancellationToken cancellationToken) 58public async Task<(RemoteBuildHost buildHost, BuildHostProcessKind actualKind)> GetBuildHostWithFallbackAsync(BuildHostProcessKind buildHostKind, string projectOrSolutionFilePath, CancellationToken cancellationToken) 84public async Task<RemoteBuildHost> GetBuildHostAsync(BuildHostProcessKind buildHostKind, CancellationToken cancellationToken)
MSBuild\MSBuildProjectLoader.cs (2)
157public async Task<SolutionInfo> LoadSolutionInfoAsync( 224public async Task<ImmutableArray<ProjectInfo>> LoadProjectInfoAsync(
MSBuild\MSBuildProjectLoader.Worker.cs (6)
106private async Task<TResult> DoOperationAndReportProgressAsync<TResult>(ProjectLoadOperation operation, string? projectPath, string? targetFramework, Func<Task<TResult>> doFunc) 129public async Task<ImmutableArray<ProjectInfo>> LoadAsync(CancellationToken cancellationToken) 171private async Task<ImmutableArray<ProjectFileInfo>> LoadProjectFileInfosAsync(string projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken) 219private async Task<ImmutableArray<ProjectInfo>> LoadProjectInfosFromPathAsync( 274private Task<ProjectInfo> CreateProjectInfoAsync(ProjectFileInfo projectFileInfo, ProjectId projectId, bool addDiscriminator, CancellationToken cancellationToken)
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (4)
186private async Task<ResolvedReferences> ResolveReferencesAsync(ProjectId id, ProjectFileInfo projectFileInfo, CommandLineArguments commandLineArgs, CancellationToken cancellationToken) 267private async Task<bool> TryLoadAndAddReferenceAsync(ProjectId id, string projectReferencePath, ImmutableArray<string> aliases, ResolvedReferencesBuilder builder, CancellationToken cancellationToken) 340private async Task<bool> VerifyUnloadableProjectOutputExistsAsync(string projectPath, ResolvedReferencesBuilder builder, CancellationToken cancellationToken) 349private async Task<bool> VerifyProjectOutputExistsAsync(string projectPath, ResolvedReferencesBuilder builder, CancellationToken cancellationToken)
MSBuild\MSBuildWorkspace.cs (4)
176public Task<Solution> OpenSolutionAsync( 192public async Task<Solution> OpenSolutionAsync( 224public Task<Project> OpenProjectAsync( 240public async Task<Project> OpenProjectAsync(
MSBuild\SolutionFileReader.cs (3)
17public static Task<(string AbsoluteSolutionPath, ImmutableArray<(string ProjectPath, string ProjectGuid)> Projects)> ReadSolutionFileAsync(string solutionFilePath, DiagnosticReportingMode diagnosticReportingMode, CancellationToken cancellationToken) 22public static async Task<(string AbsoluteSolutionPath, ImmutableArray<(string ProjectPath, string ProjectGuid)> Projects)> ReadSolutionFileAsync(string solutionFilePath, PathResolver pathResolver, DiagnosticReportingMode diagnosticReportingMode, CancellationToken cancellationToken) 43private static async Task<ImmutableArray<(string ProjectPath, string ProjectGuid)>?> TryReadSolutionFileAsync(string solutionFilePath, PathResolver pathResolver, ImmutableHashSet<string> projectFilter, DiagnosticReportingMode diagnosticReportingMode, CancellationToken cancellationToken)
Rpc\RemoteBuildHost.cs (4)
23public Task<bool> HasUsableMSBuildAsync(string projectOrSolutionFilePath, CancellationToken cancellationToken) 26public async Task<RemoteProjectFile> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 36public async Task<RemoteProjectFile> LoadProjectAsync(string projectFilePath, string projectContent, string languageName, CancellationToken cancellationToken) 43public Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken)
Rpc\RemoteProjectFile.cs (2)
22public Task<ImmutableArray<DiagnosticLogItem>> GetDiagnosticLogItemsAsync(CancellationToken cancellationToken) 25public Task<ImmutableArray<ProjectFileInfo>> GetProjectFileInfosAsync(CancellationToken cancellationToken)
Rpc\RpcClient.cs (3)
127public async Task<T?> InvokeNullableAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : class 133public async Task<T> InvokeAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : notnull 140private async Task<object?> InvokeCoreAsync(int targetObject, string methodName, List<object?> parameters, Type? expectedReturnType, CancellationToken cancellationToken)
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\IBuildHost.cs (2)
16Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken); 23Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken);
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\IProjectFile.cs (1)
17Task<ImmutableArray<ProjectFileInfo>> GetProjectFileInfosAsync(CancellationToken cancellationToken);
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\TextReaderExtensions.cs (1)
17public static async Task<string?> TryReadLineOrReturnNullIfCancelledAsync(this TextReader streamReader, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (29)
Build\ProjectBuildManager.cs (7)
82private static async Task<(MSB.Evaluation.Project? project, DiagnosticLog log)> LoadProjectAsync( 144public Task<(MSB.Evaluation.Project? project, DiagnosticLog log)> LoadProjectAsync( 204public async Task<string?> TryGetOutputFilePathAsync( 274public Task<MSB.Execution.ProjectInstance> BuildProjectAsync( 285private async Task<MSB.Execution.ProjectInstance> BuildProjectAsync( 331private static async Task<MSB.Execution.BuildResult> BuildAsync(MSB.Execution.BuildRequestData requestData, CancellationToken cancellationToken) 340private static Task<MSB.Execution.BuildResult> BuildAsync(MSB.Execution.BuildManager buildManager, MSB.Execution.BuildRequestData requestData, CancellationToken cancellationToken)
BuildHost.cs (3)
138public Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 157private async Task<int> LoadProjectFileCoreAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 193public Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken)
MSBuild\ProjectFile\ProjectFile.cs (2)
49public async Task<ImmutableArray<ProjectFileInfo>> GetProjectFileInfosAsync(CancellationToken cancellationToken) 102private async Task<ProjectFileInfo> BuildProjectFileInfoAsync(CancellationToken cancellationToken)
MSBuild\ProjectFile\ProjectFileLoader.cs (1)
20public async Task<ProjectFile> LoadProjectFileAsync(string path, ProjectBuildManager buildManager, CancellationToken cancellationToken)
Rpc\Contracts\IBuildHost.cs (2)
16Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken); 23Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken);
Rpc\Contracts\IProjectFile.cs (1)
17Task<ImmutableArray<ProjectFileInfo>> GetProjectFileInfosAsync(CancellationToken cancellationToken);
Rpc\Contracts\TextReaderExtensions.cs (2)
17public static async Task<string?> TryReadLineOrReturnNullIfCancelledAsync(this TextReader streamReader, CancellationToken cancellationToken) 36var readLineTask = streamReader.ReadLineAsync();
src\Compilers\Core\Portable\FileSystem\FileUtilities.cs (4)
334public static Task<T> RethrowExceptionsAsIOExceptionAsync<T>(Func<Task<T>> operation) 339public static async Task<T> RethrowExceptionsAsIOExceptionAsync<T, TArg>(Func<TArg, Task<T>> operation, TArg arg)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (8)
MSBuildWorkspaceTestBase.cs (5)
67protected async Task<CS.CSharpCompilationOptions> LoadCSharpCompilationOptionsAsync() 76protected async Task<CS.CSharpParseOptions> LoadCSharpParseOptionsAsync() 85protected async Task<VB.VisualBasicCompilationOptions> LoadVisualBasicCompilationOptionsAsync() 94protected async Task<VB.VisualBasicParseOptions> LoadVisualBasicParseOptionsAsync() 143protected async Task<Solution> SolutionAsync(params IBuilder[] inputs)
RpcTests.cs (2)
238public Task<string> HelloAsync(string name) { return Task.FromResult("Hello " + name); } 239public Task<string> HelloWithCancellationAsync(string name, CancellationToken cancellationToken)
VisualStudioMSBuildWorkspaceTests.cs (1)
964var getTextTask = doc.GetTextAsync();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (9)
Remote\InProcRemostHostClient.cs (2)
46public static async Task<InProcRemoteHostClient> GetTestClientAsync(Workspace workspace) 307public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _stream.ReadAsync(buffer, offset, count, cancellationToken);
Remote\InProcRemoteHostClientProvider.cs (1)
112public Task<RemoteHostClient?> TryGetRemoteHostClientAsync(CancellationToken cancellationToken)
TestDocumentServiceProvider.cs (2)
65public Task<ImmutableArray<(string mappedFilePath, TextChange mappedTextChange)>> GetMappedTextChangesAsync( 73public Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(Document document, IEnumerable<TextSpan> spans, CancellationToken cancellationToken)
TestDynamicFileInfoProviderThatProducesFiles.cs (1)
30public Task<DynamicFileInfo> GetDynamicFileInfoAsync(ProjectId projectId, string projectFilePath, string filePath, CancellationToken cancellationToken)
TestDynamicFileInfoProviderThatProducesNoFiles.cs (1)
30public Task<DynamicFileInfo> GetDynamicFileInfoAsync(ProjectId projectId, string projectFilePath, string filePath, CancellationToken cancellationToken)
TestTextLoader.cs (1)
21public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspaces\TestHostDocument.cs (1)
189public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.UnitTests (27)
BatchFixAllProviderTests.cs (1)
118private static async Task<Document> CreateChangedDocument(Document document, TextSpan sourceSpan, int replacement, CancellationToken cancellationToken)
CodeCleanup\MockCodeCleanupProvider.cs (3)
22public Func<MockCodeCleanupProvider, Document, ImmutableArray<TextSpan>, SyntaxFormattingOptions, CancellationToken, Task<Document>>? CleanupDocumentAsyncImpl { get; set; } 27public Task<Document> CleanupAsync(Document document, ImmutableArray<TextSpan> spans, CodeCleanupOptions options, CancellationToken cancellationToken) 30public Task<SyntaxNode> CleanupAsync(SyntaxNode root, ImmutableArray<TextSpan> spans, SyntaxFormattingOptions options, SolutionServices services, CancellationToken cancellationToken)
Formatter\FormatterTests.cs (1)
41public Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, LineFormattingOptions lineFormattingOptions, SyntaxFormattingOptions? syntaxFormattingOptions, CancellationToken cancellationToken)
SolutionTests\SolutionWithSourceGeneratorTests.cs (5)
564static async Task<Project> MakeChangesToDocument(Project project) 1274static async Task<SourceGeneratedDocument> FreezeAndGetDocument(Project project, SourceGeneratedDocumentIdentity identity) 1311static async Task<SourceGeneratedDocument> FreezeAndGetDocument(Project project, SourceGeneratedDocumentIdentity identity) 1342static async Task<Solution> FreezeDocumentAndGetSolution(Project project, SourceGeneratedDocumentIdentity identity) 1377static async Task<Solution> FreezeDocumentAndGetSolution(Project project, SourceGeneratedDocumentIdentity identity)
SolutionTests\TextLoaderTests.cs (12)
22public new virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 29public new virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 33public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId) 37public virtual Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, ref DocumentId? documentId, CancellationToken cancellationToken) 41public virtual Task<TextAndVersion> LoadTextAndVersionAsync<T>(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 47public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 53public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId) 59public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, ref DocumentId? documentId, CancellationToken cancellationToken) 65public override Task<TextAndVersion> LoadTextAndVersionAsync<T>(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 85public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 94public override Task<TextAndVersion> LoadTextAndVersionAsync(Workspace? workspace, DocumentId? documentId, CancellationToken cancellationToken) 102public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
UtilityTest\AsyncLazyTests.cs (5)
278Func<CancellationToken, Task<object>> asynchronousComputeFunction = 311Func<CancellationToken, Task<string>>? asynchronousComputation = null; 329var synchronousRequest = Task.Run(() => lazy.GetValue(CancellationToken.None)); 396var asynchronousRequest = Task.Run(() => lazy.GetValueAsync(asynchronousRequestCancellationToken.Token)); 401var synchronousRequest = Task.Run(() => lazy.GetValue(CancellationToken.None));
Microsoft.CommonLanguageServerProtocol.Framework.Package (14)
AbstractLanguageServer.cs (1)
207protected async Task<object?> InvokeAsync(
AbstractRequestContextFactory.cs (1)
36public abstract Task<TRequestContext> CreateRequestContextAsync<TRequestParam>(IQueueItem<TRequestContext> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken);
Handlers\InitializeHandler.cs (1)
26public Task<TResponse> HandleRequestAsync(TRequest request, TRequestContext context, CancellationToken cancellationToken)
IQueueItem.cs (1)
38Task<(TRequestContext, TRequest)?> CreateRequestContextAsync<TRequest>(IMethodHandler handler, RequestHandlerMetadata requestHandlerMetadata, AbstractLanguageServer<TRequestContext> languageServer, CancellationToken cancellationToken);
IRequestExecutionQueue.cs (1)
24Task<object?> ExecuteAsync(object? serializedRequest, string methodName, ILspServices lspServices, CancellationToken cancellationToken);
IRequestHandler.cs (2)
21Task<TResponse> HandleRequestAsync(TRequest request, TRequestContext context, CancellationToken cancellationToken); 32Task<TResponse> HandleRequestAsync(TRequestContext context, CancellationToken cancellationToken);
NewtonsoftLanguageServer.cs (1)
74private async Task<JToken?> ExecuteRequestAsync(JToken? request = null, CancellationToken cancellationToken = default)
QueueItem.cs (2)
69public static (IQueueItem<TRequestContext>, Task<object?>) Create( 86public async Task<(TRequestContext, TRequest)?> CreateRequestContextAsync<TRequest>(IMethodHandler handler, RequestHandlerMetadata requestHandlerMetadata, AbstractLanguageServer<TRequestContext> languageServer, CancellationToken cancellationToken)
RequestExecutionQueue.cs (2)
156public virtual Task<object?> ExecuteAsync( 481public async Task<bool> AreAllItemsCancelledUnsafeAsync()
SystemTextJsonLanguageServer.cs (2)
74private Task<JsonElement?> ExecuteRequest0Async(CancellationToken cancellationToken = default) 82private async Task<JsonElement?> ExecuteRequestAsync(JsonElement? request, CancellationToken cancellationToken = default)
Microsoft.CommonLanguageServerProtocol.Framework.UnitTests (18)
Mocks\TestMethodHandlers.cs (8)
26public Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken) 41public Task<MockResponse> HandleRequestAsync(TestRequestContext context, CancellationToken cancellationToken) 96public Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken) 111public async Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken) 133public async Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken) 152public Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken) 169public Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken) 185public Task<MockResponse> HandleRequestAsync(MockRequest request, TestRequestContext context, CancellationToken cancellationToken)
Mocks\TestRequestContext.cs (1)
16public override Task<TestRequestContext> CreateRequestContextAsync<TRequestParam>(IQueueItem<TestRequestContext> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken)
RequestExecutionQueueTests.cs (4)
77var _ = requestExecutionQueue.ExecuteAsync(JToken.FromObject(new MockRequest(1)), CancellingHandler.Name, lspServices, cancellingRequestCancellationToken); 78var _1 = requestExecutionQueue.ExecuteAsync(JToken.FromObject(new MockRequest(1)), CompletingHandler.Name, lspServices, completingRequestCancellationToken); 146var task1 = requestExecutionQueue.ExecuteAsync(request, TestMethodHandler.Name, lspServices, CancellationToken.None); 147var task2 = requestExecutionQueue.ExecuteAsync(request, TestMethodHandler.Name, lspServices, CancellationToken.None);
TestExampleLanguageServer.cs (5)
37public async Task<TResponse> ExecuteRequestAsync<TRequest, TResponse>(string methodName, TRequest request, CancellationToken cancellationToken) 96public async Task<int> WaitForShutdown() 101internal async Task<int> WaitForExit() 151internal async Task<InitializeResult> InitializeServerAsync() 173Task<SemanticTokensDeltaPartialResult> IRequestHandler<DidOpenTextDocumentParams, SemanticTokensDeltaPartialResult, ExampleRequestContext>.HandleRequestAsync(DidOpenTextDocumentParams request, ExampleRequestContext context, CancellationToken cancellationToken)
Microsoft.Data.Analysis (2)
DataFrame.IO.cs (2)
199public static async Task<DataFrame> LoadFrom(DbDataReader reader) 221public static async Task<DataFrame> LoadFrom(DbDataAdapter adapter)
Microsoft.DotNet.Arcade.Sdk (2)
src\DownloadFile.cs (2)
110private async Tasks.Task<bool> DownloadFromUriAsync(string uri) { 176private async Tasks.Task<bool> DownloadWithRetriesAsync(HttpClient httpClient, string uri)
Microsoft.DotNet.Build.Tasks.Feed (36)
src\AzureStorageExtensions.cs (1)
25public static async Task<bool> IsFileIdenticalToBlobAsync(this BlobClient client, string file)
src\common\AzureStorageUtils.cs (6)
139public async Task<bool> IsFileIdenticalToBlobAsync(string localFileFullPath, string blobPath) => 142public async Task<string> CreateContainerAsync(PublicAccessType publicAccess) 159public async Task<bool> CheckIfContainerExistsAsync() => 162public async Task<bool> CheckIfBlobExistsAsync(string blobPath) => 207public static async Task<PackageFeedStatus> CompareLocalPackageToFeedPackage( 239public static async Task<PackageFeedStatus> CompareLocalPackageToFeedPackage(
src\common\CreateAzureContainer.cs (2)
33public abstract Task<AzureStorageUtils> GetBlobStorageUtilsAsync(); 40public async Task<bool> ExecuteAsync()
src\common\CreateAzureContainerIfNotExists.cs (1)
18public override async Task<AzureStorageUtils> GetBlobStorageUtilsAsync()
src\common\CreateNewAzureContainer.cs (1)
18public override async Task<AzureStorageUtils> GetBlobStorageUtilsAsync()
src\common\GeneralUtils.cs (4)
43public static async Task<bool> CompareStreamsAsync(Stream localFileStream, Stream remoteStream, int bufferSize) 122public static Task<bool?> IsFeedPublicAsync( 139public static async Task<bool?> IsFeedPublicAsync( 266public static async Task<ProcessExecutionResult> RunProcessAndGetOutputsAsync(string path, string arguments)
src\common\UploadToAzure.cs (1)
68public async Task<bool> ExecuteAsync(CancellationToken ct)
src\CreateAzureDevOpsFeed.cs (1)
79private async Task<bool> ExecuteAsync()
src\PublishArtifactsInManifest.cs (1)
243public async Task<bool> ExecuteAsync()
src\PublishArtifactsInManifestBase.cs (10)
240public abstract Task<bool> ExecuteAsync(); 424private async Task<bool> PublishSymbolsUsingStreamingAsync( 441async Task<bool> PublishSymbolPackageWithDownload(BlobArtifactModel symbolAsset) 499private async Task<bool> PublishSymbolsFromBlobArtifactsAsync( 664Task<SymbolUploadHelper> CreatePublishSymbolHelper(string symbolPublishingExclusionsFile, bool publishSpecialClrFiles, bool dryRun) 727internal async Task<string> PrepLoosePdbsForPublish(string pdbArtifactsBasePath, SemaphoreSlim clientThrottle) 965private async Task<IArtifactUrlHelper> CreateArtifactUrlHelper(HttpClient client, string artifactName) 1372public static async Task<NuGetFeedUploadPackageResult> NuGetFeedUploadPackageAsync(HttpClient httpClient, string feedName, string feedUri, Stream packageContentReadStream) 1439Func<string, string, HttpClient, MsBuildUtils.TaskLoggingHelper, Task<PackageFeedStatus>> CompareLocalPackageToFeedPackageCallBack = null, 1440Func<HttpClient, string, string, Stream, Task<NuGetFeedUploadPackageResult>> AttemptPushPackageCallback = null)
src\PublishArtifactsInManifestV3.cs (1)
55public override async Task<bool> ExecuteAsync()
src\PublishArtifactsInManifestV4.cs (1)
51public override async Task<bool> ExecuteAsync()
src\PublishBuildToMaestro.cs (4)
101public async Task<bool> PushMetadataAsync(CancellationToken cancellationToken) 233private async Task<IEnumerable<DefaultChannel>> GetBuildDefaultChannelsAsync(IProductConstructionServiceApi client, 255private async Task<List<BuildRef>> GetBuildDependenciesAsync( 295private static async Task<int?> GetBuildId(DependencyDetail dep, IProductConstructionServiceApi client,
src\PublishSignedAssets.cs (1)
56public override async Task<bool> ExecuteAsync()
src\SemaphoreLock.cs (1)
36static async Task<SemaphoreLock> WaitForLock(Task waitTask, SemaphoreSlim sem)
Microsoft.DotNet.Build.Tasks.Feed.Tests (7)
PublishArtifactsInManifestTests.cs (3)
130Func<string, string, HttpClient, MsBuildUtils.TaskLoggingHelper, Task<PackageFeedStatus>> testCompareLocalPackage = async (string localPackageFullPath, string packageContentUrl, HttpClient client, MsBuildUtils.TaskLoggingHelper log) => 144Func<HttpClient, string, string, Stream, Task<NuGetFeedUploadPackageResult>> testPush = (_, feedName, feedUri, _) => 221public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
TestDoubles\MockRetryHandler.cs (4)
27public Task<bool> RunAsync(Func<int, Task<bool>> actionSuccessfulAsync) 30public async Task<bool> RunAsync(Func<int, Task<bool>> actionSuccessfulAsync, CancellationToken cancellationToken)
Microsoft.DotNet.Deployment.Tasks.Links (4)
Microsoft.DotNet.Git.IssueManager (10)
Clients\AzureDevOpsClient.cs (1)
25public static async Task<string> GetCommitAuthorAsync(
Clients\GitHubClient.cs (3)
16public static async Task<string> GetCommitAuthorAsync( 39public static async Task<int> CreateNewIssueAsync( 75public static async Task<string> CreateNewIssueCommentAsync(
Helpers\RepositoryHelper.cs (3)
13public static async Task<string> GetCommitAuthorAsync( 42public static async Task<int> CreateNewIssueAsync( 76public static async Task<string> CreateNewIssueCommentAsync(
IssueManager.cs (3)
31public async Task<string> GetCommitAuthorAsync(string repositoryUrl, string commit) 54public async Task<int> CreateNewIssueAsync( 79public async Task<string> CreateNewIssueCommentAsync(
Microsoft.DotNet.Helix.Client (74)
generated-code\Aggregate.cs (22)
20Task<Models.AggregateWorkItemSummary> AnalysisSummaryAsync( 32Task<IImmutableList<Models.BuildHistoryItem>> BuildHistoryAsync( 38Task<Models.BuildAggregation> BuildAsync( 45Task<IImmutableList<Models.AggregatedWorkItemCounts>> JobSummaryAsync( 56Task<IImmutableList<Models.AggregatedWorkItemCounts>> WorkItemSummaryAsync( 66Task<IImmutableList<Models.AggregateAnalysisDetail>> AnalysisDetailAsync( 77Task<IImmutableDictionary<string, Newtonsoft.Json.Linq.JToken>> PropertiesAsync( 86Task<Models.InvestigationResult> Investigation_ContinueAsync( 91Task<Models.InvestigationResult> InvestigationAsync( 103Task<IImmutableList<Models.HistoricalAnalysisItem>> HistoryAsync( 113Task<Models.MultiSourceResponse> MultiSourceAsync( 133public async Task<Models.AggregateWorkItemSummary> AnalysisSummaryAsync( 263public async Task<IImmutableList<Models.BuildHistoryItem>> BuildHistoryAsync( 358public async Task<Models.BuildAggregation> BuildAsync( 463public async Task<IImmutableList<Models.AggregatedWorkItemCounts>> JobSummaryAsync( 575public async Task<IImmutableList<Models.AggregatedWorkItemCounts>> WorkItemSummaryAsync( 682public async Task<IImmutableList<Models.AggregateAnalysisDetail>> AnalysisDetailAsync( 824public async Task<IImmutableDictionary<string, Newtonsoft.Json.Linq.JToken>> PropertiesAsync( 918public async Task<Models.InvestigationResult> Investigation_ContinueAsync( 993public async Task<Models.InvestigationResult> InvestigationAsync( 1110public async Task<IImmutableList<Models.HistoricalAnalysisItem>> HistoryAsync( 1230public async Task<Models.MultiSourceResponse> MultiSourceAsync(
generated-code\Analysis.cs (2)
29Task<Newtonsoft.Json.Linq.JToken> GetDetailsAsync( 156public async Task<Newtonsoft.Json.Linq.JToken> GetDetailsAsync(
generated-code\HelixApi.cs (1)
531public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
generated-code\Information.cs (6)
20Task<Models.QueueInfo> QueueInfoAsync( 26Task<IImmutableList<Models.QueueInfo>> QueueInfoListAsync( 31Task<IImmutableList<Models.Deploy1esImagesResult>> Deployed1esImagesInfoListAsync( 50public async Task<Models.QueueInfo> QueueInfoAsync( 130public async Task<IImmutableList<Models.QueueInfo>> QueueInfoListAsync( 204public async Task<IImmutableList<Models.Deploy1esImagesResult>> Deployed1esImagesInfoListAsync(
generated-code\Job.cs (12)
20Task<Models.JobCreationResult> NewAsync( 27Task<IImmutableList<Models.JobSummary>> ListAsync( 37Task<Models.JobResultsUri> ResultsAsync( 42Task<Models.JobPassFail> PassFailAsync( 47Task<Models.JobSummary> SummaryAsync( 52Task<Models.JobDetails> DetailsAsync( 83public async Task<Models.JobCreationResult> NewAsync( 186public async Task<IImmutableList<Models.JobSummary>> ListAsync( 285public async Task<Models.JobResultsUri> ResultsAsync( 360public async Task<Models.JobPassFail> PassFailAsync( 435public async Task<Models.JobSummary> SummaryAsync( 510public async Task<Models.JobDetails> DetailsAsync(
generated-code\Machine.cs (2)
27Task<Models.MachineInformation> GetMachineStatusAsync( 132public async Task<Models.MachineInformation> GetMachineStatusAsync(
generated-code\PagedResponse.cs (1)
15public static async Task<List<T>> ToListAsync<T>(this IAsyncEnumerable<T> that, CancellationToken cancellationToken)
generated-code\ScaleSets.cs (4)
20Task<IImmutableList<Models.DetailedVMScalingHistory>> GetDetailedVMScalingHistoryAsync( 26Task<IImmutableList<Models.AggregatedVMScalingHistory>> GetAggregatedVMScalingHistoryAsync( 46public async Task<IImmutableList<Models.DetailedVMScalingHistory>> GetDetailedVMScalingHistoryAsync( 125public async Task<IImmutableList<Models.AggregatedVMScalingHistory>> GetAggregatedVMScalingHistoryAsync(
generated-code\Storage.cs (6)
20Task<IImmutableList<Models.ContainerInformation>> ListAsync( 25Task<Models.ContainerInformation> NewAsync( 30Task<Models.ContainerInformation> ExtendExpirationAsync( 50public async Task<IImmutableList<Models.ContainerInformation>> ListAsync( 124public async Task<Models.ContainerInformation> NewAsync( 210public async Task<Models.ContainerInformation> ExtendExpirationAsync(
generated-code\Telemetry.cs (6)
20Task<string> StartJobAsync( 25Task<string> StartBuildWorkItemAsync( 40Task<string> StartXUnitWorkItemAsync( 97public async Task<string> StartJobAsync( 183public async Task<string> StartBuildWorkItemAsync( 365public async Task<string> StartXUnitWorkItemAsync(
generated-code\WorkItem.cs (10)
20Task<System.IO.Stream> GetFileAsync( 28Task<IImmutableList<Models.UploadedFile>> ListFilesAsync( 35Task<System.IO.Stream> ConsoleLogAsync( 41Task<IImmutableList<Models.WorkItemSummary>> ListAsync( 46Task<Models.WorkItemDetails> DetailsAsync( 67public async Task<System.IO.Stream> GetFileAsync( 154public async Task<IImmutableList<Models.UploadedFile>> ListFilesAsync( 240public async Task<System.IO.Stream> ConsoleLogAsync( 316public async Task<IImmutableList<Models.WorkItemSummary>> ListAsync( 391public async Task<Models.WorkItemDetails> DetailsAsync(
IJob.cs (1)
12Task<JobPassFail> WaitForJobAsync(string jobCorrelationId, int pollingIntervalMs = 10000, CancellationToken cancellationToken = default);
Job.cs (1)
13public async Task<JobPassFail> WaitForJobAsync(string jobCorrelationId, int pollingIntervalMs = 10000, CancellationToken cancellationToken = default)
Microsoft.DotNet.Helix.JobSender (23)
IJobDefinition.cs (1)
187Task<ISentJob> SendAsync(Action<string> log = null, CancellationToken cancellationToken = default);
IPayload.cs (1)
12Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken);
ISentJob.cs (1)
29Task<JobPassFail> WaitAsync(int pollingIntervalMs = 10000, CancellationToken cancellationToken = default);
JobDefinition.cs (1)
147public async Task<ISentJob> SendAsync(Action<string> log, CancellationToken cancellationToken)
Payloads\AdhocPayload.cs (1)
30public async Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken)
Payloads\ArchivePayload.cs (2)
28public Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken) 34private async Task<string> DoUploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken)
Payloads\DirectoryPayload.cs (2)
35public Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken) 41private async Task<string> DoUploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken)
Payloads\EmptyPayload.cs (2)
12private readonly Task<string> _emptyStringTask = Task.FromResult(""); 20public Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken)
Payloads\SingleFilePayload.cs (1)
34public async Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken)
Payloads\UriPayload.cs (1)
19public Task<string> UploadAsync(IBlobContainer payloadContainer, Action<string> log, CancellationToken cancellationToken)
SentJob.cs (1)
23public Task<JobPassFail> WaitAsync(int pollingIntervalMs = 10000, CancellationToken cancellationToken = default)
StorageHelpers\ApiBlobHelper.cs (1)
23public async Task<IBlobContainer> GetContainerAsync(string requestedName, string targetQueue, CancellationToken cancellationToken)
StorageHelpers\ConnectionStringBlobHelper.cs (1)
22public async Task<IBlobContainer> GetContainerAsync(string requestedName, string targetQueue, CancellationToken cancellationToken)
StorageHelpers\ContainerBase.cs (3)
18public async Task<Uri> UploadFileAsync(Stream stream, string blobName, Action<string> log, CancellationToken cancellationToken) 42public async Task<Uri> UploadTextAsync(string text, string blobName, Action<string> log, CancellationToken cancellationToken) 50private async Task<bool> CheckExistenceWithRetry(BlobClient blobClient, Action<string> log)
StorageHelpers\IBlobContainer.cs (2)
14Task<Uri> UploadFileAsync(Stream stream, string blobName, Action<string> log, CancellationToken cancellationToken); 15Task<Uri> UploadTextAsync(string text, string blobName, Action<string> log, CancellationToken cancellationToken);
StorageHelpers\IBlobHelper.cs (1)
12Task<IBlobContainer> GetContainerAsync(string requestedName, string targetQueue, CancellationToken cancellationToken);
WorkItemDefinition.cs (1)
113public async Task<JobListEntry> SendAsync(
Microsoft.DotNet.Helix.Sdk (20)
AzureDevOpsTask.cs (8)
49private async Task<bool> ExecuteAsync() 107protected async Task<T> RetryAsync<T>(Func<Task<T>> function) 149protected async Task<JObject> ParseResponseAsync(HttpRequestMessage req, HttpResponseMessage res) 195public Task<T> RetryAsync<T>(Func<Task<T>> function, Action<Exception> logRetry, 201public async Task<T> RetryAsync<T>(Func<Task<T>> function, Action<Exception> logRetry,
CreateFailedTestsForFailedWorkItems.cs (1)
33private async Task<int> CreateFakeTestResultAsync(HttpClient client, string testRunId, string jobName, string workItemFriendlyName, bool failed)
CreateXHarnessAndroidWorkItems.cs (1)
72private async Task<ITaskItem> PrepareWorkItem(IZipArchiveManager zipArchiveManager, IFileSystem fileSystem, ITaskItem appPackage)
CreateXHarnessAppleWorkItems.cs (1)
94private async Task<ITaskItem> PrepareWorkItem(
CreateXUnitWorkItems.cs (1)
88private async Task<ITaskItem> PrepareWorkItem(ITaskItem xunitProject)
FindDotNetCliPackage.cs (6)
138private async Task<string> GetDownloadUrlAsync(ITaskItem feed) 172private async Task<string> GetEffectiveVersion(ITaskItem feed, string version) 203private async Task<string> GetMatchingProductVersionTxtContents(string baseUri, string customVersionTextFileName, string sasToken = null) 230private async Task<HttpResponseMessage> GetAsyncWithRetry(string uri, string sasToken = null) 259private async Task<HttpResponseMessage> HeadRequestWithRetry(string uri) 321private async Task<string> ResolveVersionAsync(ITaskItem feed)
GetHelixWorkItems.cs (1)
37private async Task<IEnumerable<ITaskItem>> GetWorkItemsAsync(ITaskItem job, CancellationToken cancellationToken)
XharnessTaskBase.cs (1)
121protected async Task<string> CreatePayloadArchive(
Microsoft.DotNet.Helix.Sdk.Tests (2)
InstallDotNetToolTests.cs (2)
272var installationTask = Task.Run(() => task1.InvokeExecute(provider1).Should().BeTrue()); 277var skipTask = Task.Run(() => task2.InvokeExecute(provider2).Should().BeTrue());
Microsoft.DotNet.Internal.SymbolHelper (23)
SymbolPromotionHelper.cs (5)
78public static async Task<bool> RegisterAndPublishRequest(ITracer logger, TokenCredential credential, Environment env, 138async Task<bool> SendPostRequestWithRetries(string url, JsonObject payload) 182public static async Task<SymbolRequestStatus?> CheckRequestRegistration(ITracer logger, TokenCredential credential, 232private async static Task<AuthenticationHeaderValue> GetSymbolRequestAuthHeader(TokenCredential credential, string tokenResource, CancellationToken ct) 238public static async Task<bool> UpdateRequestExpiration(ITracer logger, TokenCredential credential,
SymbolUploadHelper.cs (15)
121public async Task<int> GetClientDiagnosticInfo() 133public async Task<int> CreateRequest(string? name) 151public async Task<int> AddDirectory(string? name, string pathToAdd) 182public async Task<int> AddPackageToRequest(string? name, string packagePath) 198public async Task<int> AddPackagesToRequest(string? name, IEnumerable<string> packagePaths) 224public async Task<int> FinalizeRequest(string? name, uint daysToRetain) 239public async Task<int> DeleteRequest(string? name, bool synchronous = false) 252private async Task<int> AddDirectoryCore(string name, string pathToAdd, string? manifestPath, ScopedTracer logger) 265private async Task<int> AddPackageToRequestCore(string name, string packagePath, ScopedTracer logger) 412private async Task<int> RunSymbolCommand(string arguments, string directory, ScopedTracer logger, CancellationToken ct = default) 455Task<string?> outputAvailable = standardOutput.ReadLineAsync(ct).AsTask(); 458Task<string?> errorAvailable = standardError.ReadLineAsync(ct).AsTask(); 499async Task<Task<string?>> LogFromStreamReader(Task<string?> outputTask, Func<CancellationToken, ValueTask<string?>> readLine, Action<string> logMethod, CancellationToken ct)
SymbolUploadHelperFactory.cs (3)
40public static async Task<SymbolUploadHelper> GetSymbolHelperWithDownloadAsync(ITracer logger, SymbolPublisherOptions options, string? installDirectory = null, string? workingDir = null, int retryCount = 3, CancellationToken token = default) 91private static async Task<string> DownloadSymbolsToolAsync( 144static async Task<string> GetToolUrl(ITracer logger, string azdoOrg, string installDirectory, CancellationToken token)
Microsoft.DotNet.Open.Api.Tools.Tests (2)
OpenApiTestBase.cs (2)
135public Task<IHttpResponseMessageWrapper> GetResponseAsync(string url) 151public Task<Stream> Stream { get; }
Microsoft.DotNet.RemoteExecutor (8)
Program.cs (1)
59if (result is Task<int> task)
RemoteExecutor.cs (7)
191public static RemoteInvokeHandle Invoke(Func<Task<int>> method, RemoteInvokeOptions options = null) 200public static RemoteInvokeHandle Invoke(Func<string, Task<int>> method, string arg, 211public static RemoteInvokeHandle Invoke(Func<string, string, Task<int>> method, string arg1, string arg2, 223public static RemoteInvokeHandle Invoke(Func<string, string, string, Task<int>> method, string arg1, 236public static RemoteInvokeHandle Invoke(Func<string, string, string, string, Task<int>> method, string arg1, 250public static RemoteInvokeHandle Invoke(Func<string, string, string, string, string, Task<int>> method, string arg1, 423&& method.ReturnType != typeof(Task<int>))
Microsoft.DotNet.SignCheckLibrary (1)
Verification\NupkgVerifier.cs (1)
28private async Task<bool> IsSignedAsync(string path, SignatureVerificationResult svr)
Microsoft.DotNet.SwaggerGenerator.CmdLine (2)
Program.cs (2)
32private static async Task<int> Main(string[] args) 116private static async Task<(OpenApiDiagnostic, OpenApiDocument)> GetSwaggerDocument(string input)
Microsoft.DotNet.SwaggerGenerator.MSBuild (1)
GenerateSwaggerCode.cs (1)
96private static async Task<(OpenApiDiagnostic, OpenApiDocument)> GetSwaggerDocument(string input)
Microsoft.DotNet.XUnitExtensions (5)
src\Microsoft.DotNet.XUnitExtensions.Shared\SkippedFactTestCase.cs (1)
59public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
src\Microsoft.DotNet.XUnitExtensions.Shared\SkippedTheoryTestCase.cs (1)
25public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
src\Microsoft.DotNet.XUnitExtensions.Shared\XunitParallelTheoryTestCase.cs (1)
29public override Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource)
src\Microsoft.DotNet.XUnitExtensions.Shared\XunitParallelTheoryTestCaseRunner.cs (2)
130protected override async Task<RunSummary> RunTestAsync() 135var runningTests = new List<Task<RunSummary>>(_testRunners.Count);
Microsoft.Extensions.AI (37)
ChatCompletion\AnonymousDelegatingChatClient.cs (5)
23private readonly Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, Task<ChatResponse>>? _getResponseFunc; 79Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, Task<ChatResponse>>? getResponseFunc, 90public override Task<ChatResponse> GetResponseAsync( 99async Task<ChatResponse> GetResponseViaSharedAsync( 189static async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsyncViaGetResponseAsync(Task<ChatResponse> task)
ChatCompletion\CachingChatClient.cs (4)
49public override Task<ChatResponse> GetResponseAsync( 59private async Task<ChatResponse> GetCachedResponseAsync( 163protected abstract Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken); 173protected abstract Task<IReadOnlyList<ChatResponseUpdate>?> ReadCacheStreamingAsync(string key, CancellationToken cancellationToken);
ChatCompletion\ChatClientBuilder.cs (1)
143Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, Task<ChatResponse>>? getResponseFunc,
ChatCompletion\ChatClientStructuredOutputExtensions.cs (6)
48public static Task<ChatResponse<T>> GetResponseAsync<T>( 68public static Task<ChatResponse<T>> GetResponseAsync<T>( 87public static Task<ChatResponse<T>> GetResponseAsync<T>( 107public static Task<ChatResponse<T>> GetResponseAsync<T>( 128public static Task<ChatResponse<T>> GetResponseAsync<T>( 150public static async Task<ChatResponse<T>> GetResponseAsync<T>(
ChatCompletion\ConfigureOptionsChatClient.cs (1)
37public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\DistributedCachingChatClient.cs (2)
60protected override async Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken) 74protected override async Task<IReadOnlyList<ChatResponseUpdate>?> ReadCacheStreamingAsync(string key, CancellationToken cancellationToken)
ChatCompletion\FunctionInvokingChatClient.cs (4)
209public override async Task<ChatResponse> GetResponseAsync( 559private async Task<(bool ShouldTerminate, int NewConsecutiveErrorCount, IList<ChatMessage> MessagesAdded)> ProcessFunctionCallsAsync( 688private async Task<FunctionInvocationResult> ProcessFunctionCallAsync( 793private async Task<object?> InstrumentedInvokeFunctionAsync(FunctionInvocationContext context, CancellationToken cancellationToken)
ChatCompletion\LoggingChatClient.cs (1)
54public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\OpenTelemetryChatClient.cs (1)
132public override async Task<ChatResponse> GetResponseAsync(
Embeddings\AnonymousDelegatingEmbeddingGenerator.cs (3)
19private readonly Func<IEnumerable<TInput>, EmbeddingGenerationOptions?, IEmbeddingGenerator<TInput, TEmbedding>, CancellationToken, Task<GeneratedEmbeddings<TEmbedding>>> _generateFunc; 28Func<IEnumerable<TInput>, EmbeddingGenerationOptions?, IEmbeddingGenerator<TInput, TEmbedding>, CancellationToken, Task<GeneratedEmbeddings<TEmbedding>>> generateFunc) 37public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(
Embeddings\CachingEmbeddingGenerator.cs (2)
28public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync( 118protected abstract Task<TEmbedding?> ReadCacheAsync(string key, CancellationToken cancellationToken);
Embeddings\ConfigureOptionsEmbeddingGenerator.cs (1)
44public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(
Embeddings\DistributedCachingEmbeddingGenerator.cs (1)
55protected override async Task<TEmbedding?> ReadCacheAsync(string key, CancellationToken cancellationToken)
Embeddings\EmbeddingGeneratorBuilder.cs (1)
105Func<IEnumerable<TInput>, EmbeddingGenerationOptions?, IEmbeddingGenerator<TInput, TEmbedding>, CancellationToken, Task<GeneratedEmbeddings<TEmbedding>>>? generateFunc)
Embeddings\LoggingEmbeddingGenerator.cs (1)
56public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
Embeddings\OpenTelemetryEmbeddingGenerator.cs (1)
109public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
40public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (1)
57public override async Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.Abstractions (23)
ChatCompletion\ChatClientExtensions.cs (2)
91public static Task<ChatResponse> GetResponseAsync( 111public static Task<ChatResponse> GetResponseAsync(
ChatCompletion\ChatResponseExtensions.cs (2)
160public static Task<ChatResponse> ToChatResponseAsync( 167static async Task<ChatResponse> ToChatResponseAsync(
ChatCompletion\DelegatingChatClient.cs (1)
42public virtual Task<ChatResponse> GetResponseAsync(
ChatCompletion\IChatClient.cs (1)
42Task<ChatResponse> GetResponseAsync(
Embeddings\DelegatingEmbeddingGenerator.cs (1)
44public virtual Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) =>
Embeddings\EmbeddingGeneratorExtensions.cs (3)
105public static async Task<ReadOnlyMemory<TEmbeddingElement>> GenerateVectorAsync<TInput, TEmbeddingElement>( 133public static async Task<TEmbedding> GenerateAsync<TInput, TEmbedding>( 178public static async Task<(TInput Value, TEmbedding Embedding)[]> GenerateAndZipAsync<TInput, TEmbedding>(
Embeddings\IEmbeddingGenerator{TInput,TEmbedding}.cs (1)
38Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(
Functions\AIFunctionFactory.cs (5)
743if (t == typeof(Task<>) || t == typeof(ValueTask<>) || t == typeof(IAsyncEnumerable<>)) 855/// Gets a delegate for handling the result value of a method, converting it into the <see cref="Task{FunctionResult}"/> to return from the invocation. 919if (returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1001private static readonly MethodInfo _taskGetResult = typeof(Task<>).GetProperty(nameof(Task<int>.Result), BindingFlags.Instance | BindingFlags.Public)!.GetMethod!;
Functions\AIFunctionFactoryOptions.cs (2)
93/// Methods strongly-typed to return types of <see cref="Task"/>, <see cref="Task{TResult}"/>, <see cref="ValueTask"/>, 96/// For methods typed to return <see cref="Task{TResult}"/> or <see cref="ValueTask{TResult}"/>, the delegate will be invoked with the
SpeechToText\DelegatingSpeechToTextClient.cs (1)
44public virtual Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\ISpeechToTextClient.cs (1)
36Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextClientExtensions.cs (1)
40public static Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
62public static Task<SpeechToTextResponse> ToSpeechToTextResponseAsync( 69static async Task<SpeechToTextResponse> ToResponseAsync(
Microsoft.Extensions.AI.Abstractions.Tests (9)
ChatCompletion\DelegatingChatClientTests.cs (1)
43var resultTask = delegating.GetResponseAsync(expectedChatContents, expectedChatOptions, expectedCancellationToken);
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
42var resultTask = delegating.GenerateAsync(expectedInput, options: null, expectedCancellationToken);
SpeechToText\DelegatingSpeechToTextClientTests.cs (1)
44var resultTask = delegating.GetTextAsync(expectedAudioSpeechStream, expectedOptions, expectedCancellationToken);
TestChatClient.cs (2)
20public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, Task<ChatResponse>>? GetResponseAsyncCallback { get; set; } 29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
TestEmbeddingGenerator.cs (2)
22public Func<IEnumerable<TInput>, EmbeddingGenerationOptions?, CancellationToken, Task<GeneratedEmbeddings<TEmbedding>>>? GenerateAsyncCallback { get; set; } 29public Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.AzureAIInference (3)
AzureAIInferenceChatClient.cs (1)
85public async Task<ChatResponse> GetResponseAsync(
AzureAIInferenceEmbeddingGenerator.cs (1)
89public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
AzureAIInferenceImageEmbeddingGenerator.cs (1)
85public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
Microsoft.Extensions.AI.Evaluation (7)
Utilities\TaskExtensions.cs (6)
16this IEnumerable<Func<CancellationToken, Task<T>>> functions, 20IEnumerable<Task<T>> concurrentTasks = functions.Select(f => f(cancellationToken)); 43this IEnumerable<Task<T>> concurrentTasks, 49foreach (Task<T> task in concurrentTasks) 65var remaining = new HashSet<Task<T>>(concurrentTasks); 71var task = await Task.WhenAny(remaining).ConfigureAwait(false);
Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Evaluation.Console (5)
Commands\CleanCacheCommand.cs (1)
19internal async Task<int> InvokeAsync(DirectoryInfo? storageRootDir, Uri? endpointUri, CancellationToken cancellationToken = default)
Commands\CleanResultsCommand.cs (1)
20internal async Task<int> InvokeAsync(
Commands\ReportCommand.cs (1)
22internal async Task<int> InvokeAsync(
Program.cs (1)
24private static async Task<int> Main(string[] args)
Utilities\LoggerExtensions.cs (1)
100Func<Task<TResult>> operation,
Microsoft.Extensions.AI.Evaluation.Integration.Tests (2)
AgentQualityEvaluatorTests.cs (2)
204private static async Task<(IEnumerable<ChatMessage> messages, ChatResponse response)> 217private static async Task<(IEnumerable<ChatMessage> messages, ChatResponse response)>
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Evaluation.Reporting (5)
ResponseCachingChatClient.cs (2)
32protected override async Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken) 58protected override async Task<IReadOnlyList<ChatResponseUpdate>?> ReadCacheStreamingAsync(
SimpleChatClient.cs (1)
22public async override Task<ChatResponse> GetResponseAsync(
Storage\DiskBasedResponseCache.CacheEntry.cs (1)
50public static async Task<CacheEntry> ReadAsync(
Storage\DiskBasedResponseCache.cs (1)
75public async Task<byte[]?> GetAsync(string key, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
Storage\AzureStorageResponseCache.CacheEntry.cs (1)
55public static async Task<CacheEntry> ReadAsync(
Storage\AzureStorageResponseCache.cs (1)
66public async Task<byte[]?> GetAsync(string key, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
ResultStoreTester.cs (1)
42private static async Task<IEnumerable<(string executionName, string scenarioName, string iterationName)>>
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyChatClient.cs (1)
61public async Task<ChatResponse> GetResponseAsync(
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Integration.Tests (14)
CallCountingChatClient.cs (1)
19public override Task<ChatResponse> GetResponseAsync(
CallCountingEmbeddingGenerator.cs (1)
20public override Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
PromptBasedFunctionCallingChatClient.cs (1)
42public override async Task<ChatResponse> GetResponseAsync(
QuantizationEmbeddingGenerator.cs (2)
35async Task<GeneratedEmbeddings<BinaryEmbedding>> IEmbeddingGenerator<string, BinaryEmbedding>.GenerateAsync( 68async Task<GeneratedEmbeddings<Embedding<Half>>> IEmbeddingGenerator<string, Embedding<Half>>.GenerateAsync(
ReducingChatClientTests.cs (3)
75public override async Task<ChatResponse> GetResponseAsync( 103Task<IList<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken); 130public async Task<IList<ChatMessage>> ReduceAsync(
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (2)
20public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, Task<ChatResponse>>? GetResponseAsyncCallback { get; set; } 29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
VerbatimHttpHandler.cs (1)
27protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
VerbatimMultiPartHttpHandler.cs (1)
44protected override async Task<HttpResponseMessage> SendAsync(
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (1)
88public async Task<ChatResponse> GetResponseAsync(
OllamaEmbeddingGenerator.cs (1)
85public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientIntegrationTests.cs (1)
108public override Task<ChatResponse> GetResponseAsync(
Microsoft.Extensions.AI.OpenAI (5)
OpenAIAssistantChatClient.cs (1)
78public Task<ChatResponse> GetResponseAsync(
OpenAIChatClient.cs (1)
69public async Task<ChatResponse> GetResponseAsync(
OpenAIEmbeddingGenerator.cs (1)
65public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
OpenAIResponseChatClient.cs (1)
69public async Task<ChatResponse> GetResponseAsync(
OpenAISpeechToTextClient.cs (1)
83public async Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.Templates.Tests (3)
Infrastructure\DotNetNewCommand.cs (1)
27public override Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
68public async Task<Project> CreateProjectAsync(string templateName, string projectName, params string[] args)
Infrastructure\TestCommand.cs (1)
26public virtual async Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
Microsoft.Extensions.AI.Tests (21)
ChatCompletion\DistributedCachingChatClientTest.cs (6)
149var result1 = outer.GetResponseAsync("some input"); 150var result2 = outer.GetResponseAsync("some input"); 161var result3 = outer.GetResponseAsync("some input"); 224var result1 = outer.GetResponseAsync([input]); 534var result1Assertion = ToListAsync(result1); 718private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> values)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
721async Task InvokeAsync(Func<Task<List<ChatMessage>>> work) 931private static async Task<List<ChatMessage>> InvokeAndAssertAsync( 1031private static async Task<List<ChatMessage>> InvokeAndAssertStreamingAsync(
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (3)
137var result1 = outer.GenerateAsync("abc"); 138var result2 = outer.GenerateAsync("abc"); 210var result1 = outer.GenerateAsync("abc");
Embeddings\UseDelegateEmbeddingGeneratorTests.cs (1)
21builder.Use((Func<IEnumerable<string>, EmbeddingGenerationOptions?, IEmbeddingGenerator<string, Embedding<float>>, CancellationToken, Task<GeneratedEmbeddings<Embedding<float>>>>)null!));
Functions\AIFunctionFactoryTest.cs (1)
102func = AIFunctionFactory.Create(Task<string> (string a) => Task.FromResult(a + " " + a));
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestChatClient.cs (2)
20public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, Task<ChatResponse>>? GetResponseAsyncCallback { get; set; } 29public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestEmbeddingGenerator.cs (2)
22public Func<IEnumerable<TInput>, EmbeddingGenerationOptions?, CancellationToken, Task<GeneratedEmbeddings<TEmbedding>>>? GenerateAsyncCallback { get; set; } 29public Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\TestSpeechToTextClient.cs (2)
25Task<SpeechToTextResponse>>? 41public Task<SpeechToTextResponse> GetTextAsync(
TestInMemoryCacheStorage.cs (1)
21public Task<byte[]?> GetAsync(string key, CancellationToken token = default)
Microsoft.Extensions.ApiDescription.Client.Tests (1)
TargetTest.cs (1)
497private async Task<ProcessEx> RunBuild()
Microsoft.Extensions.Caching.Abstractions (6)
DistributedCacheExtensions.cs (1)
133public static async Task<string?> GetStringAsync(this IDistributedCache cache, string key, CancellationToken token = default(CancellationToken))
IDistributedCache.cs (1)
27Task<byte[]?> GetAsync(string key, CancellationToken token = default(CancellationToken));
MemoryCacheExtensions.cs (4)
210public static Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory) 224public static async Task<TItem?> GetOrCreateAsync<TItem>(this IMemoryCache cache, object key, Func<ICacheEntry, Task<TItem>> factory, MemoryCacheEntryOptions? createOptions)
Microsoft.Extensions.Caching.Hybrid (21)
Internal\DefaultHybridCache.L2.cs (5)
33Task<byte[]?> pendingLegacy = _backendCache!.GetAsync(key, token); 65static async Task<BufferChunk> AwaitedLegacyAsync(Task<byte[]?> pending, DefaultHybridCache @this) 71static async Task<BufferChunk> AwaitedBuffersAsync(ValueTask<bool> pending, RecyclableArrayBufferWriter<byte> writer) 138internal async Task<long> SafeReadTagInvalidationAsync(string tag)
Internal\DefaultHybridCache.StampedeStateT.cs (7)
27private Task<T>? _sharedUnwrap; // allows multiple non-cancellable callers to share a single task (when no defensive copy needed) 124public Task<CacheItem<T>> Task 131static Task<CacheItem<T>> InvalidAsync() => System.Threading.Tasks.Task.FromException<CacheItem<T>>( 142Task<CacheItem<T>> task = Task; 154Task<T> result = ImmutableTypeCache<T>.IsImmutable ? (_sharedUnwrap ??= AwaitedAsync(log, Task)) : AwaitedAsync(log, Task); 157static async Task<T> AwaitedAsync(ILogger log, Task<CacheItem<T>> task)
Internal\DefaultHybridCache.TagInvalidation.cs (9)
13private static readonly Task<long> _zeroTimestamp = Task.FromResult<long>(0L); 15private readonly ConcurrentDictionary<string, Task<long>> _tagInvalidationTimes = []; 22private Task<long> _globalInvalidateTimestamp; 114if (!_tagInvalidationTimes.TryGetValue(tag, out Task<long>? pending)) 170if (!_tagInvalidationTimes.TryGetValue(tag, out Task<long>? pending)) 194static async ValueTask<bool> AwaitedAsync(Task<long> pending, long timestamp) => timestamp <= await pending.ConfigureAwait(false); 201internal void DebugInvalidateTag(string tag, Task<long> pending) 236if (!_tagInvalidationTimes.TryGetValue(tag, out Task<long>? pending)) 244Task<long> timestampTask = Task.FromResult<long>(timestamp);
Microsoft.Extensions.Caching.Hybrid.Tests (31)
L2Tests.cs (1)
223Task<byte[]?> IDistributedCache.GetAsync(string key, CancellationToken token)
NullDistributedCache.cs (1)
12Task<byte[]?> IDistributedCache.GetAsync(string key, CancellationToken token) => Task.FromResult<byte[]?>(null);
RedisFixture.cs (3)
11private Task<IConnectionMultiplexer?>? _sharedConnect; 12public Task<IConnectionMultiplexer?> ConnectAsync() => _sharedConnect ??= DoConnectAsync(); 17private async Task<IConnectionMultiplexer?> DoConnectAsync()
SampleUsage.cs (6)
93public async Task<SomeInformation> GetSomeInformationAsync(string name, int id, CancellationToken token = default) 120public async Task<SomeInformation> GetSomeInformationAsync(string name, int id, CancellationToken token = default) 130private static Task<SomeInformation> SomeExpensiveOperationAsync(string name, int id, 139private static Task<SomeInformationReuse> SomeExpensiveOperationReuseAsync(string name, int id, 148public async Task<SomeInformation> GetSomeInformationAsync(string name, int id, CancellationToken token = default) 161public async Task<SomeInformationReuse> GetSomeInformationAsync(string name, int id)
StampedeTests.cs (14)
43Task<byte[]?> IDistributedCache.GetAsync(string key, CancellationToken token) => throw new NotSupportedException("Intentionally not provided"); 96var results = new Task<Guid>[callerCount]; 123foreach (var result in results) 160foreach (var result in results) 183var results = new Task<Guid>[callerCount]; 221var result = results[i]; 261var results = new Task<Guid>[callerCount]; 304var result = results[i]; 340var first = cache.GetOrCreateAsync(Me(), async ct => 347var second = cache.GetOrCreateAsync(Me(), async ct => 380var first = cache.GetOrCreateAsync(Me(), async ct => 387var second = cache.GetOrCreateAsync(Me(), async ct => 424var first = cache.GetOrCreateAsync(Me(), async ct => 431var second = cache.GetOrCreateAsync(Me(), async ct =>
TestEventListener.cs (1)
177public async Task<int> TryAwaitCountersAsync()
UnreliableL2Tests.cs (5)
163public Task<byte[]?> GetAsync(string key, CancellationToken token = default) 184private static async Task<T> ThrowAsync<T>(bool yield) 198private static Task<T>? ThrowIfBrokenAsync<T>(BreakType breakType) 245private Task<T> TrackLast<T>(Task<T> lastWrite)
Microsoft.Extensions.Caching.Memory (1)
MemoryDistributedCache.cs (1)
60public Task<byte[]?> GetAsync(string key, CancellationToken token = default(CancellationToken))
Microsoft.Extensions.Caching.MicroBenchmarks (10)
DistributedCacheBenchmarks.cs (10)
22private readonly Task<byte[]?>[] pendingBlobs = new Task<byte[]?>[OperationsPerInvoke]; 130Func<Task<byte[]?>> callback = () => _backend.GetAsync(RandomKey()); 145public async Task<int> GetSingleRandomAsync() 156public async Task<int> GetConcurrentRandomAsync() 158Func<Task<byte[]?>> callback = () => _backend.GetAsync(RandomKey()); 185Func<Task<byte[]?>> callback = () => _backend.GetAsync(FixedKey()); 199public async Task<int> GetSingleFixedAsync() 210public async Task<int> GetConcurrentFixedAsync() 212Func<Task<byte[]?>> callback = () => _backend.GetAsync(FixedKey());
Microsoft.Extensions.Caching.SqlServer (6)
DatabaseOperations.cs (3)
89public Task<byte[]?> GetCacheItemAsync(string key, CancellationToken token = default(CancellationToken)) 96public async Task<bool> TryGetCacheItemAsync(string key, IBufferWriter<byte> destination, CancellationToken token = default(CancellationToken)) 260private async Task<byte[]?> GetCacheItemAsync(string key, bool includeValue, IBufferWriter<byte>? destination = null, CancellationToken token = default(CancellationToken))
IDatabaseOperations.cs (2)
18Task<byte[]?> GetCacheItemAsync(string key, CancellationToken token = default(CancellationToken)); 20Task<bool> TryGetCacheItemAsync(string key, IBufferWriter<byte> destination, CancellationToken token = default(CancellationToken));
SqlServerCache.cs (1)
99public async Task<byte[]?> GetAsync(string key, CancellationToken token = default(CancellationToken))
Microsoft.Extensions.Caching.SqlServer.Tests (1)
SqlServerCacheWithDatabaseTest.cs (1)
727private async Task<CacheItemInfo> GetCacheItemFromDatabaseAsync(string key)
Microsoft.Extensions.Caching.StackExchangeRedis (6)
RedisCache.cs (5)
122public async Task<byte[]?> GetAsync(string key, CancellationToken token = default) 188var setTtl = batch.KeyExpireAsync(prefixedKey, TimeSpan.FromSeconds(ttl.GetValueOrDefault())); 428private async Task<byte[]?> GetAndRefreshAsync(string key, bool getData, CancellationToken token = default) 714var pendingMetadata = cache.HashGetAsync(prefixed, GetHashFields(false)); 763var pendingMetadata = cache.HashGetAsync(prefixed, GetHashFields(false));
RedisCacheOptions.cs (1)
32public Func<Task<IConnectionMultiplexer>>? ConnectionMultiplexerFactory { get; set; }
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (1)
TimeExpirationAsyncTests.cs (1)
272static async Task<string> GetNameAndReset(IDistributedCache cache, [CallerMemberName] string caller = "")
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\StackGuard.cs (1)
68Task<R> task = Task.Factory.StartNew((Func<object?, R>)action, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
Microsoft.Extensions.Diagnostics.HealthChecks (15)
DefaultHealthCheckService.cs (3)
38public override async Task<HealthReport> CheckHealthAsync( 51var tasks = new Task<HealthReportEntry>[registrations.Count]; 74private async Task<HealthReportEntry> RunCheckAsync(HealthCheckRegistration registration, CancellationToken cancellationToken)
DelegateHealthCheck.cs (4)
16private readonly Func<CancellationToken, Task<HealthCheckResult>> _check; 22public DelegateHealthCheck(Func<CancellationToken, Task<HealthCheckResult>> check) 32/// <returns>A <see cref="Task{HealthCheckResult}"/> that completes when the health check has finished, yielding the status of the component being checked.</returns> 33public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) => _check(cancellationToken);
DependencyInjection\HealthChecksBuilderDelegateExtensions.cs (4)
117Func<Task<HealthCheckResult>> check, 136Func<Task<HealthCheckResult>> check, 160Func<CancellationToken, Task<HealthCheckResult>> check, 179Func<CancellationToken, Task<HealthCheckResult>> check,
HealthCheckService.cs (4)
39/// A <see cref="Task{T}"/> which will complete when all the health checks have been run, 43public Task<HealthReport> CheckHealthAsync(CancellationToken cancellationToken = default) 56/// A <see cref="Task{T}"/> which will complete when all the health checks have been run, 60public abstract Task<HealthReport> CheckHealthAsync(
Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions (2)
IHealthCheck.cs (2)
20/// <returns>A <see cref="Task{HealthCheckResult}"/> that completes when the health check has finished, yielding the status of the component being checked.</returns> 21Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default);
Microsoft.Extensions.Diagnostics.HealthChecks.Common (8)
ApplicationLifecycleHealthCheck.cs (6)
16private static readonly Task<HealthCheckResult> _healthy = Task.FromResult(HealthCheckResult.Healthy()); 17private static readonly Task<HealthCheckResult> _unhealthyNotStarted = Task.FromResult(HealthCheckResult.Unhealthy("Not Started")); 18private static readonly Task<HealthCheckResult> _unhealthyStopping = Task.FromResult(HealthCheckResult.Unhealthy("Stopping")); 19private static readonly Task<HealthCheckResult> _unhealthyStopped = Task.FromResult(HealthCheckResult.Unhealthy("Stopped")); 41/// A <see cref="Task{T}" /> that completes when the health check has finished, 44public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
ManualHealthCheckService.cs (2)
34/// A <see cref="Task{T}" /> that completes when the health check has finished, 37public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) => Task.FromResult(_tracker.GetHealthCheckResult());
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (9)
DefaultHealthCheckServiceTest.cs (7)
262var task = service.CheckHealthAsync(cancel.Token); 513var checkHealthTask = service.CheckHealthAsync(); 666public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 681public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 698public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 710public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 734public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken)
DependencyInjection\HealthChecksBuilderTest.cs (2)
233public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 251public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Microsoft.Extensions.Diagnostics.Probes.Tests (4)
MockHealthCheckService.cs (4)
14private readonly Task<HealthReport> _healthyReport = CreateHealthReport(HealthStatus.Healthy); 15private readonly Task<HealthReport> _unhealthyReport = CreateHealthReport(HealthStatus.Unhealthy); 18public override Task<HealthReport> CheckHealthAsync(Func<HealthCheckRegistration, bool>? predicate, CancellationToken cancellationToken = default) 23private static Task<HealthReport> CreateHealthReport(HealthStatus healthStatus)
Microsoft.Extensions.Hosting.Abstractions (1)
HostingAbstractionsHostBuilderExtensions.cs (1)
30public static async Task<IHost> StartAsync(this IHostBuilder hostBuilder, CancellationToken cancellationToken = default)
Microsoft.Extensions.Http (7)
Logging\HttpClientLoggerHandler.cs (1)
25protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\LoggingHttpMessageHandler.cs (3)
49private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 54async Task<HttpResponseMessage> Core(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 86protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\LoggingScopeHttpMessageHandler.cs (3)
48private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 53async Task<HttpResponseMessage> Core(HttpRequestMessage request, bool useAsync, CancellationToken cancellationToken) 87protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Diagnostics (2)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
43protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\Internal\HttpResponseBodyReader.cs (1)
133private static async Task<string> BufferStreamAndWriteToPipeAsync(Stream stream, PipeWriter writer, int bufferSize, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (51)
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (16)
45public async Task<HttpResponseMessage> Huge_No_Log_HeadersRead() 55public async Task<HttpResponseMessage> Huge_No_Log_ContentRead() 65public async Task<HttpResponseMessage> Huge_Log_All_HeadersRead() 75public async Task<HttpResponseMessage> Huge_Log_All_ContentRead() 85public async Task<HttpResponseMessage> Huge_Log_Request_HeadersRead() 95public async Task<HttpResponseMessage> Huge_Log_Request_ContentRead() 105public async Task<HttpResponseMessage> Huge_Log_Response_HeadersRead() 115public async Task<HttpResponseMessage> Huge_Log_Response_ContentRead() 125public async Task<HttpResponseMessage> Huge_No_Log_HeadersRead_ChunkedEncoding() 135public async Task<HttpResponseMessage> Huge_No_Log_ContentRead_ChunkedEncoding() 145public async Task<HttpResponseMessage> Huge_Log_All_HeadersRead_ChunkedEncoding() 155public async Task<HttpResponseMessage> Huge_Log_All_ContentRead_ChunkedEncoding() 165public async Task<HttpResponseMessage> Huge_Log_Request_HeadersRead_ChunkedEncoding() 175public async Task<HttpResponseMessage> Huge_Log_Request_ContentRead_ChunkedEncoding() 185public async Task<HttpResponseMessage> Huge_Log_Response_HeadersRead_ChunkedEncoding() 195public async Task<HttpResponseMessage> Huge_Log_Response_ContentRead_ChunkedEncoding()
Benchmarks\MediumHttpClientLoggingBenchmark.cs (16)
45public async Task<HttpResponseMessage> Medium_No_Log_HeadersRead() 55public async Task<HttpResponseMessage> Medium_No_Log_ContentRead() 65public async Task<HttpResponseMessage> Medium_Log_All_HeadersRead() 75public async Task<HttpResponseMessage> Medium_Log_All_ContentRead() 85public async Task<HttpResponseMessage> Medium_Log_Request_HeadersRead() 95public async Task<HttpResponseMessage> Medium_Log_Request_ContentRead() 105public async Task<HttpResponseMessage> Medium_Log_Response_HeadersRead() 115public async Task<HttpResponseMessage> Medium_Log_Response_ContentRead() 125public async Task<HttpResponseMessage> Medium_No_Log_HeadersRead_ChunkedEncoding() 135public async Task<HttpResponseMessage> Medium_No_Log_ContentRead_ChunkedEncoding() 145public async Task<HttpResponseMessage> Medium_Log_All_HeadersRead_ChunkedEncoding() 155public async Task<HttpResponseMessage> Medium_Log_All_ContentRead_ChunkedEncoding() 165public async Task<HttpResponseMessage> Medium_Log_Request_HeadersRead_ChunkedEncoding() 175public async Task<HttpResponseMessage> Medium_Log_Request_ContentRead_ChunkedEncoding() 185public async Task<HttpResponseMessage> Medium_Log_Response_HeadersRead_ChunkedEncoding() 195public async Task<HttpResponseMessage> Medium_Log_Response_ContentRead_ChunkedEncoding()
Benchmarks\SmallHttpClientLoggingBenchmark.cs (16)
45public async Task<HttpResponseMessage> Small_No_Log_HeadersRead() 55public async Task<HttpResponseMessage> Small_No_Log_ContentRead() 65public async Task<HttpResponseMessage> Small_Log_All_HeadersRead() 75public async Task<HttpResponseMessage> Small_Log_All_ContentRead() 85public async Task<HttpResponseMessage> Small_Log_Request_HeadersRead() 95public async Task<HttpResponseMessage> Small_Log_Request_ContentRead() 105public async Task<HttpResponseMessage> Small_Log_Response_HeadersRead() 115public async Task<HttpResponseMessage> Small_Log_Response_ContentRead() 125public async Task<HttpResponseMessage> Small_No_Log_HeadersRead_ChunkedEncoding() 135public async Task<HttpResponseMessage> Small_No_Log_ContentRead_ChunkedEncoding() 145public async Task<HttpResponseMessage> Small_Log_All_HeadersRead_ChunkedEncoding() 155public async Task<HttpResponseMessage> Small_Log_All_ContentRead_ChunkedEncoding() 165public async Task<HttpResponseMessage> Small_Log_Request_HeadersRead_ChunkedEncoding() 175public async Task<HttpResponseMessage> Small_Log_Request_ContentRead_ChunkedEncoding() 185public async Task<HttpResponseMessage> Small_Log_Response_HeadersRead_ChunkedEncoding() 195public async Task<HttpResponseMessage> Small_Log_Response_ContentRead_ChunkedEncoding()
NoRemoteCallHandler.cs (1)
35protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
NoRemoteCallNotSeekableHandler.cs (1)
38protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
NotSeekableStream.cs (1)
32public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _innerStream.ReadAsync(buffer, offset, count, cancellationToken);
Microsoft.Extensions.Http.Diagnostics.Tests (11)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
65mockHandler.Protected().Setup<Task<HttpResponseMessage>>(
Logging\AcceptanceTests.cs (1)
195private static async Task<string> SendRequest(HttpClient httpClient, HttpRequestMessage httpRequestMessage)
Logging\Internal\ITestHttpClient1.cs (1)
11Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage);
Logging\Internal\ITestHttpClient2.cs (1)
11Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage);
Logging\Internal\NoRemoteCallHandler.cs (1)
29protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\Internal\NotSeekableStream.cs (1)
31public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _innerStream.ReadAsync(buffer, offset, count, cancellationToken);
Logging\Internal\TestHttpClient1.cs (1)
18public Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage)
Logging\Internal\TestHttpClient2.cs (1)
18public Task<HttpResponseMessage> SendRequest(HttpRequestMessage httpRequestMessage)
Logging\Internal\TestingHandlerStub.cs (3)
13private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 15public TestingHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc) 20protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => _handlerFunc(request, cancellationToken);
Microsoft.Extensions.Http.Polly (3)
PolicyHttpMessageHandler.cs (3)
107protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 148/// <returns>Returns a <see cref="Task{HttpResponseMessage}"/> that will yield a response when completed.</returns> 149protected virtual async Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Polly.Tests (7)
DependencyInjection\PollyHttpClientBuilderExtensionsTest.cs (2)
561protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 580protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
PolicyHttpMessageHandlerTest.cs (5)
414public Func<HttpRequestMessage, Context, CancellationToken, Task<HttpResponseMessage>> OnSendAsync { get; set; } 426public new Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 431protected override Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) 440public Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> OnSendAsync { get; set; } 442protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Resilience (2)
Resilience\ResilienceHandler.cs (2)
50protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 182private Task<HttpResponseMessage> SendCoreAsync(HttpRequestMessage requestMessage, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Resilience.PerformanceTests (13)
EmptyHandler.cs (1)
12protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
HedgingBenchmark.cs (1)
37public Task<HttpResponseMessage> HedgingCall() => _client.SendAsync(Request, CancellationToken.None);
HttpResilienceBenchmark.cs (5)
46public Task<HttpResponseMessage> DefaultClient() 52public Task<HttpResponseMessage> SingleHandler() 58public Task<HttpResponseMessage> StandardResilienceHandler() 64public Task<HttpResponseMessage> StandardHedgingHandler_RoutesFromRequest() 70public Task<HttpResponseMessage> StandardHedgingHandler_RoutesFromConfig()
NoRemoteCallHandler.cs (2)
13private readonly Task<HttpResponseMessage> _completedResponse; 26protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
RetryBenchmark.cs (2)
69public Task<HttpResponseMessage> Retry_Polly_V7() 75public Task<HttpResponseMessage> Retry_Polly_V8()
StandardResilienceBenchmark.cs (2)
71public Task<HttpResponseMessage> StandardPipeline_Polly_V7() 77public Task<HttpResponseMessage> StandardPipeline_Polly_V8()
Microsoft.Extensions.Http.Resilience.Tests (11)
artifacts\obj\Microsoft.Extensions.Http.Resilience.Tests\Debug\net9.0\Protos\GreetGrpc.cs (1)
81public virtual global::System.Threading.Tasks.Task<global::Microsoft.Extensions.Http.Resilience.Test.Grpc.HelloReply> SayHello(global::Microsoft.Extensions.Http.Resilience.Test.Grpc.HelloRequest request, grpc::ServerCallContext context)
Hedging\HedgingTests.cs (2)
308protected static Task<HttpResponseMessage> SendRequest( 348private Task<HttpResponseMessage> InnerHandlerFunction(HttpRequestMessage request, CancellationToken cancellationToken)
Hedging\StandardHedgingTests.cs (1)
352protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Helpers\TestHandlerStub.cs (3)
14private readonly Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> _handlerFunc; 21public TestHandlerStub(Func<HttpRequestMessage, CancellationToken, Task<HttpResponseMessage>> handlerFunc) 26protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Resilience\GrpcResilienceTests.cs (2)
82private static Task<HelloReply> SendRequest(Greeter.GreeterClient client, bool asynchronous) 114public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context)
Resilience\HttpClientBuilderExtensionsTests.Standard.cs (1)
39private static Task<HttpResponseMessage> SendRequest(HttpClient client, string url, bool asynchronous)
Resilience\ResilienceHandlerTest.cs (1)
162private static Task<HttpResponseMessage> InvokeHandler(
Microsoft.Extensions.Identity.Core (185)
AuthenticatorTokenProvider.cs (3)
21public virtual async Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user) 35public virtual Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user) 48public virtual async Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user)
DefaultUserConfirmation.cs (1)
20public virtual async Task<bool> IsConfirmedAsync(UserManager<TUser> manager, TUser user)
EmailTokenProvider.cs (2)
21public override async Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user) 35public override async Task<string> GetUserModifierAsync(string purpose, UserManager<TUser> manager,
IPasswordValidator.cs (1)
21Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string? password);
IRoleClaimStore.cs (2)
23/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <see cref="Claim"/>s. 25Task<IList<Claim>> GetClaimsAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken));
IRoleStore.cs (16)
21/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 22Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken); 29/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 30Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken); 37/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 38Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken); 45/// <returns>A <see cref="Task{TResult}"/> that contains the ID of the role.</returns> 46Task<string> GetRoleIdAsync(TRole role, CancellationToken cancellationToken); 53/// <returns>A <see cref="Task{TResult}"/> that contains the name of the role.</returns> 54Task<string?> GetRoleNameAsync(TRole role, CancellationToken cancellationToken); 70/// <returns>A <see cref="Task{TResult}"/> that contains the name of the role.</returns> 71Task<string?> GetNormalizedRoleNameAsync(TRole role, CancellationToken cancellationToken); 87/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns> 88Task<TRole?> FindByIdAsync(string roleId, CancellationToken cancellationToken); 95/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns> 96Task<TRole?> FindByNameAsync(string normalizedRoleName, CancellationToken cancellationToken);
IRoleValidator.cs (2)
19/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous validation.</returns> 20Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role);
IUserAuthenticationTokenStore.cs (1)
44Task<string?> GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken);
IUserAuthenticatorKeyStore.cs (1)
30Task<string?> GetAuthenticatorKeyAsync(TUser user, CancellationToken cancellationToken);
IUserClaimsPrincipalFactory.cs (1)
21Task<ClaimsPrincipal> CreateAsync(TUser user);
IUserClaimStore.cs (4)
23/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <see cref="Claim"/>s. 25Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken); 61/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/> who 64Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken);
IUserConfirmation.cs (1)
20Task<bool> IsConfirmedAsync(UserManager<TUser> manager, TUser user);
IUserEmailStore.cs (4)
30Task<string?> GetEmailAsync(TUser user, CancellationToken cancellationToken); 42Task<bool> GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken); 61Task<TUser?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken); 71Task<string?> GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken);
IUserLockoutStore.cs (5)
24/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a <see cref="DateTimeOffset"/> containing the last time 27Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken); 44Task<int> IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken); 61Task<int> GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken); 71Task<bool> GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken);
IUserLoginStore.cs (2)
45Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken); 56Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken);
IUserPasswordStore.cs (2)
30Task<string?> GetPasswordHashAsync(TUser user, CancellationToken cancellationToken); 41Task<bool> HasPasswordAsync(TUser user, CancellationToken cancellationToken);
IUserPhoneNumberStore.cs (2)
30Task<string?> GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken); 41Task<bool> GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken);
IUserRoleStore.cs (3)
40Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken); 52Task<bool> IsInRoleAsync(TUser user, string roleName, CancellationToken cancellationToken); 62Task<IList<TUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken);
IUserSecurityStampStore.cs (1)
30Task<string?> GetSecurityStampAsync(TUser user, CancellationToken cancellationToken);
IUserStore.cs (8)
22Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken); 30Task<string?> GetUserNameAsync(TUser user, CancellationToken cancellationToken); 47Task<string?> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken); 64Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken); 72Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken); 80Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken); 90Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken); 100Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken);
IUserTwoFactorRecoveryCodeStore.cs (2)
33Task<bool> RedeemCodeAsync(TUser user, string code, CancellationToken cancellationToken); 41Task<int> CountCodesAsync(TUser user, CancellationToken cancellationToken);
IUserTwoFactorStore.cs (1)
35Task<bool> GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken);
IUserTwoFactorTokenProvider.cs (3)
33Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user); 48Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user); 61Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user);
IUserValidator.cs (1)
20Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user);
PasswordValidator.cs (1)
40public virtual Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string? password)
PhoneNumberTokenProvider.cs (2)
30public override async Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user) 49public override async Task<string> GetUserModifierAsync(string purpose, UserManager<TUser> manager, TUser user)
RoleManager.cs (14)
155public virtual async Task<IdentityResult> CreateAsync(TRole role) 189public virtual Task<IdentityResult> UpdateAsync(TRole role) 204public virtual Task<IdentityResult> DeleteAsync(TRole role) 219public virtual async Task<bool> RoleExistsAsync(string roleName) 246public virtual Task<TRole?> FindByIdAsync(string roleId) 260public virtual Task<string?> GetRoleNameAsync(TRole role) 275public virtual async Task<IdentityResult> SetRoleNameAsync(TRole role, string? name) 292public virtual Task<string> GetRoleIdAsync(TRole role) 306public virtual Task<TRole?> FindByNameAsync(string roleName) 323public virtual async Task<IdentityResult> AddClaimAsync(TRole role, Claim claim) 343public virtual async Task<IdentityResult> RemoveClaimAsync(TRole role, Claim claim) 361public virtual Task<IList<Claim>> GetClaimsAsync(TRole role) 397protected virtual async Task<IdentityResult> ValidateRoleAsync(TRole role) 425protected virtual async Task<IdentityResult> UpdateRoleAsync(TRole role)
RoleValidator.cs (3)
33/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous validation.</returns> 34public virtual async Task<IdentityResult> ValidateAsync(RoleManager<TRole> manager, TRole role) 46private async Task<List<IdentityError>?> ValidateRoleName(RoleManager<TRole> manager, TRole role)
TotpSecurityStampBasedTokenProvider.cs (4)
37public virtual async Task<string> GenerateAsync(string purpose, UserManager<TUser> manager, TUser user) 59public virtual async Task<bool> ValidateAsync(string purpose, string token, UserManager<TUser> manager, TUser user) 83public virtual async Task<string> GetUserModifierAsync(string purpose, UserManager<TUser> manager, TUser user) 102public abstract Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user);
UserClaimsPrincipalFactory.cs (3)
59public virtual async Task<ClaimsPrincipal> CreateAsync(TUser user) 71protected virtual async Task<ClaimsIdentity> GenerateClaimsAsync(TUser user) 136protected override async Task<ClaimsIdentity> GenerateClaimsAsync(TUser user)
UserManager.cs (86)
432public virtual Task<TUser?> GetUserAsync(ClaimsPrincipal principal) 447public virtual Task<string> GenerateConcurrencyStampAsync(TUser user) 461public virtual async Task<IdentityResult> CreateAsync(TUser user) 488public virtual Task<IdentityResult> UpdateAsync(TUser user) 504public virtual Task<IdentityResult> DeleteAsync(TUser user) 519public virtual Task<TUser?> FindByIdAsync(string userId) 532public virtual async Task<TUser?> FindByNameAsync(string userName) 571public virtual async Task<IdentityResult> CreateAsync(TUser user, string password) 632public virtual async Task<string?> GetUserNameAsync(TUser user) 645public virtual async Task<IdentityResult> SetUserNameAsync(TUser user, string? userName) 660public virtual async Task<string> GetUserIdAsync(TUser user) 675public virtual async Task<bool> CheckPasswordAsync(TUser user, string password) 707public virtual Task<bool> HasPasswordAsync(TUser user) 726public virtual async Task<IdentityResult> AddPasswordAsync(TUser user, string password) 757public virtual async Task<IdentityResult> ChangePasswordAsync(TUser user, string currentPassword, string newPassword) 784public virtual async Task<IdentityResult> RemovePasswordAsync(TUser user) 804protected virtual async Task<PasswordVerificationResult> VerifyPasswordAsync(IUserPasswordStore<TUser> store, TUser user, string password) 819public virtual async Task<string> GetSecurityStampAsync(TUser user) 844public virtual async Task<IdentityResult> UpdateSecurityStampAsync(TUser user) 861public virtual Task<string> GeneratePasswordResetTokenAsync(TUser user) 878public virtual async Task<IdentityResult> ResetPasswordAsync(TUser user, string token, string newPassword) 904public virtual Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey) 924public virtual async Task<IdentityResult> RemoveLoginAsync(TUser user, string loginProvider, string providerKey) 946public virtual async Task<IdentityResult> AddLoginAsync(TUser user, UserLoginInfo login) 970public virtual async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user) 987public virtual Task<IdentityResult> AddClaimAsync(TUser user, Claim claim) 1005public virtual async Task<IdentityResult> AddClaimsAsync(TUser user, IEnumerable<Claim> claims) 1026public virtual async Task<IdentityResult> ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim) 1047public virtual Task<IdentityResult> RemoveClaimAsync(TUser user, Claim claim) 1065public virtual async Task<IdentityResult> RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims) 1081/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <see cref="Claim"/>s. 1083public virtual async Task<IList<Claim>> GetClaimsAsync(TUser user) 1100public virtual async Task<IdentityResult> AddToRoleAsync(TUser user, string role) 1124public virtual async Task<IdentityResult> AddToRolesAsync(TUser user, IEnumerable<string> roles) 1152public virtual async Task<IdentityResult> RemoveFromRoleAsync(TUser user, string role) 1194public virtual async Task<IdentityResult> RemoveFromRolesAsync(TUser user, IEnumerable<string> roles) 1218public virtual async Task<IList<string>> GetRolesAsync(TUser user) 1235public virtual async Task<bool> IsInRoleAsync(TUser user, string role) 1248public virtual async Task<string?> GetEmailAsync(TUser user) 1265public virtual async Task<IdentityResult> SetEmailAsync(TUser user, string? email) 1286public virtual async Task<TUser?> FindByEmailAsync(string email) 1338public virtual Task<string> GenerateEmailConfirmationTokenAsync(TUser user) 1353public virtual async Task<IdentityResult> ConfirmEmailAsync(TUser user, string token) 1376public virtual async Task<bool> IsEmailConfirmedAsync(TUser user) 1392public virtual Task<string> GenerateChangeEmailTokenAsync(TUser user, string newEmail) 1408public virtual async Task<IdentityResult> ChangeEmailAsync(TUser user, string newEmail, string token) 1430public virtual async Task<string?> GetPhoneNumberAsync(TUser user) 1447public virtual async Task<IdentityResult> SetPhoneNumberAsync(TUser user, string? phoneNumber) 1470public virtual async Task<IdentityResult> ChangePhoneNumberAsync(TUser user, string phoneNumber, string token) 1495public virtual Task<bool> IsPhoneNumberConfirmedAsync(TUser user) 1511public virtual Task<string> GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) 1528public virtual Task<bool> VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) 1549public virtual async Task<bool> VerifyUserTokenAsync(TUser user, string tokenProvider, string purpose, string token) 1579public virtual Task<string> GenerateUserTokenAsync(TUser user, string tokenProvider, string purpose) 1614public virtual async Task<IList<string>> GetValidTwoFactorProvidersAsync(TUser user) 1639public virtual async Task<bool> VerifyTwoFactorTokenAsync(TUser user, string tokenProvider, string token) 1666public virtual Task<string> GenerateTwoFactorTokenAsync(TUser user, string tokenProvider) 1687public virtual async Task<bool> GetTwoFactorEnabledAsync(TUser user) 1704public virtual async Task<IdentityResult> SetTwoFactorEnabledAsync(TUser user, bool enabled) 1724public virtual async Task<bool> IsLockedOutAsync(TUser user) 1746public virtual async Task<IdentityResult> SetLockoutEnabledAsync(TUser user, bool enabled) 1763public virtual async Task<bool> GetLockoutEnabledAsync(TUser user) 1777/// A <see cref="Task{TResult}"/> that represents the lookup, a <see cref="DateTimeOffset"/> containing the last time a user's lockout expired, if any. 1779public virtual async Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user) 1793public virtual async Task<IdentityResult> SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd) 1815public virtual async Task<IdentityResult> AccessFailedAsync(TUser user) 1839public virtual async Task<IdentityResult> ResetAccessFailedCountAsync(TUser user) 1859public virtual async Task<int> GetAccessFailedCountAsync(TUser user) 1872/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/>s who 1875public virtual Task<IList<TUser>> GetUsersForClaimAsync(Claim claim) 1888/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/>s who 1891public virtual Task<IList<TUser>> GetUsersInRoleAsync(string roleName) 1907public virtual Task<string?> GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 1926public virtual async Task<IdentityResult> SetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName, string? tokenValue) 1946public virtual async Task<IdentityResult> RemoveAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 1963public virtual Task<string?> GetAuthenticatorKeyAsync(TUser user) 1976public virtual async Task<IdentityResult> ResetAuthenticatorKeyAsync(TUser user) 1999public virtual async Task<IEnumerable<string>?> GenerateNewTwoFactorRecoveryCodesAsync(TUser user, int number) 2103public virtual async Task<IdentityResult> RedeemTwoFactorRecoveryCodeAsync(TUser user, string code) 2122public virtual Task<int> CountRecoveryCodesAsync(TUser user) 2193public virtual async Task<byte[]> CreateSecurityTokenAsync(TUser user) 2214protected virtual Task<IdentityResult> UpdatePasswordHash(TUser user, string newPassword, bool validatePassword) 2217private async Task<IdentityResult> UpdatePasswordHash(IUserPasswordStore<TUser> passwordStore, 2299protected async Task<IdentityResult> ValidateUserAsync(TUser user) 2337protected async Task<IdentityResult> ValidatePasswordAsync(TUser user, string? password) 2371protected virtual async Task<IdentityResult> UpdateUserAsync(TUser user)
UserValidator.cs (3)
40public virtual async Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user) 52private async Task<List<IdentityError>?> ValidateUserName(UserManager<TUser> manager, TUser user) 82private async Task<List<IdentityError>?> ValidateEmail(UserManager<TUser> manager, TUser user, List<IdentityError>? errors)
Microsoft.Extensions.Identity.Stores (63)
RoleStoreBase.cs (18)
54/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 55public abstract Task<IdentityResult> CreateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)); 62/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 63public abstract Task<IdentityResult> UpdateAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)); 70/// <returns>A <see cref="Task{TResult}"/> that represents the <see cref="IdentityResult"/> of the asynchronous query.</returns> 71public abstract Task<IdentityResult> DeleteAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)); 78/// <returns>A <see cref="Task{TResult}"/> that contains the ID of the role.</returns> 79public virtual Task<string> GetRoleIdAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 92/// <returns>A <see cref="Task{TResult}"/> that contains the name of the role.</returns> 93public virtual Task<string?> GetRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 152/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns> 153public abstract Task<TRole?> FindByIdAsync(string id, CancellationToken cancellationToken = default(CancellationToken)); 160/// <returns>A <see cref="Task{TResult}"/> that result of the look up.</returns> 161public abstract Task<TRole?> FindByNameAsync(string normalizedName, CancellationToken cancellationToken = default(CancellationToken)); 168/// <returns>A <see cref="Task{TResult}"/> that contains the name of the role.</returns> 169public virtual Task<string?> GetNormalizedRoleNameAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken)) 211/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a role.</returns> 212public abstract Task<IList<Claim>> GetClaimsAsync(TRole role, CancellationToken cancellationToken = default(CancellationToken));
UserStoreBase.cs (45)
116public virtual Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 130public virtual Task<string?> GetUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 160public virtual Task<string?> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 190public abstract Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 198public abstract Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 206public abstract Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 216public abstract Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)); 256public abstract Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)); 287/// <returns>A <see cref="Task{TResult}"/> that contains the password hash for the user.</returns> 288public virtual Task<string?> GetPasswordHashAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 301/// <returns>A <see cref="Task{TResult}"/> containing a flag indicating if the specified user has a password. If the 303public virtual Task<bool> HasPasswordAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 315protected abstract Task<TUser?> FindUserAsync(TKey userId, CancellationToken cancellationToken); 325protected abstract Task<TUserLogin?> FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken); 334protected abstract Task<TUserLogin?> FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken); 357/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a user.</returns> 358public abstract Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 415public abstract Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 426public virtual async Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey, 449public virtual Task<bool> GetEmailConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 495public virtual Task<string?> GetEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 511public virtual Task<string?> GetNormalizedEmailAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 543public abstract Task<TUser?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)); 552/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a <see cref="DateTimeOffset"/> containing the last time 555public virtual Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 585public virtual Task<int> IncrementAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 616public virtual Task<int> GetAccessFailedCountAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 632public virtual Task<bool> GetLockoutEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 678public virtual Task<string?> GetPhoneNumberAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 695public virtual Task<bool> GetPhoneNumberConfirmedAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 742public virtual Task<string?> GetSecurityStampAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 777public virtual Task<bool> GetTwoFactorEnabledAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 793public abstract Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)); 803protected abstract Task<TUserToken?> FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken); 875public virtual async Task<string?> GetTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken) 905public virtual Task<string?> GetAuthenticatorKeyAsync(TUser user, CancellationToken cancellationToken) 914public virtual async Task<int> CountCodesAsync(TUser user, CancellationToken cancellationToken) 966public virtual async Task<bool> RedeemCodeAsync(TUser user, string code, CancellationToken cancellationToken) 1038public abstract Task<IList<TUser>> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken)); 1063/// <returns>A <see cref="Task{TResult}"/> that contains the roles the user is a member of.</returns> 1064public abstract Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)); 1072/// <returns>A <see cref="Task{TResult}"/> containing a flag indicating if the specified user is a member of the given group. If the 1074public abstract Task<bool> IsInRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken)); 1082protected abstract Task<TRole?> FindRoleAsync(string normalizedRoleName, CancellationToken cancellationToken); 1091protected abstract Task<TUserRole?> FindUserRoleAsync(TKey userId, TKey roleId, CancellationToken cancellationToken);
Microsoft.Extensions.Logging.AzureAppServices (1)
BlobAppendReferenceWrapper.cs (1)
33Task<HttpResponseMessage> AppendDataAsync()
Microsoft.Extensions.ML (2)
ModelLoaders\UriModelLoader.cs (2)
105internal virtual async Task<bool> MatchEtagAsync(Uri uri, string eTag) 136internal virtual async Task<bool> LoadModelAsync()
Microsoft.Extensions.ML.Tests (2)
UriLoaderTests.cs (2)
95internal override Task<bool> LoadModelAsync() 100internal override Task<bool> MatchEtagAsync(Uri uri, string eTag)
Microsoft.Extensions.Options.Contextual.Tests (2)
AcceptanceTests.cs (2)
55public async Task<IEnumerable<WeatherForecast>> GetForecast(WeatherForecastContext context, CancellationToken cancellationToken) 69Task<IEnumerable<WeatherForecast>> GetForecast(WeatherForecastContext context, CancellationToken cancellationToken);
Microsoft.Extensions.ServiceDiscovery (2)
Http\ResolvingHttpClientHandler.cs (1)
17protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Http\ResolvingHttpDelegatingHandler.cs (1)
41protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (15)
DnsSrvServiceEndpointResolverTests.cs (15)
24public Func<string, QueryType, QueryClass, CancellationToken, Task<IDnsQueryResponse>>? QueryAsyncFunc { get; set; } 29public Task<IDnsQueryResponse> QueryAsync(string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) 31public Task<IDnsQueryResponse> QueryAsync(DnsQuestion question, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 32public Task<IDnsQueryResponse> QueryAsync(DnsQuestion question, DnsQueryAndServerOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 37public Task<IDnsQueryResponse> QueryReverseAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 38public Task<IDnsQueryResponse> QueryReverseAsync(IPAddress ipAddress, DnsQueryAndServerOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 44public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 45public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, DnsQuestion question, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 46public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, DnsQuestion question, DnsQueryOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 47public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPAddress> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 48public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 53public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPAddress> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 54public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 55public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 56public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, DnsQueryOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException();
Microsoft.Extensions.ServiceDiscovery.Yarp (3)
ServiceDiscoveryDestinationResolver.cs (3)
27var tasks = new List<Task<(List<(string Name, DestinationConfig Config)>, IChangeToken ChangeToken)>>(destinations.Count); 35foreach (var task in tasks) 52private async Task<(List<(string Name, DestinationConfig Config)>, IChangeToken ChangeToken)> ResolveHostAsync(
Microsoft.Extensions.ServiceDiscovery.Yarp.Tests (15)
YarpServiceDiscoveryTests.cs (15)
318public Func<string, QueryType, QueryClass, CancellationToken, Task<IDnsQueryResponse>>? QueryAsyncFunc { get; set; } 323public Task<IDnsQueryResponse> QueryAsync(string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) 325public Task<IDnsQueryResponse> QueryAsync(DnsQuestion question, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 326public Task<IDnsQueryResponse> QueryAsync(DnsQuestion question, DnsQueryAndServerOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 331public Task<IDnsQueryResponse> QueryReverseAsync(IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 332public Task<IDnsQueryResponse> QueryReverseAsync(IPAddress ipAddress, DnsQueryAndServerOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 338public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 339public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, DnsQuestion question, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 340public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<NameServer> servers, DnsQuestion question, DnsQueryOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 341public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPAddress> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 342public Task<IDnsQueryResponse> QueryServerAsync(IReadOnlyCollection<IPEndPoint> servers, string query, QueryType queryType, QueryClass queryClass = QueryClass.IN, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 347public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPAddress> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 348public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<IPEndPoint> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 349public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 350public Task<IDnsQueryResponse> QueryServerReverseAsync(IReadOnlyCollection<NameServer> servers, IPAddress ipAddress, DnsQueryOptions queryOptions, CancellationToken cancellationToken = default) => throw new NotImplementedException();
Microsoft.Extensions.TimeProvider.Testing.Tests (6)
FakeTimeProviderTests.cs (6)
375var t = source.Task.WaitAsync(TimeSpan.FromSeconds(100000), timeProvider, CancellationToken.None); 395var t = source.Task.WaitAsync(TimeSpan.FromMilliseconds(-1), timeProvider, CancellationToken.None); 414var t = source.Task.WaitAsync(TimeSpan.FromMilliseconds(1), timeProvider, CancellationToken.None); 433var t = source.Task.WaitAsync(_infiniteTimeout, timeProvider, cts.Token); 537async Task<int> simulatedPollyRetry() 564var result = simulatedPollyRetry();
Microsoft.Extensions.Validation.GeneratorTests (1)
ValidationsGeneratorTestBase.cs (1)
588internal static async Task<HttpValidationProblemDetails> AssertBadRequest(HttpContext context)
Microsoft.Gen.ComplianceReports.Unit.Tests (11)
GeneratorTests.cs (1)
164private static async Task<IReadOnlyList<Diagnostic>> RunGenerator(string code, string? outputFile = null, Dictionary<string, string>? options = null)
test\Generators\Shared\RoslynTestUtils.cs (10)
244public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 258public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 288public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 301public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 355public static async Task<Compilation> RunSyntaxContextReceiver( 377public static async Task<TParserOutput?> RunParser<TReceiver, TParserOutput>( 392public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 434public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 546private static async Task<Document> RecreateDocumentAsync(Document document)
Microsoft.Gen.ContextualOptions.Unit.Tests (11)
ParserTests.cs (1)
98private static async Task<IEnumerable<OptionsContextType>> GetParserResult(string[] sources) =>
test\Generators\Shared\RoslynTestUtils.cs (10)
244public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 258public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 288public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 301public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 355public static async Task<Compilation> RunSyntaxContextReceiver( 377public static async Task<TParserOutput?> RunParser<TReceiver, TParserOutput>( 392public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 434public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 546private static async Task<Document> RecreateDocumentAsync(Document document)
Microsoft.Gen.Logging.Unit.Tests (11)
AttributeParserTests.cs (1)
225private static async Task<IReadOnlyList<Diagnostic>> RunGenerator(string code)
test\Generators\Shared\RoslynTestUtils.cs (10)
244public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 258public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 288public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 301public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 355public static async Task<Compilation> RunSyntaxContextReceiver( 377public static async Task<TParserOutput?> RunParser<TReceiver, TParserOutput>( 392public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 434public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 546private static async Task<Document> RecreateDocumentAsync(Document document)
Microsoft.Gen.MetadataExtractor.Unit.Tests (11)
GeneratorTests.cs (1)
199private static async Task<IReadOnlyList<Diagnostic>> RunGenerator(
test\Generators\Shared\RoslynTestUtils.cs (10)
244public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 258public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 288public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 301public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 355public static async Task<Compilation> RunSyntaxContextReceiver( 377public static async Task<TParserOutput?> RunParser<TReceiver, TParserOutput>( 392public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 434public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 546private static async Task<Document> RecreateDocumentAsync(Document document)
Microsoft.Gen.Metrics.Unit.Tests (11)
ParserTests.cs (1)
745private static async Task<IReadOnlyList<Diagnostic>> RunGenerator(
test\Generators\Shared\RoslynTestUtils.cs (10)
244public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 258public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 288public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 301public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 355public static async Task<Compilation> RunSyntaxContextReceiver( 377public static async Task<TParserOutput?> RunParser<TReceiver, TParserOutput>( 392public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 434public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 546private static async Task<Document> RecreateDocumentAsync(Document document)
Microsoft.Gen.MetricsReports.Unit.Tests (11)
GeneratorTests.cs (1)
145private static async Task<IReadOnlyList<Diagnostic>> RunGenerator(
test\Generators\Shared\RoslynTestUtils.cs (10)
244public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 258public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 288public static Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 301public static async Task<(IReadOnlyList<Diagnostic> diagnostics, ImmutableArray<GeneratedSourceResult> generatedSources)> RunGenerator( 355public static async Task<Compilation> RunSyntaxContextReceiver( 377public static async Task<TParserOutput?> RunParser<TReceiver, TParserOutput>( 392public static async Task<IReadOnlyList<Diagnostic>> RunAnalyzer( 434public static async Task<IReadOnlyList<string>> RunAnalyzerAndFixer( 534private static async Task<Project> RecreateProjectDocumentsAsync(Project project) 546private static async Task<Document> RecreateDocumentAsync(Document document)
Microsoft.Interop.ComInterfaceGenerator (4)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<DocumentEditor, CancellationToken, Task> documentBasedFix, CancellationToken ct) 169public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (2)
15public static async Task<ImmutableArray<Diagnostic>> GetDiagnosticsInScopeAsync(this FixAllContext context) 48public static async Task<ImmutableArray<Project>> GetProjectsWithDiagnosticsAsync(this FixAllContext context)
Microsoft.Interop.LibraryImportGenerator (10)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
52private static async Task<Solution> AddDisableRuntimeMarshallingAttributeApplicationToProject(Project project, CancellationToken cancellationToken)
Analyzers\ConvertToLibraryImportFixer.cs (2)
196private static async Task<SyntaxNode> ConvertMethodDeclarationToLibraryImport( 271private static async Task<bool> TransformCallersOfNoPreserveSigMethod(DocumentEditor editor, IMethodSymbol methodSymbol, CancellationToken cancellationToken)
Analyzers\CustomMarshallerAttributeFixer.cs (3)
29public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 87private static async Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsInScope(FixAllContext context) 154private static async Task<Solution> AddMissingMembers(Document doc, SyntaxNode node, HashSet<string> missingMemberNames, CancellationToken ct)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<DocumentEditor, CancellationToken, Task> documentBasedFix, CancellationToken ct) 169public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
src\libraries\System.Runtime.InteropServices\gen\Common\FixAllContextExtensions.cs (2)
15public static async Task<ImmutableArray<Diagnostic>> GetDiagnosticsInScopeAsync(this FixAllContext context) 48public static async Task<ImmutableArray<Project>> GetProjectsWithDiagnosticsAsync(this FixAllContext context)
Microsoft.JSInterop (3)
Infrastructure\TaskGenericsUtil.cs (2)
44(!taskType.IsGenericType || taskType.GetGenericTypeDefinition() != typeof(Task<>))) 69public object? GetResult(Task task) => ((Task<T>)task).Result!;
JSRuntime.cs (1)
262protected internal virtual Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
Microsoft.JSInterop.Tests (2)
Infrastructure\DotNetDispatcherTest.cs (2)
966public async Task<InvokableAsyncMethodResult> InvokableAsyncMethod(TestDTO dtoViaJson, DotNetObjectReference<TestDTO> dtoByRefWrapper) 1048public static async Task<string> AsyncThrowingMethod()
Microsoft.Maui (31)
Core\IHybridWebView.cs (2)
51 Task<string?> EvaluateJavaScriptAsync(string script); 63 Task<TReturnType?> InvokeJavaScriptAsync<TReturnType>(
Core\IWebView.cs (1)
62 Task<string> EvaluateJavaScriptAsync(string script);
Dispatching\DispatcherExtensions.cs (6)
18 /// <returns>A <see cref="Task{TResult}"/> object containing information about the state of the dispatcher operation.</returns> 19 public static Task<T> DispatchAsync<T>(this IDispatcher dispatcher, Func<T> func) 58 /// <returns>A <see cref="Task{TResult}"/> object containing information about the state of the dispatcher operation.</returns> 59 public static Task<T> DispatchAsync<T>(this IDispatcher dispatcher, Func<Task<T>> funcTask) 97 public static Task<SynchronizationContext> GetSynchronizationContextAsync(this IDispatcher dispatcher) =>
Handlers\ElementHandlerExtensions.cs (1)
74 internal static Task<T> InvokeAsync<T>(this IElementHandler handler, string commandName,
Handlers\HybridWebView\HybridWebViewHandler.cs (6)
171 internal async Task<byte[]?> InvokeDotNetAsync(NameValueCollection invokeQueryString) 231 private static async Task<object?> InvokeDotNetMethodAsync( 280 var resultProperty = dotnetMethod.ReturnType.GetProperty(nameof(Task<object>.Result)); 397 static async Task<object?> MapInvokeJavaScriptAsyncImpl(IHybridWebViewHandler handler, IHybridWebView hybridWebView, HybridWebViewInvokeJavaScriptRequest invokeJavaScriptRequest) 474 internal static async Task<string?> GetAssetContentAsync(string assetPath) 488 internal static async Task<Stream?> GetAssetStreamAsync(string assetPath)
ImageSources\ImageSourceExtensions.cs (3)
29 static async Task LoadImageResult(Task<IImageSourceServiceResult<PlatformImage>?> task, Action<IImageSourceServiceResult<PlatformImage>?>? finished = null) 35 public static Task<IImageSourceServiceResult<PlatformImage>?> GetPlatformImageAsync(this IImageSource? imageSource, IMauiContext mauiContext) 46 public static Task<IImageSourceServiceResult<PlatformImage>?> GetPlatformImageAsync(this IImageSourceService imageSourceService, IImageSource? imageSource, IMauiContext mauiContext)
ImageSources\IStreamImageSource.cs (1)
10 Task<Stream> GetStreamAsync(CancellationToken cancellationToken = default);
SoftInputExtensions.cs (2)
35 public static Task<bool> HideSoftInputAsync(this ITextInput targetView, CancellationToken token) 57 public static Task<bool> ShowSoftInputAsync(this ITextInput targetView, CancellationToken token)
TaskExtensions.cs (2)
12 this Task<TResult> task, 64 public static async void RunAndReport<T>(this TaskCompletionSource<T> request, Task<T> task)
ViewExtensions.cs (1)
69 public static Task<IScreenshotResult?> CaptureAsync(this IView view)
VisualDiagnostics\VisualDiagnostics.cs (5)
81 public static async Task<byte[]?> CaptureAsPngAsync(IView view) 87 public static async Task<byte[]?> CaptureAsJpegAsync(IView view, int quality = 80) 93 public static async Task<byte[]?> CaptureAsPngAsync(IWindow window) 99 public static async Task<byte[]?> CaptureAsJpegAsync(IWindow window, int quality = 80) 105 static async Task<byte[]?> ScreenshotResultToArray(IScreenshotResult? result, ScreenshotFormat format, int quality)
WindowExtensions.cs (1)
18 public static Task<IScreenshotResult?> CaptureAsync(this IWindow window)
Microsoft.Maui.Controls (85)
Device.cs (4)
95 public static Task<T> InvokeOnMainThreadAsync<T>(Func<T> func) => 105 public static Task<T> InvokeOnMainThreadAsync<T>(Func<Task<T>> funcTask) => 115 public static Task<SynchronizationContext> GetMainThreadSynchronizationContextAsync() =>
DragAndDrop\DataPackageView.cs (2)
23 public Task<ImageSource> GetImageAsync() 29 public Task<string> GetTextAsync()
FileImageSource.cs (1)
24 public override Task<bool> Cancel()
Foldable\IFoldableService.cs (1)
19 Task<int> GetHingeAngleAsync();
HybridWebView\HybridWebView.cs (2)
113 public async Task<TReturnType?> InvokeJavaScriptAsync<TReturnType>( 148 public async Task<string?> EvaluateJavaScriptAsync(string script)
ImageSource.cs (2)
53 public virtual Task<bool> Cancel() 95 public static ImageSource FromStream(Func<CancellationToken, Task<Stream>> stream)
INavigation.cs (4)
15 Task<Page> PopAsync(); 16 Task<Page> PopAsync(bool animated); 17 Task<Page> PopModalAsync(); 18 Task<Page> PopModalAsync(bool animated);
INavigationPageController.cs (2)
11 Task<Page> RemoveAsyncInner(Page page, bool animated, bool fast); 19 Task<Page> PopAsyncInner(bool animated, bool fast = false);
Internals\AsyncValue.cs (3)
40 readonly Task<T> _valueTask; 43 public AsyncValue(Task<T> valueTask, T defaultValue = default(T)) 97 public static AsyncValue<T> AsAsyncValue<T>(this Task<T> valueTask, T defaultValue = default(T)) =>
Internals\EvalRequested.cs (1)
9 public delegate Task<string> EvaluateJavaScriptDelegate(string script);
Internals\ImageParser.cs (5)
96 public async Task<int> ReadAsync(byte[] buffer, int toRead) 120 public async Task<int> ReadBlockAsync() 200 public static async Task<GIFColorTable> CreateColorTableAsync(GIFDecoderStreamReader stream, short size) 270 public static async Task<GIFHeader> CreateHeaderAsync(GIFDecoderStreamReader stream, bool skipTypeIdentifier = false) 551 public static async Task<GIFBitmap> CreateBitmapAsync(GIFDecoderStreamReader stream, GIFHeader header, GIFBitmapDecoder decoder, GIFBitmap previousBitmap, bool ignoreImageData = false)
Internals\NavigationRequestedEventArgs.cs (1)
30 public Task<bool> Task { get; set; }
NavigationPage\NavigationPage.cs (3)
208 public Task<Page> PopAsync() 214 public async Task<Page> PopAsync(bool animated) 773 protected async override Task<Page> OnPopAsync(bool animated)
NavigationPage\NavigationPage.Legacy.cs (5)
17 async Task<Page> PopAsyncInner( 34 async Task<Page> RemoveAsyncInner( 75 Task<Page> INavigationPageController.PopAsyncInner(bool animated, bool fast) 80 Task<Page> INavigationPageController.RemoveAsyncInner(Page page, bool animated, bool fast) 278 protected override Task<Page> OnPopAsync(bool animated)
NavigationProxy.cs (6)
89 public Task<Page> PopAsync() 95 public Task<Page> PopAsync(bool animated) 101 public Task<Page> PopModalAsync() 107 public Task<Page> PopModalAsync(bool animated) 186 protected virtual Task<Page> OnPopAsync(bool animated) 192 protected virtual Task<Page> OnPopModal(bool animated)
Page\Page.cs (5)
278 public Task<string> DisplayActionSheet(string title, string cancel, string destruction, params string[] buttons) 293 public Task<string> DisplayActionSheet(string title, string cancel, string destruction, FlowDirection flowDirection, params string[] buttons) 316 public Task<bool> DisplayAlert(string title, string message, string accept, string cancel) 338 public Task<bool> DisplayAlert(string title, string message, string accept, string cancel, FlowDirection flowDirection) 368 public Task<string> DisplayPromptAsync(string title, string message, string accept = "OK", string cancel = "Cancel", string placeholder = null, int maxLength = -1, Keyboard keyboard = default(Keyboard), string initialValue = "")
Platform\ModalNavigationManager\ModalNavigationManager.cs (2)
74 public Task<Page?> PopModalAsync() 198 public async Task<Page?> PopModalAsync(bool animated)
Platform\ModalNavigationManager\ModalNavigationManager.Standard.cs (1)
11 Task<Page> PopModalPlatformAsync(bool animated)
ProgressBar\ProgressBar.cs (1)
44 public Task<bool> ProgressTo(double value, uint length, Easing easing)
Shell\Shell.cs (3)
2090 protected override Task<Page> OnPopAsync(bool animated) => SectionProxy.PopAsync(animated); 2098 protected override async Task<Page> OnPopModal(bool animated) 2150 protected override Task<Page> OnPopModal(bool animated) => _shellProxy.PopModalAsync(animated);
Shell\ShellNavigatingEventArgs.cs (1)
99 internal Task<bool> DeferredTask => _deferredTaskCompletionSource?.Task;
Shell\ShellSection.cs (4)
771 protected async virtual Task<Page> OnPopAsync(bool animated) 1062 protected override async Task<Page> OnPopAsync(bool animated) 1134 internal Task<Page> PopModalInnerAsync(bool animated) 1162 protected async override Task<Page> OnPopModal(bool animated)
StreamImageSource.cs (5)
13 public static readonly BindableProperty StreamProperty = BindableProperty.Create(nameof(Stream), typeof(Func<CancellationToken, Task<Stream>>), typeof(StreamImageSource), 14 default(Func<CancellationToken, Task<Stream>>)); 20 public virtual Func<CancellationToken, Task<Stream>> Stream 22 get { return (Func<CancellationToken, Task<Stream>>)GetValue(StreamProperty); } 33 async Task<Stream> IStreamImageSource.GetStreamAsync(CancellationToken userToken)
StreamWrapper.cs (1)
93 public static async Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken, HttpClient client)
TemplateUtilities.cs (2)
11 public static async Task<Element> FindTemplatedParentAsync(Element element) 35 public static Task<Element> GetRealParentAsync(Element element)
UriImageSource.cs (3)
54 async Task<Stream> IStreamImageSource.GetStreamAsync(CancellationToken userToken) 88 async Task<Stream> GetStreamAsync(Uri uri, CancellationToken cancellationToken = default(CancellationToken)) 113 async Task<Stream> DownloadStreamAsync(Uri uri, CancellationToken cancellationToken)
ViewExtensions.cs (12)
38 static Task<bool> AnimateTo(this VisualElement view, double start, double end, string name, 71 public static Task<bool> FadeTo(this VisualElement view, double opacity, uint length = 250, Easing? easing = null) 89 public static Task<bool> LayoutTo(this VisualElement view, Rect bounds, uint length = 250, Easing? easing = null) 117 public static Task<bool> RelRotateTo(this VisualElement view, double drotation, uint length = 250, Easing? easing = null) 135 public static Task<bool> RelScaleTo(this VisualElement view, double dscale, uint length = 250, Easing? easing = null) 153 public static Task<bool> RotateTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 171 public static Task<bool> RotateXTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 189 public static Task<bool> RotateYTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 206 public static Task<bool> ScaleTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 224 public static Task<bool> ScaleXTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 242 public static Task<bool> ScaleYTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 261 public static Task<bool> TranslateTo(this VisualElement view, double x, double y, uint length = 250, Easing? easing = null)
WebView\WebView.cs (1)
120 public async Task<string> EvaluateJavaScriptAsync(string script)
Window\Window.cs (2)
710 protected override Task<Page> OnPopAsync(bool animated) 730 protected override Task<Page?> OnPopModal(bool animated)
Microsoft.Maui.Controls.Foldable (2)
DualScreenInfo.cs (1)
233 public Task<int> GetHingeAngleAsync() => FoldableService?.GetHingeAngleAsync() ?? Task.FromResult(0);
NoPlatformFoldableService.cs (1)
28 public Task<int> GetHingeAngleAsync() => Task.FromResult(0);
Microsoft.Maui.Essentials (150)
AppActions\AppActions.netstandard.tvos.watchos.macos.tizen.cs (1)
12 public Task<IEnumerable<AppAction>> GetAsync() =>
AppActions\AppActions.shared.cs (2)
22 Task<IEnumerable<AppAction>> GetAsync(); 87 public static Task<IEnumerable<AppAction>> GetAsync()
Browser\Browser.netstandard.tvos.watchos.cs (1)
9 public Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options) =>
Browser\Browser.shared.cs (12)
18 Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options); 31 public static Task<bool> OpenAsync(string uri) => Default.OpenAsync(uri); 39 public static Task<bool> OpenAsync(string uri, BrowserLaunchMode launchMode) => Default.OpenAsync(uri, launchMode); 47 public static Task<bool> OpenAsync(string uri, BrowserLaunchOptions options) => Default.OpenAsync(uri, options); 54 public static Task<bool> OpenAsync(Uri uri) => Default.OpenAsync(uri); 62 public static Task<bool> OpenAsync(Uri uri, BrowserLaunchMode launchMode) => Default.OpenAsync(uri, launchMode); 70 public static Task<bool> OpenAsync(Uri uri, BrowserLaunchOptions options) => Default.OpenAsync(uri, options); 95 public static Task<bool> OpenAsync(this IBrowser browser, string uri) => 105 public static Task<bool> OpenAsync(this IBrowser browser, string uri, BrowserLaunchMode launchMode) => 115 public static Task<bool> OpenAsync(this IBrowser browser, string uri, BrowserLaunchOptions options) => 124 public static Task<bool> OpenAsync(this IBrowser browser, Uri uri) => 134 public static Task<bool> OpenAsync(this IBrowser browser, Uri uri, BrowserLaunchMode launchMode) =>
Clipboard\Clipboard.netstandard.tvos.watchos.tizen.cs (1)
14 public Task<string?> GetTextAsync()
Clipboard\Clipboard.shared.cs (2)
29 Task<string?> GetTextAsync(); 61 public static Task<string?> GetTextAsync()
Contacts\Contacts.netstandard.tvos.watchos.cs (2)
9 public Task<Contact> PickContactAsync() => 12 public Task<IEnumerable<Contact>> GetAllAsync(CancellationToken cancellationToken) =>
Contacts\Contacts.shared.cs (4)
17 Task<Contact?> PickContactAsync(); 24 Task<IEnumerable<Contact>> GetAllAsync(CancellationToken cancellationToken = default); 36 public static Task<Contact?> PickContactAsync() => 44 public static Task<IEnumerable<Contact>> GetAllAsync(CancellationToken cancellationToken = default) =>
FilePicker\FilePicker.netstandard.watchos.tvos.cs (1)
9 Task<IEnumerable<FileResult>> PlatformPickAsync(PickOptions options, bool allowMultiple = false)
FilePicker\FilePicker.shared.cs (6)
30 Task<FileResult?> PickAsync(PickOptions? options = null); 44 Task<IEnumerable<FileResult>> PickMultipleAsync(PickOptions? options = null); 65 public static Task<FileResult?> PickAsync(PickOptions? options = null) => 80 public static Task<IEnumerable<FileResult>> PickMultipleAsync(PickOptions? options = null) => 97 public async Task<FileResult?> PickAsync(PickOptions? options = null) => 100 public Task<IEnumerable<FileResult>> PickMultipleAsync(PickOptions? options = null) =>
FileSystem\FileSystem.netstandard.cs (3)
15 Task<Stream> PlatformOpenAppPackageFileAsync(string filename) 18 Task<bool> PlatformAppPackageFileExistsAsync(string filename) 30 internal virtual Task<Stream> PlatformOpenReadAsync()
FileSystem\FileSystem.shared.cs (7)
30 Task<Stream> OpenAppPackageFileAsync(string filename); 37 Task<bool> AppPackageFileExistsAsync(string filename); 64 public static Task<Stream> OpenAppPackageFileAsync(string filename) 72 public static Task<bool> AppPackageFileExistsAsync(string filename) 101 public Task<Stream> OpenAppPackageFileAsync(string filename) 105 public Task<bool> AppPackageFileExistsAsync(string filename) 281 public Task<Stream> OpenReadAsync()
Flashlight\Flashlight.netstandard.tvos.watchos.macos.cs (1)
12 public Task<bool> IsSupportedAsync() => Task.FromResult(false);
Flashlight\Flashlight.shared.cs (2)
15 Task<bool> IsSupportedAsync(); 39 public static Task<bool> IsSupportedAsync() => Default.IsSupportedAsync();
Geocoding\Geocoding.netstandard.cs (2)
9 public Task<IEnumerable<Placemark>> GetPlacemarksAsync(double latitude, double longitude) => 12 public Task<IEnumerable<Location>> GetLocationsAsync(string address) =>
Geocoding\Geocoding.shared.cs (6)
19 Task<IEnumerable<Placemark>> GetPlacemarksAsync(double latitude, double longitude); 26 Task<IEnumerable<Location>> GetLocationsAsync(string address); 53 public static Task<IEnumerable<Placemark>> GetPlacemarksAsync(Location location) => 62 public static Task<IEnumerable<Placemark>> GetPlacemarksAsync(double latitude, double longitude) => 70 public static Task<IEnumerable<Location>> GetLocationsAsync(string address) => 99 public static Task<IEnumerable<Placemark>> GetPlacemarksAsync(this IGeocoding geocoding, Location location)
Geolocation\Geolocation.netstandard.tvos.watchos.cs (3)
11 public Task<Location?> GetLastKnownLocationAsync() => 14 public Task<Location?> GetLocationAsync(GeolocationRequest request, CancellationToken cancellationToken) => 19 public Task<bool> StartListeningForegroundAsync(GeolocationListeningRequest request) =>
Geolocation\Geolocation.shared.cs (10)
22 Task<Location?> GetLastKnownLocationAsync(); 31 Task<Location?> GetLocationAsync(GeolocationRequest request, CancellationToken cancelToken); 60 Task<bool> StartListeningForegroundAsync(GeolocationListeningRequest request); 82 public static Task<Location?> GetLastKnownLocationAsync() => 90 public static Task<Location?> GetLocationAsync() => 99 public static Task<Location?> GetLocationAsync(GeolocationRequest request) => 109 public static Task<Location?> GetLocationAsync(GeolocationRequest request, CancellationToken cancelToken) => 148 public static Task<bool> StartListeningForegroundAsync(GeolocationListeningRequest request) => 200 public static Task<Location?> GetLocationAsync(this IGeolocation geolocation) => 210 public static Task<Location?> GetLocationAsync(this IGeolocation geolocation, GeolocationRequest request) =>
Launcher\Launcher.netstandard.watchos.cs (4)
8 Task<bool> PlatformCanOpenAsync(Uri uri) => 11 Task<bool> PlatformOpenAsync(Uri uri) => 14 Task<bool> PlatformOpenAsync(OpenFileRequest request) => 17 Task<bool> PlatformTryOpenAsync(Uri uri) =>
Launcher\Launcher.shared.cs (18)
25 Task<bool> CanOpenAsync(Uri uri); 33 Task<bool> OpenAsync(Uri uri); 40 Task<bool> OpenAsync(OpenFileRequest request); 48 Task<bool> TryOpenAsync(Uri uri); 67 public static Task<bool> CanOpenAsync(string uri) 76 public static Task<bool> CanOpenAsync(Uri uri) 85 public static Task<bool> OpenAsync(string uri) 94 public static Task<bool> OpenAsync(Uri uri) 102 public static Task<bool> OpenAsync(OpenFileRequest request) 111 public static Task<bool> TryOpenAsync(string uri) 120 public static Task<bool> TryOpenAsync(Uri uri) 139 public Task<bool> CanOpenAsync(Uri uri) 147 public Task<bool> OpenAsync(Uri uri) 155 public Task<bool> OpenAsync(OpenFileRequest request) 165 public Task<bool> TryOpenAsync(Uri uri) 186 public static Task<bool> CanOpenAsync(this ILauncher launcher, string uri) => 196 public static Task<bool> OpenAsync(this ILauncher launcher, string uri) => 206 public static Task<bool> TryOpenAsync(this ILauncher launcher, string uri) =>
MainThread\MainThread.shared.cs (4)
71 public static Task<T> InvokeOnMainThreadAsync<T>(Func<T> func) 133 public static Task<T> InvokeOnMainThreadAsync<T>(Func<Task<T>> funcTask) 163 public static async Task<SynchronizationContext> GetMainThreadSynchronizationContextAsync()
Map\Map.netstandard.tvos.cs (2)
14 public Task<bool> TryOpenAsync(double latitude, double longitude, MapLaunchOptions options) 17 public Task<bool> TryOpenAsync(Placemark placemark, MapLaunchOptions options)
Map\Map.shared.cs (12)
38 Task<bool> TryOpenAsync(double latitude, double longitude, MapLaunchOptions options); 47 Task<bool> TryOpenAsync(Placemark placemark, MapLaunchOptions options); 114 public static Task<bool> TryOpenAsync(Location location) => 124 public static Task<bool> TryOpenAsync(Location location, MapLaunchOptions options) => 134 public static Task<bool> TryOpenAsync(double latitude, double longitude) => 145 public static Task<bool> TryOpenAsync(double latitude, double longitude, MapLaunchOptions options) => 154 public static Task<bool> TryOpenAsync(Placemark placemark) => 164 public static Task<bool> TryOpenAsync(Placemark placemark, MapLaunchOptions options) => 222 public static Task<bool> TryOpenAsync(this IMap map, Location location) => 234 public static Task<bool> TryOpenAsync(this IMap map, Location location, MapLaunchOptions options) 272 public static Task<bool> TryOpenAsync(this IMap map, double latitude, double longitude) => 282 public static Task<bool> TryOpenAsync(this IMap map, Placemark placemark) =>
MediaPicker\MediaPicker.netstandard.watchos.tvos.cs (4)
14 public Task<FileResult> PickPhotoAsync(MediaPickerOptions options) => 17 public Task<FileResult> CapturePhotoAsync(MediaPickerOptions options) => 20 public Task<FileResult> PickVideoAsync(MediaPickerOptions options) => 23 public Task<FileResult> CaptureVideoAsync(MediaPickerOptions options) =>
MediaPicker\MediaPicker.shared.cs (8)
22 Task<FileResult?> PickPhotoAsync(MediaPickerOptions? options = null); 29 Task<FileResult?> CapturePhotoAsync(MediaPickerOptions? options = null); 36 Task<FileResult?> PickVideoAsync(MediaPickerOptions? options = null); 43 Task<FileResult?> CaptureVideoAsync(MediaPickerOptions? options = null); 62 public static Task<FileResult?> PickPhotoAsync(MediaPickerOptions? options = null) => 70 public static Task<FileResult?> CapturePhotoAsync(MediaPickerOptions? options = null) => 78 public static Task<FileResult?> PickVideoAsync(MediaPickerOptions? options = null) => 86 public static Task<FileResult?> CaptureVideoAsync(MediaPickerOptions? options = null) =>
Permissions\Permissions.netstandard.cs (2)
20 public override Task<PermissionStatus> CheckStatusAsync() => 24 public override Task<PermissionStatus> RequestAsync() =>
Permissions\Permissions.shared.cs (4)
20 public static Task<PermissionStatus> CheckStatusAsync<TPermission>() 34 public static Task<PermissionStatus> RequestAsync<TPermission>() 91 public abstract Task<PermissionStatus> CheckStatusAsync(); 102 public abstract Task<PermissionStatus> RequestAsync();
Screenshot\Screenshot.netstandard.watchos.macos.cs (3)
12 public Task<IScreenshotResult> CaptureAsync() => 22 Task<Stream> PlatformOpenReadAsync(ScreenshotFormat format, int quality) => 28 Task<byte[]> PlatformToPixelBufferAsync() =>
Screenshot\Screenshot.shared.cs (4)
23 Task<IScreenshotResult> CaptureAsync(); 120 Task<Stream> OpenReadAsync(ScreenshotFormat format = ScreenshotFormat.Png, int quality = 100); 148 public static Task<IScreenshotResult> CaptureAsync() 290 public Task<Stream> OpenReadAsync(ScreenshotFormat format = ScreenshotFormat.Png, int quality = 100)
SecureStorage\SecureStorage.netstandard.cs (1)
8 Task<string> PlatformGetAsync(string key) =>
SecureStorage\SecureStorage.shared.cs (3)
17 Task<string?> GetAsync(string key); 87 public static Task<string?> GetAsync(string key) => 210 public Task<string?> GetAsync(string key)
TextToSpeech\TextToSpeech.netstandard.cs (1)
13 Task<IEnumerable<Locale>> PlatformGetLocalesAsync() =>
TextToSpeech\TextToSpeech.shared.cs (3)
19 Task<IEnumerable<Locale>> GetLocalesAsync(); 41 public static Task<IEnumerable<Locale>> GetLocalesAsync() => 153 public Task<IEnumerable<Locale>> GetLocalesAsync() =>
Types\Shared\Utils.shared.cs (3)
34 internal static async Task<T> WithTimeout<T>(Task<T> task, TimeSpan timeSpan) 39 return retTask is Task<T> ? task.Result : default(T);
WebAuthenticator\AppleSignInAuthenticator.netstandard.android.tvos.watchos.uwp.tizen.macos.cs (1)
8 public Task<WebAuthenticatorResult> AuthenticateAsync(AppleSignInAuthenticator.Options options) =>
WebAuthenticator\AppleSignInAuthenticator.shared.cs (2)
16 Task<WebAuthenticatorResult> AuthenticateAsync(AppleSignInAuthenticator.Options? options = null); 30 public static Task<WebAuthenticatorResult> AuthenticateAsync(AppleSignInAuthenticator.Options? options = null)
WebAuthenticator\WebAuthenticator.netstandard.watchos.tizen.cs (1)
11 public Task<WebAuthenticatorResult> AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions)
WebAuthenticator\WebAuthenticator.shared.cs (4)
27 Task<WebAuthenticatorResult> AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions); 81 public static Task<WebAuthenticatorResult> AuthenticateAsync(Uri url, Uri callbackUrl) 90 public static Task<WebAuthenticatorResult> AuthenticateAsync(WebAuthenticatorOptions webAuthenticatorOptions) 131 public static Task<WebAuthenticatorResult> AuthenticateAsync(this IWebAuthenticator webAuthenticator, Uri url, Uri callbackUrl) =>
Microsoft.Maui.Graphics (4)
ImageExtensions.cs (1)
33 public static async Task<byte[]> AsBytesAsync(this IImage target, ImageFormat format = ImageFormat.Png, float quality = 1)
PdfPageExtensions.cs (1)
33 public static async Task<byte[]> AsBytesAsync(this IPdfPage target)
PictureReaderExtensions.cs (1)
20 public static async Task<IPicture> ReadAsync(this IPictureReader target, Stream stream, string hash = null)
PictureWriterExtensions.cs (1)
21 public static async Task<byte[]> SaveAsBytesAsync(this IPictureWriter target, IPicture picture)
Microsoft.Maui.Graphics.Win2D.WinUI.Desktop (2)
src\Graphics\src\Graphics\Platforms\Windows\AsyncPump.cs (2)
58 public static T Run<T>(Func<Task<T>> asyncMethod) 71 var t = asyncMethod();
Microsoft.Maui.Maps (2)
src\Core\src\TaskExtensions.cs (2)
12 this Task<TResult> task, 64 public static async void RunAndReport<T>(this TaskCompletionSource<T> request, Task<T> task)
Microsoft.Maui.Resizetizer (1)
AsyncTaskExtensions.cs (1)
47 public static Task<TSource> RunTask<TSource>(this MauiAsyncTask asyncTask, Func<TSource> body) =>
Microsoft.ML.AutoML (6)
API\BinaryClassificationExperiment.cs (1)
448public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
API\MulticlassClassificationExperiment.cs (1)
426public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
API\RegressionExperiment.cs (1)
380public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
AutoMLExperiment\AutoMLExperiment.cs (1)
214public async Task<TrialResult> RunAsync(CancellationToken ct = default)
AutoMLExperiment\Runner\ITrialRunner.cs (1)
19Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct);
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
94public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
Microsoft.ML.AutoML.Tests (1)
AutoMLExperimentTests.cs (1)
445public async Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
Microsoft.ML.Core (8)
Utilities\ResourceManagerUtils.cs (7)
108public async Task<ResourceDownloadResults> EnsureResourceAsync(IHostEnvironment env, IChannel ch, string relativeUrl, string fileName, string dir, int timeout) 125private async Task<string> DownloadFromUrlWithRetryAsync(IHostEnvironment env, IChannel ch, string url, string fileName, 155private async Task<string> DownloadFromUrlAsync(IHostEnvironment env, IChannel ch, string url, string fileName, int timeout, string filePath) 160var t = Task.Run(() => DownloadResource(env, ch, client, new Uri(url), filePath, fileName, downloadCancel.Token)); 163var timeoutTask = Task.Delay(timeout).ContinueWith(task => default(Exception), TaskScheduler.Default); 165var completedTask = await Task.WhenAny(t, timeoutTask); 249private async Task<Exception> DownloadResource(IHostEnvironment env, IChannel ch, HttpClient httpClient, Uri uri, string path, string fileName, CancellationToken ct)
Utilities\TaskExtensions.cs (1)
14public static TResult CompletedResult<TResult>(this Task<TResult> task)
Microsoft.ML.Core.Tests (1)
UnitTests\TestResourceDownload.cs (1)
117var t = ResourceManagerUtils.Instance.EnsureResourceAsync(env, ch, "text/Sswe/sentiment.emd", fileName, saveToDir, 1 * 60 * 1000);
Microsoft.ML.Data (2)
Commands\CrossValidationCommand.cs (2)
455public Task<FoldResult>[] GetCrossValidationTasks() 457var tasks = new Task<FoldResult>[_numFolds];
Microsoft.ML.Fairlearn (1)
Reductions\GridSearchTrialRunner.cs (1)
50public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
36public virtual Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.LLaMA (4)
Llama3CausalLMChatClient.cs (1)
27public override Task<ChatResponse> GetResponseAsync(
LlamaCausalLMAgent.cs (1)
40public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
LlamaChatCompletionService.cs (1)
33public async Task<IReadOnlyList<ChatMessageContent>> GetChatMessageContentsAsync(ChatHistory chatHistory, PromptExecutionSettings? executionSettings = null, Kernel? kernel = null, CancellationToken cancellationToken = default)
LlamaTextCompletionService.cs (1)
61public Task<IReadOnlyList<TextContent>> GetTextContentsAsync(string prompt, PromptExecutionSettings? executionSettings = null, Kernel? kernel = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
44public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Phi (4)
Phi3\Phi3CausalLMAgent.cs (1)
38public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Phi3\Phi3CausalLMChatClient.cs (1)
32public override Task<ChatResponse> GetResponseAsync(
Phi3\Phi3CausalLMChatCompletionService.cs (1)
32public async Task<IReadOnlyList<ChatMessageContent>> GetChatMessageContentsAsync(
Phi3\Phi3CausalLMTextGenerationService.cs (1)
31public Task<IReadOnlyList<TextContent>> GetTextContentsAsync(string prompt, PromptExecutionSettings? executionSettings = null, Kernel? kernel = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Samples (2)
Mistral\Mistral_7B_Instruct.cs (2)
22public Task<string> GetWeather(string city) 135functionMap: new Dictionary<string, Func<string, Task<string>>>
Microsoft.ML.InternalCodeAnalyzer (3)
ContractsCheckNameofFixProvider.cs (2)
167private async Task<Document> StringReplaceAsync(Document document, string name, ArgumentSyntax nameArg, CancellationToken cancellationToken) 176private async Task<Document> ExpressionReplaceAsync(Document document, SyntaxNode exp, ArgumentSyntax nameArg, CancellationToken cancellationToken)
NameFixProvider.cs (1)
102private async Task<Solution> RenameAsync(Document document,
Microsoft.ML.PerformanceTests (1)
BenchmarkBase.cs (1)
53var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(
Microsoft.ML.Samples (6)
Dynamic\TensorFlow\ImageClassification.cs (2)
28var downloadTask = Download(@"https://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/resnet_v2_101.tgz", @"resnet_v2_101_299_frozen.tgz"); 118private static async Task<string> Download(string baseGitPath, string dataFile)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
255public static async Task<bool> Download(string url, string destDir, string destFileName)
Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
287public static async Task<bool> Download(string url, string destDir, string destFileName)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
243public static async Task<bool> Download(string url, string destDir, string destFileName)
Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
264public static async Task<bool> Download(string url, string destDir, string destFileName)
Microsoft.ML.Samples.GPU (6)
docs\samples\Microsoft.ML.Samples\Dynamic\TensorFlow\ImageClassification.cs (2)
28var downloadTask = Download(@"https://storage.googleapis.com/download.tensorflow.org/models/tflite_11_05_08/resnet_v2_101.tgz", @"resnet_v2_101_299_frozen.tgz"); 118private static async Task<string> Download(string baseGitPath, string dataFile)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ImageClassificationDefault.cs (1)
255public static async Task<bool> Download(string url, string destDir, string destFileName)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
287public static async Task<bool> Download(string url, string destDir, string destFileName)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningEarlyStopping.cs (1)
243public static async Task<bool> Download(string url, string destDir, string destFileName)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
264public static async Task<bool> Download(string url, string destDir, string destFileName)
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
191private static async Task<string> Download(string baseGitPath, string dataFile)
Microsoft.ML.Sweeper (3)
AsyncSweeper.cs (3)
50Task<ParameterSetWithId> ProposeAsync(); 111public Task<ParameterSetWithId> ProposeAsync() 276public async Task<ParameterSetWithId> ProposeAsync()
Microsoft.ML.Sweeper.Tests (11)
TestSweeper.cs (11)
148var task = sweeper.ProposeAsync(); 170var task = gridSweeper.ProposeAsync(); 203var tasks = new List<Task<ParameterSetWithId>>(); 207var task = sweeper.ProposeAsync(); 221foreach (var task in tasks) 257var task = sweeper.ProposeAsync(); 268var tasks = new Task<ParameterSetWithId>[sweeps]; 275var task = sweeper.ProposeAsync(); 286var task = sweeper.ProposeAsync(); 331var r = Task.Run(() => Parallel.For(0, sweeps, options, async (int i) => 333var task = sweeper.ProposeAsync();
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
214var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(env, ch, url, fileName, dir, timeout);
Microsoft.ML.TensorFlow.Tests (1)
TensorflowTests.cs (1)
1988var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(_mlContext, ch, url, destFileName, destDir, timeout);
Microsoft.ML.TestFramework (1)
TestCommandBase.cs (1)
999var t = new Task<int>[2];
Microsoft.ML.Tokenizers (10)
Model\BertTokenizer.cs (2)
692public static async Task<BertTokenizer> CreateAsync( 717public static async Task<BertTokenizer> CreateAsync(
Model\BPETokenizer.cs (1)
257public static async Task<BpeTokenizer> CreateAsync(
Model\TiktokenTokenizer.cs (3)
1317public static async Task<TiktokenTokenizer> CreateAsync( 1349public static async Task<TiktokenTokenizer> CreateAsync( 1414public static async Task<TiktokenTokenizer> CreateForModelAsync(
Model\WordPieceTokenizer.cs (3)
187public static async Task<WordPieceTokenizer> CreateAsync( 208public static async Task<WordPieceTokenizer> CreateAsync( 214private static async Task<WordPieceTokenizer> CreateAsync(
Utils\Helpers.netstandard.cs (1)
27public static async Task<Stream> GetStreamAsync(HttpClient client, string url, CancellationToken cancellationToken = default)
Microsoft.ML.Tokenizers.Tests (1)
src\Microsoft.ML.Tokenizers\Utils\Helpers.netcoreapp.cs (1)
26public static Task<Stream> GetStreamAsync(HttpClient client, string url, CancellationToken cancellationToken = default) =>
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
271var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout);
Roberta\QATrainer.cs (1)
255var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout);
TorchSharpBaseTrainer.cs (1)
181var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, modelUrl, destFileName, destDir, timeout);
Microsoft.ML.Transforms (1)
Text\WordEmbeddingsExtractor.cs (1)
634var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(env, ch, url, modelFileName, dir, Timeout);
Microsoft.Svcutil.NamedPipeMetadataImporter (1)
NamedPipeMetadataImporter.cs (1)
30public async Task<XmlReader> GetMetadatadataAsync(Uri uri)
Microsoft.TestUtilities (1)
XUnit\SkippedFactTestCase.cs (1)
26public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
Microsoft.VisualBasic.Tests (2)
Microsoft\VisualBasic\ApplicationServices\SingleInstanceTests.cs (2)
214var task = Task.Factory.StartNew(() => SendSecondInstanceArgs(pipeName, timeout: 300, []), cancellationToken: TestContext.Current.CancellationToken, creationOptions: default, scheduler: TaskScheduler.Default); 229var task = Task.Factory.StartNew(() => SendSecondInstanceArgs(pipeName, SendTimeout, ["1", "ABC"]), cancellationToken: TestContext.Current.CancellationToken, creationOptions: default, scheduler: TaskScheduler.Default);
Microsoft.VisualStudio.LanguageServices (210)
CallHierarchy\CallHierarchyProvider.cs (2)
54public async Task<CallHierarchyItem> CreateItemAsync( 100public async Task<ImmutableArray<AbstractCallFinder>> CreateFindersAsync(ISymbol symbol, Project project, CancellationToken cancellationToken)
CallHierarchy\Finders\AbstractCallFinder.cs (1)
180protected abstract Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken);
CallHierarchy\Finders\BaseMemberFinder.cs (1)
27protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\CallToOverrideFinder.cs (1)
23protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\FieldReferenceFinder.cs (1)
30protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\ImplementerFinder.cs (1)
33protected override Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\InterfaceImplementationCallFinder.cs (1)
30protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\MethodCallFinder.cs (1)
33protected override async Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CallHierarchy\Finders\OverridingMemberFinder.cs (1)
29protected override Task<IEnumerable<SymbolCallerInfo>> GetCallersAsync(ISymbol symbol, Project project, IImmutableSet<Document> documents, CancellationToken cancellationToken)
CodeCleanup\AbstractCodeCleanUpFixer.cs (8)
44public Task<bool> FixAsync(ICodeCleanUpScope scope, ICodeCleanUpExecutionContext context) 52private async Task<bool> FixHierarchyContentAsync(IVsHierarchyCodeCleanupScope hierarchyContent, ICodeCleanUpExecutionContext context) 139private Task<bool> FixTextBufferAsync(TextBufferCodeCleanUpScope textBufferScope, ICodeCleanUpExecutionContext context) 158async Task<Solution> ApplyFixAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 168private async Task<bool> FixAsync( 170Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> applyFixAsync, 193private static async Task<Solution> FixProjectsAsync( 237private static async Task<Document> FixDocumentAsync(
CodeDefinitionWindow\VisualStudioCodeDefinitionWindowService.cs (1)
33public async Task<bool> IsWindowOpenAsync(CancellationToken cancellationToken)
CodeLens\CodeLensCallbackListener.cs (8)
64public async Task<ImmutableDictionary<Guid, string>> GetProjectVersionsAsync(ImmutableArray<Guid> projectGuids, CancellationToken cancellationToken) 83public async Task<ReferenceCount?> GetReferenceCountAsync( 115public async Task<(string projectVersion, ImmutableArray<ReferenceLocationDescriptor> references)?> FindReferenceLocationsAsync( 143public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync( 157public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync( 172private async Task<(DocumentId?, SyntaxNode?)> GetDocumentIdAndNodeAsync( 195private async Task<int> GetMaxResultCapAsync(CancellationToken cancellationToken) 233private async Task<Document?> GetDocumentAsync(
CodeLens\RemoteCodeLensReferencesService.cs (6)
41public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, 66public async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 87public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 112public async Task<string?> GetFullyQualifiedNameAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 137private async Task<ImmutableArray<ReferenceLocationDescriptor>> FixUpDescriptorsAsync( 252private static async Task<ImmutableArray<ReferenceLocationDescriptor>?> FindReferenceLocationsWorkerAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode,
ColorSchemes\ColorSchemeApplier.cs (1)
122private async Task<ColorSchemeName?> TryGetUpdatedColorSchemeAsync(CancellationToken cancellationToken)
ColorSchemes\ColorSchemeApplier.Settings.cs (1)
88public async Task<ColorSchemeName> GetAppliedColorSchemeAsync(CancellationToken cancellationToken)
CommonControls\MemberSelectionViewModel.cs (2)
22private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>>? _symbolToDependentsMap; 28ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>>? dependentsMap,
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
281private async Task<IProjectItemDesignerTypeUpdateService?> GetUpdateServiceIfCpsProjectAsync(
Diagnostics\IVisualStudioDiagnosticAnalyzerProviderFactory.cs (1)
15Task<VisualStudioDiagnosticAnalyzerProvider> GetOrCreateProviderAsync(CancellationToken cancellationToken);
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.Factory.cs (1)
34public async Task<VisualStudioDiagnosticAnalyzerProvider> GetOrCreateProviderAsync(CancellationToken cancellationToken)
DocumentOutline\DocumentOutlineViewModel.cs (1)
426private async Task<(ImmutableArray<DocumentSymbolData> documentSymbolData, ITextSnapshot newTextSnapshot)> ComputeDocumentSymbolDataAsync(CancellationToken cancellationToken)
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (2)
21internal delegate Task<TResponse?> LanguageServiceBrokerCallback<TRequest, TResponse>(Request<TRequest, TResponse> request, CancellationToken cancellationToken); 29public static async Task<(RoslynDocumentSymbol[] response, ITextSnapshot snapshot)?> DocumentSymbolsRequestAsync(
EditorConfigSettings\Analyzers\View\AnalyzerSettingsView.xaml.cs (1)
29public Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText) => _viewModel.UpdateEditorConfigAsync(sourceText);
EditorConfigSettings\CodeStyle\View\CodeStyleSettingsView.xaml.cs (1)
30public Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText) => _viewModel.UpdateEditorConfigAsync(sourceText);
EditorConfigSettings\Common\SettingsViewModelBase.cs (1)
90public Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText) => _data.GetChangedEditorConfigAsync(sourceText);
EditorConfigSettings\ISettingsEditorView.cs (1)
16Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText);
EditorConfigSettings\NamingStyle\View\NamingStyleSettingsView.xaml.cs (1)
30public Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText) => _viewModel.UpdateEditorConfigAsync(sourceText);
EditorConfigSettings\Whitespace\View\WhitespaceSettingsView.xaml.cs (1)
29public Task<SourceText> UpdateEditorConfigAsync(SourceText sourceText) => _viewModel.UpdateEditorConfigAsync(sourceText);
ErrorReporting\VisualStudioInfoBar.cs (2)
63public async Task<InfoBarMessage?> ShowInfoBarMessageAsync( 137private async Task<object?> GetInfoBarHostObjectAsync()
Extensions\VsTextSpanExtensions.cs (1)
16public static async Task<VsTextSpan?> MapSpanFromSecondaryBufferToPrimaryBufferAsync(
ExternalAccess\ProjectSystem\Api\IProjectSystemReferenceCleanupService.cs (2)
18Task<ImmutableArray<ProjectSystemReferenceInfo>> GetProjectReferencesAsync( 27Task<bool> TryUpdateReferenceAsync(
ExternalAccess\ProjectSystem\Api\IProjectSystemReferenceCleanupService2.cs (1)
17Task<IProjectSystemUpdateReferenceOperation> GetUpdateReferenceOperationAsync(
ExternalAccess\ProjectSystem\Api\IProjectSystemUpdateReferenceOperation.cs (2)
18Task<bool> ApplyAsync(CancellationToken cancellationToken); 25Task<bool> RevertAsync(CancellationToken cancellationToken);
ExtractClass\ExtractClassViewModel.cs (1)
26ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> memberToDependentsMap,
F1Help\AbstractHelpContextService.cs (1)
44public abstract Task<string> GetHelpTermAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken);
F1Help\IHelpContextService.cs (1)
18Task<string> GetHelpTermAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken);
FindReferences\Contexts\AbstractTableDataSourceFindUsagesContext.cs (3)
403protected async Task<Entry?> TryCreateDefinitionEntryAsync( 430protected async Task<Entry?> TryCreateDocumentSpanEntryAsync( 468private async Task<(ExcerptResult, SourceText)> ExcerptAsync(
FindReferences\Contexts\WithReferencesFindUsagesContext.cs (1)
142Func<RoslynDefinitionBucket, Task<Entry?>> createEntryAsync,
FindReferences\Entries\AbstractDocumentSpanEntry.cs (1)
81public static async Task<MappedSpanResult?> TryMapAndGetFirstAsync(DocumentSpan documentSpan, SourceText sourceText, CancellationToken cancellationToken)
FindReferences\Entries\SimpleMessageEntry.cs (1)
30public static Task<Entry> CreateAsync(
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (2)
31public async Task<DefinitionItem?> GetThirdPartyDefinitionItemAsync( 92public override Task<INavigableLocation?> GetNavigableLocationAsync(Workspace workspace, CancellationToken cancellationToken)
Implementation\AbstractVsTextViewFilter.cs (5)
44private async Task<(string pbstrText, int result)> GetDataTipTextAsync(TextSpan[] pSpan) 59protected virtual async Task<(string pbstrText, int result)> GetDataTipTextImplAsync(TextSpan[] pSpan) 68protected async Task<(string pbstrText, int result)> GetDataTipTextImplAsync(ITextBuffer subjectBuffer, TextSpan[] pSpan) 137private async Task<int> GetPairExtentsAsync(int iLine, int iIndex, TextSpan[] pSpan) 160internal static async Task<int> GetPairExtentsAsync(
Interactive\VsResetInteractive.cs (2)
283protected override Task<bool> BuildProjectAsync() 305protected override async Task<IEnumerable<string>> GetNamespacesToImportAsync(IEnumerable<string> namespacesToImport, IInteractiveWindow interactiveWindow)
KeybindingReset\KeybindingResetDetector.cs (1)
316async Task<OLECMDF> QueryStatusAsync(uint cmdId)
LanguageClient\VisualStudioLogHubLoggerFactory.cs (1)
40public async Task<AbstractLspLogger> CreateLoggerAsync(string serverTypeName, JsonRpc jsonRpc, CancellationToken cancellationToken)
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
250private async Task<int> ValidateBreakpointLocationAsync(
LanguageService\AbstractPackage`2.cs (2)
139protected void RegisterService<T>(Func<CancellationToken, Task<T>> serviceCreator) 143protected void RegisterLanguageService(Type t, Func<CancellationToken, Task<object>> serviceCreator)
Library\AbstractLibraryManager_IVsSimpleLibrary2.cs (1)
19protected abstract Task<IVsSimpleObjectList2> GetListAsync(uint listType, uint flags, VSOBSEARCHCRITERIA2[] pobSrch, CancellationToken cancellationToken);
Library\AbstractObjectList.cs (6)
29protected abstract Task<bool> GetExpandableAsync(uint index, uint listTypeExcluded, CancellationToken cancellationToken); 31protected abstract Task<IVsSimpleObjectList2> GetListAsync( 65protected virtual Task<(bool success, object pvar)> TryGetPropertyAsync(uint index, _VSOBJLISTELEMPROPID propertyId, CancellationToken cancellationToken) 76protected virtual Task<object> GetBrowseObjectAsync(uint index, CancellationToken cancellationToken) 84protected virtual Task<IVsNavInfo> GetNavInfoAsync(uint index, CancellationToken cancellationToken) 101protected virtual Task<bool> TryFillDescriptionAsync(uint index, _VSOBJDESCOPTIONS options, IVsObjectBrowserDescription3 description, CancellationToken cancellationToken)
Library\ClassView\AbstractSyncClassViewCommandHandler.cs (1)
43private async Task<bool> ExecuteCommandAsync(
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (2)
41private Task<Compilation> GetCompilationAsync(CancellationToken cancellationToken) 455internal async Task<bool> TryBuildAsync(_VSOBJDESCOPTIONS options, CancellationToken cancellationToken)
Library\ObjectBrowser\AbstractListItemFactory.cs (2)
465public async Task<ImmutableHashSet<(ProjectId, IAssemblySymbol)>> GetAssemblySetAsync( 507public async Task<ImmutableHashSet<(ProjectId, IAssemblySymbol)>> GetAssemblySetAsync(Project project, bool lookInReferences, CancellationToken cancellationToken)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (3)
202internal async Task<Compilation> GetCompilationAsync( 305protected override async Task<IVsSimpleObjectList2> GetListAsync( 414internal async Task<IVsNavInfo> GetNavInfoAsync(
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Description.cs (1)
13internal async Task<bool> TryFillDescriptionAsync(
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_ListItems.cs (2)
23internal Task<ImmutableHashSet<(ProjectId, IAssemblySymbol)>> GetAssemblySetAsync(Solution solution, string languageName, CancellationToken cancellationToken) 26internal Task<ImmutableHashSet<(ProjectId, IAssemblySymbol)>> GetAssemblySetAsync(Project project, bool lookInReferences, CancellationToken cancellationToken)
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager_Search.cs (1)
36public async Task<IVsSimpleObjectList2> GetSearchListAsync(
Library\ObjectBrowser\ObjectList.cs (7)
399protected override async Task<bool> GetExpandableAsync( 418private async Task<bool> IsExpandableTypeAsync(uint index, CancellationToken cancellationToken) 461protected override async Task<IVsSimpleObjectList2> GetListAsync( 532protected override Task<object> GetBrowseObjectAsync(uint index, CancellationToken cancellationToken) 547protected override async Task<IVsNavInfo> GetNavInfoAsync( 657protected override Task<bool> TryFillDescriptionAsync( 666protected override async Task<(bool success, object pvar)> TryGetPropertyAsync(
Library\ObjectBrowser\ObjectListItem.cs (1)
73public async Task<Compilation> GetCompilationAsync(Workspace workspace, CancellationToken cancellationToken)
MoveStaticMembers\StaticMemberSelectionViewModel.cs (2)
18private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> _symbolToDependentsMap; 24ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> dependentsMap)
NavigateTo\RoslynSearchResultViewFactory.cs (1)
51public Task<IReadOnlyList<SearchResultPreviewPanelBase>> GetPreviewPanelsAsync(SearchResult result, SearchResultViewBase searchResultView)
Packaging\PackageInstallerServiceFactory.cs (9)
93private Task<ImmutableArray<PackageSource>>? _packageSourcesTask; 143Task<ImmutableArray<PackageSource>> localPackageSourcesTask; 163private async Task<ImmutableArray<PackageSource>> GetPackageSourcesAsync() 258public async Task<bool> TryInstallPackageAsync( 293private async Task<bool> TryInstallPackageAsync( 372private async Task<bool> TryUninstallPackageAsync( 495private async Task<T?> PerformNuGetProjectServiceWorkAsync<T>( 572private static async Task<ProjectState?> GetCurrentProjectStateAsync( 590private static async Task<ImmutableDictionary<string, string>> GetInstalledPackagesMapAsync(INuGetProjectService nugetService, Guid projectGuid, CancellationToken cancellationToken)
Packaging\PackageInstallerServiceFactory_UndoRedo.cs (2)
18private async Task<bool> TryInstallAndAddUndoActionAsync( 39private async Task<bool> TryUninstallAndAddRedoActionAsync(
PdbSourceDocument\AbstractSourceLinkService.cs (4)
18public async Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken) 76public async Task<SourceFilePathResult?> GetSourceFilePathAsync(string url, string relativePath, CancellationToken cancellationToken) 99protected abstract Task<SymbolLocatorResult?> LocateSymbolFileAsync(SymbolLocatorPdbInfo pdbInfo, SymbolLocatorSearchFlags flags, CancellationToken cancellationToken); 101protected abstract Task<SourceLinkResult?> GetSourceLinkAsync(string url, string relativePath, CancellationToken cancellationToken);
PdbSourceDocument\SourceLinkService.cs (2)
35protected override async Task<SymbolLocatorResult?> LocateSymbolFileAsync(SymbolLocatorPdbInfo pdbInfo, SymbolLocatorSearchFlags flags, CancellationToken cancellationToken) 40protected override async Task<SourceLinkResult?> GetSourceLinkAsync(string url, string relativePath, CancellationToken cancellationToken)
Preview\PreviewUpdater.PreviewDialogWorkspace.cs (1)
50public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Progression\GraphNodeCreation.cs (2)
17public static Task<GraphNodeId> CreateNodeIdAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken) 21public static Task<GraphNode> CreateNodeAsync(this Graph graph, ISymbol symbol, Solution solution, CancellationToken cancellationToken)
ProjectSystem\BrokeredService\WorkspaceProject.cs (1)
184public async Task<IWorkspaceProjectBatch> StartBatchAsync(CancellationToken cancellationToken)
ProjectSystem\BrokeredService\WorkspaceProjectFactoryService.cs (2)
24public async Task<IWorkspaceProject> CreateAndAddProjectAsync(WorkspaceProjectCreationInfo creationInfo, CancellationToken cancellationToken) 37public Task<IReadOnlyCollection<string>> GetSupportedBuildSystemPropertiesAsync(CancellationToken cancellationToken)
ProjectSystem\CPS\ITempPECompiler.cs (1)
28Task<bool> CompileAsync(IWorkspaceProjectContext context, string outputFileName, ISet<string> filesToInclude, CancellationToken cancellationToken);
ProjectSystem\CPS\IWorkspaceProjectContextFactory.cs (1)
33Task<IWorkspaceProjectContext> CreateProjectContextAsync(Guid id, string uniqueName, string languageName, EvaluationData data, object? hostObject, CancellationToken cancellationToken);
ProjectSystem\FileChangeWatcher.cs (2)
30private readonly Task<IVsAsyncFileChangeEx2> _fileChangeService; 45Task<IVsAsyncFileChangeEx2> fileChangeService)
ProjectSystem\VisualStudioProjectFactory.cs (2)
75public Task<ProjectSystemProject> CreateAndAddToWorkspaceAsync(string projectSystemName, string language, CancellationToken cancellationToken) 78public async Task<ProjectSystemProject> CreateAndAddToWorkspaceAsync(
ProjectSystem\VisualStudioWorkspace.cs (2)
61internal abstract Task<object?> GetBrowseObjectAsync(SymbolListItem symbolListItem, CancellationToken cancellationToken); 65public abstract Task<bool> TryGoToDefinitionAsync(ISymbol symbol, Project project, CancellationToken cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
663async Task<MultiDictionary<string, (TextChange TextChange, ProjectId ProjectId)>> GetMappedTextChangesAsync(SolutionChanges solutionChanges)
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
87public static async Task<OpenFileTracker> CreateAsync(VisualStudioWorkspaceImpl workspace, ProjectSystemProjectFactory projectSystemProjectFactory, IAsyncServiceProvider asyncServiceProvider)
PullMemberUp\MainDialog\PullMemberUpDialogViewModel.cs (2)
30private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> _symbolToDependentsMap; 37ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> dependentsMap)
PullMemberUp\SymbolDependentsBuilder.cs (2)
20public static ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> FindMemberToDependentsMap( 56public async Task<ImmutableArray<ISymbol>> FindMemberDependentsAsync()
Remote\DefaultRemoteHostClientProvider.cs (1)
17public Task<RemoteHostClient?> TryGetRemoteHostClientAsync(CancellationToken cancellationToken)
Remote\VisualStudioRemoteHostClientProvider.cs (2)
127private async Task<RemoteHostClient?> CreateHostClientAsync() 156public Task<RemoteHostClient?> TryGetRemoteHostClientAsync(CancellationToken cancellationToken)
Remote\VisualStudioWorkspaceServiceHubConnector.cs (1)
30private Task<RemoteHostClient?>? _remoteClientInitializationTask;
RoslynPackage.cs (1)
190protected override Task<object?> InitializeToolWindowAsync(Type toolWindowType, int id, CancellationToken cancellationToken)
Snippets\AbstractSnippetExpansionLanguageHelper.cs (1)
33public abstract Task<Document> AddImportsAsync(Document document, AddImportPlacementOptions addImportOptions, SyntaxFormattingOptions formattingOptions, int position, XElement snippetNode, CancellationToken cancellationToken);
Snippets\ISnippetExpansionLanguageHelper.cs (1)
27Task<Document> AddImportsAsync(Document document, AddImportPlacementOptions addImportOptions, SyntaxFormattingOptions formattingOptions, int position, XElement snippetNode, CancellationToken cancellationToken);
Snippets\SnippetExpansionClient.cs (1)
758private static async Task<ImmutableArray<ISymbol>> GetReferencedSymbolsToLeftOfCaretAsync(
Snippets\SnippetFunctions\AbstractSnippetFunction.cs (2)
38protected virtual Task<(int ExitCode, string Value, int HasDefaultValue)> GetDefaultValueAsync(CancellationToken cancellationToken) 49protected virtual Task<(int ExitCode, string Value, int HasCurrentValue)> GetCurrentValueAsync(CancellationToken cancellationToken)
Snippets\SnippetFunctions\SnippetFunctionClassName.cs (1)
27protected override async Task<(int ExitCode, string Value, int HasDefaultValue)> GetDefaultValueAsync(CancellationToken cancellationToken)
Snippets\SnippetFunctions\SnippetFunctionGenerateSwitchCases.cs (1)
42protected override async Task<(int ExitCode, string Value, int HasCurrentValue)> GetCurrentValueAsync(CancellationToken cancellationToken)
Snippets\SnippetFunctions\SnippetFunctionSimpleTypeName.cs (1)
34protected override async Task<(int ExitCode, string Value, int HasDefaultValue)> GetDefaultValueAsync(CancellationToken cancellationToken)
StackTraceExplorer\StackFrameViewModel.cs (1)
216private async Task<DefinitionItem?> GetDefinitionAsync(StackFrameSymbolPart symbolPart, CancellationToken cancellationToken)
StackTraceExplorer\StackTraceExplorerToolWindow.cs (1)
59public async Task<bool> ShouldShowOnActivatedAsync(CancellationToken cancellationToken)
Storage\FileDownloader.cs (1)
33public Task<Stream?> ReadFileAsync()
SymbolSearch\VisualStudioSymbolSearchService.cs (1)
116private async Task<ISymbolSearchUpdateEngine> GetEngineAsync(CancellationToken cancellationToken)
TableDataSource\Suppression\VisualStudioDiagnosticListSuppressionStateService.cs (2)
189public async Task<ImmutableArray<DiagnosticData>> GetSelectedItemsAsync(bool isAddSuppression, CancellationToken cancellationToken) 300private static async Task<ImmutableDictionary<string, Document>> GetFilePathToDocumentMapAsync(Project project, CancellationToken cancellationToken)
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (5)
147private async Task<ImmutableHashSet<DiagnosticData>?> GetDiagnosticsToFixAsync( 171private async Task<bool> ApplySuppressionFixAsync( 386private async Task<UIThreadOperationStatus> InvokeWithWaitDialogAsync( 448private async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken) 541private async Task<ImmutableDictionary<Project, ImmutableArray<Diagnostic>>> GetProjectDiagnosticsToFixAsync(IEnumerable<DiagnosticData> diagnosticsToFix, Func<Project, bool> shouldFixInProject, bool filterStaleDiagnostics, CancellationToken cancellationToken)
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
260private async Task<IDiagnosticManagerService> GetOrCreateDiagnosticManagerAsync(CancellationToken cancellationToken)
UnusedReferences\ProjectAssets\ProjectAssetsFileReader.cs (1)
18public static async Task<ImmutableArray<ReferenceInfo>> ReadReferencesAsync(
UnusedReferences\UnusedReferenceAnalysisService.cs (1)
26public async Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync(Solution solution, string projectFilePath, string projectAssetsFilePath, ImmutableArray<ReferenceInfo> projectReferences, CancellationToken cancellationToken)
UnusedReferences\VisualStudioReferenceCleanupService.cs (2)
32public async Task<ImmutableArray<ReferenceInfo>> GetProjectReferencesAsync(string projectPath, CancellationToken cancellationToken) 38public async Task<bool> TryUpdateReferenceAsync(string projectPath, ReferenceUpdate referenceUpdate, CancellationToken cancellationToken)
Utilities\VisualStudioNavigateToLinkService.cs (1)
26public Task<bool> TryNavigateToLinkAsync(Uri uri, CancellationToken cancellationToken)
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
191private async Task<ImmutableArray<TreeItemViewModel>> CalculateChildrenAsync(CancellationToken cancellationToken)
ValueTracking\ValueTrackingCommandHandler.cs (1)
179private async Task<ValueTrackingToolWindow?> GetOrCreateToolWindowAsync(ITextView textView, CancellationToken cancellationToken)
Venus\ContainedDocument.DocumentServiceProvider.cs (4)
72public override async Task<ImmutableArray<(string mappedFilePath, TextChange mappedTextChange)>> GetMappedTextChangesAsync( 83public override async Task<ImmutableArray<MappedSpanResult>> MapSpansAsync( 135public async Task<ExcerptResult?> TryExcerptAsync(Document document, TextSpan span, ExcerptMode mode, ClassificationOptions classificationOptions, CancellationToken cancellationToken) 173private static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansOnContentAsync(
Venus\VenusCommandFilter.cs (1)
47protected override async Task<(string pbstrText, int result)> GetDataTipTextImplAsync(TextSpan[] pSpan)
Venus\VenusTaskExtensions.cs (1)
23public static T WaitAndGetResult_Venus<T>(this Task<T> task, CancellationToken cancellationToken)
Workspace\SourceGeneratedFileManager.cs (2)
106public Func<CancellationToken, Task<bool>> GetNavigationCallback(SourceGeneratedDocument document, TextSpan sourceSpan) 530public Task<bool> NavigateToSpanAsync(TextSpan sourceSpan, CancellationToken cancellationToken)
Workspace\VisualStudioDocumentNavigationService.cs (16)
52public async Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 68public async Task<bool> CanNavigateToPositionAsync( 100public async Task<INavigableLocation?> GetLocationForSpanAsync( 114public async Task<INavigableLocation?> GetLocationForPositionAsync( 127static async Task<TextSpan> GetTextSpanFromPositionAsync(Document document, int position, int virtualSpace, CancellationToken cancellationToken) 156private async Task<INavigableLocation?> GetNavigableLocationAsync( 159Func<Document, Task<TextSpan>> getTextSpanForMappingAsync, 180private async Task<Func<CancellationToken, Task<bool>>?> GetNavigationCallbackAsync( 183Func<Document, Task<TextSpan>> getTextSpanForMappingAsync, 242private Func<CancellationToken, Task<bool>>? GetNavigationCallback( 294private async Task<Func<CancellationToken, Task<bool>>?> GetNavigableLocationForMappedFileAsync( 317private static async Task<MappedSpanResult?> GetMappedSpanAsync( 374public async Task<bool> NavigateToTextBufferAsync( 412private async Task<bool> CanMapFromSecondaryBufferToPrimaryBufferAsync(
Workspace\VisualStudioSymbolNavigationService.cs (6)
47public async Task<INavigableLocation?> GetNavigableLocationAsync( 124private async Task<INavigableLocation?> GetNavigableLocationForMetadataAsync( 181public async Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken) 201public async Task<(string filePath, LinePosition linePosition)?> GetExternalNavigationSymbolLocationAsync( 211public async Task<(string filePath, LinePosition linePosition)?> GetExternalNavigationLocationForSpecificSymbolAsync( 245private async Task<(IVsHierarchy hierarchy, uint itemId, IVsSymbolicNavigationNotify navigationNotify)?> TryGetNavigationAPIRequiredArgumentsAsync(
Workspace\VisualStudioWorkspaceStatusServiceFactory.cs (1)
131public async Task<bool> IsFullyLoadedAsync(CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.CodeLens (4)
ReferenceCodeLensProvider.cs (4)
65public Task<bool> CanCreateDataPointAsync( 78public Task<IAsyncCodeLensDataPoint> CreateDataPointAsync( 197public async Task<CodeLensDataPointDescriptor?> GetDataAsync(CodeLensDescriptorContext descriptorContext, CancellationToken cancellationToken) 242public async Task<CodeLensDetailsDescriptor> GetDetailsAsync(CodeLensDescriptorContext descriptorContext, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.CSharp (15)
LanguageService\CSharpHelpContextService.cs (1)
42public override async Task<string> GetHelpTermAsync(Document document, TextSpan span, CancellationToken cancellationToken)
Options\CSharpVisualStudioCopilotOptionsService.cs (7)
54private readonly Task<ISettingsManager> _settingsManagerTask; 75private async Task<bool> IsCopilotOptionEnabledAsync(CopilotOption option) 99public Task<bool> IsCodeAnalysisOptionEnabledAsync() 102public Task<bool> IsRefineOptionEnabledAsync() 105public Task<bool> IsOnTheFlyDocsOptionEnabledAsync() 108public Task<bool> IsGenerateDocumentationCommentOptionEnabledAsync() 111public Task<bool> IsImplementNotImplementedExceptionEnabledAsync()
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (1)
130async Task<(int result, int? newCount)> GetValidStartupClassesAsync()
SemanticSearch\SemanticSearchDocumentNavigationService.cs (2)
25public override Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 28public override Task<INavigableLocation?> GetLocationForSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken)
SemanticSearch\SemanticSearchToolWindow.cs (1)
56public override Task<IRemoteUserControl> GetContentAsync(CancellationToken cancellationToken)
SemanticSearch\SemanticSearchToolWindowImpl.cs (2)
93public async Task<IRemoteUserControl> InitializeAsync(CancellationToken cancellationToken) 106private async Task<FrameworkElement> CreateContentAsync(CancellationToken cancellationToken)
Snippets\CSharpSnippetExpansionLanguageHelper.cs (1)
70public override async Task<Document> AddImportsAsync(
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (19)
DocumentOutline\DocumentOutlineTests.cs (1)
57private async Task<(DocumentOutlineTestMocks mocks, (ImmutableArray<DocumentSymbolData> DocumentSymbolData, ITextSnapshot OriginalSnapshot), ImmutableArray<DocumentSymbolDataViewModel> uiItems)>
DocumentOutline\DocumentOutlineTestsBase.cs (4)
76protected async Task<DocumentOutlineTestMocks> CreateMocksAsync(string code) 86async Task<RoslynDocumentSymbol[]?> RequestAsync(Request<RoslynDocumentSymbolParams, RoslynDocumentSymbol[]> request, CancellationToken cancellationToken) 96private async Task<EditorTestLspServer> CreateTestLspServerAsync(EditorTestWorkspace workspace) 110public static async Task<EditorTestLspServer> CreateAsync(EditorTestWorkspace testWorkspace, InitializationOptions initializationOptions, AbstractLspLogger logger)
EditorConfigSettings\DataProvider\DataProviderTests.TestViewModel.cs (1)
17Task<SourceText> ISettingsEditorViewModel.UpdateEditorConfigAsync(SourceText sourceText)
Interactive\Commands\TestResetInteractive.cs (2)
61protected override Task<bool> BuildProjectAsync() 89protected override Task<IEnumerable<string>> GetNamespacesToImportAsync(IEnumerable<string> namespacesToImport, IInteractiveWindow interactiveWindow)
Interactive\TestInteractiveEvaluator.cs (3)
26public Task<ExecutionResult> InitializeAsync() 29public Task<ExecutionResult> ResetAsync(bool initialize = true) 35public Task<ExecutionResult> ExecuteCodeAsync(string text)
PersistentStorage\AbstractPersistentStorageTests.cs (3)
909private static void DoSimultaneousReads(Func<Task<string>> read, string expectedValue) 1002internal async Task<IChecksummedPersistentStorage> GetStorageAsync( 1026internal async Task<IChecksummedPersistentStorage> GetStorageFromKeyAsync(
ProjectSystemShim\CSharpHelpers.cs (5)
49public static Task<CPSProject> CreateCSharpCPSProjectAsync(TestEnvironment environment, string projectName, params string[] commandLineArguments) 54public static Task<CPSProject> CreateCSharpCPSProjectAsync(TestEnvironment environment, string projectName, Guid projectGuid, params string[] commandLineArguments) 62public static Task<CPSProject> CreateCSharpCPSProjectAsync(TestEnvironment environment, string projectName, string binOutputPath, params string[] commandLineArguments) 78public static async Task<CPSProject> CreateCSharpCPSProjectAsync(TestEnvironment environment, string projectName, string projectFilePath, string binOutputPath, Guid projectGuid, params string[] commandLineArguments) 98public static async Task<CPSProject> CreateNonCompilableProjectAsync(TestEnvironment environment, string projectName, string projectFilePath, string targetPath)
Microsoft.VisualStudio.LanguageServices.DevKit (6)
SourceLink\VSCodeSourceLinkService.cs (2)
26protected override async Task<SymbolLocatorResult?> LocateSymbolFileAsync(SymbolLocatorPdbInfo pdbInfo, SymbolLocatorSearchFlags flags, CancellationToken cancellationToken) 50protected override async Task<SourceLinkResult?> GetSourceLinkAsync(string url, string relativePath, CancellationToken cancellationToken)
src\VisualStudio\Core\Def\PdbSourceDocument\AbstractSourceLinkService.cs (4)
18public async Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken) 76public async Task<SourceFilePathResult?> GetSourceFilePathAsync(string url, string relativePath, CancellationToken cancellationToken) 99protected abstract Task<SymbolLocatorResult?> LocateSymbolFileAsync(SymbolLocatorPdbInfo pdbInfo, SymbolLocatorSearchFlags flags, CancellationToken cancellationToken); 101protected abstract Task<SourceLinkResult?> GetSourceLinkAsync(string url, string relativePath, CancellationToken cancellationToken);
Microsoft.VisualStudio.LanguageServices.LiveShare (11)
Client\Projects\IRemoteProjectInfoProvider.cs (1)
16Task<ImmutableArray<ProjectInfo>> GetRemoteProjectInfosAsync(CancellationToken cancellationToken);
Client\Projects\RemoteProjectInfoProvider.cs (1)
30public async Task<IReadOnlyCollection<ProjectInfo>> GetRemoteProjectInfosAsync(CancellationToken cancellationToken)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
39public async Task<ImmutableArray<ProjectInfo>> GetRemoteProjectInfosAsync(CancellationToken cancellationToken)
Client\Projects\WorkspaceFileTextLoaderNoException.cs (1)
28public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Client\RemoteLanguageServiceWorkspace.cs (2)
166private static async Task<(ImmutableHashSet<string> remoteRootPaths, ImmutableHashSet<string> externalPaths)> GetLocalPathsOfRemoteRootsAsync(CollaborationSession session) 288public async Task<DocumentSpan?> GetDocumentSpanFromLocationAsync(LSP.Location location, CancellationToken cancellationToken)
Client\RemoteLanguageServiceWorkspaceHost.cs (1)
64public async Task<ICollaborationService> CreateServiceAsync(CollaborationSession collaborationSession, CancellationToken cancellationToken)
Client\RoslynLSPClientService.cs (1)
29public Task<ICollaborationService> CreateServiceAsync(CollaborationSession collaborationSession, CancellationToken cancellationToken)
LiveShareInitializeHandler.cs (1)
28public Task<InitializeResult> HandleAsync(InitializeParams param, RequestContext<Solution> requestContext, CancellationToken cancellationToken)
LSPSDKInitializeHandler.cs (1)
31public Task<LSP.InitializeResult> HandleAsync(LSP.InitializeParams request, RequestContext<Solution> requestContext, CancellationToken cancellationToken)
ProjectsHandler.cs (1)
22public async Task<object[]> HandleAsync(object param, RequestContext<Solution> requestContext, CancellationToken cancellationToken)
Microsoft.VisualStudio.LanguageServices.UnitTests (4)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
450languageName As String) As Tasks.Task(Of ChangeSignatureViewModelTestState)
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
219Optional isValidIdentifier As Boolean = True) As Tasks.Task(Of NewTypeDestinationSelectionViewModel)
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
282Optional isValidIdentifier As Boolean = True) As Tasks.Task(Of ExtractInterfaceDialogViewModel)
GenerateType\GenerateTypeViewModelTests.vb (1)
835Optional projectRootFilePath As String = Nothing) As Tasks.Task(Of GenerateTypeDialogViewModel)
Microsoft.VisualStudio.LanguageServices.Xaml (46)
CodeFixes\RemoveUnnecessaryUsings\XamlRemoveUnnecessaryUsingsCodeFixProvider.cs (1)
54private static async Task<Document> RemoveUnnecessaryImportsAsync(
Diagnostics\Analyzers\IXamlDocumentAnalyzerService.cs (2)
17Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(Document document, CancellationToken cancellationToken); 19Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(Document document, CancellationToken cancellationToken);
Diagnostics\Analyzers\XamlDocumentDiagnosticAnalyzer.cs (2)
20public override async Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken) 25public override async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken)
Features\AutoInsert\IXamlAutoInsertService.cs (1)
16public Task<XamlAutoInsertResult> GetAutoInsertAsync(TextDocument document, char typedChar, int position, CancellationToken cancellationToken);
Features\Commands\IXamlCommandService.cs (1)
22Task<bool> ExecuteCommandAsync(TextDocument document, string command, object[]? commandArguments, CancellationToken cancellationToken);
Features\Completion\IXamlCompletionService.cs (2)
16Task<XamlCompletionResult> GetCompletionsAsync(XamlCompletionContext completionContext, CancellationToken cancellationToken); 17Task<ISymbol> GetSymbolAsync(XamlCompletionContext completionContext, string label, CancellationToken cancellationToken);
Features\Definitions\IXamlGoToDefinitionService.cs (1)
15Task<ImmutableArray<XamlDefinition>> GetDefinitionsAsync(TextDocument document, int position, CancellationToken cancellationToken);
Features\Diagnostics\IXamlPullDiagnosticService.cs (1)
21Task<XamlDiagnosticReport> GetDiagnosticReportAsync(TextDocument document, string? previousResultId, CancellationToken cancellationToken);
Features\Formatting\IXamlFormattingService.cs (2)
18Task<IList<TextChange>> GetFormattingChangesAsync(TextDocument document, XamlFormattingOptions options, TextSpan? textSpan, CancellationToken cancellationToken); 19Task<IList<TextChange>> GetFormattingChangesAsync(TextDocument document, XamlFormattingOptions options, char typedChar, int position, CancellationToken cancellationToken);
Features\InlineRename\IXamlRenameInfo.cs (1)
54Task<IList<DocumentSpan>> FindRenameLocationsAsync(bool renameInStrings, bool renameInComments, CancellationToken cancellationToken);
Features\InlineRename\IXamlRenameInfoService.cs (1)
14Task<IXamlRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken);
Features\InlineRename\XamlEditorInlineRenameService.cs (4)
35public Task<ImmutableDictionary<string, ImmutableArray<(string filePath, string content)>>> GetRenameContextAsync(IInlineRenameInfo inlineRenameInfo, IInlineRenameLocationSet inlineRenameLocationSet, CancellationToken cancellationToken) 40public async Task<IInlineRenameInfo> GetRenameInfoAsync(Document document, int position, CancellationToken cancellationToken) 77public async Task<IInlineRenameLocationSet> FindRenameLocationsAsync(SymbolRenameOptions options, CancellationToken cancellationToken) 164public async Task<IInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, SymbolRenameOptions options, CancellationToken cancellationToken)
Features\OrganizeImports\IXamlOrganizeNamespacesService.cs (1)
16Task<Document> OrganizeNamespacesAsync(Document document, bool placeSystemNamespaceFirst, CancellationToken cancellationToken);
Features\OrganizeImports\IXamlRemoveUnnecessaryNamespacesService.cs (1)
16Task<Document> RemoveUnnecessaryNamespacesAsync(Document document, CancellationToken cancellationToken);
Features\OrganizeImports\XamlOrganizeImportsService.cs (1)
23public async Task<Document> OrganizeImportsAsync(Document document, OrganizeImportsOptions options, CancellationToken cancellationToken)
Features\OrganizeImports\XamlRemoveUnnecessaryImportsService.cs (2)
27public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 30public Task<Document> RemoveUnnecessaryImportsAsync(
Features\Peek\IXamlPeekableItemFactory.cs (1)
24Task<IEnumerable<IPeekableItem>> GetPeekableItemsAsync(ISymbol symbol, Project project, IPeekResultFactory peekResultFactory, CancellationToken cancellationToken);
Features\QuickInfo\IXamlQuickInfoService.cs (1)
16Task<XamlQuickInfo> GetQuickInfoAsync(TextDocument document, int position, CancellationToken cancellationToken);
Features\Structure\IXamlStructureService.cs (1)
17Task<ImmutableArray<XamlStructureTag>> GetStructureTagsAsync(TextDocument document, CancellationToken cancellationToken);
Features\TypeRename\IXamlTypeRenameService.cs (1)
14public Task<XamlTypeRenameResult> GetTypeRenameAsync(TextDocument document, int position, CancellationToken cancellationToken);
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (1)
21public static async Task<IEnumerable<TaggedText>> GetDescriptionAsync(this ISymbol symbol, TextDocument document, SymbolDescriptionOptions options, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Commands\CreateEventCommandHandler.cs (1)
45public override async Task<object> HandleRequestAsync(ExecuteCommandParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
51public async Task<CompletionList?> HandleRequestAsync(CompletionParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Completion\CompletionResolveHandler.cs (1)
44public async Task<LSP.CompletionItem> HandleRequestAsync(LSP.CompletionItem completionItem, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (4)
51public async Task<LSP.Location[]> HandleRequestAsync(TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken) 91private async Task<LSP.Location[]> GetLocationsAsync(XamlDefinition definition, Document document, Solution solution, CancellationToken cancellationToken) 111private static async Task<LSP.Location?> GetSourceDefinitionLocationAsync(XamlSourceDefinition sourceDefinition, Solution solution, CancellationToken cancellationToken) 153private static async Task<LSP.Location[]> GetSymbolDefinitionLocationsAsync(XamlSymbolDefinition symbolDefinition, Document document, Solution solution, IMetadataAsSourceFileService metadataAsSourceFileService, IGlobalOptionService globalOptions, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Diagnostics\AbstractPullDiagnosticHandler.cs (1)
62public async Task<TReport[]?> HandleRequestAsync(TDiagnosticsParams diagnosticsParams, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\FoldingRanges\FoldingRangesHandler.cs (1)
32public async Task<FoldingRange[]> HandleRequestAsync(FoldingRangeParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (2)
24public abstract Task<ResponseType> HandleRequestAsync(RequestType request, RequestContext context, CancellationToken cancellationToken); 26protected async Task<LSP.TextEdit[]> GetTextEditsAsync(LSP.FormattingOptions formattingOptions, RequestContext context, CancellationToken cancellationToken, LSP.Range? range = null)
Implementation\LanguageServer\Handler\Formatting\FormatDocumentHandler.cs (1)
27public override Task<LSP.TextEdit[]> HandleRequestAsync(LSP.DocumentFormattingParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
34public async Task<TextEdit[]> HandleRequestAsync(DocumentOnTypeFormattingParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Formatting\FormatDocumentRangeHandler.cs (1)
27public override Task<TextEdit[]> HandleRequestAsync(DocumentRangeFormattingParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\Hover\HoverHandler.cs (1)
43public async Task<Hover?> HandleRequestAsync(TextDocumentPositionParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
33public async Task<VSInternalDocumentOnAutoInsertResponseItem?> HandleRequestAsync(VSInternalDocumentOnAutoInsertParams request, RequestContext context, CancellationToken cancellationToken)
Implementation\LanguageServer\Handler\OnTypeRename\OnTypeRenameHandler.cs (1)
65public async Task<LinkedEditingRanges?> HandleRequestAsync(LinkedEditingRangeParams request, RequestContext context, CancellationToken cancellationToken)
MSBuild (3)
BufferedReadStream.cs (1)
130public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
CommunicationsUtilities.cs (1)
644var readTask = stream.ReadAsync(bytes, 0, bytes.Length);
NodeEndpointOutOfProcBase.cs (1)
527Task<int> readTask = localReadPipe.ReadAsync(headerByte.AsMemory(), CancellationToken.None).AsTask();
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1161[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
Mvc.Api.Analyzers.Test (20)
ActualApiResponseMetadataFactoryTest.cs (4)
362private async Task<(bool result, IList<ActualApiResponseMetadata> responseMetadatas, TestSource testSource)> TryGetActualResponseMetadata(string typeName, string methodName) 382private async Task<ActualApiResponseMetadata?[]> RunInspectReturnStatementSyntax(ReturnOperationTestVariant variant = ReturnOperationTestVariant.Default, [CallerMemberName] string test = null) 403private async Task<ActualApiResponseMetadata?[]> RunInspectReturnStatementSyntax(string source, string test) 422private Task<Compilation> GetCompilation(string test)
ApiControllerFactsTest.cs (1)
126private Task<Compilation> GetCompilation(string testFile = "TestFile")
Infrastructure\MvcDiagnosticAnalyzerRunner.cs (2)
20public Task<Diagnostic[]> GetDiagnosticsAsync(string source) 46public Task<Diagnostic[]> GetDiagnosticsAsync(Project project)
MvcFactsTest.cs (3)
216private Task<Compilation> GetIsControllerCompilation() => GetCompilation("IsControllerTests"); 218private Task<Compilation> GetIsControllerActionCompilation() => GetCompilation("IsControllerActionTests"); 220private Task<Compilation> GetCompilation(string test)
SymbolApiConventionMatcherTest.cs (1)
553private Task<Compilation> GetCompilationAsync(string test = "SymbolApiConventionMatcherTestFile")
SymbolApiResponseMetadataProviderTest.cs (2)
472private Task<Compilation> GetResponseMetadataCompilation() => GetCompilation("GetResponseMetadataTests"); 474private Task<Compilation> GetCompilation(string test)
TestFiles\ActualApiResponseMetadataFactoryTest\TryGetActualResponseMetadataTests.cs (3)
11public async Task<ActionResult<IEnumerable<TryGetActualResponseMetadataModel>>> ActionWithActionResultOfTReturningOkResult() 19public async Task<ActionResult<IEnumerable<TryGetActualResponseMetadataModel>>> ActionWithActionResultOfTReturningModel() 27public async Task<ActionResult<TryGetActualResponseMetadataModel>> ActionReturningNotFoundAndModel(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_ForControllerWithCustomConvention.cs (1)
16public async Task<IActionResult> Update(int id, Product product)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfAsyncMethodWithProducesResponseTypeAttribute_ReturnsUndocumentedStatusCode.cs (1)
13public async Task<IActionResult> Method(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithAttributeAsynchronouslyReturnsValue_WithoutDocumentation.cs (1)
12public async Task<ActionResult<DiagnosticsAreReturned_IfMethodWithAttributeAsynchronouslyReturnsValue_WithoutDocumentationModel>> Method(int id)
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForOkResultReturningAction.cs (1)
12public async Task<ActionResult<IEnumerable<NoDiagnosticsAreReturned_ForOkResultReturningAction>>> Action()
MyFrontend (3)
Services\BasketServiceClient.cs (2)
10public async Task<(CustomerBasket? Basket, bool IsAvailable)> GetBasketAsync(string buyerId) 28public async Task<CustomerBasket> AddToCartAsync(string buyerId, int productId)
Services\CatalogServiceClient.cs (1)
7public Task<Catalog?> GetItemsAsync(int? before = null, int? after = null)
Negotiate.Client (8)
Controllers\AuthTestController.cs (8)
29public async Task<IActionResult> AnonymousUnrestricted([FromQuery] string server, [FromQuery] string protocol) 49public async Task<IActionResult> AnonymousAuthorized([FromQuery] string server, [FromQuery] string protocol) 76public async Task<IActionResult> DefaultCredentialsAuthorized([FromQuery] string server, [FromQuery] string protocol) 99public async Task<IActionResult> AfterAuthUnrestrictedPersist([FromQuery] string server, [FromQuery] string protocol1, [FromQuery] string protocol2) 132public async Task<IActionResult> AfterAuthUnrestrictedNonPersist([FromQuery] string server, [FromQuery] string protocol1, [FromQuery] string protocol2) 165public async Task<IActionResult> AfterAuthAuthorizedNonPersist([FromQuery] string server, [FromQuery] string protocol1, [FromQuery] string protocol2) 198public async Task<IActionResult> Unauthorized([FromQuery] string server, [FromQuery] string protocol) 224public async Task<IActionResult> AfterAuthUnauthorized([FromQuery] string server, [FromQuery] string protocol)
netstandard (1)
netstandard.cs (1)
2118[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
PathSchemeSelection (3)
Controllers\AccountController.cs (2)
29public async Task<IActionResult> Login(string userName, string password, string returnUrl = null) 62public async Task<IActionResult> Logout()
Startup.cs (1)
51protected override Task<AuthenticateResult> HandleAuthenticateAsync()
ProjectCachePlugin (1)
AssemblyMockCache.cs (1)
43public override Task<CacheResult> GetCacheResultAsync(
Publishers.Frontend (1)
Program.cs (1)
37public async Task<string> GetDataAsync(CancellationToken cancellationToken = default)
RazorPagesWebSite (2)
ModelHandlerTestModel.cs (2)
18public async Task<IActionResult> OnPostAsync() 46public async Task<CustomActionResult> OnPostCustomActionResult()
RazorWebSite (1)
Services\TaskReturningService.cs (1)
8public async Task<string> GetValueAsync()
Replay (13)
Replay.cs (4)
74static async Task<int> RunAsync(ReplayOptions options) 150var tasks = new List<Task<BuildData>>(capacity: maxParallel); 162var completedTask = await Task.WhenAny(tasks).ConfigureAwait(false); 193static async Task<BuildData> BuildAsync(
src\Compilers\Core\CommandLine\BuildProtocol.cs (2)
122public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 318public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
88internal static async Task<bool> RunServerShutdownRequestAsync( 157internal static Task<BuildResponse> RunServerBuildRequestAsync( 171internal static async Task<BuildResponse> RunServerBuildRequestAsync( 200static Task<NamedPipeClientStream?> tryConnectToServerAsync( 277static async Task<BuildResponse> tryRunRequestAsync( 300var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 371internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Roslyn.Compilers.Extension (4)
CompilerPackage.cs (3)
147private async Task<string> GetMSBuildVersionStringAsync(CancellationToken cancellationToken) 172private async Task<string> GetMSBuildPathAsync(CancellationToken cancellationToken) 179private async Task<string> GetMSBuildRelativePathAsync(string relativePath, CancellationToken cancellationToken)
SetGlobalGlobalPropertiesForCPS.cs (1)
28public override Task<IImmutableDictionary<string, string>> GetGlobalPropertiesAsync(CancellationToken cancellationToken)
Roslyn.Diagnostics.Analyzers (48)
AbstractApplyTraitToClass`1.cs (1)
67private async Task<Document> ApplyTraitToClassAsync(State state, CancellationToken cancellationToken)
AbstractCreateTestAccessor`1.cs (1)
58private async Task<Document> CreateTestAccessorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
AbstractExposeMemberForTesting`1.cs (2)
82private async Task<TTypeDeclarationSyntax?> GetRelevantTypeFromHeaderAsync(CodeRefactoringContext context) 100private async Task<Solution> AddMemberToTestAccessorAsync(Document document, TextSpan sourceSpan, string memberName, string memberDocumentationCommentId, CancellationToken cancellationToken)
AbstractRunIterations`1.cs (1)
80private static async Task<Document> RunIterationsAsync(Document document, TMethodDeclarationSyntax method, bool convertToTheory, CancellationToken cancellationToken)
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (4)
44Func<CancellationToken, Task<Document>> createChangedDocument; 78private static async Task<Document> AddExplicitImportingConstructorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 140private static async Task<Document> MakeConstructorPublicAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 157private static async Task<Document> AddImportingConstructorAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (6)
44Func<CancellationToken, Task<Document>> createChangedDocument; 87private static async Task<Document> AddObsoleteAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 119private static async Task<Document> AddDescriptionAndErrorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 140private static async Task<Document> UpdateDescriptionAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 165private static async Task<Document> AddErrorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 184private static async Task<Document> SetErrorToTrueAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
PartsExportedWithMEFv2MustBeMarkedAsShared.Fixer.cs (1)
61private static Task<Document> AddSharedAttributeAsync(Document document, SyntaxNode root, SyntaxNode declaration)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
src\RoslynAnalyzers\Utilities\Refactoring\AbstractRefactoringHelpers`3.cs (2)
29public async Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>( 151private static async Task<(SyntaxToken tokenToRightOrIn, SyntaxToken tokenToLeft, int location)> GetTokensToRightOrInToLeftAndUpdatedLocationAsync(
src\RoslynAnalyzers\Utilities\Refactoring\CodeRefactoringContextExtensions.cs (4)
17internal static Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this CodeRefactoringContext context, IRefactoringHelpers helpers) 21internal static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(this CodeRefactoringContext context, IRefactoringHelpers helpers) 25internal static async Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>( 36internal static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(
src\RoslynAnalyzers\Utilities\Refactoring\CodeRefactoringHelpers.cs (1)
21public static async Task<TextSpan> GetTrimmedTextSpanAsync(Document document, TextSpan span, CancellationToken cancellationToken)
src\RoslynAnalyzers\Utilities\Refactoring\IRefactoringHelpers.cs (1)
41Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(Document document, TextSpan selection, CancellationToken cancellationToken)
TestExportsShouldNotBeDiscoverableCodeFixProvider.cs (1)
49private static async Task<Document> AddPartNotDiscoverableAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
Roslyn.Diagnostics.CSharp.Analyzers (4)
CSharpAvoidOptSuffixForNullableEnableCodeCodeFixProvider.cs (1)
66private static async Task<Solution> RemoveOptSuffixOnVariableAsync(Document document, ISymbol variableSymbol, string newName, CancellationToken cancellationToken)
CSharpDoNotUseDebugAssertForInterpolatedStringsFixer.cs (1)
56private static async Task<Document> ReplaceWithDebugAssertAsync(Document document, Location location, INamedTypeSymbol roslynDebugSymbol, CancellationToken cancellationToken)
NumberCommentsRefactoring.cs (1)
50private static async Task<Document> FixCommentsAsync(Document document, LiteralExpressionSyntax stringLiteral, CancellationToken c)
PreferNullLiteralCodeFixProvider.cs (1)
48private static async Task<Document> ReplaceWithNullLiteralAsync(Document document, Location location, CancellationToken cancellationToken)
Roslyn.VisualStudio.DiagnosticsWindow (2)
Panels\WorkspacePanel.xaml.cs (1)
62private async Task<string> DiagnoseAsync(CancellationToken cancellationToken)
VisualStudioDiagnosticsWindowPackage.cs (1)
114protected override Task<object> InitializeToolWindowAsync(Type toolWindowType, int id, CancellationToken cancellationToken)
Roslyn.VisualStudio.Next.UnitTests (16)
Remote\SerializationValidator.cs (4)
83private async Task<SolutionAsset> GetRequiredAssetAsync(Checksum checksum) 90public async Task<T> GetValueAsync<T>(Checksum checksum) 111public async Task<Solution> GetSolutionAsync(SolutionAssetStorage.Scope scope) 193internal async Task<T> VerifyAssetSerializationAsync<T>(
Remote\SnapshotSerializationTests.cs (1)
73private static async Task<SolutionAsset> GetRequiredAssetAsync(SolutionAssetStorage.Scope scope, Checksum checksum)
Services\ServiceHubServicesTests.cs (3)
123private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, Workspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null) 224public Task<ImmutableArray<DesignerAttributeData>> Infos => _infosSource.Task; 1485private static async Task<Solution> VerifyIncrementalUpdatesAsync(
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (4)
145private static async Task<TestExtensionAssemblyLoaderProvider> GetRemoteAssemblyLoaderProvider(TestWorkspace localWorkspace) 153private static async Task<TestExtensionMessageHandlerFactory> GetRemoteAssemblyHandlerFactory(TestWorkspace localWorkspace) 243private static async Task<ExtensionMessageNames> RegisterTestHandlers( 790public Task<object?> ExecuteAsync(object? message, TArgument argument, CancellationToken cancellationToken)
Services\SolutionServiceTests.cs (2)
462static async Task<Solution> GetInitialOOPSolutionAsync(RemoteWorkspace remoteWorkspace, AssetProvider assetProvider, Solution solution) 1315private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, RemoteWorkspace remoteWorkspace, Solution solution, Dictionary<Checksum, object>? map = null)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
123var task = Task.Run(() => AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer: false, source.Token)); 226private static async Task<DiagnosticAnalysisResult> AnalyzeAsync(TestWorkspace workspace, ProjectId projectId, Type analyzerType, bool isHostAnalyzer, CancellationToken cancellationToken = default)
RunTests (16)
HelixTestRunner.cs (1)
50internal static async Task<int> RunAsync(Options options, ImmutableArray<AssemblyInfo> assemblies, CancellationToken cancellationToken)
ProcessRunner.cs (2)
35public Task<ProcessResult> Result { get; } 39public ProcessInfo(Process process, ProcessStartInfo startInfo, Task<ProcessResult> result)
ProcessTestExecutor.cs (1)
109public async Task<TestResult> RunTestAsync(WorkItemInfo workItemInfo, Options options, CancellationToken cancellationToken)
Program.cs (4)
35internal static async Task<int> Main(string[] args) 99private static async Task<int> RunCoreAsync(Options options, CancellationToken cancellationToken) 102var runTask = RunAsync(options, cts.Token); 128private static async Task<int> RunAsync(Options options, CancellationToken cancellationToken)
TestHistoryManager.cs (4)
31public static async Task<ImmutableDictionary<string, TimeSpan>> GetTestHistoryAsync(Options options, CancellationToken cancellationToken) 147private static async Task<Build?> GetLastSuccessfulBuildAsync(int definitionId, string branchName, BuildHttpClient buildClient, CancellationToken cancellationToken) 170private static async Task<TestRun?> GetRunForStageAsync(Build build, string phaseName, TestResultsHttpClient testClient, CancellationToken cancellationToken) 192private static async Task<List<TestCaseResult>> GetTestResultsAsync(TestRun testRun, int skip, int top, TestResultsHttpClient testClient, CancellationToken cancellationToken)
TestRunner.cs (4)
76internal async Task<RunAllResult> RunAllAsync(ImmutableArray<AssemblyInfo> assemblies, CancellationToken cancellationToken) 84var running = new List<Task<TestResult>>(); 95var task = running[i]; 138var task = _testExecutor.RunTestAsync(waiting.Pop(), _options, cancellationToken);
Sandbox (20)
artifacts\obj\Sandbox\Release\net10.0\GreetGrpc.cs (2)
86public virtual global::System.Threading.Tasks.Task<global::Greet.HelloReply> SayHello(global::Greet.HelloRequest request, grpc::ServerCallContext context) 92public virtual global::System.Threading.Tasks.Task<global::Greet.HelloReply> SayHelloFrom(global::Greet.HelloRequestFrom request, grpc::ServerCallContext context)
artifacts\obj\Sandbox\Release\net10.0\TranscodingGrpc.cs (16)
186public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> SayHello(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 192public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> ResponseBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 198public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> Custom(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 204public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> AdditionalBindings(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 210public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> NoOption(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 222public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> Body(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 228public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> SubBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 234public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> SubRepeatedBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 240public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> ParameterRoute(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 246public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.ListValue> ReturnListValue(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 252public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Value> ReturnValue(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 258public virtual global::System.Threading.Tasks.Task<global::Google.Protobuf.WellKnownTypes.Struct> ReturnStruct(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 264public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> ReturnEnum(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 378public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> BadResponseBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 466public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> BadBody(global::Transcoding.HelloRequest request, grpc::ServerCallContext context) 554public virtual global::System.Threading.Tasks.Task<global::Transcoding.HelloReply2> BadPattern(global::Transcoding.HelloRequest request, grpc::ServerCallContext context)
Services\GreeterService.cs (2)
29public override Task<HelloReply> SayHello(HelloRequest request, ServerCallContext context) 35public override Task<HelloReply> SayHelloFrom(HelloRequestFrom request, ServerCallContext context)
ScenarioTests.Common.Tests (17)
ScenarioTestTypes.cs (2)
770public Task<Guid> ServicePingCallback(Guid guid) 779public Task<Guid> ServicePingFaultCallback(Guid guid)
ServiceInterfaces.cs (15)
30Task<String> EchoWithTimeoutAsync(String message, TimeSpan serviceOperationTimeout); 82Task<Stream> EchoStreamAsync(Stream stream); 138Task<string> EchoXmlSerializerFormatAsync(string message); 188System.Threading.Tasks.Task<System.ServiceModel.Channels.Message> MessageRequestReplyAsync(System.ServiceModel.Channels.Message request); 194System.Threading.Tasks.Task<string> EchoAsync(string message); 241System.Threading.Tasks.Task<System.ServiceModel.Channels.Message> MessageRequestReplyAsync(System.ServiceModel.Channels.Message request); 247System.Threading.Tasks.Task<string> EchoAsync(string message); 279Task<FeedbackResponse> FeedbackAsync(FeedbackRequest request); 372Task<Guid> Ping(Guid guid); 377Task<Guid> FaultPing(Guid guid); 383Task<Guid> ServicePingCallback(Guid guid); 388Task<Guid> ServicePingFaultCallback(Guid guid); 891Task<int> GetNextNumberAsync(); 893Task<string> EchoAsync(string echo); 907Task<string> DuplexEchoAsync(string echo);
SecurityWebSite (5)
Controllers\AdministrationController.cs (1)
36public async Task<IActionResult> SignInCookie2()
Controllers\LoginController.cs (3)
16public async Task<IActionResult> LoginDefaultScheme() 24public async Task<IActionResult> LoginClaimA() 32public async Task<IActionResult> LoginClaimAB()
CountingPolicyEvaluator.cs (1)
16public override Task<PolicyAuthorizationResult> AuthorizeAsync(AuthorizationPolicy policy, AuthenticateResult authenticationResult, HttpContext context, object resource)
ServerComparison.FunctionalTests (1)
ResponseCompressionTests.cs (1)
224private static async Task<string> ReadCompressedAsStringAsync(HttpContent content)
ServerComparison.TestSites (1)
OneTransformPerRequest.cs (1)
21public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal principal)
Shared.Tests (1)
Memoization\MemoizeTests.cs (1)
24Func<int, Task<int>> doubler = x => Task.FromResult(x * 2);
SignalR.Client.FunctionalTestApp (1)
TestHub.cs (1)
83public async Task<string> StreamingConcat(ChannelReader<string> stream)
SignalRSamples (3)
Hubs\UploadHub.cs (3)
19public async Task<string> UploadWord(ChannelReader<string> source) 38public async Task<string> ScoreTracker(ChannelReader<int> player1, ChannelReader<int> player2) 46async Task<int> Loop(ChannelReader<int> reader)
SocialSample (1)
Startup.cs (1)
468private Task<OAuthOptions> GetOAuthOptionsAsync(HttpContext context, string currentAuthType)
SocialWeather (4)
IStreamFormatter.cs (1)
8Task<T> ReadAsync(Stream stream);
Json\JSonStreamFormatter.cs (1)
12public async Task<T> ReadAsync(Stream stream)
Pipe\PipeWeatherStreamFormatter.cs (1)
10public async Task<WeatherReport> ReadAsync(Stream stream)
Protobuf\ProtobufWeatherStreamFormatter.cs (1)
10public Task<SocialWeather.WeatherReport> ReadAsync(Stream stream)
Sockets.BindTests (5)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
104var task = _reader.ReadAsync(actual, offset, actual.Length - offset);
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
39public Task<LogMessage> WaitForMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
34public Task<LogMessage> WaitForLogMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TransportTestHelpers\HostNameIsReachableAttribute.cs (2)
31private async Task<bool> HostNameIsReachable() 62public static async Task<Socket> ConnectToHost(string hostName, int port)
Sockets.FunctionalTests (14)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (1)
104var task = _reader.ReadAsync(actual, offset, actual.Length - offset);
src\Servers\Kestrel\shared\test\StreamExtensions.cs (4)
15public static async Task<int> FillBufferUntilEndAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 34public static async Task<int> FillEntireBufferAsync(this Stream stream, byte[] buffer, CancellationToken cancellationToken = default) 49public static async Task<byte[]> ReadAtLeastLengthAsync(this Stream stream, int length, int bufferLength = 1024, bool allowEmpty = false, CancellationToken cancellationToken = default) 76public static async Task<byte[]> ReadUntilEndAsync(this Stream stream, int bufferLength = 1024, CancellationToken cancellationToken = default)
src\Servers\Kestrel\shared\test\TestApplicationErrorLogger.cs (1)
39public Task<LogMessage> WaitForMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TestApplicationErrorLoggerLoggedTest.cs (1)
34public Task<LogMessage> WaitForLogMessage(Func<LogMessage, bool> messageFilter)
src\Servers\Kestrel\shared\test\TransportTestHelpers\HostNameIsReachableAttribute.cs (2)
31private async Task<bool> HostNameIsReachable() 62public static async Task<Socket> ConnectToHost(string hostName, int port)
src\Servers\Kestrel\test\FunctionalTests\Http2\ShutdownTests.cs (4)
142var requestTask = Client.GetStringAsync($"https://localhost:{server.Port}/"); 194var requestTask = Client.GetStringAsync($"https://localhost:{server.Port}/"); 200var closingMessageTask = WaitForLogMessage(m => m.Message.Contains("is closing.")).DefaultTimeout(); 207var closedMessageTask = WaitForLogMessage(m => m.Message.Contains("is closed. The last processed stream ID was 1.")).DefaultTimeout();
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (1)
298private async Task<IHost> StartHost(long? maxRequestBufferSize,
StaticFilesAuth (2)
Controllers\AccountController.cs (2)
28public async Task<IActionResult> Login(string userName, string password, string returnUrl = null) 61public async Task<IActionResult> Logout()
Stress.AppHost (2)
Program.cs (2)
123var resultTask1 = interactionService.PromptConfirmationAsync("Command confirmation", "Are you sure?", cancellationToken: commandContext.CancellationToken); 124var resultTask2 = interactionService.PromptConfirmationAsync("Command confirmation", "Are you really sure?", new MessageBoxInteractionOptions { Intent = MessageIntent.Warning }, cancellationToken: commandContext.CancellationToken);
Stress.TelemetryService (3)
artifacts\obj\Stress.TelemetryService\Debug\net8.0\opentelemetry\proto\collector\logs\v1\LogsServiceGrpc.cs (1)
99public virtual global::System.Threading.Tasks.Task<global::OpenTelemetry.Proto.Collector.Logs.V1.ExportLogsServiceResponse> Export(global::OpenTelemetry.Proto.Collector.Logs.V1.ExportLogsServiceRequest request, grpc::ServerCallContext context)
artifacts\obj\Stress.TelemetryService\Debug\net8.0\opentelemetry\proto\collector\metrics\v1\MetricsServiceGrpc.cs (1)
99public virtual global::System.Threading.Tasks.Task<global::OpenTelemetry.Proto.Collector.Metrics.V1.ExportMetricsServiceResponse> Export(global::OpenTelemetry.Proto.Collector.Metrics.V1.ExportMetricsServiceRequest request, grpc::ServerCallContext context)
artifacts\obj\Stress.TelemetryService\Debug\net8.0\opentelemetry\proto\collector\trace\v1\TraceServiceGrpc.cs (1)
99public virtual global::System.Threading.Tasks.Task<global::OpenTelemetry.Proto.Collector.Trace.V1.ExportTraceServiceResponse> Export(global::OpenTelemetry.Proto.Collector.Trace.V1.ExportTraceServiceRequest request, grpc::ServerCallContext context)
Swaggatherer (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
System.Console (5)
System\IO\SyncTextReader.cs (5)
94public override Task<string?> ReadLineAsync() 106public override Task<string> ReadToEndAsync() 111public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) 118public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) 130public override Task<int> ReadAsync(char[] buffer, int index, int count)
System.Data.Common (40)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
22private static Task<bool>? _trueTask; 23internal static Task<bool> TrueTask => _trueTask ??= Task.FromResult(true); 25private static Task<bool>? _falseTask; 26internal static Task<bool> FalseTask => _falseTask ??= Task.FromResult(false);
System\Data\Common\AdapterUtil.Common.cs (1)
22internal static Task<T> CreatedTaskWithCancellation<T>() => Task.FromCanceled<T>(new CancellationToken(true));
System\Data\Common\DbBatch.cs (5)
38public Task<DbDataReader> ExecuteReaderAsync(CancellationToken cancellationToken = default) 41public Task<DbDataReader> ExecuteReaderAsync( 46protected abstract Task<DbDataReader> ExecuteDbDataReaderAsync( 52public abstract Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken = default); 56public abstract Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken = default);
System\Data\Common\DbCommand.cs (9)
119public Task<int> ExecuteNonQueryAsync() => ExecuteNonQueryAsync(CancellationToken.None); 121public virtual Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken) 150public Task<DbDataReader> ExecuteReaderAsync() => 153public Task<DbDataReader> ExecuteReaderAsync(CancellationToken cancellationToken) => 156public Task<DbDataReader> ExecuteReaderAsync(CommandBehavior behavior) => 159public Task<DbDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) => 162protected virtual Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) 191public Task<object?> ExecuteScalarAsync() => 194public virtual Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken)
System\Data\Common\DbConnection.cs (3)
229public virtual Task<DataTable> GetSchemaAsync(CancellationToken cancellationToken = default) 259public virtual Task<DataTable> GetSchemaAsync( 292public virtual Task<DataTable> GetSchemaAsync(string collectionName, string?[] restrictionValues,
System\Data\Common\DbDataReader.cs (10)
103public virtual Task<DataTable?> GetSchemaTableAsync(CancellationToken cancellationToken = default) 132public virtual Task<ReadOnlyCollection<DbColumn>> GetColumnSchemaAsync( 247public Task<T> GetFieldValueAsync<T>(int ordinal) => 250public virtual Task<T> GetFieldValueAsync<T>(int ordinal, CancellationToken cancellationToken) 273public Task<bool> IsDBNullAsync(int ordinal) => IsDBNullAsync(ordinal, CancellationToken.None); 275public virtual Task<bool> IsDBNullAsync(int ordinal, CancellationToken cancellationToken) 298public Task<bool> ReadAsync() => ReadAsync(CancellationToken.None); 300public virtual Task<bool> ReadAsync(CancellationToken cancellationToken) 319public Task<bool> NextResultAsync() => NextResultAsync(CancellationToken.None); 321public virtual Task<bool> NextResultAsync(CancellationToken cancellationToken)
System\Data\Common\DbDataSource.cs (6)
135public override async Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken) 188public override async Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken) 240protected override async Task<DbDataReader> ExecuteDbDataReaderAsync( 394public override async Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken) 447public override async Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken) 499protected override async Task<DbDataReader> ExecuteDbDataReaderAsync(
System\Data\DataReaderExtensions.cs (2)
99public static Task<T> GetFieldValueAsync<T>(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken)) 192public static Task<bool> IsDBNullAsync(this DbDataReader reader, string name, CancellationToken cancellationToken = default(CancellationToken))
System.Data.Odbc (9)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
47Task<DbConnectionInternal> newTask;
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (4)
22private static Task<bool>? _trueTask; 23internal static Task<bool> TrueTask => _trueTask ??= Task.FromResult(true); 25private static Task<bool>? _falseTask; 26internal static Task<bool> FalseTask => _falseTask ??= Task.FromResult(false);
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (4)
26private static readonly Task<DbConnectionInternal?>[] s_pendingOpenNonPooled = new Task<DbConnectionInternal?>[Environment.ProcessorCount]; 27private static Task<DbConnectionInternal?>? s_completedTask; 132private static Task<DbConnectionInternal?> GetCompletedTask()
System.Formats.Tar (1)
System\Formats\Tar\SubReadStream.cs (1)
134public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Compression (27)
System\IO\Compression\DeflateManaged\DeflateManagedStream.cs (1)
248public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\DeflateZLib\DeflateStream.cs (1)
403public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\GZipStream.cs (1)
199public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\PositionPreservingWriteOnlyStreamWrapper.cs (1)
115public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => throw new NotSupportedException(SR.NotSupported);
System\IO\Compression\ZipArchive.Async.cs (1)
65public static async Task<ZipArchive> CreateAsync(Stream stream, ZipArchiveMode mode, bool leaveOpen, Encoding? entryNameEncoding, CancellationToken cancellationToken = default)
System\IO\Compression\ZipArchiveEntry.Async.cs (8)
22public async Task<Stream> OpenAsync(CancellationToken cancellationToken = default) 40internal async Task<long> GetOffsetOfCompressedDataAsync(CancellationToken cancellationToken) 55private async Task<MemoryStream> GetUncompressedDataAsync(CancellationToken cancellationToken) 181private async Task<bool> GetIsOpenableAsync(bool needToUncompress, bool needToLoadIntoMemory, CancellationToken cancellationToken) 196private async Task<Stream> OpenInReadModeAsync(bool checkOpenable, CancellationToken cancellationToken) 206private async Task<WrappedStream> OpenInUpdateModeAsync(CancellationToken cancellationToken) 230private async Task<(bool, string?)> IsOpenableAsync(bool needToUncompress, bool needToLoadIntoMemory, CancellationToken cancellationToken) 261private async Task<bool> WriteLocalFileHeaderAsync(bool isEmptyFile, bool forceWrite, CancellationToken cancellationToken)
System\IO\Compression\ZipArchiveEntry.cs (1)
1440public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\ZipBlocks.Async.cs (6)
58public static async Task<Zip64EndOfCentralDirectoryLocator> TryReadBlockAsync(Stream stream, CancellationToken cancellationToken) 83public static async Task<Zip64EndOfCentralDirectoryRecord> TryReadBlockAsync(Stream stream, CancellationToken cancellationToken) 111public static async Task<(List<ZipGenericExtraField>, byte[] trailingData)> GetExtraFieldsAsync(Stream stream, CancellationToken cancellationToken) 145public static async Task<bool> TrySkipBlockAsync(Stream stream, CancellationToken cancellationToken) 165public static async Task<(bool, int, ZipCentralDirectoryFileHeader?)> TryReadBlockAsync(ReadOnlyMemory<byte> buffer, Stream furtherReads, bool saveExtraFieldsAndComments, CancellationToken cancellationToken) 243public static async Task<ZipEndOfCentralDirectoryBlock> ReadBlockAsync(Stream stream, CancellationToken cancellationToken)
System\IO\Compression\ZipCustomStreams.cs (3)
117public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 335public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 489public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\ZipHelper.Async.cs (3)
16internal static async Task<int> ReadBytesAsync(Stream stream, Memory<byte> buffer, int bytesToRead, CancellationToken cancellationToken) 33internal static async Task<bool> SeekBackwardsToSignatureAsync(Stream stream, ReadOnlyMemory<byte> signatureToFind, int maxBytesToRead, CancellationToken cancellationToken) 102private static async Task<int> SeekBackwardsAndReadAsync(Stream stream, Memory<byte> buffer, int overlap, CancellationToken cancellationToken)
System\IO\Compression\ZLibStream.cs (1)
154public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Compression.Brotli (1)
System\IO\Compression\dec\BrotliStream.Decompress.cs (1)
119public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Compression.ZipFile (6)
System\IO\Compression\ZipFile.Create.Async.cs (3)
35public static Task<ZipArchive> OpenReadAsync(string archiveFileName, CancellationToken cancellationToken = default) => OpenAsync(archiveFileName, ZipArchiveMode.Read, cancellationToken); 74public static Task<ZipArchive> OpenAsync(string archiveFileName, ZipArchiveMode mode, CancellationToken cancellationToken = default) => OpenAsync(archiveFileName, mode, entryNameEncoding: null, cancellationToken); 152public static async Task<ZipArchive> OpenAsync(string archiveFileName, ZipArchiveMode mode, Encoding? entryNameEncoding, CancellationToken cancellationToken = default)
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (3)
46public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, string sourceFileName, string entryName, CancellationToken cancellationToken = default) => 79public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, 83internal static async Task<ZipArchiveEntry> DoCreateEntryFromFileAsync(this ZipArchive destination, string sourceFileName, string entryName,
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (1)
256public override Task<int> ReadAsync(byte[] buffer, int offset, int count, Threading.CancellationToken cancellationToken)
System.IO.Pipelines (1)
System\IO\Pipelines\PipeReaderStream.cs (1)
83public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Pipes (1)
System\IO\Pipes\PipeStream.Unix.cs (1)
58public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Ports (3)
System\IO\Ports\SerialStream.Unix.cs (3)
427Task<int> t = ReadAsync(array, offset, count, cts?.Token ?? CancellationToken.None); 443public override Task<int> ReadAsync(byte[] array, int offset, int count, CancellationToken cancellationToken) 448return Task<int>.FromResult(0); // return immediately if no bytes requested; no need for overhead.
System.Linq.Expressions (1)
System\Linq\Expressions\StackGuard.cs (1)
68Task<R> task = Task.Factory.StartNew(action!, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default);
System.Memory.Data (7)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (1)
126public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\BinaryData.cs (6)
250public static Task<BinaryData> FromStreamAsync(Stream stream, CancellationToken cancellationToken = default) 263public static Task<BinaryData> FromStreamAsync(Stream stream, string? mediaType, 271private static async Task<BinaryData> FromStreamAsync(Stream stream, bool useAsync, 337public static Task<BinaryData> FromFileAsync(string path, CancellationToken cancellationToken = default) 349public static Task<BinaryData> FromFileAsync(string path, string? mediaType, 356async Task<BinaryData> Core()
System.Net.Http (99)
src\libraries\Common\src\System\IO\DelegatingStream.cs (1)
105public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\Common\src\System\IO\ReadOnlyMemoryStream.cs (1)
126public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Http\ByteArrayContent.cs (1)
64protected override Task<Stream> CreateContentReadStreamAsync() =>
System\Net\Http\DelegatingHandler.cs (1)
53protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\EmptyContent.cs (2)
32protected override Task<Stream> CreateContentReadStreamAsync() => 35protected override Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) =>
System\Net\Http\HttpBaseStream.cs (1)
51public sealed override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Http\HttpClient.cs (44)
159public Task<string> GetStringAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 162public Task<string> GetStringAsync(Uri? requestUri) => 165public Task<string> GetStringAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 168public Task<string> GetStringAsync(Uri? requestUri, CancellationToken cancellationToken) 178private async Task<string> GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 231public Task<byte[]> GetByteArrayAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 234public Task<byte[]> GetByteArrayAsync(Uri? requestUri) => 237public Task<byte[]> GetByteArrayAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 240public Task<byte[]> GetByteArrayAsync(Uri? requestUri, CancellationToken cancellationToken) 250private async Task<byte[]> GetByteArrayAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 306public Task<Stream> GetStreamAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 309public Task<Stream> GetStreamAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 312public Task<Stream> GetStreamAsync(Uri? requestUri) => 315public Task<Stream> GetStreamAsync(Uri? requestUri, CancellationToken cancellationToken) 325private async Task<Stream> GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 356public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 359public Task<HttpResponseMessage> GetAsync(Uri? requestUri) => 362public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption) => 365public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption) => 368public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 371public Task<HttpResponseMessage> GetAsync(Uri? requestUri, CancellationToken cancellationToken) => 374public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 377public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 380public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 383public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) => 386public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 389public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 396public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 399public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) => 402public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 405public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 412public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 415public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) => 418public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 421public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 428public Task<HttpResponseMessage> DeleteAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 431public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri) => 434public Task<HttpResponseMessage> DeleteAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 437public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri, CancellationToken cancellationToken) => 496public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request) => 499public override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => 502public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption) => 505public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 513async Task<HttpResponseMessage> Core(
System\Net\Http\HttpClientHandler.cs (1)
367protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\HttpContent.cs (16)
87public Task<string> ReadAsStringAsync() => 90public Task<string> ReadAsStringAsync(CancellationToken cancellationToken) 183public Task<byte[]> ReadAsByteArrayAsync() => 186public Task<byte[]> ReadAsByteArrayAsync(CancellationToken cancellationToken) 229public Task<Stream> ReadAsStreamAsync() => 232public Task<Stream> ReadAsStreamAsync(CancellationToken cancellationToken) 242Task<Stream> t = IsBuffered ? 248else if (_contentReadStream is Task<Stream> t) // have a Task<Stream> 255Task<Stream> ts = Task.FromResult((Stream)_contentReadStream); 283Debug.Assert(_contentReadStream is Task<Stream>, $"Expected a Task<Stream>, got ${_contentReadStream}"); 284Task<Stream> t = (Task<Stream>)_contentReadStream; 539protected virtual Task<Stream> CreateContentReadStreamAsync() 547protected virtual Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) 639(_contentReadStream is Task<Stream> t && t.Status == TaskStatus.RanToCompletion ? t.Result : null); 762private static async Task<TResult> WaitAndReturnAsync<TState, TResult>(Task waitTask, TState state, Func<TState, TResult> returnFunc)
System\Net\Http\HttpMessageHandler.cs (1)
27protected internal abstract Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken);
System\Net\Http\HttpMessageInvoker.cs (2)
64public virtual Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 77static async Task<HttpResponseMessage> SendAsyncWithTelemetry(HttpMessageHandler handler, HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\MessageProcessingHandler.cs (2)
42protected internal sealed override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, 56Task<HttpResponseMessage> sendAsyncTask = base.SendAsync(newRequestMessage, cancellationToken);
System\Net\Http\MultipartContent.cs (3)
240protected override Task<Stream> CreateContentReadStreamAsync() => 243protected override Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) => 520public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Http\ReadOnlyMemoryContent.cs (1)
37protected override Task<Stream> CreateContentReadStreamAsync() =>
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.Digest.cs (1)
39public static async Task<string?> GetDigestTokenForCredential(NetworkCredential credential, HttpRequestMessage request, DigestResponse digestResponse)
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (4)
51private static Task<HttpResponseMessage> InnerSendAsync(HttpRequestMessage request, bool async, bool isProxyAuth, HttpConnectionPool pool, HttpConnection connection, CancellationToken cancellationToken) 76private static async Task<HttpResponseMessage> SendWithNtAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, bool isProxyAuth, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 235public static Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, TokenImpersonationLevel impersonationLevel, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 240public static Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpRequestMessage request, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
368private Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 378public Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
161protected override Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) =>
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (2)
345public Task<bool> WaitForAvailableStreamsAsync() 1996public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
240public Task<bool> WaitForAvailableStreamsAsync() 264public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, WaitForHttp3ConnectionActivity waitForConnectionActivity, bool streamAvailable, CancellationToken cancellationToken) 334Task<HttpResponseMessage> responseTask = requestStream.SendAsync(cancellationToken);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (1)
142public async Task<HttpResponseMessage> SendAsync(CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (2)
532public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 997HttpRequestMessage request, Task<bool> allowExpect100ToContinueTask,
System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs (1)
75protected sealed override Task<Stream> CreateContentReadStreamAsync() =>
System\Net\Http\SocketsHttpHandler\HttpMessageHandlerStage.cs (1)
20protected internal sealed override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) =>
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (3)
23private Task<HttpMessageHandlerStage>? _handlerChainSetupTask; 601protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 625async Task<HttpResponseMessage> CreateHandlerAndSendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\StreamContent.cs (1)
106protected override Task<Stream> CreateContentReadStreamAsync()
System.Net.Http.Json (71)
System\Net\Http\Json\HttpClientJsonExtensions.cs (13)
19private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 24private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 27private static Task<object?> FromJsonAsyncCore(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 30private static Task<TValue?> FromJsonAsyncCore<TValue>(Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken) => 33private static Task<TValue?> FromJsonAsyncCore<TValue, TJsonOptions>( 34Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> getMethod, 54Task<HttpResponseMessage> responseTask; 72static async Task<TValue?> Core( 74Task<HttpResponseMessage> responseTask,
System\Net\Http\Json\HttpClientJsonExtensions.Delete.cs (13)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_deleteAsync = 33public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 48public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 63public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 78public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 91public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 104public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 117public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) => 130public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) => 144public static Task<object?> DeleteFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, CancellationToken cancellationToken = default) => 158public static Task<object?> DeleteFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) => 172public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken = default) => 186public static Task<TValue?> DeleteFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Get.cs (13)
18private static readonly Func<HttpClient, Uri?, CancellationToken, Task<HttpResponseMessage>> s_getAsync = 23public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 28public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 33public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 38public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonSerializerOptions? options, CancellationToken cancellationToken = default) => 41public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 44public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) => 47public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) => 50public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) => 55public static Task<object?> GetFromJsonAsync(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, Type type, CancellationToken cancellationToken = default) => 60public static Task<object?> GetFromJsonAsync(this HttpClient client, Uri? requestUri, Type type, CancellationToken cancellationToken = default) => 65public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken = default) => 70public static Task<TValue?> GetFromJsonAsync<TValue>(this HttpClient client, Uri? requestUri, CancellationToken cancellationToken = default) =>
System\Net\Http\Json\HttpClientJsonExtensions.Patch.cs (6)
27public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 48public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 68public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken) 83public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 97public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) 116public static Task<HttpResponseMessage> PatchAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Post.cs (6)
16public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 26public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 36public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken) 41public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 44public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) 52public static Task<HttpResponseMessage> PostAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpClientJsonExtensions.Put.cs (6)
16public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 26public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonSerializerOptions? options = null, CancellationToken cancellationToken = default) 36public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, CancellationToken cancellationToken) 41public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, CancellationToken cancellationToken) 44public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, [StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default) 52public static Task<HttpResponseMessage> PutAsJsonAsync<TValue>(this HttpClient client, Uri? requestUri, TValue value, JsonTypeInfo<TValue> jsonTypeInfo, CancellationToken cancellationToken = default)
System\Net\Http\Json\HttpContentJsonExtensions.cs (12)
30public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken = default) 46public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, CancellationToken cancellationToken = default) 61public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken = default) 77public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, CancellationToken cancellationToken = default) 84private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerOptions? options, CancellationToken cancellationToken) 94private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonSerializerOptions? options, CancellationToken cancellationToken) 102public static Task<object?> ReadFromJsonAsync(this HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken = default) 109public static Task<T?> ReadFromJsonAsync<T>(this HttpContent content, JsonTypeInfo<T> jsonTypeInfo, CancellationToken cancellationToken = default) 116private static async Task<object?> ReadFromJsonAsyncCore(HttpContent content, Type type, JsonSerializerContext context, CancellationToken cancellationToken) 124private static async Task<T?> ReadFromJsonAsyncCore<T>(HttpContent content, JsonTypeInfo<T> jsonTypeInfo, CancellationToken cancellationToken) 134Task<Stream> task = ReadHttpContentStreamAsync(content, cancellationToken); 141private static async ValueTask<Stream> GetTranscodingStreamAsync(Task<Stream> task, Encoding sourceEncoding)
System\Net\Http\Json\HttpContentJsonExtensions.netcoreapp.cs (1)
13private static Task<Stream> ReadHttpContentStreamAsync(HttpContent content, CancellationToken cancellationToken)
System\Net\Http\Json\LengthLimitReadStream.cs (1)
41public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) =>
System.Net.Http.WinHttpHandler (1)
artifacts\obj\System.Net.Http.WinHttpHandler\Debug\net10.0\System.Net.Http.WinHttpHandler.notsupported.cs (1)
52protected override System.Threading.Tasks.Task<System.Net.Http.HttpResponseMessage> SendAsync(System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_WinHttpHandler); }
System.Net.HttpListener (8)
System\Net\HttpListener.cs (1)
290public Task<HttpListenerContext> GetContextAsync()
System\Net\HttpListenerContext.cs (2)
25public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync(string? subProtocol) 30public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync(string? subProtocol, TimeSpan keepAliveInterval)
System\Net\HttpListenerRequest.cs (1)
254public Task<X509Certificate2?> GetClientCertificateAsync()
System\Net\Managed\HttpListenerContext.Managed.cs (2)
89public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval) 94public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment<byte> internalBuffer)
System\Net\Managed\WebSockets\HttpWebSocket.Managed.cs (2)
13internal static async Task<HttpListenerWebSocketContext> AcceptWebSocketAsyncCore(HttpListenerContext context, 166public override Task<WebSocketReceiveResult> ReceiveAsync(
System.Net.Mail (17)
System\Net\DelegatedStream.cs (1)
138public sealed override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Mail\SmtpClient.cs (4)
410private async Task<(Exception? ex, bool synchronous)> SendAsyncInternal<TIOAdapter>(MailMessage message, bool invokeSendCompleted, object? userToken, bool forceWrapExceptions = false, CancellationToken cancellationToken = default) 593Task<(Exception? ex, bool _)> task = SendAsyncInternal<AsyncReadWriteAdapter>(message, true, userToken, true); 663Task<(Exception?, bool)> task = SendAsyncInternal<AsyncReadWriteAdapter>(message, false, null, true, cancellationToken); 684static async Task WaitAndRethrowIfNeeded(Task<(Exception? ex, bool _)> task)
System\Net\Mail\SmtpCommands.cs (7)
18internal static async Task<LineInfo> SendAsync<TIOAdapter>(SmtpConnection conn, CancellationToken cancellationToken = default) 28internal static async Task<LineInfo[]> SendAsync<TIOAdapter>(SmtpConnection conn, CancellationToken cancellationToken = default) 38internal static async Task<LineInfo> SendAsync<TIOAdapter>(SmtpConnection conn, string type, string message, CancellationToken cancellationToken = default) 46internal static async Task<LineInfo> SendAsync<TIOAdapter>(SmtpConnection conn, string? message, CancellationToken cancellationToken = default) 170internal static async Task<string[]> SendAsync<TIOAdapter>(SmtpConnection conn, string domain, CancellationToken cancellationToken = default) 309static async Task<LineInfo> SendAndCheck(SmtpConnection conn, CancellationToken cancellationToken) 359internal static async Task<(bool success, string response)> SendAsync<TIOAdapter>(SmtpConnection conn, string to, CancellationToken cancellationToken = default)
System\Net\Mail\SmtpReplyReader.cs (2)
31internal Task<LineInfo[]> ReadLinesAsync<TIOAdapter>(CancellationToken cancellationToken) where TIOAdapter : IReadWriteAdapter 36internal Task<LineInfo> ReadLineAsync<TIOAdapter>(CancellationToken cancellationToken) where TIOAdapter : IReadWriteAdapter
System\Net\Mail\SmtpReplyReaderFactory.cs (2)
259internal async Task<LineInfo[]> ReadLinesAsync<TIOAdapter>(SmtpReplyReader caller, bool oneLine = false, CancellationToken cancellationToken = default) where TIOAdapter : IReadWriteAdapter 328internal async Task<LineInfo> ReadLineAsync<TIOAdapter>(SmtpReplyReader caller, CancellationToken cancellationToken) where TIOAdapter : IReadWriteAdapter
System\Net\Mail\SmtpTransport.cs (1)
112internal async Task<(MailWriter, List<SmtpFailedRecipientException>?)> SendMailAsync<TIOAdapter>(MailAddress sender, MailAddressCollection recipients, string deliveryNotify, bool allowUnicode, CancellationToken cancellationToken = default)
System.Net.NameResolution (22)
System\Net\Dns.cs (22)
94public static Task<IPHostEntry> GetHostEntryAsync(string hostNameOrAddress) => 103/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns 106public static Task<IPHostEntry> GetHostEntryAsync(string hostNameOrAddress, CancellationToken cancellationToken) => 116/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns 119public static Task<IPHostEntry> GetHostEntryAsync(string hostNameOrAddress, AddressFamily family, CancellationToken cancellationToken = default) 123Task<IPHostEntry> t = GetHostEntryCoreAsync(hostNameOrAddress, justReturnParsedIp: false, throwOnIIPAny: true, family, cancellationToken); 152public static Task<IPHostEntry> GetHostEntryAsync(IPAddress address) 224public static Task<IPAddress[]> GetHostAddressesAsync(string hostNameOrAddress) => 225(Task<IPAddress[]>)GetHostEntryOrAddressesCoreAsync(hostNameOrAddress, justReturnParsedIp: true, throwOnIIPAny: true, justAddresses: true, AddressFamily.Unspecified, CancellationToken.None); 233/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns an array of 236public static Task<IPAddress[]> GetHostAddressesAsync(string hostNameOrAddress, CancellationToken cancellationToken) => 237(Task<IPAddress[]>)GetHostEntryOrAddressesCoreAsync(hostNameOrAddress, justReturnParsedIp: true, throwOnIIPAny: true, justAddresses: true, AddressFamily.Unspecified, cancellationToken); 246/// The task object representing the asynchronous operation. The <see cref="Task{TResult}.Result"/> property on the task object returns an array of 249public static Task<IPAddress[]> GetHostAddressesAsync(string hostNameOrAddress, AddressFamily family, CancellationToken cancellationToken = default) => 250(Task<IPAddress[]>)GetHostEntryOrAddressesCoreAsync(hostNameOrAddress, justReturnParsedIp: true, throwOnIIPAny: true, justAddresses: true, family, cancellationToken); 547private static Task<IPHostEntry> GetHostEntryCoreAsync(string hostName, bool justReturnParsedIp, bool throwOnIIPAny, AddressFamily family, CancellationToken cancellationToken) => 548(Task<IPHostEntry>)GetHostEntryOrAddressesCoreAsync(hostName, justReturnParsedIp, throwOnIIPAny, justAddresses: false, family, cancellationToken); 648private static Task<T>? GetAddrInfoWithTelemetryAsync<T>(string hostName, bool justAddresses, AddressFamily addressFamily, CancellationToken cancellationToken) 663static async Task<T> CompleteAsync(Task task, string hostName, long startingTimeStamp) 670result = await ((Task<T>)task).ConfigureAwait(false); 725private static Task<TResult> RunAsync<TResult>(Func<object, NameResolutionActivity, TResult> func, object key, CancellationToken cancellationToken) 736Task<TResult>? task = null;
System.Net.NetworkInformation (3)
System\Net\NetworkInformation\IPGlobalProperties.cs (1)
124public virtual Task<UnicastIPAddressInformationCollection> GetUnicastAddressesAsync()
System\Net\NetworkInformation\UnixIPGlobalProperties.cs (2)
43Task<UnicastIPAddressInformationCollection> t = GetUnicastAddressesAsync(); 52public sealed override Task<UnicastIPAddressInformationCollection> GetUnicastAddressesAsync()
System.Net.Ping (18)
System\Net\NetworkInformation\Ping.cs (15)
522private void TranslateTaskToEap(object? userToken, Task<PingReply> pingTask) 533public Task<PingReply> SendPingAsync(IPAddress address) 538public Task<PingReply> SendPingAsync(string hostNameOrAddress) 543public Task<PingReply> SendPingAsync(IPAddress address, int timeout) 548public Task<PingReply> SendPingAsync(string hostNameOrAddress, int timeout) 553public Task<PingReply> SendPingAsync(IPAddress address, int timeout, byte[] buffer) 558public Task<PingReply> SendPingAsync(string hostNameOrAddress, int timeout, byte[] buffer) 563public Task<PingReply> SendPingAsync(IPAddress address, int timeout, byte[] buffer, PingOptions? options) 583public Task<PingReply> SendPingAsync(IPAddress address, TimeSpan timeout, byte[]? buffer = null, PingOptions? options = null, CancellationToken cancellationToken = default) 588private Task<PingReply> SendPingAsync(IPAddress address, int timeout, byte[] buffer, PingOptions? options, CancellationToken cancellationToken) 603public Task<PingReply> SendPingAsync(string hostNameOrAddress, int timeout, byte[] buffer, PingOptions? options) 626public Task<PingReply> SendPingAsync(string hostNameOrAddress, TimeSpan timeout, byte[]? buffer = null, PingOptions? options = null, CancellationToken cancellationToken = default) 631private Task<PingReply> SendPingAsync(string hostNameOrAddress, int timeout, byte[] buffer, PingOptions? options, CancellationToken cancellationToken) 704private async Task<PingReply> SendPingAsyncInternal<TArg>( 721Task<PingReply> pingTask = SendPingAsyncCore(address, buffer, timeout, options);
System\Net\NetworkInformation\Ping.PingUtility.cs (1)
74private async Task<PingReply> SendWithPingUtilityAsync(IPAddress address, byte[] buffer, int timeout, PingOptions? options)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
322private async Task<PingReply> SendIcmpEchoRequestOverRawSocketAsync(IPAddress address, byte[] buffer, int timeout, PingOptions? options)
System\Net\NetworkInformation\Ping.Unix.cs (1)
30private Task<PingReply> SendPingAsyncCore(IPAddress address, byte[] buffer, int timeout, PingOptions? options)
System.Net.Quic (3)
System\Net\Quic\QuicConnection.cs (1)
754var task = _sslConnectionOptions.StartAsyncCertificateValidation((IntPtr)data.Certificate, (IntPtr)data.Chain);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (1)
69internal async Task<bool> StartAsyncCertificateValidation(IntPtr certificatePtr, IntPtr chainPtr)
System\Net\Quic\QuicStream.Stream.cs (1)
143public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
System.Net.Requests (21)
System\Net\FileWebRequest.cs (5)
160Task<Stream> t = Task.Factory.StartNew<Stream>(s => ((FileWebRequest)s!).CreateWriteStream(), 165public override Task<Stream> GetRequestStreamAsync() 221Task<WebResponse> t = Task.Factory.StartNew(s => ((FileWebRequest)s!).CreateResponse(), 226public override Task<WebResponse> GetResponseAsync() 422public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\HttpWebRequest.cs (9)
48private Task<HttpResponseMessage>? _sendRequestTask; 1090private async Task<Stream> InternalGetRequestStream() 1108Task<Stream> getStreamTask = getStreamTcs.Task; 1169if (asyncResult == null || !(asyncResult is Task<Stream>)) 1182stream = ((Task<Stream>)asyncResult).GetAwaiter().GetResult(); 1194private Task<HttpResponseMessage> SendRequest(bool async, HttpContent? content = null) 1262private async Task<WebResponse> HandleResponse(bool async) 1442if (asyncResult == null || !(asyncResult is Task<WebResponse>)) 1455response = ((Task<WebResponse>)asyncResult).GetAwaiter().GetResult();
System\Net\HttpWebResponse.cs (1)
408public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\NetworkStreamWrapper.cs (1)
188public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\TaskExtensions.cs (1)
13this Task<TResult> task,
System\Net\WebRequest.cs (4)
518public virtual async Task<Stream> GetRequestStreamAsync() 523return await Task<Stream>.Factory.FromAsync( 529public virtual async Task<WebResponse> GetResponseAsync() 534return await Task<WebResponse>.Factory.FromAsync(
System.Net.Security (12)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (6)
19private static readonly Func<string, CancellationToken, bool, Task<byte[]?>>? s_downloadBytes = CreateDownloadBytesFunc(); 31Task<byte[]?> task = DownloadAssetCore(uri, downloadTimeout, async: false); 36internal static Task<byte[]?> DownloadAssetAsync(string uri, TimeSpan downloadTimeout) 41private static async Task<byte[]?> DownloadAssetCore(string uri, TimeSpan downloadTimeout, bool async) 66Task<byte[]?> task = s_downloadBytes(uri, cts?.Token ?? default, async); 151private static Func<string, CancellationToken, bool, Task<byte[]?>>? CreateDownloadBytesFunc()
System\Net\Security\NegotiateStream.cs (1)
314public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Security\SslStream.cs (1)
881public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Security\SslStreamCertificateContext.Linux.cs (4)
41private Task<byte[]?>? _pendingDownload; 202Task<byte[]?>? pending = _pendingDownload; 213Task<byte[]?>? pending = _pendingDownload; 269private Task<byte[]?> FetchOcspAsync()
System.Net.Sockets (50)
System\Net\Sockets\NetworkStream.cs (1)
563public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Sockets\Socket.cs (9)
2505Task<int> t = SendAsync(new ReadOnlyMemory<byte>(buffer, offset, size), socketFlags, default).AsTask(); 2531Task<int> t = SendAsync(buffers, socketFlags); 2580Task<int> t = SendToAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2601Task<int> t = ReceiveAsync(new ArraySegment<byte>(buffer, offset, size), socketFlags, fromNetworkStream: false, default).AsTask(); 2626Task<int> t = ReceiveAsync(buffers, socketFlags); 2647Task<int> ti = TaskToAsyncResult.Unwrap<int>(asyncResult); 2671Task<SocketReceiveMessageFromResult> t = ReceiveMessageFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2712Task<SocketReceiveFromResult> t = ReceiveFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2750private async Task<(Socket s, byte[] buffer, int bytesReceived)> AcceptAndReceiveHelperAsync(Socket? acceptSocket, int receiveSize)
System\Net\Sockets\Socket.Tasks.cs (21)
23/// <summary>Cached instance for receive operations that return <see cref="Task{Int32}"/>.</summary> 25/// <summary>Cached instance for send operations that return <see cref="Task{Int32}"/>.</summary> 32public Task<Socket> AcceptAsync() => AcceptAsync((Socket?)null, CancellationToken.None).AsTask(); 46public Task<Socket> AcceptAsync(Socket? acceptSocket) => AcceptAsync(acceptSocket, CancellationToken.None).AsTask(); 276public Task<int> ReceiveAsync(ArraySegment<byte> buffer) => 285public Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) => ReceiveAsync(buffer, socketFlags, fromNetworkStream: false); 287internal Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, bool fromNetworkStream) 335public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers) => 344public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 366public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 376public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 468public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 478public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 527public Task<int> SendAsync(ArraySegment<byte> buffer) => 536public Task<int> SendAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) 599public Task<int> SendAsync(IList<ArraySegment<byte>> buffers) => 608public Task<int> SendAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 630public Task<int> SendToAsync(ArraySegment<byte> buffer, EndPoint remoteEP) => 640public Task<int> SendToAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) 853private Task<int> GetTaskForSendReceive(bool pending, TaskSocketAsyncEventArgs<int> saea, bool fromNetworkStream, bool isReceive) 855Task<int> t;
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
690Task<IPAddress[]> addressesTask = Dns.GetHostAddressesAsync(endPoint.Host, endPoint.AddressFamily, cancellationToken); 711async Task Core(MultiConnectSocketAsyncEventArgs internalArgs, Task<IPAddress[]> addressesTask, int port, SocketType socketType, ProtocolType protocolType, CancellationToken cancellationToken)
System\Net\Sockets\SocketTaskExtensions.cs (9)
15public static Task<Socket> AcceptAsync(this Socket socket) => 18public static Task<Socket> AcceptAsync(this Socket socket, Socket? acceptSocket) => 47public static Task<int> ReceiveAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags) => 53public static Task<int> ReceiveAsync(this Socket socket, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) => 56public static Task<SocketReceiveFromResult> ReceiveFromAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) => 59public static Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) => 63public static Task<int> SendAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags) => 69public static Task<int> SendAsync(this Socket socket, IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) => 73public static Task<int> SendToAsync(this Socket socket, ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) =>
System\Net\Sockets\TCPListener.cs (2)
224public Task<Socket> AcceptSocketAsync() => AcceptSocketAsync(CancellationToken.None).AsTask(); 236public Task<TcpClient> AcceptTcpClientAsync() => AcceptTcpClientAsync(CancellationToken.None).AsTask();
System\Net\Sockets\UDPClient.cs (6)
524public Task<int> SendAsync(byte[] datagram, int bytes) => 542public Task<int> SendAsync(byte[] datagram, int bytes, string? hostname, int port) => 567public Task<int> SendAsync(byte[] datagram, int bytes, IPEndPoint? endPoint) 615public Task<UdpReceiveResult> ReceiveAsync() 624async Task<UdpReceiveResult> WaitAndWrap(Task<SocketReceiveFromResult> task)
System.Net.WebClient (28)
src\libraries\Common\src\System\IO\DelegatingStream.cs (1)
105public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\WebClient.cs (27)
268private async Task<WebResponse> GetWebResponseTaskAsync(WebRequest request) 1536public Task<string> DownloadStringTaskAsync(string address) => 1539public Task<string> DownloadStringTaskAsync(Uri address) 1560public Task<Stream> OpenReadTaskAsync(string address) => 1563public Task<Stream> OpenReadTaskAsync(Uri address) 1585public Task<Stream> OpenWriteTaskAsync(string address) => 1588public Task<Stream> OpenWriteTaskAsync(Uri address) => 1591public Task<Stream> OpenWriteTaskAsync(string address, string? method) => 1594public Task<Stream> OpenWriteTaskAsync(Uri address, string? method) 1616public Task<string> UploadStringTaskAsync(string address, string data) => 1619public Task<string> UploadStringTaskAsync(Uri address, string data) => 1622public Task<string> UploadStringTaskAsync(string address, string? method, string data) => 1625public Task<string> UploadStringTaskAsync(Uri address, string? method, string data) 1647public Task<byte[]> DownloadDataTaskAsync(string address) => 1650public Task<byte[]> DownloadDataTaskAsync(Uri address) 1697public Task<byte[]> UploadDataTaskAsync(string address, byte[] data) => 1700public Task<byte[]> UploadDataTaskAsync(Uri address, byte[] data) => 1703public Task<byte[]> UploadDataTaskAsync(string address, string? method, byte[] data) => 1706public Task<byte[]> UploadDataTaskAsync(Uri address, string? method, byte[] data) 1728public Task<byte[]> UploadFileTaskAsync(string address, string fileName) => 1731public Task<byte[]> UploadFileTaskAsync(Uri address, string fileName) => 1734public Task<byte[]> UploadFileTaskAsync(string address, string? method, string fileName) => 1737public Task<byte[]> UploadFileTaskAsync(Uri address, string? method, string fileName) 1759public Task<byte[]> UploadValuesTaskAsync(string address, NameValueCollection data) => 1762public Task<byte[]> UploadValuesTaskAsync(string address, string? method, NameValueCollection data) => 1765public Task<byte[]> UploadValuesTaskAsync(Uri address, NameValueCollection data) => 1768public Task<byte[]> UploadValuesTaskAsync(Uri address, string? method, NameValueCollection data)
System.Net.WebSockets (2)
System\Net\WebSockets\ManagedWebSocket.cs (1)
363public override Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken)
System\Net\WebSockets\WebSocket.cs (1)
28public abstract Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer,
System.Net.WebSockets.Client (2)
System\Net\WebSockets\ClientWebSocket.cs (1)
154public override Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) =>
System\Net\WebSockets\WebSocketHandle.Managed.cs (1)
127Task<HttpResponseMessage> sendTask = invoker is HttpClient client
System.Private.CoreLib (962)
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (8)
53/// <summary>Waits for the <see cref="Task{TResult}"/> wrapped by the <see cref="IAsyncResult"/> returned by <see cref="Begin"/> to complete.</summary> 56/// <returns>The result of the <see cref="Task{TResult}"/> wrapped by the <see cref="IAsyncResult"/>.</returns> 59/// <remarks>This will propagate any exception stored in the wrapped <see cref="Task{TResult}"/>.</remarks> 80/// <summary>Extracts the underlying <see cref="Task{TResult}"/> from an <see cref="IAsyncResult"/> created by <see cref="Begin"/>.</summary> 83/// <returns>The <see cref="Task{TResult}"/> wrapped by the <see cref="IAsyncResult"/>.</returns> 87/// or the <see cref="Task{TResult}"/> provided to <see cref="Begin"/> was used a generic type parameter 90public static Task<TResult> Unwrap<TResult>(IAsyncResult asyncResult) 94if ((asyncResult as TaskAsyncResult)?._task is not Task<TResult> task)
src\libraries\System.Private.CoreLib\src\System\IO\BufferedStream.cs (1)
573public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (9)
1084public static Task<string> ReadAllTextAsync(string path, CancellationToken cancellationToken = default) 1087public static Task<string> ReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1096private static async Task<string> InternalReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken) 1169public static Task<byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken = default) 1198private static async Task<byte[]> InternalReadAllBytesAsync(SafeFileHandle sfh, int count, CancellationToken cancellationToken) 1219private static async Task<byte[]> InternalReadAllBytesUnknownLengthAsync(SafeFileHandle sfh, CancellationToken cancellationToken) 1292public static Task<string[]> ReadAllLinesAsync(string path, CancellationToken cancellationToken = default) 1295public static Task<string[]> ReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1304private static async Task<string[]> InternalReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (2)
287public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 618internal Task<int> BaseReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (1)
367public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\BufferedFileStreamStrategy.cs (1)
281public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\DerivedFileStreamStrategy.cs (1)
86public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (1)
269public sealed override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) =>
src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (7)
202internal Task<int> BeginReadInternal( 301public Task<int> ReadAsync(byte[] buffer, int offset, int count) => ReadAsync(buffer, offset, count, CancellationToken.None); 303public virtual Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => 318static async ValueTask<int> FinishReadAsync(Task<int> readTask, byte[] localBuffer, Memory<byte> localDestination) 450private Task<int> BeginEndReadAsync(byte[] buffer, int offset, int count) 1034TaskToAsyncResult.Begin(Task<int>.s_defaultResultTask, callback, state); 1049public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) =>
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (17)
854public override Task<string?> ReadLineAsync() => 898Task<string?> task = ReadLineAsyncInternal(cancellationToken); 904private async Task<string?> ReadLineAsyncInternal(CancellationToken cancellationToken) 987public override Task<string> ReadToEndAsync() => ReadToEndAsync(default); 1012public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) 1026Task<string> task = ReadToEndAsyncInternal(cancellationToken); 1032private async Task<string> ReadToEndAsyncInternal(CancellationToken cancellationToken) 1047public override Task<int> ReadAsync(char[] buffer, int index, int count) 1070Task<int> task = ReadAsyncInternal(new Memory<char>(buffer, index, count), CancellationToken.None).AsTask(); 1258public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) 1281Task<int> task = base.ReadBlockAsync(buffer, index, count); 1310Task<int> t = vt.AsTask(); 1427public override Task<int> ReadAsync(char[] buffer, int index, int count) => Task.FromResult(0); 1436public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) => Task.FromResult(0); 1443public override Task<string?> ReadLineAsync() => Task.FromResult<string?>(null); 1450public override Task<string> ReadToEndAsync() => Task.FromResult(""); 1452public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) =>
src\libraries\System.Private.CoreLib\src\System\IO\StringReader.cs (5)
214public override Task<string?> ReadLineAsync() 252public override Task<string> ReadToEndAsync() 282public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) => 287public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) 305public override Task<int> ReadAsync(char[] buffer, int index, int count)
src\libraries\System.Private.CoreLib\src\System\IO\TextReader.cs (15)
199public virtual Task<string?> ReadLineAsync() => ReadLineCoreAsync(default); 221private Task<string?> ReadLineCoreAsync(CancellationToken cancellationToken) => 222Task<string?>.Factory.StartNew(static state => ((TextReader)state!).ReadLine(), this, 225public virtual Task<string> ReadToEndAsync() => ReadToEndAsync(default); 241public virtual async Task<string> ReadToEndAsync(CancellationToken cancellationToken) 260public virtual Task<int> ReadAsync(char[] buffer, int index, int count) 277Task<int>.Factory.StartNew(static state => 284new ValueTask<int>(Task<int>.Factory.StartNew(static state => 290public virtual Task<int> ReadBlockAsync(char[] buffer, int index, int count) 307Task<int>.Factory.StartNew(static state => 376public override Task<string?> ReadLineAsync() => Task.FromResult(ReadLine()); 383public override Task<string> ReadToEndAsync() => Task.FromResult(ReadToEnd()); 386public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) 390public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) 403public override Task<int> ReadAsync(char[] buffer, int index, int count)
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (1)
421public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStreamWrapper.cs (1)
159public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.cs (1)
55public static T Await<T>(Task<T> task)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncIteratorMethodBuilder.cs (1)
20private Task<VoidTaskResult>? m_task; // Debugger depends on the exact name of this field.
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilder.cs (2)
21private Task<VoidTaskResult>? m_task; // Debugger depends on the exact name of this field. 84private Task<VoidTaskResult> InitializeTaskAsPromise()
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (16)
12/// Provides a builder for asynchronous methods that return <see cref="Task{TResult}"/>. 23private Task<TResult>? m_task; // Debugger depends on the exact name of this field. 58ref TAwaiter awaiter, ref TStateMachine stateMachine, ref Task<TResult>? taskField) 88ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref Task<TResult>? taskField) 155[NotNull] ref Task<TResult>? taskField) 426/// <summary>Gets the <see cref="Task{TResult}"/> for this builder.</summary> 427/// <returns>The <see cref="Task{TResult}"/> representing the builder's asynchronous operation.</returns> 428public Task<TResult> Task 440private Task<TResult> InitializeTaskAsPromise() 446internal static Task<TResult> CreateWeaklyTypedStateMachineBox() 462/// Completes the <see cref="Task{TResult}"/> in the 485internal static void SetExistingTaskResult(Task<TResult> task, TResult? result) 501/// Completes the <see cref="Task{TResult}"/> in the 509internal static void SetException(Exception exception, ref Task<TResult>? taskField) 517Task<TResult> task = (taskField ??= new Task<TResult>()); 550internal static void SetNotificationForWaitCompletion(bool enabled, [NotNull] ref Task<TResult>? taskField)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncValueTaskMethodBuilder.cs (3)
14private static readonly Task<VoidTaskResult> s_syncSuccessSentinel = AsyncValueTaskMethodBuilder<VoidTaskResult>.s_syncSuccessSentinel; 20private Task<VoidTaskResult>? m_task; // Debugger depends on the exact name of this field. 74Task<VoidTaskResult>? task = m_task ??= new Task<VoidTaskResult>(); // base task used rather than box to minimize size when used as manual promise
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncValueTaskMethodBuilderT.cs (3)
20internal static readonly Task<TResult> s_syncSuccessSentinel = new Task<TResult>(default(TResult)!); 23private Task<TResult>? m_task; // Debugger depends on the exact name of this field. 81Task<TResult>? task = m_task ??= new Task<TResult>(); // base task used rather than box to minimize size when used as manual promise
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredValueTaskAwaitable.cs (6)
160Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 162if (obj is Task<TResult> t) 182Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 184if (obj is Task<TResult> t) 202Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 204if (obj is Task<TResult> t)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (14)
285/// <summary>Provides an awaiter for awaiting a <see cref="Task{TResult}"/>.</summary> 292private readonly Task<TResult> m_task; 295/// <param name="task">The <see cref="Task{TResult}"/> to be awaited.</param> 296internal TaskAwaiter(Task<TResult> task) 327/// <summary>Ends the await on the completed <see cref="Task{TResult}"/>.</summary> 328/// <returns>The result of the completed <see cref="Task{TResult}"/>.</returns> 437/// <summary>Provides an awaitable object that allows for configured awaits on <see cref="Task{TResult}"/>.</summary> 445/// <param name="task">The awaitable <see cref="Task{TResult}"/>.</param> 447internal ConfiguredTaskAwaitable(Task<TResult> task, ConfigureAwaitOptions options) 467private readonly Task<TResult> m_task; 472/// <param name="task">The awaitable <see cref="Task{TResult}"/>.</param> 474internal ConfiguredTaskAwaiter(Task<TResult> task, ConfigureAwaitOptions options) 507/// <summary>Ends the await on the completed <see cref="Task{TResult}"/>.</summary> 508/// <returns>The result of the completed <see cref="Task{TResult}"/>.</returns>
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ValueTaskAwaiter.cs (6)
132Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 134if (obj is Task<TResult> t) 152Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 154if (obj is Task<TResult> t) 171Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 173if (obj is Task<TResult> t)
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\YieldAwaitable.cs (3)
162log.TaskWaitContinuationStarted(((Task<int>)continuationIdTask).Result); 168EventSource.SetCurrentThreadActivityId(TplEventSource.CreateGuidForTaskID(((Task<int>)continuationIdTask).Result), out prevActivityId); 177log.TaskWaitContinuationComplete(((Task<int>)continuationIdTask).Result);
src\libraries\System.Private.CoreLib\src\System\Text\TranscodingStream.cs (1)
360public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (6)
332Task<bool>? asyncWaitTask = null; 538public Task<bool> WaitAsync(int millisecondsTimeout) 563public Task<bool> WaitAsync(TimeSpan timeout) 587public Task<bool> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken) 619public Task<bool> WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken) 719private async Task<bool> WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, int millisecondsTimeout, CancellationToken cancellationToken)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\CachedCompletedInt32Task.cs (5)
16private Task<int>? _task; 18/// <summary>Gets a completed <see cref="Task{Int32}"/> whose result is <paramref name="result"/>.</summary> 20/// <param name="result">The result value for which a <see cref="Task{Int32}"/> is needed.</param> 22public Task<int> GetTask(int result) 24if (_task is Task<int> task)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
635var t = new Task<bool>(s =>
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConfigureAwaitOptions.cs (3)
35/// not <see cref="Task{TResult}.ConfigureAwait(ConfigureAwaitOptions)"/>, as for a <see cref="Task{TResult}"/> the 36/// operation could end up returning an incorrect and/or invalid result. To use with a <see cref="Task{TResult}"/>,
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Future.cs (148)
22/// The type of the result produced by this <see cref="Task{TResult}"/>. 26/// <see cref="Task{TResult}"/> instances may be created in a variety of ways. The most common approach is by 29/// purposes. For example, to create a <see cref="Task{TResult}"/> that runs a function, the factory's StartNew 44/// The <see cref="Task{TResult}"/> class also provides constructors that initialize the task but that do not 52/// All members of <see cref="Task{TResult}"/>, except for 62internal static readonly Task<TResult> s_defaultResultTask = TaskCache.CreateCacheableTask<TResult>(default); 98/// Initializes a new <see cref="Task{TResult}"/> with the specified function. 115/// Initializes a new <see cref="Task{TResult}"/> with the specified function. 135/// Initializes a new <see cref="Task{TResult}"/> with the specified function and creation options. 158/// Initializes a new <see cref="Task{TResult}"/> with the specified function and creation options. 185/// Initializes a new <see cref="Task{TResult}"/> with the specified function and state. 202/// Initializes a new <see cref="Task{TResult}"/> with the specified action, state, and options. 223/// Initializes a new <see cref="Task{TResult}"/> with the specified action, state, and options. 249/// Initializes a new <see cref="Task{TResult}"/> with the specified action, state, and options. 310internal static Task<TResult> StartNew(Task? parent, Func<TResult> function, CancellationToken cancellationToken, 323Task<TResult> f = new Task<TResult>(function, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); 330internal static Task<TResult> StartNew(Task? parent, Func<object?, TResult> function, object? state, CancellationToken cancellationToken, 343Task<TResult> f = new Task<TResult>(function, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); 420/// Gets the result value of this <see cref="Task{TResult}"/>. 434/// Gets the result value of this <see cref="Task{TResult}"/> once the task has completed successfully. 469/// Provides access to factory methods for creating <see cref="Task{TResult}"/> instances. 504/// <summary>Gets an awaiter used to await this <see cref="Task{TResult}"/>.</summary> 511/// <summary>Configures an awaiter used to await this <see cref="Task{TResult}"/>.</summary> 546/// <summary>Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes or when the specified <see cref="CancellationToken"/> has cancellation requested.</summary> 548/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 549public new Task<TResult> WaitAsync(CancellationToken cancellationToken) => 552/// <summary>Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes or when the specified timeout expires.</summary> 554/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 555public new Task<TResult> WaitAsync(TimeSpan timeout) => 559/// Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes or when the specified timeout expires. 563/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 564public new Task<TResult> WaitAsync(TimeSpan timeout, TimeProvider timeProvider) 570/// <summary>Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes, when the specified timeout expires, or when the specified <see cref="CancellationToken"/> has cancellation requested.</summary> 573/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 574public new Task<TResult> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken) => 578/// Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes, when the specified timeout expires, or when the specified <see cref="CancellationToken"/> has cancellation requested. 583/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 584public new Task<TResult> WaitAsync(TimeSpan timeout, TimeProvider timeProvider, CancellationToken cancellationToken) 590private Task<TResult> WaitAsync(uint millisecondsTimeout, TimeProvider timeProvider, CancellationToken cancellationToken) 616/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 619/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 631public Task ContinueWith(Action<Task<TResult>> continuationAction) 638/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 641/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 654public Task ContinueWith(Action<Task<TResult>> continuationAction, CancellationToken cancellationToken) 661/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 664/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 682public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler) 688/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 691/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 715public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskContinuationOptions continuationOptions) 721/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 724/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 755public Task ContinueWith(Action<Task<TResult>> continuationAction, CancellationToken cancellationToken, 762internal Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler, CancellationToken cancellationToken, 796/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 799/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 812public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state) 819/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 822/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 836public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, CancellationToken cancellationToken) 843/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 846/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 865public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler) 871/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 874/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 899public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskContinuationOptions continuationOptions) 905/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 908/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 940public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, CancellationToken cancellationToken, 947internal Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler, CancellationToken cancellationToken, 982/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 988/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 991/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 993/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1000public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction) 1007/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1013/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1017/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1019/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1029public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken) 1035/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1041/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1047/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1049/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1059public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler) 1065/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1071/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1081/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1084/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1090/// cref="Task{TNewResult}"/>. This task's completion state will be transferred to the task returned 1101public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskContinuationOptions continuationOptions) 1107/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1113/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be passed as 1128/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1131/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1136/// The <paramref name="continuationFunction"/>, when executed, should return a <see cref="Task{TNewResult}"/>. 1154public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken, 1161internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler, 1179Task<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult, TNewResult>( 1195/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1201/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1205/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1207/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1214public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state) 1221/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1227/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1232/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1234/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1244public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1251/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1257/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1264/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1266/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1276public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1283/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1289/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1300/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1303/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1309/// cref="Task{TNewResult}"/>. This task's completion state will be transferred to the task returned 1320public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1327/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1333/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1349/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1352/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1357/// The <paramref name="continuationFunction"/>, when executed, should return a <see cref="Task{TNewResult}"/>. 1375public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1382internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1400Task<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult, TNewResult>( 1420private readonly Task<TResult> m_task; 1422public SystemThreadingTasks_FutureDebugView(Task<TResult> task)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\FutureFactory.cs (204)
10/// <see cref="Task{TResult}">Task{TResult}</see> objects. 13/// the <see cref="Task{TResult}">Task{TResult}</see> objects that are associated with 23/// <see cref="Task{TResult}.Factory">Task{TResult}.Factory</see> property. 241/// Creates and starts a <see cref="Task{TResult}"/>. 244/// the <see cref="Task{TResult}"/>.</param> 245/// <returns>The started <see cref="Task{TResult}"/>.</returns> 250/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 256public Task<TResult> StartNew(Func<TResult> function) 259return Task<TResult>.StartNew(currTask, function, m_defaultCancellationToken, 264/// Creates and starts a <see cref="Task{TResult}"/>. 267/// the <see cref="Task{TResult}"/>.</param> 269/// <returns>The started <see cref="Task{TResult}"/>.</returns> 277/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 283public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken) 286return Task<TResult>.StartNew(currTask, function, cancellationToken, 291/// Creates and starts a <see cref="Task{TResult}"/>. 294/// the <see cref="Task{TResult}"/>.</param> 297/// <see cref="Task{TResult}"/>.</param> 298/// <returns>The started <see cref="Task{TResult}"/>.</returns> 306/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 312public Task<TResult> StartNew(Func<TResult> function, TaskCreationOptions creationOptions) 315return Task<TResult>.StartNew(currTask, function, m_defaultCancellationToken, 320/// Creates and starts a <see cref="Task{TResult}"/>. 323/// the <see cref="Task{TResult}"/>.</param> 326/// <see cref="Task{TResult}"/>.</param> 330/// that is used to schedule the created <see cref="Task{TResult}"> 332/// <returns>The started <see cref="Task{TResult}"/>.</returns> 346/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 352public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) 354return Task<TResult>.StartNew( 360/// Creates and starts a <see cref="Task{TResult}"/>. 363/// the <see cref="Task{TResult}"/>.</param> 366/// <returns>The started <see cref="Task{TResult}"/>.</returns> 371/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 377public Task<TResult> StartNew(Func<object?, TResult> function, object? state) 380return Task<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken, 385/// Creates and starts a <see cref="Task{TResult}"/>. 388/// the <see cref="Task{TResult}"/>.</param> 392/// <returns>The started <see cref="Task{TResult}"/>.</returns> 400/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 406public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken) 409return Task<TResult>.StartNew(currTask, function, state, cancellationToken, 414/// Creates and starts a <see cref="Task{TResult}"/>. 417/// the <see cref="Task{TResult}"/>.</param> 422/// <see cref="Task{TResult}"/>.</param> 423/// <returns>The started <see cref="Task{TResult}"/>.</returns> 431/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 437public Task<TResult> StartNew(Func<object?, TResult> function, object? state, TaskCreationOptions creationOptions) 440return Task<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken, 445/// Creates and starts a <see cref="Task{TResult}"/>. 448/// the <see cref="Task{TResult}"/>.</param> 454/// <see cref="Task{TResult}"/>.</param> 457/// that is used to schedule the created <see cref="Task{TResult}"> 459/// <returns>The started <see cref="Task{TResult}"/>.</returns> 473/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 479public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) 481return Task<TResult>.StartNew(Task.InternalCurrentIfAttached(creationOptions), function, state, cancellationToken, 494Task<TResult> promise, 547/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 558/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 560public Task<TResult> FromAsync(IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod) 566/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 574/// created <see cref="Task{TResult}">Task</see>.</param> 582/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 584public Task<TResult> FromAsync( 595/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 605/// created <see cref="Task{TResult}">Task</see>.</param> 615/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 617public Task<TResult> FromAsync( 628internal static Task<TResult> FromAsyncImpl( 648Task<TResult> promise = new Task<TResult>((object?)null, creationOptions); 697/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 708/// <returns>The created <see cref="Task{TResult}">Task</see> that 713public Task<TResult> FromAsync( 721/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 727/// created <see cref="Task{TResult}">Task</see>.</param> 737/// <returns>The created <see cref="Task{TResult}">Task</see> that 742public Task<TResult> FromAsync( 751internal static Task<TResult> FromAsyncImpl(Func<AsyncCallback, object?, IAsyncResult> beginMethod, 765Task<TResult> promise = new Task<TResult>(state, creationOptions); 804/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 819/// <returns>The created <see cref="Task{TResult}">Task</see> that 824public Task<TResult> FromAsync<TArg1>( 833/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 843/// created <see cref="Task{TResult}">Task</see>.</param> 853/// <returns>The created <see cref="Task{TResult}">Task</see> that 858public Task<TResult> FromAsync<TArg1>( 868internal static Task<TResult> FromAsyncImpl<TArg1>(Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod, 882Task<TResult> promise = new Task<TResult>(state, creationOptions); 921/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 940/// <returns>The created <see cref="Task{TResult}">Task</see> that 945public Task<TResult> FromAsync<TArg1, TArg2>( 954/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 968/// created <see cref="Task{TResult}">Task</see>.</param> 978/// <returns>The created <see cref="Task{TResult}">Task</see> that 983public Task<TResult> FromAsync<TArg1, TArg2>( 993internal static Task<TResult> FromAsyncImpl<TArg1, TArg2>(Func<TArg1, TArg2, AsyncCallback, object?, IAsyncResult> beginMethod, 1007Task<TResult> promise = new Task<TResult>(state, creationOptions); 1046/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1069/// <returns>The created <see cref="Task{TResult}">Task</see> that 1074public Task<TResult> FromAsync<TArg1, TArg2, TArg3>( 1083/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1101/// created <see cref="Task{TResult}">Task</see>.</param> 1111/// <returns>The created <see cref="Task{TResult}">Task</see> that 1116public Task<TResult> FromAsync<TArg1, TArg2, TArg3>( 1126internal static Task<TResult> FromAsyncImpl<TArg1, TArg2, TArg3>(Func<TArg1, TArg2, TArg3, AsyncCallback, object?, IAsyncResult> beginMethod, 1140Task<TResult> promise = new Task<TResult>(state, creationOptions); 1190internal static Task<TResult> FromAsyncTrim<TInstance, TArgs>( 1322private static Task<TResult> CreateCanceledTask(TaskContinuationOptions continuationOptions, CancellationToken ct) 1333/// Creates a continuation <see cref="Task{TResult}">Task</see> 1339/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1348public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction) 1356/// Creates a continuation <see cref="Task{TResult}">Task</see> 1364/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1376public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken) 1384/// Creates a continuation <see cref="Task{TResult}">Task</see> 1392/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1393/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1410public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions) 1418/// Creates a continuation <see cref="Task{TResult}">Task</see> 1428/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1432/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1454public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, 1463/// Creates a continuation <see cref="Task{TResult}">Task</see> 1470/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1479public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction) 1487/// Creates a continuation <see cref="Task{TResult}">Task</see> 1496/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1508public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1517/// Creates a continuation <see cref="Task{TResult}">Task</see> 1526/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1527/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1544public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1553/// Creates a continuation <see cref="Task{TResult}">Task</see> 1564/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1567/// cref="Task{TResult}"/>.</param> 1568/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1590public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1601internal static Task<TResult> ContinueWhenAllImpl<TAntecedentResult>(Task<TAntecedentResult>[] tasks, 1602Func<Task<TAntecedentResult>[], TResult>? continuationFunction, Action<Task<TAntecedentResult>[]>? continuationAction, 1612Task<TAntecedentResult>[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy(tasks); 1623Task<Task<TAntecedentResult>[]> starter = TaskFactory.CommonCWAllLogic(tasksCopy); 1629static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>[], TResult>)continuationFunction!)(starter.Result), 1639((Action<Task<TAntecedentResult>[]>)continuationAction!)(starter.Result); 1648internal static Task<TResult> ContinueWhenAllImpl(Task[] tasks, 1670Task<Task[]> starter = TaskFactory.CommonCWAllLogic(tasksCopy); 1703/// Creates a continuation <see cref="Task{TResult}">Task</see> 1709/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1718public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction) 1726/// Creates a continuation <see cref="Task{TResult}">Task</see> 1734/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1746public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 1754/// Creates a continuation <see cref="Task{TResult}">Task</see> 1762/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1763/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1780public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 1788/// Creates a continuation <see cref="Task{TResult}">Task</see> 1798/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1802/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1824public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, 1833/// Creates a continuation <see cref="Task{TResult}">Task</see> 1840/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1849public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction) 1857/// Creates a continuation <see cref="Task{TResult}">Task</see> 1866/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1878public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1887/// Creates a continuation <see cref="Task{TResult}">Task</see> 1896/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1897/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1914public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1923/// Creates a continuation <see cref="Task{TResult}">Task</see> 1934/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1937/// cref="Task{TResult}"/>.</param> 1938/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1960public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1970internal static Task<TResult> ContinueWhenAnyImpl(Task[] tasks, 1983Task<Task> starter = TaskFactory.CommonCWAnyLogic(tasks); 2021internal static Task<TResult> ContinueWhenAnyImpl<TAntecedentResult>(Task<TAntecedentResult>[] tasks, 2022Func<Task<TAntecedentResult>, TResult>? continuationFunction, Action<Task<TAntecedentResult>>? continuationAction, 2033Task<Task<TAntecedentResult>> starter = TaskFactory.CommonCWAnyLogic(tasks); 2047static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>, TResult>)continuationFunction!)(starter.Result), 2056((Action<Task<TAntecedentResult>>)continuationAction!)(starter.Result);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (128)
96/// For operations that return values, the <see cref="Task{TResult}"/> class 1456/// Provides access to factory methods for creating <see cref="Task"/> and <see cref="Task{TResult}"/> instances. 1466/// <remarks>It's a <see cref="Task{VoidTaskResult}"/> so it can be shared with <see cref="AsyncTaskMethodBuilder"/>.</remarks> 1467internal static readonly Task<VoidTaskResult> s_cachedCompleted = new Task<VoidTaskResult>(false, default, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default); 2925_ => completingTask is Task<TResult> taskTResult ? TrySetResult(taskTResult.Result) : TrySetResult(), 3995/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 3997/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4004public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction) 4021/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4023/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4033public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 4051/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4053/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4063public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler) 4085/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4087/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4099public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 4126/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4128/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4145public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken, 4152private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler, 4169Task<TResult> continuationTask = new ContinuationResultTaskFromTask<TResult>( 4195/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4197/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4204public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state) 4222/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4224/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4234public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken) 4253/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4255/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4265public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler) 4288/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4290/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4302public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskContinuationOptions continuationOptions) 4330/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4332/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4349public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken, 4356private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler, 4373Task<TResult> continuationTask = new ContinuationResultTaskFromTask<TResult>( 5356Task<Task> firstCompleted = TaskFactory.CommonCWAnyLogic(tasks, isSyncBlocking: true); 5381/// <summary>Gets a <see cref="Task{TResult}"/> that's completed successfully with the specified result.</summary> 5386public static unsafe Task<TResult> FromResult<TResult>(TResult result) 5397return Task<TResult>.s_defaultResultTask; 5403Task<bool> task = *(bool*)&result ? TaskCache.s_trueTask : TaskCache.s_falseTask; 5404return *(Task<TResult>*)&task; 5414Task<int> task = TaskCache.s_int32Tasks[value - TaskCache.InclusiveInt32Min]; 5415return *(Task<TResult>*)&task; 5430return Task<TResult>.s_defaultResultTask; 5438/// <summary>Creates a <see cref="Task{TResult}"/> that's completed exceptionally with the specified exception.</summary> 5451/// <summary>Creates a <see cref="Task{TResult}"/> that's completed exceptionally with the specified exception.</summary> 5455public static Task<TResult> FromException<TResult>(Exception exception) 5459var task = new Task<TResult>(); 5475/// <summary>Creates a <see cref="Task{TResult}"/> that's completed due to cancellation with the specified token.</summary> 5479public static Task<TResult> FromCanceled<TResult>(CancellationToken cancellationToken) 5499/// <summary>Creates a <see cref="Task{TResult}"/> that's completed due to cancellation with the specified exception.</summary> 5503internal static Task<TResult> FromCanceled<TResult>(OperationCanceledException exception) 5507var task = new Task<TResult>(); 5557public static Task<TResult> Run<TResult>(Func<TResult> function) 5559return Task<TResult>.StartNew(null, function, default, 5575public static Task<TResult> Run<TResult>(Func<TResult> function, CancellationToken cancellationToken) 5577return Task<TResult>.StartNew(null, function, cancellationToken, 5617Task<Task?> task1 = Task<Task?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 5636public static Task<TResult> Run<TResult>(Func<Task<TResult>?> function) 5652public static Task<TResult> Run<TResult>(Func<Task<TResult>?> function, CancellationToken cancellationToken) 5661Task<Task<TResult>?> task1 = Task<Task<TResult>?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 6235public static Task<TResult[]> WhenAll<TResult>(IEnumerable<Task<TResult>> tasks) 6238if (tasks is Task<TResult>[] taskArray) 6244if (tasks is ICollection<Task<TResult>> taskCollection) 6252taskArray = new Task<TResult>[count]; 6254foreach (Task<TResult> task in taskArray) 6271List<Task<TResult>> taskList = new List<Task<TResult>>(); 6272foreach (Task<TResult> task in tasks) 6318public static Task<TResult[]> WhenAll<TResult>(params Task<TResult>[] tasks) 6325return WhenAll((ReadOnlySpan<Task<TResult>>)tasks); 6356public static Task<TResult[]> WhenAll<TResult>(params ReadOnlySpan<Task<TResult>> tasks) 6363Task<TResult>[] tasksCopy = tasks.ToArray(); 6364foreach (Task<TResult> task in tasksCopy) 6386private readonly Task<T>?[] m_tasks; 6390internal WhenAllPromise(Task<T>[] tasks) 6404foreach (Task<T> task in tasks) 6430Task<T>? task = m_tasks[i]; 6508public static Task<Task> WhenAny(params Task[] tasks) 6527public static Task<Task> WhenAny(params ReadOnlySpan<Task> tasks) => 6542private static Task<TTask> WhenAnyCore<TTask>(ReadOnlySpan<TTask> tasks) where TTask : Task 6580public static Task<Task> WhenAny(Task task1, Task task2) => 6594private static Task<TTask> WhenAny<TTask>(TTask task1, TTask task2) where TTask : Task 6700public static Task<Task> WhenAny(IEnumerable<Task> tasks) => 6716private static Task<TTask> WhenAny<TTask>(IEnumerable<TTask> tasks) where TTask : Task 6794public static Task<Task<TResult>> WhenAny<TResult>(params Task<TResult>[] tasks) 6798return WhenAnyCore((ReadOnlySpan<Task<TResult>>)tasks); 6814public static Task<Task<TResult>> WhenAny<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => 6829public static Task<Task<TResult>> WhenAny<TResult>(Task<TResult> task1, Task<TResult> task2) => 6830WhenAny<Task<TResult>>(task1, task2); 6848public static Task<Task<TResult>> WhenAny<TResult>(IEnumerable<Task<TResult>> tasks) => 6849WhenAny<Task<TResult>>(tasks); 6881public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params Task<TResult>[] tasks) 6884return WhenEach((ReadOnlySpan<Task<TResult>>)tasks); 6890public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => // TODO https://github.com/dotnet/runtime/issues/77873: Add params 6891WhenEachState.Iterate<Task<TResult>>(WhenEachState.Create(ReadOnlySpan<Task>.CastUp(tasks))); 6896public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(IEnumerable<Task<TResult>> tasks) => 6897WhenEachState.Iterate<Task<TResult>>(WhenEachState.Create(tasks)); 7045internal static Task<TResult> CreateUnwrapPromise<TResult>(Task outerTask, bool lookForOce) 7489ProcessInnerTask(task is Task<Task<TResult>> taskOfTaskOfTResult ? // it's either a Task<Task> or Task<Task<TResult>> 7490taskOfTaskOfTResult.Result : ((Task<Task>)task).Result); 7535result = TrySetResult(task is Task<TResult> taskTResult ? taskTResult.Result : default);
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCache.cs (6)
13internal static readonly Task<bool> s_trueTask = CreateCacheableTask(result: true); 15internal static readonly Task<bool> s_falseTask = CreateCacheableTask(result: false); 17internal static readonly Task<int>[] s_int32Tasks = CreateInt32Tasks(); 27internal static Task<TResult> CreateCacheableTask<TResult>(TResult? result) => 31private static Task<int>[] CreateInt32Tasks() 35var tasks = new Task<int>[ExclusiveInt32Max - InclusiveInt32Min];
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource.cs (5)
290/// Transition the underlying <see cref="Task{TResult}"/> into the same completion state as the specified <paramref name="completedTask"/>. 296/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 300/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 312/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the same completion state as the specified <paramref name="completedTask"/>. 319/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states:
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCompletionSource_T.cs (46)
10/// Represents the producer side of a <see cref="Task{TResult}"/> unbound to a 15/// It is often the case that a <see cref="Task{TResult}"/> is desired to 34private readonly Task<TResult> _task; 41/// The <see cref="Task{TResult}"/> created by this instance and accessible through its <see cref="Task"/> property 44/// <param name="creationOptions">The options to use when creating the underlying <see cref="Task{TResult}"/>.</param> 56/// <see cref="Task{TResult}"/>'s AsyncState.</param> 63/// <param name="creationOptions">The options to use when creating the underlying <see cref="Task{TResult}"/>.</param> 64/// <param name="state">The state to use as the underlying <see cref="Task{TResult}"/>'s AsyncState.</param> 69/// <summary>Gets the <see cref="Task{TResult}"/> created by this <see cref="TaskCompletionSource{TResult}"/>.</summary> 71/// This property enables a consumer access to the <see cref="Task{TResult}"/> that is controlled by this instance. 76public Task<TResult> Task => _task; 78/// <summary>Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state.</summary> 79/// <param name="exception">The exception to bind to this <see cref="Task{TResult}"/>.</param> 82/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 95/// <summary>Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state.</summary> 96/// <param name="exceptions">The collection of exceptions to bind to this <see cref="Task{TResult}"/>.</param> 100/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 114/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state. 116/// <param name="exception">The exception to bind to this <see cref="Task{TResult}"/>.</param> 119/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 142/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Faulted"/> state. 144/// <param name="exceptions">The collection of exceptions to bind to this <see cref="Task{TResult}"/>.</param> 147/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 188/// Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.RanToCompletion"/> state. 190/// <param name="result">The result value to bind to this <see cref="Task{TResult}"/>.</param> 192/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 206/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.RanToCompletion"/> state. 208/// <param name="result">The result value to bind to this <see cref="Task{TResult}"/>.</param> 211/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 228/// Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state. 231/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 239/// Transitions the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state 242/// <param name="cancellationToken">The cancellation token with which to cancel the <see cref="Task{TResult}"/>.</param> 244/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 258/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state. 262/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 270/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the <see cref="TaskStatus.Canceled"/> state. 272/// <param name="cancellationToken">The cancellation token with which to cancel the <see cref="Task{TResult}"/>.</param> 275/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 292/// Transition the underlying <see cref="Task{TResult}"/> into the same completion state as the specified <paramref name="completedTask"/>. 298/// The underlying <see cref="Task{TResult}"/> is already in one of the three final states: 302/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 305public void SetFromTask(Task<TResult> completedTask) 314/// Attempts to transition the underlying <see cref="Task{TResult}"/> into the same completion state as the specified <paramref name="completedTask"/>. 321/// This operation will return false if the <see cref="Task{TResult}"/> is already in one of the three final states: 324public bool TrySetFromTask(Task<TResult> completedTask)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskContinuation.cs (14)
104private Task<TAntecedentResult>? m_antecedent; 107Task<TAntecedentResult> antecedent, Delegate action, object? state, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions) : 110Debug.Assert(action is Action<Task<TAntecedentResult>> || action is Action<Task<TAntecedentResult>, object?>, 122Task<TAntecedentResult>? antecedent = m_antecedent; 132if (m_action is Action<Task<TAntecedentResult>> action) 138if (m_action is Action<Task<TAntecedentResult>, object?> actionWithState) 150private Task<TAntecedentResult>? m_antecedent; 153Task<TAntecedentResult> antecedent, Delegate function, object? state, TaskCreationOptions creationOptions, InternalTaskOptions internalOptions) : 156Debug.Assert(function is Func<Task<TAntecedentResult>, TResult> || function is Func<Task<TAntecedentResult>, object?, TResult>, 168Task<TAntecedentResult>? antecedent = m_antecedent; 178if (m_action is Func<Task<TAntecedentResult>, TResult> func) 184if (m_action is Func<Task<TAntecedentResult>, object?, TResult> funcWithState)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskExtensions.cs (12)
9/// <summary>Creates a proxy <see cref="Task"/> that represents the asynchronous operation of a <see cref="Task{Task}"/>.</summary> 10/// <param name="task">The <see cref="Task{Task}"/> to unwrap.</param> 11/// <returns>A <see cref="Task"/> that represents the asynchronous operation of the provided <see cref="Task{Task}"/>.</returns> 12public static Task Unwrap(this Task<Task> task) 25/// <summary>Creates a proxy <see cref="Task{TResult}"/> that represents the asynchronous operation of a wrapped <see cref="Task{TResult}"/>.</summary> 26/// <param name="task">The wrapped <see cref="Task{TResult}"/> to unwrap.</param> 27/// <returns>A <see cref="Task{TResult}"/> that represents the asynchronous operation of the provided wrapped <see cref="Task{TResult}"/>.</returns> 28public static Task<TResult> Unwrap<TResult>(this Task<Task<TResult>> task)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory.cs (232)
502/// Creates and starts a <see cref="Task{TResult}"/>. 505/// <see cref="Task{TResult}">Task</see>. 508/// the <see cref="Task{TResult}"/>.</param> 509/// <returns>The started <see cref="Task{TResult}"/>.</returns> 514/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 520public Task<TResult> StartNew<TResult>(Func<TResult> function) 523return Task<TResult>.StartNew(currTask, function, m_defaultCancellationToken, 529/// Creates and starts a <see cref="Task{TResult}"/>. 532/// <see cref="Task{TResult}">Task</see>. 535/// the <see cref="Task{TResult}"/>.</param> 537/// <returns>The started <see cref="Task{TResult}"/>.</returns> 545/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 551public Task<TResult> StartNew<TResult>(Func<TResult> function, CancellationToken cancellationToken) 554return Task<TResult>.StartNew(currTask, function, cancellationToken, 559/// Creates and starts a <see cref="Task{TResult}"/>. 562/// <see cref="Task{TResult}">Task</see>. 565/// the <see cref="Task{TResult}"/>.</param> 568/// <see cref="Task{TResult}"/>.</param> 569/// <returns>The started <see cref="Task{TResult}"/>.</returns> 577/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 583public Task<TResult> StartNew<TResult>(Func<TResult> function, TaskCreationOptions creationOptions) 586return Task<TResult>.StartNew(currTask, function, m_defaultCancellationToken, 591/// Creates and starts a <see cref="Task{TResult}"/>. 594/// <see cref="Task{TResult}">Task</see>. 597/// the <see cref="Task{TResult}"/>.</param> 601/// <see cref="Task{TResult}"/>.</param> 604/// that is used to schedule the created <see cref="Task{TResult}"> 606/// <returns>The started <see cref="Task{TResult}"/>.</returns> 620/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 626public Task<TResult> StartNew<TResult>(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) 628return Task<TResult>.StartNew( 634/// Creates and starts a <see cref="Task{TResult}"/>. 637/// <see cref="Task{TResult}">Task</see>. 640/// the <see cref="Task{TResult}"/>.</param> 643/// <returns>The started <see cref="Task{TResult}"/>.</returns> 648/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 654public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state) 657return Task<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken, 663/// Creates and starts a <see cref="Task{TResult}"/>. 666/// <see cref="Task{TResult}">Task</see>. 669/// the <see cref="Task{TResult}"/>.</param> 673/// <returns>The started <see cref="Task{TResult}"/>.</returns> 681/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 687public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state, CancellationToken cancellationToken) 690return Task<TResult>.StartNew(currTask, function, state, cancellationToken, 695/// Creates and starts a <see cref="Task{TResult}"/>. 698/// <see cref="Task{TResult}">Task</see>. 701/// the <see cref="Task{TResult}"/>.</param> 706/// <see cref="Task{TResult}"/>.</param> 707/// <returns>The started <see cref="Task{TResult}"/>.</returns> 715/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 721public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state, TaskCreationOptions creationOptions) 724return Task<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken, 729/// Creates and starts a <see cref="Task{TResult}"/>. 732/// <see cref="Task{TResult}">Task</see>. 735/// the <see cref="Task{TResult}"/>.</param> 741/// <see cref="Task{TResult}"/>.</param> 744/// that is used to schedule the created <see cref="Task{TResult}"> 746/// <returns>The started <see cref="Task{TResult}"/>.</returns> 760/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 766public Task<TResult> StartNew<TResult>(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, 769return Task<TResult>.StartNew( 1137/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 1141/// <see cref="Task{TResult}">Task</see>. 1151/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 1153public Task<TResult> FromAsync<TResult>( 1160/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 1164/// <see cref="Task{TResult}">Task</see>. 1171/// created <see cref="Task{TResult}">Task</see>.</param> 1179/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 1181public Task<TResult> FromAsync<TResult>( 1188/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 1192/// <see cref="Task{TResult}">Task</see>. 1201/// created <see cref="Task{TResult}">Task</see>.</param> 1211/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 1213public Task<TResult> FromAsync<TResult>( 1220/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1224/// <see cref="Task{TResult}">Task</see>. 1234/// <returns>The created <see cref="Task{TResult}">Task</see> that 1239public Task<TResult> FromAsync<TResult>( 1247/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1251/// <see cref="Task{TResult}">Task</see>. 1256/// created <see cref="Task{TResult}">Task</see>.</param> 1266/// <returns>The created <see cref="Task{TResult}">Task</see> that 1271public Task<TResult> FromAsync<TResult>( 1279/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1285/// <see cref="Task{TResult}">Task</see>. 1297/// <returns>The created <see cref="Task{TResult}">Task</see> that 1302public Task<TResult> FromAsync<TArg1, TResult>( 1310/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1316/// <see cref="Task{TResult}">Task</see>. 1323/// created <see cref="Task{TResult}">Task</see>.</param> 1333/// <returns>The created <see cref="Task{TResult}">Task</see> that 1338public Task<TResult> FromAsync<TArg1, TResult>(Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod, 1345/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1353/// <see cref="Task{TResult}">Task</see>. 1367/// <returns>The created <see cref="Task{TResult}">Task</see> that 1372public Task<TResult> FromAsync<TArg1, TArg2, TResult>(Func<TArg1, TArg2, AsyncCallback, object?, IAsyncResult> beginMethod, 1379/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1387/// <see cref="Task{TResult}">Task</see>. 1396/// created <see cref="Task{TResult}">Task</see>.</param> 1406/// <returns>The created <see cref="Task{TResult}">Task</see> that 1411public Task<TResult> FromAsync<TArg1, TArg2, TResult>( 1419/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1429/// <see cref="Task{TResult}">Task</see>. 1445/// <returns>The created <see cref="Task{TResult}">Task</see> that 1450public Task<TResult> FromAsync<TArg1, TArg2, TArg3, TResult>( 1458/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1468/// <see cref="Task{TResult}">Task</see>. 1479/// created <see cref="Task{TResult}">Task</see>.</param> 1489/// <returns>The created <see cref="Task{TResult}">Task</see> that 1494public Task<TResult> FromAsync<TArg1, TArg2, TArg3, TResult>( 1596internal static Task<Task[]> CommonCWAllLogic(Task[] tasksCopy) 1617private sealed class CompleteOnCountdownPromise<T> : Task<Task<T>[]>, ITaskCompletionAction 1619private readonly Task<T>[] _tasks; 1622internal CompleteOnCountdownPromise(Task<T>[] tasksCopy) 1666internal static Task<Task<T>[]> CommonCWAllLogic<T>(Task<T>[] tasksCopy) 1829public Task ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>[]> continuationAction) 1859public Task ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>[]> continuationAction, 1895public Task ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>[]> continuationAction, 1941public Task ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>[]> continuationAction, 1956/// cref="Task{TResult}"/>.</typeparam> 1960/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1969public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction) 1984/// cref="Task{TResult}"/>.</typeparam> 1990/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2002public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken) 2010/// Creates a continuation <see cref="Task{TResult}">Task</see> 2016/// cref="Task{TResult}"/>.</typeparam> 2022/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2023/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2040public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions) 2048/// Creates a continuation <see cref="Task{TResult}">Task</see> 2054/// cref="Task{TResult}"/>.</typeparam> 2062/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2065/// cref="Task{TResult}"/>.</param> 2066/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2088public Task<TResult> ContinueWhenAll<TResult>(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken, 2098/// Creates a continuation <see cref="Task{TResult}">Task</see> 2105/// cref="Task{TResult}"/>.</typeparam> 2109/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2118public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction) 2126/// Creates a continuation <see cref="Task{TResult}">Task</see> 2133/// cref="Task{TResult}"/>.</typeparam> 2139/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2151public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 2160/// Creates a continuation <see cref="Task{TResult}">Task</see> 2167/// cref="Task{TResult}"/>.</typeparam> 2173/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2174/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2191public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 2200/// Creates a continuation <see cref="Task{TResult}">Task</see> 2207/// cref="Task{TResult}"/>.</typeparam> 2215/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2218/// cref="Task{TResult}"/>.</param> 2219/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2241public Task<TResult> ContinueWhenAll<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 2336internal static Task<TTask> CommonCWAnyLogic<TTask>(IList<TTask> tasks, bool isSyncBlocking = false) where TTask : Task 2391internal static void CommonCWAnyLogicCleanup(Task<Task> continuation) 2530/// Creates a continuation <see cref="Task{TResult}">Task</see> 2536/// cref="Task{TResult}"/>.</typeparam> 2540/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2549public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction) 2557/// Creates a continuation <see cref="Task{TResult}">Task</see> 2563/// cref="Task{TResult}"/>.</typeparam> 2569/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2581public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 2589/// Creates a continuation <see cref="Task{TResult}">Task</see> 2595/// cref="Task{TResult}"/>.</typeparam> 2601/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2602/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2619public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 2627/// Creates a continuation <see cref="Task{TResult}">Task</see> 2633/// cref="Task{TResult}"/>.</typeparam> 2641/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2644/// cref="Task{TResult}"/>.</param> 2645/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2667public Task<TResult> ContinueWhenAny<TResult>(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken, 2676/// Creates a continuation <see cref="Task{TResult}">Task</see> 2683/// cref="Task{TResult}"/>.</typeparam> 2687/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2696public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction) 2704/// Creates a continuation <see cref="Task{TResult}">Task</see> 2711/// cref="Task{TResult}"/>.</typeparam> 2717/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2729public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 2738/// Creates a continuation <see cref="Task{TResult}">Task</see> 2745/// cref="Task{TResult}"/>.</typeparam> 2751/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2752/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2769public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 2778/// Creates a continuation <see cref="Task{TResult}">Task</see> 2785/// cref="Task{TResult}"/>.</typeparam> 2793/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 2796/// cref="Task{TResult}"/>.</param> 2797/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 2819public Task<TResult> ContinueWhenAny<TAntecedentResult, TResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 2845public Task ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>> continuationAction) 2874public Task ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>> continuationAction, 2910public Task ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>> continuationAction, 2933/// cref="Task{TResult}"/>.</param> 2956public Task ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Action<Task<TAntecedentResult>> continuationAction, 2985internal static Task<TResult>[] CheckMultiContinuationTasksAndCopy<TResult>(Task<TResult>[] tasks) 2992Task<TResult>[] tasksCopy = new Task<TResult>[tasks.Length];
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (25)
437/// <see cref="ValueTask{TResult}"/> instances are meant to be directly awaited. To do more complicated operations with them, a <see cref="Task{TResult}"/> 450/// <see cref="ValueTask{TResult}"/> wraps a <code>T</code> or a <see cref="Task{TResult}"/>, it may not work if the <see cref="Task{TResult}"/> 465private static volatile Task<TResult>? s_canceledTask; 466/// <summary>null if <see cref="_result"/> has the result, otherwise a <see cref="Task{TResult}"/> or a <see cref="IValueTaskSource{TResult}"/>.</summary> 491/// <summary>Initialize the <see cref="ValueTask{TResult}"/> with a <see cref="Task{TResult}"/> that represents the operation.</summary> 494public ValueTask(Task<TResult> task) 567/// Gets a <see cref="Task{TResult}"/> object to represent this ValueTask. 573public Task<TResult> AsTask() 576Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 583if (obj is Task<TResult> t) 594/// <summary>Creates a <see cref="Task{TResult}"/> to represent the <see cref="IValueTaskSource{TResult}"/>.</summary> 599private Task<TResult> GetTaskForValueTaskSource(IValueTaskSource<TResult> t) 621var task = new Task<TResult>(); 639/// <summary>Type used to create a <see cref="Task{TResult}"/> to represent a <see cref="IValueTaskSource{TResult}"/>.</summary> 708Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 715if (obj is Task<TResult> t) 731Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 738if (obj is Task<TResult> t) 753Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 760if (obj is Task<TResult> t) 780Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 787if (obj is Task<TResult> t) 804Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 811if (obj is Task<TResult> t)
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
223private static async Task<T?> FinalizeTaskReturningThunk<T>(Continuation continuation)
System.Private.DataContractSerialization (2)
System\Xml\XmlBaseWriter.cs (1)
551private async Task<string> StartElementAsync(string? prefix, string localName, string? ns, XmlDictionaryString? xNs)
System\Xml\XmlStreamNodeWriter.cs (1)
90protected async Task<BytesWithOffset> GetBufferAsync(int count)
System.Private.Xml (264)
System\Xml\AsyncHelper.cs (15)
10public static readonly Task<bool> DoneTaskTrue = Task.FromResult(true); 12public static readonly Task<bool> DoneTaskFalse = Task.FromResult(false); 14public static readonly Task<int> DoneTaskZero = Task.FromResult(0); 40public static Task<bool> ReturnTrueTaskWhenFinishAsync(this Task task) 47private static async Task<bool> ReturnTrueTaskWhenFinishCoreAsync(this Task task) 66public static Task<bool> CallBoolTaskFuncWhenFinishAsync<TArg>(this Task task, Func<TArg, Task<bool>> func, TArg arg) 73private static async Task<bool> CallBoolTaskFuncWhenFinishCoreAsync<TArg>(this Task task, Func<TArg, Task<bool>> func, TArg arg) 79public static Task<bool> ContinueBoolTaskFuncWhenFalseAsync<TArg>(this Task<bool> task, Func<TArg, Task<bool>> func, TArg arg) 91private static async Task<bool> ContinueBoolTaskFuncWhenFalseCoreAsync<TArg>(Task<bool> task, Func<TArg, Task<bool>> func, TArg arg)
System\Xml\Core\IDtdParserAdapterAsync.cs (5)
13Task<int> ReadDataAsync(); 15Task<int> ParseNumericCharRefAsync(StringBuilder? internalSubsetBuilder); 16Task<int> ParseNamedCharRefAsync(bool expand, StringBuilder? internalSubsetBuilder); 20Task<(int, bool)> PushEntityAsync(IDtdEntityInfo entity); 22Task<bool> PushExternalSubsetAsync(string? systemId, string? publicId);
System\Xml\Core\IDtdParserAsync.cs (2)
12Task<IDtdInfo> ParseInternalDtdAsync(IDtdParserAdapter adapter, bool saveInternalSubset); 14Task<IDtdInfo> ParseFreeFloatingDtdAsync(string baseUri, string docTypeName, string publicId, string systemId, string internalSubset, IDtdParserAdapter adapter);
System\Xml\Core\ReadContentAsBinaryHelperAsync.cs (9)
13internal async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) // only ever awaited, so no need to separate out argument handling 57internal async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) // only ever awaited, so no need to separate out argument handling 101internal async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) // only ever awaited, so no need to separate out argument handling 145internal async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) // only ever awaited, so no need to separate out argument handling 209private async Task<bool> InitAsync() 222private async Task<bool> InitOnElementAsync() 250private async Task<int> ReadContentAsBinaryAsync(byte[] buffer, int index, int count) 309private async Task<int> ReadElementContentAsBinaryAsync(byte[] buffer, int index, int count) 334private async Task<bool> MoveToNextContentNodeAsync(bool moveIfOnContentNode)
System\Xml\Core\XmlAsyncCheckReader.cs (32)
779public override Task<string> GetValueAsync() 782var task = _coreReader.GetValueAsync(); 787public override Task<object> ReadContentAsObjectAsync() 790var task = _coreReader.ReadContentAsObjectAsync(); 795public override Task<string> ReadContentAsStringAsync() 798var task = _coreReader.ReadContentAsStringAsync(); 803public override Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 806var task = _coreReader.ReadContentAsAsync(returnType, namespaceResolver); 811public override Task<object> ReadElementContentAsObjectAsync() 814var task = _coreReader.ReadElementContentAsObjectAsync(); 819public override Task<string> ReadElementContentAsStringAsync() 822var task = _coreReader.ReadElementContentAsStringAsync(); 827public override Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 830var task = _coreReader.ReadElementContentAsAsync(returnType, namespaceResolver); 835public override Task<bool> ReadAsync() 838var task = _coreReader.ReadAsync(); 851public override Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 854var task = _coreReader.ReadContentAsBase64Async(buffer, index, count); 859public override Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 862var task = _coreReader.ReadElementContentAsBase64Async(buffer, index, count); 867public override Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 870var task = _coreReader.ReadContentAsBinHexAsync(buffer, index, count); 875public override Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 878var task = _coreReader.ReadElementContentAsBinHexAsync(buffer, index, count); 883public override Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 886var task = _coreReader.ReadValueChunkAsync(buffer, index, count); 891public override Task<XmlNodeType> MoveToContentAsync() 894var task = _coreReader.MoveToContentAsync(); 899public override Task<string> ReadInnerXmlAsync() 902var task = _coreReader.ReadInnerXmlAsync(); 907public override Task<string> ReadOuterXmlAsync() 910var task = _coreReader.ReadOuterXmlAsync();
System\Xml\Core\XmlCharCheckingReaderAsync.cs (7)
18public override async Task<bool> ReadAsync() 219public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 262public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 305public override Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 320async Task<int> Core(byte[] buffer, int index, int count) 359public override Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 374async Task<int> Core(byte[] buffer, int index, int count)
System\Xml\Core\XmlReaderAsync.cs (20)
17public virtual Task<string> GetValueAsync() 24public virtual async Task<object> ReadContentAsObjectAsync() 35public virtual Task<string> ReadContentAsStringAsync() 46public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 74public virtual async Task<object> ReadElementContentAsObjectAsync() 86public virtual async Task<string> ReadElementContentAsStringAsync() 98public virtual async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 112public virtual Task<bool> ReadAsync() 124public virtual Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 130public virtual Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 136public virtual Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 142public virtual Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 149public virtual Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 157public virtual async Task<XmlNodeType> MoveToContentAsync() 179public virtual async Task<string> ReadInnerXmlAsync() 262public virtual async Task<string> ReadOuterXmlAsync() 297private async Task<bool> SkipSubtreeAsync() 321internal async Task<string> InternalReadContentAsStringAsync() 367private async Task<bool> SetupReadElementContentAsXxxAsync(string methodName) 398private Task<bool> FinishReadElementContentAsXxxAsync()
System\Xml\Core\XmlSubtreeReaderAsync.cs (13)
16public override Task<string> GetValueAsync() 28public override async Task<bool> ReadAsync() 183public override async Task<object> ReadContentAsObjectAsync() 199public override async Task<string> ReadContentAsStringAsync() 215public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 231public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 312public override async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 369public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 450public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 506public override Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 557private async Task<bool> InitReadElementContentAsBinaryAsync(State binaryState) 588private async Task<bool> FinishReadElementContentAsBinaryAsync() 622private async Task<bool> FinishReadContentAsBinaryAsync()
System\Xml\Core\XmlTextReaderImpl.cs (1)
638Task<object> t = _laterInitParam.inputUriResolver.GetEntityAsync(_laterInitParam.inputbaseUri, string.Empty, typeof(Stream));
System\Xml\Core\XmlTextReaderImplAsync.cs (78)
30public override Task<string> GetValueAsync() 40private async Task<string> _GetValueAsync() 155public override Task<bool> ReadAsync() 270private Task<bool> ReadAsync_SwitchToInteractiveXmlDecl() 274Task<bool> task = ParseXmlDeclarationAsync(false); 285private async Task<bool> _ReadAsync_SwitchToInteractiveXmlDecl(Task<bool> task) 291private Task<bool> ReadAsync_SwitchToInteractiveXmlDecl_Helper(bool finish) 369private async Task<int> ReadContentAsBase64_AsyncHelper(Task<bool> task, byte[] buffer, int index, int count) 387public override Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 421Task<bool> task = InitReadContentAsBinaryAsync(); 443public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 490private async Task<int> ReadElementContentAsBase64Async_Helper(Task<bool> task, byte[] buffer, int index, int count) 508public override Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 542Task<bool> task = InitReadElementContentAsBinaryAsync(); 564public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 611public override async Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 723internal Task<int> DtdParserProxy_ReadDataAsync() 729internal async Task<int> DtdParserProxy_ParseNumericCharRefAsync(StringBuilder? internalSubsetBuilder) 737internal Task<int> DtdParserProxy_ParseNamedCharRefAsync(bool expand, StringBuilder? internalSubsetBuilder) 797internal async Task<(int, bool)> DtdParserProxy_PushEntityAsync(IDtdEntityInfo entity) 825internal async Task<bool> DtdParserProxy_PushExternalSubsetAsync(string? systemId, string? publicId) 937private Task<int> InitTextReaderInputAsync(string baseUriStr, TextReader input) 942private Task<int> InitTextReaderInputAsync(string baseUriStr, Uri? baseUri, TextReader input) 1019private async Task<int> ReadDataAsync() 1169private async Task<bool> ParseXmlDeclarationAsync(bool isTextDecl) 1469private Task<bool> ParseDocumentContentAsync() 1601private Task<bool> ParseDocumentContentAsync_CData() 1610private async Task<bool> ParseDocumentContentAsync_ParseEntity() 1652private Task<bool> ParseDocumentContentAsync_WhiteSpace() 1654Task<bool> task = ParseTextAsync(); 1676private async Task<bool> _ParseDocumentContentAsync_WhiteSpace(Task<bool> task) 1689private async Task<bool> ParseDocumentContentAsync_ReadData(bool needMoreChars) 1729private Task<bool> ParseElementContentAsync() 1828private async Task<bool> ParseElementContent_ReadData() 1919Task<(int, int)> parseQNameTask = ParseQNameAsync(); 1926private Task ParseElementAsync_ContinueWithSetElement(Task<(int, int)> task) 1941private async Task _ParseElementAsync_ContinueWithSetElement(Task<(int, int)> task) 2886private Task<bool> ParseTextAsync() 2944private async Task<bool> _ParseTextAsync(Task<(int, int, int, bool)>? parseTask) 3101private Task<bool> ParseTextAsync_IgnoreNode() 3164private readonly Task<(int, int, int, bool)> _parseText_dummyTask = Task.FromResult((0, 0, 0, false)); 3169Task<(int, int, int, bool)> task = ParseTextAsync(outOrChars, _ps.chars, _ps.charPos, 0, -1, outOrChars); 3207private async Task<(int, int, int, bool)> ParseTextAsync_AsyncFunc(Task<(int, int, int, bool)> task) 3243private Task<(int, int, int, bool)> ParseTextAsync(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars) 3350private async Task<(int, int, int, bool)> ParseTextAsync_ParseEntity(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c) 3420private async Task<(int, int, int, bool)> ParseTextAsync_Surrogate(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c) 3458private async Task<(int, int, int, bool)> ParseTextAsync_ReadData(int outOrChars, char[] chars, int pos, int rcount, int rpos, int orChars, char c) 3675private async Task<bool> ParseRootLevelWhitespaceAsync() 3725private async Task<(int, EntityType)> HandleEntityReferenceAsync(bool isInAttributeValue, EntityExpandType expandType) 3809private async Task<EntityType> HandleGeneralEntityReferenceAsync(string name, bool isInAttributeValue, bool pushFakeEntityIfNullResolver, int entityStartLinePos) 3894private Task<bool> ParsePIAsync() 3901private async Task<bool> ParsePIAsync(StringBuilder? piInDtdStringBuilder) 4017private async Task<(int, int, bool)> ParsePIValueAsync() 4172private async Task<bool> ParseCommentAsync() 4242private async Task<(int, int, bool)> ParseCDataOrCommentTupleAsync(XmlNodeType type) 4409private async Task<bool> ParseDoctypeDeclAsync() 4803private async Task<int> EatWhitespacesAsync(StringBuilder? sb) 4904private async Task<(EntityType, int)> ParseNumericCharRefAsync(bool expand, StringBuilder? internalSubsetBuilder) 4939private async Task<int> ParseNamedCharRefAsync(bool expand, StringBuilder? internalSubsetBuilder) 4966private async Task<int> ParseNameAsync() 4972private Task<(int, int)> ParseQNameAsync() 4977private async Task<(int, int)> ParseQNameAsync(bool isQName, int startOffset) 5065private async Task<(int, bool)> ReadDataInNameAsync(int pos) 5074private async Task<string> ParseEntityNameAsync() 5159private async Task<bool> OpenAndPushAsync(Uri uri) 5195private async Task<bool> PushExternalEntityAsync(IDtdEntityInfo entity) 5243private async Task<bool> ZeroEndingStreamAsync(int pos) 5268private async Task<bool> InitReadContentAsBinaryAsync() 5294private async Task<bool> InitReadElementContentAsBinaryAsync() 5324private async Task<bool> MoveToNextContentNodeAsync(bool moveIfOnContentNode) 5357private async Task<int> ReadContentAsBinaryAsync(byte[] buffer, int index, int count) 5452private async Task<int> ReadElementContentAsBinaryAsync(byte[] buffer, int index, int count)
System\Xml\Core\XmlTextReaderImplHelpersAsync.cs (5)
25Task<int> IDtdParserAdapter.ReadDataAsync() 30Task<int> IDtdParserAdapter.ParseNumericCharRefAsync(StringBuilder? internalSubsetBuilder) 35Task<int> IDtdParserAdapter.ParseNamedCharRefAsync(bool expand, StringBuilder? internalSubsetBuilder) 50Task<(int, bool)> IDtdParserAdapter.PushEntityAsync(IDtdEntityInfo entity) 55Task<bool> IDtdParserAdapter.PushExternalSubsetAsync(string? systemId, string? publicId)
System\Xml\Core\XmlValidatingReaderImplAsync.cs (6)
20public override Task<string> GetValueAsync() 26public override async Task<bool> ReadAsync() 73public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 97public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 121public override async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 145public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count)
System\Xml\Core\XmlWrappingReaderAsync.cs (2)
15public override Task<string> GetValueAsync() 20public override Task<bool> ReadAsync()
System\Xml\Core\XsdCachingReaderAsync.cs (2)
18public override Task<string> GetValueAsync() 31public override async Task<bool> ReadAsync()
System\Xml\Core\XsdValidatingReaderAsync.cs (28)
20public override Task<string> GetValueAsync() 31public override Task<object> ReadContentAsObjectAsync() 41public override async Task<string> ReadContentAsStringAsync() 75public override async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 122public override async Task<object> ReadElementContentAsObjectAsync() 134public override async Task<string> ReadElementContentAsStringAsync() 174public override async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 222private Task<bool> ReadAsync_Read(Task<bool> task) 247private async Task<bool> _ReadAsync_Read(Task<bool> task) 266private Task<bool> ReadAsync_ReadAhead(Task task) 279private async Task<bool> _ReadAsync_ReadAhead(Task task) 287public override Task<bool> ReadAsync() 292Task<bool> readTask = _coreReader.ReadAsync(); 382public override async Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 409public override async Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 436public override async Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 463public override async Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 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)); 677private Task<object> InternalReadContentAsObjectAsync() 682private async Task<object> InternalReadContentAsObjectAsync(bool unwrapTypedValue) 688private async Task<(string, object)> InternalReadContentAsObjectTupleAsync(bool unwrapTypedValue) 759private Task<(XmlSchemaType, object)> InternalReadElementContentAsObjectAsync() 764private async Task<(XmlSchemaType, object)> InternalReadElementContentAsObjectAsync(bool unwrapTypedValue) 771private async Task<(XmlSchemaType, string, object)> InternalReadElementContentAsObjectTupleAsync(bool unwrapTypedValue) 853private async Task<object?> ReadTillEndElementAsync()
System\Xml\Resolvers\XmlPreloadedResolverAsync.cs (1)
17public override Task<object> GetEntityAsync(Uri absoluteUri,
System\Xml\Schema\DtdParserAsync.cs (31)
23async Task<IDtdInfo> IDtdParser.ParseInternalDtdAsync(IDtdParserAdapter adapter, bool saveInternalSubset) 30async Task<IDtdInfo> IDtdParser.ParseFreeFloatingDtdAsync(string baseUri, string docTypeName, string publicId, string systemId, string internalSubset, IDtdParserAdapter adapter) 1088private async Task<(string?, string?)> ParseExternalIdAsync(Token idTokenType, Token declType) 1171private async Task<Token> GetTokenAsync(bool needWhiteSpace) 1306private async Task<Token> ScanSubsetContentAsync() 1471private async Task<Token> ScanNameExpectedAsync() 1478private async Task<Token> ScanQNameExpectedAsync() 1485private async Task<Token> ScanNmtokenExpectedAsync() 1492private async Task<Token> ScanDoctype1Async() 1526private async Task<Token> ScanElement1Async() 1573private async Task<Token> ScanElement2Async() 1601private async Task<Token> ScanElement3Async() 1619private async Task<Token> ScanAttlist1Async() 1638private async Task<Token> ScanAttlist2Async() 1770private async Task<Token> ScanAttlist6Async() 1837private async Task<Token> ScanLiteralAsync(LiteralType literalType) 2069private async Task<Token> ScanNotation1Async() 2095private async Task<Token> ScanSystemIdAsync() 2108private async Task<Token> ScanEntity1Async() 2125private async Task<Token> ScanEntity2Async() 2157private async Task<Token> ScanEntity3Async() 2182private async Task<Token> ScanPublicId1Async() 2195private async Task<Token> ScanPublicId2Async() 2209private async Task<Token> ScanCondSection1Async() 2263private async Task<Token> ScanCondSection3Async() 2466private async Task<bool> ReadDataInNameAsync() 2520private async Task<bool> EatPublicKeywordAsync() 2539private async Task<bool> EatSystemKeywordAsync() 2561private async Task<int> ReadDataAsync() 2572private Task<bool> HandleEntityReferenceAsync(bool paramEntity, bool inLiteral, bool inAttribute) 2580private async Task<bool> HandleEntityReferenceAsync(XmlQualifiedName entityName, bool paramEntity, bool inLiteral, bool inAttribute)
System\Xml\XmlDownloadManager.cs (2)
27internal static Task<Stream> GetStreamAsync(Uri uri, ICredentials? credentials, IWebProxy? proxy) 40private static async Task<Stream> GetNonFileStreamAsync(Uri uri, ICredentials? credentials, IWebProxy? proxy)
System\Xml\XmlResolver.cs (1)
31public virtual Task<object> GetEntityAsync(Uri absoluteUri,
System\Xml\XmlResolver.FileSystemResolver.cs (1)
40public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlResolver.ThrowingResolver.cs (1)
43public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlSecureResolver.cs (1)
27public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn) => XmlResolver.ThrowingResolver.GetEntityAsync(absoluteUri, role, ofObjectToReturn);
System\Xml\XmlUrlResolver.cs (1)
50public override async Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System.Private.Xml.Linq (11)
System\Xml\Linq\XDocument.cs (4)
294public static async Task<XDocument> LoadAsync(Stream stream, LoadOptions options, CancellationToken cancellationToken) 377public static async Task<XDocument> LoadAsync(TextReader textReader, LoadOptions options, CancellationToken cancellationToken) 453public static Task<XDocument> LoadAsync(XmlReader reader, LoadOptions options, CancellationToken cancellationToken) 462private static async Task<XDocument> LoadAsyncInternal(XmlReader reader, LoadOptions options, CancellationToken cancellationToken)
System\Xml\Linq\XElement.cs (5)
162internal static async Task<XElement> CreateAsync(XmlReader r, CancellationToken cancellationToken) 681public static async Task<XElement> LoadAsync(Stream stream, LoadOptions options, CancellationToken cancellationToken) 763public static async Task<XElement> LoadAsync(TextReader textReader, LoadOptions options, CancellationToken cancellationToken) 835public static Task<XElement> LoadAsync(XmlReader reader, LoadOptions options, CancellationToken cancellationToken) 844private static async Task<XElement> LoadAsyncInternal(XmlReader reader, LoadOptions options, CancellationToken cancellationToken)
System\Xml\Linq\XNode.cs (2)
464public static Task<XNode> ReadFromAsync(XmlReader reader, CancellationToken cancellationToken) 473private static async Task<XNode> ReadFromAsyncInternal(XmlReader reader, CancellationToken cancellationToken)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
820[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
System.Runtime.InteropServices.JavaScript (3)
artifacts\obj\System.Runtime.InteropServices.JavaScript\Debug\net10.0\System.Runtime.InteropServices.JavaScript.notsupported.cs (3)
147public static System.Threading.Tasks.Task<JSObject> ImportAsync(string moduleName, string moduleUrl, System.Threading.CancellationToken cancellationToken = default) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 280public void ToManaged<T>(out System.Threading.Tasks.Task<T>? value, ArgumentToManagedCallback<T> marshaler) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 281public void ToJS<T>(System.Threading.Tasks.Task<T>? value, ArgumentToJSCallback<T> marshaler) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); }
System.Security.Cryptography (9)
src\libraries\Common\src\System\Net\Http\X509ResourceClient.cs (6)
19private static readonly Func<string, CancellationToken, bool, Task<byte[]?>>? s_downloadBytes = CreateDownloadBytesFunc(); 31Task<byte[]?> task = DownloadAssetCore(uri, downloadTimeout, async: false); 36internal static Task<byte[]?> DownloadAssetAsync(string uri, TimeSpan downloadTimeout) 41private static async Task<byte[]?> DownloadAssetCore(string uri, TimeSpan downloadTimeout, bool async) 66Task<byte[]?> task = s_downloadBytes(uri, cts?.Token ?? default, async); 151private static Func<string, CancellationToken, bool, Task<byte[]?>>? CreateDownloadBytesFunc()
System\Security\Cryptography\CryptoStream.cs (1)
217public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Security\Cryptography\HashAlgorithm.cs (2)
117public Task<byte[]> ComputeHashAsync( 128private async Task<byte[]> ComputeHashAsyncCore(
System.Security.Cryptography.Cose (18)
System\Security\Cryptography\Cose\CoseMultiSignMessage.cs (4)
229/// <returns>A task that represents the asynchronous operation. The value of its <see cref="Task{T}.Result"/> property contains the encoded message.</returns> 248public static Task<byte[]> SignDetachedAsync( 271private static async Task<byte[]> SignAsyncCore( 389private static async Task<int> CreateCoseMultiSignMessageAsync(
System\Security\Cryptography\Cose\CoseSign1Message.cs (9)
189/// <returns>A task that represents the asynchronous operation. The value of its <see cref="Task{T}.Result"/> property contains the encoded message.</returns> 204public static Task<byte[]> SignDetachedAsync(Stream detachedContent, CoseSigner signer, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 221private static async Task<byte[]> SignAsyncCore(int expectedSize, Stream content, CoseSigner signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken) 332private static async Task<int> CreateCoseSign1MessageAsync(Stream content, byte[] buffer, CoseSigner signer, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken) 785/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 816public Task<bool> VerifyDetachedAsync(AsymmetricAlgorithm key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 848/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 878public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 901private async Task<bool> VerifyAsyncCore(CoseKey key, Stream content, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
System\Security\Cryptography\Cose\CoseSignature.cs (5)
459/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 490public Task<bool> VerifyDetachedAsync(AsymmetricAlgorithm key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 523/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 554public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 577private async Task<bool> VerifyAsyncCore(CoseKey key, Stream content, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
System.Security.Principal.Windows (2)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (2)
270public static System.Threading.Tasks.Task<T> RunImpersonatedAsync<T>(Microsoft.Win32.SafeHandles.SafeAccessTokenHandle safeAccessTokenHandle, System.Func<System.Threading.Tasks.Task<T>> func) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); }
System.ServiceModel.Federation (7)
System\Runtime\TaskHelpers.cs (4)
19public static Task<TResult> ToApm<TResult>(this Task<TResult> task, AsyncCallback callback, object state) 130Task<TResult> task = iar as Task<TResult>;
System\ServiceModel\Federation\IWSTrustChannelContract.cs (1)
23Task<SecurityToken> IssueAsync(WsTrustRequest request);
System\ServiceModel\Federation\WSTrustChannel.cs (1)
356public async virtual Task<WCFSecurityToken> IssueAsync(WsTrustRequest trustRequest)
System\ServiceModel\Federation\WSTrustChannelSecurityTokenProvider.cs (1)
227private async Task<SecurityToken> GetTokenAsyncCore(TimeSpan timeout)
System.ServiceModel.NetFramingBase (28)
System\ServiceModel\Channels\Connection.cs (1)
230public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\ServiceModel\Channels\ConnectionPoolHelper.cs (2)
43protected abstract Task<IConnection> AcceptPooledConnectionAsync(IConnection connection, TimeoutHelper timeoutHelper); 51public async Task<IConnection> EstablishConnectionAsync(TimeSpan timeout)
System\ServiceModel\Channels\FramingChannels.cs (3)
209private async Task<IConnection> SendPreambleAsync(IConnection connection, Memory<byte> preamble, TimeSpan timeout) 364protected override Task<IConnection> AcceptPooledConnectionAsync(IConnection connection, TimeoutHelper timeoutHelper) 417public static async Task<(bool success, IConnection connection)> InitiateUpgradeAsync(
System\ServiceModel\Channels\IMessageSource.cs (2)
12Task<Message> ReceiveAsync(TimeSpan timeout); 13Task<bool> WaitForMessageAsync(TimeSpan timeout);
System\ServiceModel\Channels\SessionConnectionReader.cs (2)
62public async Task<Message> ReceiveAsync(TimeSpan timeout) 147public async Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Channels\SingletonConnectionReader.cs (3)
135public async Task<Message> ReceiveAsync(TimeoutHelper timeoutHelper) 437public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 541static async ValueTask<int> FinishReadAsync(Task<int> readTask, byte[] localBuffer, Memory<byte> localDestination)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (1)
349protected override async Task<(Stream upgradedStream, SecurityMessageProperty remoteSecurity)> OnInitiateUpgradeAsync(Stream stream)
System\ServiceModel\Channels\StreamedFramingRequestChannel.cs (3)
70internal async Task<(IConnection connection, SecurityMessageProperty remoteSecurity)> SendPreambleAsync(IConnection connection, TimeoutHelper timeoutHelper, ClientFramingDecoder decoder) 145protected override async Task<IConnection> AcceptPooledConnectionAsync(IConnection connection, TimeoutHelper timeoutHelper) 256public async Task<Message> ReceiveReplyAsync(TimeoutHelper timeoutHelper)
System\ServiceModel\Channels\StreamSecurityUpgradeInitiatorBase.cs (2)
45public override async Task<Stream> InitiateUpgradeAsync(Stream stream) 75protected abstract Task<(Stream upgradedStream, SecurityMessageProperty remoteSecurity)> OnInitiateUpgradeAsync(Stream stream);
System\ServiceModel\Channels\StreamUpgradeInitiator.cs (1)
13public abstract Task<Stream> InitiateUpgradeAsync(Stream stream);
System\ServiceModel\Channels\SynchronizedMessageSource.cs (2)
21public async Task<bool> WaitForMessageAsync(TimeSpan timeout) 45public async Task<Message> ReceiveAsync(TimeSpan timeout)
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (4)
70public Task<Message> ReceiveAsync() 75public async Task<Message> ReceiveAsync(TimeSpan timeout) 145public async Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout) 181public async Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Channels\TransportSecurityHelpers.cs (1)
86private static async Task<T> GetTokenAsync<T>(SecurityTokenProvider tokenProvider, TimeSpan timeout)
System\ServiceModel\Channels\WindowsStreamSecurityUpgradeProvider.cs (1)
164protected override async Task<(Stream upgradedStream, SecurityMessageProperty remoteSecurity)> OnInitiateUpgradeAsync(Stream stream)
System.ServiceModel.Primitives.Tests (10)
Channels\CustomChannelTest.cs (3)
158Task<Message> processTask = channel.ProcessAsync(inputMessage); 297Task<Message> processTask = channel.ProcessAsync(inputMessage); 739Task<Message> ProcessAsync(Message input);
IdentityModel\SecurityTokenProviderTest.cs (6)
162var result = Task.FromResult<SecurityToken>(new DummySecurityToken()); 169return ((Task<SecurityToken>)result).Result; 181var result = Task.FromResult<SecurityToken>(new DummySecurityToken()); 188return ((Task<SecurityToken>)result).Result; 221protected override Task<SecurityToken> GetTokenCoreAsync(TimeSpan timeout) 232protected override Task<SecurityToken> RenewTokenCoreAsync(TimeSpan timeout, SecurityToken tokenToBeRenewed)
ServiceModel\DuplexClientBaseTest.cs (1)
82public Task<Guid> OnPingCallback(Guid guid)
System.ServiceModel.UnixDomainSocket (2)
System\ServiceModel\Channels\SocketConnection.cs (1)
772private async Task<IConnection> CreateConnectionAsync(Uri uriPath)
System\ServiceModel\Channels\UnixPosixIdentitySecurityUpgradeProvider.cs (1)
101public override Task<Stream> InitiateUpgradeAsync(Stream stream)
System.Text.Json (6)
System\Text\Json\Document\JsonDocument.Parse.cs (3)
208public static Task<JsonDocument> ParseAsync( 218private static async Task<JsonDocument> ParseAsyncCore( 242internal static async Task<JsonDocument> ParseAsyncCoreUnrented(
System\Text\Json\Nodes\JsonNode.Parse.cs (1)
140public static async Task<JsonNode?> ParseAsync(
System\Text\Json\Serialization\Converters\Collection\IAsyncEnumerableOfTConverter.cs (2)
82Debug.Assert(state.PendingTask is Task<bool> && state.PendingTask.IsCompleted); 83moveNextTask = new ValueTask<bool>((Task<bool>)state.PendingTask);
System.Text.RegularExpressions.Generator (1)
UpgradeToGeneratedRegexCodeFixer.cs (1)
75private static async Task<Document> ConvertToSourceGenerator(Document document, SyntaxNode root, SyntaxNode nodeToFix, CancellationToken cancellationToken)
System.Threading.Channels (3)
System\Threading\Channels\ChannelUtilities.cs (3)
16internal static readonly Task<bool> s_trueTask = Task.FromResult(result: true); 18internal static readonly Task<bool> s_falseTask = Task.FromResult(result: false); 61Task<T> t =
System.Threading.Tasks (1)
System.Threading.Tasks.cs (1)
25[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
System.Threading.Tasks.Dataflow (81)
Base\DataflowBlock.cs (64)
249/// A <see cref="System.Threading.Tasks.Task{Boolean}"/> that represents the asynchronous send. If the target 251/// from the call the resulting <see cref="System.Threading.Tasks.Task{Boolean}"/> will be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> 252/// property will return true. If the target declines the offered element during the call, upon return from the call the resulting <see cref="System.Threading.Tasks.Task{Boolean}"/> will 253/// be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> property will return false. If the target 255/// point the Task will complete, with its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> indicating whether the message was consumed. If the target 259public static Task<bool> SendAsync<TInput>(this ITargetBlock<TInput> target, TInput item) 271/// A <see cref="System.Threading.Tasks.Task{Boolean}"/> that represents the asynchronous send. If the target 273/// from the call the resulting <see cref="System.Threading.Tasks.Task{Boolean}"/> will be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> 274/// property will return true. If the target declines the offered element during the call, upon return from the call the resulting <see cref="System.Threading.Tasks.Task{Boolean}"/> will 275/// be completed and its <see cref="System.Threading.Tasks.Task{Boolean}.Result">Result</see> property will return false. If the target 277/// point the Task will complete, with its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> indicating whether the message was consumed. If the target 286public static Task<bool> SendAsync<TInput>(this ITargetBlock<TInput> target, TInput item, CancellationToken cancellationToken) 749public Task<bool> Completion { get { return _source.Task; } } 779/// A <see cref="System.Threading.Tasks.Task{TOutput}"/> that represents the asynchronous receive operation. When an item is successfully received from the source, 780/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 784public static Task<TOutput> ReceiveAsync<TOutput>( 796/// A <see cref="System.Threading.Tasks.Task{TOutput}"/> that represents the asynchronous receive operation. When an item is successfully received from the source, 797/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 801public static Task<TOutput> ReceiveAsync<TOutput>( 813/// A <see cref="System.Threading.Tasks.Task{TOutput}"/> that represents the asynchronous receive operation. When an item is successfully received from the source, 814/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 821public static Task<TOutput> ReceiveAsync<TOutput>( 834/// A <see cref="System.Threading.Tasks.Task{TOutput}"/> that represents the asynchronous receive operation. When an item is successfully received from the source, 835/// the returned task will be completed and its <see cref="System.Threading.Tasks.Task{TOutput}.Result">Result</see> will return the received item. If an item cannot be retrieved, 842public static Task<TOutput> ReceiveAsync<TOutput>( 944Task<TOutput> task = ReceiveCore(source, false, timeout, cancellationToken); 971private static Task<TOutput> ReceiveCore<TOutput>( 1037private static Task<TOutput> ReceiveCoreByLinking<TOutput>(ISourceBlock<TOutput> source, int millisecondsTimeout, CancellationToken cancellationToken) 1370/// Provides a <see cref="System.Threading.Tasks.Task{TResult}"/> 1376/// A <see cref="System.Threading.Tasks.Task{Boolean}"/> that informs of whether and when 1377/// more output is available. When the task completes, if its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> is true, more output 1382public static Task<bool> OutputAvailableAsync<TOutput>(this ISourceBlock<TOutput> source) 1388/// Provides a <see cref="System.Threading.Tasks.Task{TResult}"/> 1395/// A <see cref="System.Threading.Tasks.Task{Boolean}"/> that informs of whether and when 1396/// more output is available. When the task completes, if its <see cref="System.Threading.Tasks.Task{Boolean}.Result"/> is true, more output 1401public static Task<bool> OutputAvailableAsync<TOutput>( 1409static async Task<bool> Impl(ISourceBlock<TOutput> source, CancellationToken cancellationToken) 1645/// A <see cref="System.Threading.Tasks.Task{Int32}"/> that represents the asynchronous choice. 1650/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to either 0 or 1 to 1661public static Task<int> Choose<T1, T2>( 1679/// A <see cref="System.Threading.Tasks.Task{Int32}"/> that represents the asynchronous choice. 1685/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to either 0 or 1 to 1699public static Task<int> Choose<T1, T2>( 1728/// A <see cref="System.Threading.Tasks.Task{Int32}"/> that represents the asynchronous choice. 1733/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to the 0-based index of the source. 1745public static Task<int> Choose<T1, T2, T3>( 1767/// A <see cref="System.Threading.Tasks.Task{Int32}"/> that represents the asynchronous choice. 1773/// will end with its <see cref="System.Threading.Tasks.Task{Int32}.Result"/> set to the 0-based index of the source. 1788public static Task<int> Choose<T1, T2, T3>( 1819private static Task<int> ChooseCore<T1, T2, T3>( 1836Task<int>? resultTask; 1869[NotNullWhen(true)] out Task<int>? task) 1904private static Task<int> ChooseCoreByLinking<T1, T2, T3>( 1927var branchTasks = new Task<int>[hasThirdSource ? 3 : 2]; 1950foreach (Task<int> task in tasks) 2001private static Task<int> CreateChooseBranch<T>( 2370private List<Task<bool>>? _tempSendAsyncTaskList; 2423Task<bool> sendAsyncTask = targetObserver.SendAsyncToTarget(item); 2427_tempSendAsyncTaskList ??= new List<Task<bool>>(); 2443Task<bool[]> allSendAsyncTasksConsolidated = Task.WhenAll(_tempSendAsyncTaskList); 2548Task<bool> task = SendAsyncToTarget(value); 2570internal Task<bool> SendAsyncToTarget(TInput value)
Blocks\TransformBlock.cs (6)
66public TransformBlock(Func<TInput, Task<TOutput>> transform) : 78public TransformBlock(Func<TInput, Task<TOutput>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) : 91private TransformBlock(Func<TInput, TOutput>? transformSync, Func<TInput, Task<TOutput>>? transformAsync, ExecutionDataflowBlockOptions dataflowBlockOptions) 223private void ProcessMessageWithTask(Func<TInput, Task<TOutput>> transform, KeyValuePair<TInput, long> messageWithId) 228Task<TOutput>? task = null; 268private void AsyncCompleteProcessMessageWithTask(Task<TOutput> completed, KeyValuePair<TInput, long> messageWithId)
Blocks\TransformManyBlock.cs (5)
80public TransformManyBlock(Func<TInput, Task<IEnumerable<TOutput>>> transform) : 92public TransformManyBlock(Func<TInput, Task<IEnumerable<TOutput>>> transform, ExecutionDataflowBlockOptions dataflowBlockOptions) 195private void ProcessMessageWithTask(Func<TInput, Task<IEnumerable<TOutput>>> function, KeyValuePair<TInput, long> messageWithId) 198Task<IEnumerable<TOutput>>? task = null; 254Task<IEnumerable<TOutput>> completed, KeyValuePair<TInput, long> messageWithId)
Internal\Common.cs (6)
36internal static readonly Task<bool> CompletedTaskWithTrueResult = CreateCachedBooleanTask(true); 38internal static readonly Task<bool> CompletedTaskWithFalseResult = CreateCachedBooleanTask(false); 338private static Task<bool> CreateCachedBooleanTask(bool value) 362internal static Task<TResult> CreateTaskFromException<TResult>(Exception exception) 372internal static Task<TResult> CreateTaskFromCancellation<TResult>(CancellationToken cancellationToken) 376var t = new Task<TResult>(CachedGenericDelegates<TResult>.DefaultTResultFunc, cancellationToken);
System.Windows.Forms (10)
System\Windows\Forms\Control_InvokeAsync.cs (2)
96public async Task<T> InvokeAsync<T>(Func<T> callback, CancellationToken cancellationToken = default) 225public async Task<T> InvokeAsync<T>(Func<CancellationToken, ValueTask<T>> callback, CancellationToken cancellationToken = default)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (3)
328public static Task<TaskDialogButton> ShowDialogAsync( 361public static Task<TaskDialogButton> ShowDialogAsync( 395public static async Task<TaskDialogButton> ShowDialogAsync(
System\Windows\Forms\Form.cs (5)
5819/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. The task completes when the form is 5850public Task<DialogResult> ShowDialogAsync() => ShowDialogAsyncInternal(owner: null); 5860/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. 5891public Task<DialogResult> ShowDialogAsync(IWin32Window owner) => ShowDialogAsyncInternal(owner); 5893private Task<DialogResult> ShowDialogAsyncInternal(IWin32Window? owner)
System.Windows.Forms.Analyzers.CodeFixes.CSharp (1)
System\Windows\Forms\CSharp\CodeFixes\AddDesignerSerializationVisibility\AddDesignerSerializationVisibilityCodeFixProvider.cs (1)
57private static async Task<Document> AddDesignerSerializationAttribute(
System.Windows.Forms.Analyzers.CSharp.Tests (1)
Generators\ApplicationConfigurationGenerator\ApplicationConfigurationGeneratorTests.cs (1)
221private async Task<SourceText> LoadFileContentAsync(string testName)
System.Windows.Forms.Analyzers.Tests (6)
TestFileLoader.cs (6)
38public static Task<string> LoadTestFileAsync(string pathSegment, string testName, SourceLanguage language = SourceLanguage.CSharp) 45public static async Task<string> LoadTestFileAsync(string testFilePath) 52public static async Task<string> GetAnalyzerTestCodeAsync( 60public static async Task<string> GetGeneratorTestCodeAsync( 68public static async Task<string> GetCSAnalyzerTestCodeAsync( 76public static async Task<string> GetVBAnalyzerTestCodeAsync(
System.Windows.Forms.Primitives.Tests (1)
Windows\Win32\AgileComPointerTests.cs (1)
75unsafe Task<AgileComPointer<IStream>> GetProxyAgileComPointer(AgileComPointer<IStream> stream)
System.Windows.Forms.Primitives.TestUtilities (1)
Extensions\AssertExtensions.cs (1)
138public static async Task<T> ThrowsAsync<T>(string expectedParamName, Func<Task> testCode)
System.Windows.Forms.Tests (4)
System\Windows\Forms\HtmlDocumentTests.cs (1)
2374private static async Task<HtmlDocument> GetDocument(WebBrowser control, string html)
System\Windows\Forms\HtmlElementTests.cs (1)
3320private static async Task<HtmlDocument> GetDocument(WebBrowser control, string html)
System\Windows\Forms\HtmlWindowTests.cs (1)
94private static async Task<HtmlDocument> GetDocument(WebBrowser control, string html)
System\Windows\Forms\TaskDialogTests.cs (1)
49var separateTask = Task.Run(() => page.Text = "X");
System.Windows.Forms.UI.IntegrationTests (1)
TabControlTests.cs (1)
66private async Task<bool> IsHoveredWithMouseAsync(Form form, TabControl tabControl, Point point, bool assertCorrectLocation = true)
TagHelpersWebSite (2)
TagHelpers\TagCloudViewComponentTagHelper.cs (2)
67public async Task<IViewComponentResult> InvokeAsync(int count) 74private Task<string[]> GetTagsAsync(int count)
Templates.Blazor.Tests (7)
BlazorTemplateTest.cs (1)
25protected async Task<Project> CreateBuildPublishAsync(
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
254internal Task<HttpResponseMessage> SendRequest(string path) => 257internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
44protected async Task<Project> CreateBuildPublishAsync(string auth = null, string[] args = null, string targetFramework = null, bool serverProject = false, bool onlyCreate = false)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
27public async Task<Project> CreateProject(ITestOutputHelper output)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
62public static async Task<ProcessEx> RunDotNetNew(ITestOutputHelper output, string arguments)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
Templates.Blazor.WebAssembly.Auth.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
254internal Task<HttpResponseMessage> SendRequest(string path) => 257internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
44protected async Task<Project> CreateBuildPublishAsync(string auth = null, string[] args = null, string targetFramework = null, bool serverProject = false, bool onlyCreate = false)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
27public async Task<Project> CreateProject(ITestOutputHelper output)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
62public static async Task<ProcessEx> RunDotNetNew(ITestOutputHelper output, string arguments)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
Templates.Blazor.WebAssembly.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
254internal Task<HttpResponseMessage> SendRequest(string path) => 257internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
44protected async Task<Project> CreateBuildPublishAsync(string auth = null, string[] args = null, string targetFramework = null, bool serverProject = false, bool onlyCreate = false)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
27public async Task<Project> CreateProject(ITestOutputHelper output)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
62public static async Task<ProcessEx> RunDotNetNew(ITestOutputHelper output, string arguments)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
Templates.Mvc.Tests (11)
BlazorTemplateTest.cs (1)
174private Task<string> ReadProjectFileAsync(Project project)
MvcTemplateTest.cs (1)
353private async Task<Project> MvcTemplateBuildsAndPublishes(string auth, string[] args)
RazorPagesTemplateTest.cs (1)
289private async Task<Project> BuildAndPublishRazorPagesTemplateIdentityWeb(string auth, string[] args)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
254internal Task<HttpResponseMessage> SendRequest(string path) => 257internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
44protected async Task<Project> CreateBuildPublishAsync(string auth = null, string[] args = null, string targetFramework = null, bool serverProject = false, bool onlyCreate = false)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
27public async Task<Project> CreateProject(ITestOutputHelper output)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
62public static async Task<ProcessEx> RunDotNetNew(ITestOutputHelper output, string arguments)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
WebApiTemplateTest.cs (1)
214private async Task<Project> PublishAndBuildWebApiTemplate(string languageOverride, string auth, string[] args = null)
Templates.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (2)
254internal Task<HttpResponseMessage> SendRequest(string path) => 257internal Task<HttpResponseMessage> SendRequest(Func<HttpRequestMessage> requestFactory)
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
44protected async Task<Project> CreateBuildPublishAsync(string auth = null, string[] args = null, string targetFramework = null, bool serverProject = false, bool onlyCreate = false)
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (1)
27public async Task<Project> CreateProject(ITestOutputHelper output)
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (1)
62public static async Task<ProcessEx> RunDotNetNew(ITestOutputHelper output, string arguments)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
src\Shared\E2ETesting\SauceConnectServer.cs (1)
233private static async Task<string> WriteTrackingFileAsync(ITestOutputHelper output, string trackingFolder, Process process)
Test.Utilities (14)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
TestProject.IntegrationServiceA (2)
Postgres\PostgresExtensions.cs (1)
13private static async Task<IResult> VerifyPostgresAsync(NpgsqlConnection connection)
Redis\RedisExtensions.cs (1)
13private static async Task<IResult> VerifyRedisAsync([FromKeyedServices("redis")] IConnectionMultiplexer cm)
Text.Analyzers (23)
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
618Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
93private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 198async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 230public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 232Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
33internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
188public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 201public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 228public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 246public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 265static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 325internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
33internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
32internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
194/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 197/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 199/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
UnitTests.Common (11)
ServiceInterfaces.cs (8)
65Task<Stream> EchoStreamAsync(Stream stream); 78System.Threading.Tasks.Task<System.ServiceModel.Channels.Message> MessageRequestReplyAsync(System.ServiceModel.Channels.Message request); 84System.Threading.Tasks.Task<string> EchoAsync(string message); 111System.Threading.Tasks.Task<System.ServiceModel.Channels.Message> MessageRequestReplyAsync(System.ServiceModel.Channels.Message request); 117System.Threading.Tasks.Task<string> EchoAsync(string message); 149Task<FeedbackResponse> FeedbackAsync(FeedbackRequest request); 193Task<Guid> ServicePingCallback(Guid guid); 197Task<Guid> ServicePingFaultCallback(Guid guid);
TestHelpers.cs (1)
356public Task<Guid> OnPingCallback(Guid guid)
TestTypes.cs (2)
696public Task<Guid> ServicePingCallback(Guid guid) 705public Task<Guid> ServicePingFaultCallback(Guid guid)
vbc (12)
src\Compilers\Core\CommandLine\BuildProtocol.cs (2)
122public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 318public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildClient.cs (3)
25internal delegate Task<BuildResponse> CompileOnServerFunc(BuildRequest buildRequest, string pipeName, CancellationToken cancellationToken); 171public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> originalArguments, BuildPaths buildPaths, TextWriter? textWriter = null) 232var buildResponseTask = _compileOnServerFunc(
src\Compilers\Shared\BuildServerConnection.cs (7)
88internal static async Task<bool> RunServerShutdownRequestAsync( 157internal static Task<BuildResponse> RunServerBuildRequestAsync( 171internal static async Task<BuildResponse> RunServerBuildRequestAsync( 200static Task<NamedPipeClientStream?> tryConnectToServerAsync( 277static async Task<BuildResponse> tryRunRequestAsync( 300var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 371internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
VBCSCompiler (32)
src\Compilers\Core\CommandLine\BuildProtocol.cs (2)
122public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 318public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
157internal async Task<int> RunShutdownAsync(string pipeName, bool waitForProcess, int? timeoutOverride, CancellationToken cancellationToken = default)
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (8)
34internal async Task<CompletionData> ProcessAsync( 35Task<IClientConnection> clientConnectionTask, 49async Task<CompletionData> ProcessCoreAsync() 99private async Task<CompletionData> WriteBuildResponseAsync(IClientConnection clientConnection, string requestId, BuildResponse response, CompletionData completionData, CancellationToken cancellationToken) 111private async Task<CompletionData> ProcessCompilationRequestAsync(IClientConnection clientConnection, BuildRequest request, CancellationToken cancellationToken) 117var compilationTask = ProcessCompilationRequestCoreAsync(CompilerServerHost, request, buildCancellationTokenSource.Token); 163static Task<BuildResponse> ProcessCompilationRequestCoreAsync(ICompilerServerHost compilerServerHost, BuildRequest buildRequest, CancellationToken cancellationToken) 172var task = new Task<BuildResponse>(func, cancellationToken, TaskCreationOptions.LongRunning);
src\Compilers\Server\VBCSCompiler\IClientConnection.cs (2)
25Task<BuildRequest> ReadBuildRequestAsync(CancellationToken cancellationToken); 51Task<IClientConnection> GetNextClientConnectionAsync();
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnection.cs (1)
54public async Task<BuildRequest> ReadBuildRequestAsync(CancellationToken cancellationToken)
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (1)
135public async Task<IClientConnection> GetNextClientConnectionAsync()
src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (7)
61private Task<IClientConnection>? _listenTask; 62private readonly List<Task<CompletionData>> _connectionList = new List<Task<CompletionData>>(); 155var connectionTask = ProcessClientConnectionAsync( 272var current = _connectionList[i]; 332internal static async Task<CompletionData> ProcessClientConnectionAsync( 334Task<IClientConnection> clientStreamTask,
src\Compilers\Shared\BuildClient.cs (3)
25internal delegate Task<BuildResponse> CompileOnServerFunc(BuildRequest buildRequest, string pipeName, CancellationToken cancellationToken); 171public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> originalArguments, BuildPaths buildPaths, TextWriter? textWriter = null) 232var buildResponseTask = _compileOnServerFunc(
src\Compilers\Shared\BuildServerConnection.cs (7)
88internal static async Task<bool> RunServerShutdownRequestAsync( 157internal static Task<BuildResponse> RunServerBuildRequestAsync( 171internal static async Task<BuildResponse> RunServerBuildRequestAsync( 200static Task<NamedPipeClientStream?> tryConnectToServerAsync( 277static async Task<BuildResponse> tryRunRequestAsync( 300var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 371internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
VBCSCompiler.UnitTests (28)
BuildClientTests.cs (2)
150var connection = tryConnectToNamedPipe(Timeout.Infinite, cts.Token); 160async Task<bool> tryConnectToNamedPipe(int timeoutMs, CancellationToken cancellationToken)
ClientConnectionHandlerTests.cs (1)
170var task = clientConnectionHandler.ProcessAsync(Task.FromResult<IClientConnection>(clientConnection));
CompilerServerTests.cs (3)
219private async Task<(byte[] assemblyBytes, string finalFlags)> CompileAndGetBytes(string source, string flags) 962private Task<DisposableFile> RunCompilationAsync(RequestLanguage language, string pipeName, int i, TempDirectory compilationDir) 1028var tasks = new Task<DisposableFile>[numberOfCompiles];
NamedPipeClientConnectionHostTests.cs (8)
36private Task<NamedPipeClientStream?> ConnectAsync(CancellationToken cancellationToken = default) => BuildServerConnection.TryConnectToServerAsync( 52var task = _host.GetNextClientConnectionAsync(); 63var task = _host.GetNextClientConnectionAsync(); 77var task = _host.GetNextClientConnectionAsync(); 93var list = new List<Task<NamedPipeClientStream?>>(); 107foreach (var item in list) 123var list = new List<Task<NamedPipeClientStream?>>(); 134foreach (var streamTask in list)
ServerUtil.cs (6)
61internal Task<TestableDiagnosticListener> ServerTask { get; } 65private ServerData(CancellationTokenSource cancellationTokenSource, string pipeName, ICompilerServerLogger logger, Task<TestableDiagnosticListener> serverTask) 124internal Task<BuildResponse> SendAsync(BuildRequest request, CancellationToken cancellationToken = default) => 133internal async Task<int> SendShutdownAsync(CancellationToken cancellationToken = default) 139internal async Task<TestableDiagnosticListener> Complete() 172internal static async Task<ServerData> CreateServer(
TestableClientConnection.cs (2)
22public Func<CancellationToken, Task<BuildRequest>> ReadBuildRequestFunc = delegate { throw new Exception(); }; 26public Task<BuildRequest> ReadBuildRequestAsync(CancellationToken cancellationToken) => ReadBuildRequestFunc(cancellationToken);
TestableClientConnectionHost.cs (5)
18private readonly Queue<Func<Task<IClientConnection>>> _waitingTasks = new Queue<Func<Task<IClientConnection>>>(); 45public Task<IClientConnection> GetNextClientConnectionAsync() 47Func<Task<IClientConnection>>? func = null; 66public void Add(Func<Task<IClientConnection>> func)
VBCSCompilerServerTests.cs (1)
57private Task<int> RunShutdownAsync(string pipeName, bool waitForProcess = true, CancellationToken cancellationToken = default(CancellationToken))
WaitFor.Frontend (1)
Program.cs (1)
37public async Task<string> GetDataAsync(CancellationToken cancellationToken = default)
Wasm.Performance.ConsoleHost (4)
NullDispatcher.cs (3)
24public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 27public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
Wasm.Performance.Driver (1)
Program.cs (1)
21public static async Task<int> Main(string[] args)
WebSocketSample (1)
Program.cs (1)
11public static async Task<int> Main(string[] args)
xunit.assert (14)
EventAsserts.cs (9)
205 public static async Task<RaisedEvent<EventArgs>> RaisesAnyAsync( 227 public static async Task<RaisedEvent<T>> RaisesAnyAsync<T>( 249 public static async Task<RaisedEvent<T>> RaisesAnyAsync<T>( 288 public static async Task<RaisedEvent<T>> RaisesAsync<T>( 313 public static async Task<RaisedEvent<T>> RaisesAsync<T>( 437 static async Task<bool> RaisesAsyncInternal( 456 static async Task<RaisedEvent<EventArgs>?> RaisesAsyncInternal( 481 static async Task<RaisedEvent<T>?> RaisesAsyncInternal<T>( 503 static async Task<RaisedEvent<T>?> RaisesAsyncInternal<T>(
ExceptionAsserts.cs (4)
248 public static async Task<T> ThrowsAnyAsync<T>(Func<Task> testCode) 258 public static async Task<Exception> ThrowsAsync( 269 public static async Task<T> ThrowsAsync<T>(Func<Task> testCode) 282 public static async Task<T> ThrowsAsync<T>(
Record.cs (1)
105 protected static async Task<Exception?> RecordExceptionAsync(Func<Task> testCode)
Xunit.NetCore.Extensions (3)
AssemblyFixtureSupport\XunitTestAssemblyRunnerWithAssemblyFixture.cs (1)
63protected override Task<RunSummary> RunTestCollectionAsync(IMessageBus messageBus,
AssemblyFixtureSupport\XunitTestClassRunnerWithAssemblyFixture.cs (1)
55protected override Task<RunSummary> RunTestMethodAsync(ITestMethod testMethod, IReflectionMethodInfo method, IEnumerable<IXunitTestCase> testCases, object[] constructorArguments)
AssemblyFixtureSupport\XunitTestCollectionRunnerWithAssemblyFixture.cs (1)
37protected override Task<RunSummary> RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo @class, IEnumerable<IXunitTestCase> testCases)