17 types derived from Task
Microsoft.AspNetCore.Mvc.Core.Test (1)
Infrastructure\ControllerActionInvokerTest.cs (1)
1950public class TaskOfTDerivedType<T> : Task<T>
Microsoft.AspNetCore.SignalR.Tests (1)
NativeAotTests.cs (1)
373public class TaskOfTDerivedType<T> : Task<T>
System.Private.CoreLib (15)
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 6397private sealed class WhenAllPromise<T> : Task<T[]>, ITaskCompletionAction 6628private sealed class TwoTaskWhenAnyPromise<TTask> : Task<TTask>, ITaskCompletionAction where TTask : Task 7390internal 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>
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
215private sealed class ThunkTask<T> : Task<T>
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)
321Task<TResult> f = new Task<TResult>(function, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); 341Task<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>(); 6266return new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default); 6300new Task<TResult[]>(false, Array.Empty<TResult>(), TaskCreationOptions.None, default) : 6377return 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);
14596 references to Task
AnalyzerRunner (8)
CodeRefactoringRunner.cs (1)
76private 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 (160)
Backchannel\AppHostBackchannel.cs (4)
18Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken); 23Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 51public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 171public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Backchannel\ExtensionBackchannel.cs (10)
34Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 35Task<bool> ConfirmAsync(string promptText, bool defaultValue, CancellationToken cancellationToken); 36Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 39Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 40Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken); 397public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 423public async Task<bool> ConfirmAsync(string promptText, bool defaultValue, CancellationToken cancellationToken) 441public async Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken) 498public async Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken) 504public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Backchannel\ExtensionRpcTarget.cs (4)
18Task<string> GetCliVersionAsync(string token); 21Task<ValidationResult?> ValidatePromptInputStringAsync(string token, string input); 31public Task<string> GetCliVersionAsync(string token) 41public Task<ValidationResult?> ValidatePromptInputStringAsync(string token, string input)
Commands\AddCommand.cs (9)
66protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 211private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> GetPackageByInteractiveFlow(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> possiblePackages, string? preferredVersion, CancellationToken cancellationToken) 240private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> GetPackageByInteractiveFlowWithNoMatchesMessage(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> possiblePackages, string? searchTerm, CancellationToken cancellationToken) 262Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken); 263Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken); 268public virtual async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 280async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForChannelPackagesAsync( 312var rootChoices = new List<(string Label, Func<CancellationToken, Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>> Action)>(); 352public virtual async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken)
Commands\BaseCommand.cs (1)
50protected abstract Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken);
Commands\ConfigCommand.cs (5)
49protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 75protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 131protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 182protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 227protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ExecCommand.cs (2)
83protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 126Task<int>? pendingRun = null;
Commands\ExtensionInternalCommand.cs (2)
24protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 44protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\NewCommand.cs (12)
108private async Task<ITemplate> GetProjectTemplateAsync(ParseResult parseResult, CancellationToken cancellationToken) 124protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 147Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken); 148Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken); 149Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken); 150Task<string> PromptForOutputPath(string v, CancellationToken cancellationToken); 155public virtual async Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken) 170async Task<(NuGetPackage Package, PackageChannel Channel)> PromptForChannelPackagesAsync( 203var rootChoices = new List<(string Label, Func<CancellationToken, Task<(NuGetPackage, PackageChannel)>> Action)>(); 246public virtual async Task<string> PromptForOutputPath(string path, CancellationToken cancellationToken) 255public virtual async Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 266public virtual async Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken)
Commands\PublishCommand.cs (2)
17Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken); 22public virtual async Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\PublishCommandBase.cs (7)
82protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 151var pendingRun = _runner.RunAsync( 227public static async Task<bool> ProcessPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, CancellationToken cancellationToken) 240public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, IAppHostBackchannel backchannel, CancellationToken cancellationToken) 469private async Task<string?> HandleSingleInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken) 511private async Task<string?> HandleSelectInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken) 531private async Task<string?> HandleNumberInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken)
Commands\RunCommand.cs (2)
86protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 169var pendingRun = _runner.RunAsync(
Commands\TemplateCommand.cs (3)
13private readonly Func<ParseResult, CancellationToken, Task<int>> _executeCallback; 15public TemplateCommand(ITemplate template, Func<ParseResult, CancellationToken, Task<int>> executeCallback, IFeatures features, ICliUpdateNotifier updateNotifier, CliExecutionContext executionContext) 25protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\UpdateCommand.cs (1)
35protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Configuration\ConfigurationService.cs (3)
45public async Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 115public async Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 247public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default)
Configuration\IConfigurationService.cs (3)
9Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default); 10Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default); 11Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default);
DotNet\DotNetCliRunner.cs (23)
27Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 28Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 29Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 30Task<int> CheckHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 31Task<int> TrustHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 32Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 33Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 34Task<int> BuildAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 35Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 36Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 37Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 65public async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 148public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 203public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 241public async Task<int> CheckHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 256public async Task<int> TrustHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 271public async Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 397public async Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 427public virtual async Task<int> ExecuteAsync(string[] args, IDictionary<string, string>? env, FileInfo? projectFile, DirectoryInfo workingDirectory, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 658public async Task<int> BuildAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 679public async Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 728public async Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 811public async Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
DotNet\DotNetSdkInstaller.cs (2)
23public Task<bool> CheckAsync(CancellationToken cancellationToken = default) 33public async Task<bool> CheckAsync(string minimumVersion, CancellationToken cancellationToken = default)
DotNet\IDotNetSdkInstaller.cs (2)
16Task<bool> CheckAsync(CancellationToken cancellationToken = default); 24Task<bool> CheckAsync(string minimumVersion, CancellationToken cancellationToken = default);
Interaction\ConsoleInteractionService.cs (5)
30public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) 59public async Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 83public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 183public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
Interaction\ExtensionInteractionService.cs (6)
62public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) 64var task = action(); 83public async Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 110public async Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 138public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter,
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, bool isSecret = false, bool required = false, 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 (9)
17Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 18Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 19Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 20Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 33public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 48public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 53public async Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 69private static async Task<string> ComputeNuGetConfigHashSuffixAsync(FileInfo nugetConfigFile, CancellationToken cancellationToken) 77public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string query, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken)
NuGet\NuGetPackagePrefetcher.cs (1)
71private async Task<BaseCommand?> WaitForCommandSelectionAsync(CancellationToken cancellationToken)
Packaging\PackageChannel.cs (6)
17public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 19var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 52public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 54var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 87public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(string packageId, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 89var tasks = new List<Task<IEnumerable<NuGetPackage>>>();
Packaging\PackagingService.cs (2)
10public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default); 15public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default)
Packaging\TemporaryNuGetConfig.cs (1)
20public static async Task<TemporaryNuGetConfig> CreateAsync(PackageMapping[] mappings)
Program.cs (2)
54private static async Task<IHost> BuildApplicationAsync(string[] args) 211public static async Task<int> Main(string[] args)
Projects\ProjectLocator.cs (6)
18Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken = default); 19Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken); 24public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 30private async Task<(List<FileInfo> BuildableAppHost, List<FileInfo> UnbuildableSuspectedAppHostProjects)> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, CancellationToken cancellationToken) 98private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(CancellationToken cancellationToken) 141public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken = default)
Projects\ProjectUpdater.cs (5)
20Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken); 25public async Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default) 138private async Task<IEnumerable<UpdateStep>> GetUpdateStepsAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken) 155private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, CancellationToken cancellationToken) 182private async Task<NuGetPackageCli> GetLatestVersionOfPackageAsync(UpdateContext context, string packageId, CancellationToken cancellationToken)
Templating\CallbackTemplate.cs (2)
9internal class CallbackTemplate(string name, string description, Func<string, string> pathDeriverCallback, Action<TemplateCommand> applyOptionsCallback, Func<CallbackTemplate, ParseResult, CancellationToken, Task<TemplateResult>> applyTemplateCallback) : ITemplate 22public Task<TemplateResult> ApplyTemplateAsync(ParseResult parseResult, CancellationToken cancellationToken)
Templating\DotNetTemplateFactory.cs (8)
100private async Task<string[]> PromptForExtraAspireStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 110private async Task<string[]> PromptForExtraAspireXUnitOptionsAsync(ParseResult result, CancellationToken cancellationToken) 212private async Task<TemplateResult> ApplyTemplateWithNoExtraArgsAsync(CallbackTemplate template, ParseResult parseResult, CancellationToken cancellationToken) 217private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 333private async Task<string> GetProjectNameAsync(ParseResult parseResult, CancellationToken cancellationToken) 344private async Task<string> GetOutputPathAsync(ParseResult parseResult, Func<string, string> pathDeriver, string projectName, CancellationToken cancellationToken) 354private async Task<(NuGetPackage Package, PackageChannel Channel)> GetProjectTemplatesVersionAsync(ParseResult parseResult, CancellationToken cancellationToken)
Templating\ITemplate.cs (1)
15Task<TemplateResult> ApplyTemplateAsync(ParseResult parseResult, CancellationToken cancellationToken);
Utils\AppHostHelper.cs (3)
17internal static async Task<(bool IsCompatibleAppHost, bool SupportsBackchannel, string? AspireHostingVersion)> CheckAppHostCompatibilityAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 53internal static async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, AspireCliTelemetry telemetry, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 68internal static async Task<int> BuildAppHostAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, DirectoryInfo workingDirectory, CancellationToken cancellationToken)
Utils\SdkInstallHelper.cs (1)
23public static async Task<bool> EnsureSdkInstalledAsync(
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 (91)
Commands\AddCommandTests.cs (2)
547public override Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 556public override Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken)
Commands\DeployCommandTests.cs (1)
265public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\ExecCommandTests.cs (6)
169public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 174public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 182public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 187public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 199public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 204public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken)
Commands\NewCommandTests.cs (4)
513public override Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken) 522public override Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 531public override Task<string> PromptForOutputPath(string path, CancellationToken cancellationToken) 540public override Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken)
Commands\PublishCommandPromptingIntegrationTests.cs (7)
672public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) => 691public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) => Task.FromResult(new[] { "baseline.v2" }); 735public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 752public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 772public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 790public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) => action();
Commands\PublishCommandTests.cs (1)
239public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\RunCommandTests.cs (9)
88public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 93public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 141public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 146public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 154public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 159public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 246var pendingRun = result.InvokeAsync(cts.Token); 302var pendingRun = result.InvokeAsync(cts.Token); 468var pendingRun = result.InvokeAsync(cts.Token);
Commands\UpdateCommandTests.cs (3)
18public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default) 30public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken = default) 42public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken)
DotNet\DotNetCliRunnerTests.cs (1)
416public override Task<int> ExecuteAsync(string[] args, IDictionary<string, string>? env, FileInfo? projectFile, DirectoryInfo workingDirectory, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
NuGet\NuGetPackagePrefetcherTests.cs (2)
109protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 124protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Packaging\NuGetConfigMergerTests.cs (5)
20private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content) 29public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 33public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 37public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 41public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken)
Projects\ProjectLocatorTests.cs (3)
341public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 347public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 352public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default)
TestServices\NoProjectFileProjectLocator.cs (2)
10public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 15public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken)
TestServices\TestAppHostBackchannel.cs (4)
16public Func<CancellationToken, Task<DashboardUrlsState>>? GetDashboardUrlsAsyncCallback { get; set; } 31public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 49public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 214public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
TestServices\TestConsoleInteractionService.cs (5)
18public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) 29public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 34public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 70public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
TestServices\TestDotNetCliRunner.cs (12)
22public Func<FileInfo, bool, bool, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostBackchannel>?, DotNetCliRunnerInvocationOptions, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 26public Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 33public Task<int> BuildAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 40public Task<int> CheckHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 47public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 56public Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 72public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 79public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 86public Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 93public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 100public Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 107public Task<int> TrustHttpCertificateAsync(DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
TestServices\TestDotNetSdkInstaller.cs (2)
14public Task<bool> CheckAsync(CancellationToken cancellationToken = default) 21public Task<bool> CheckAsync(string minimumVersion, CancellationToken cancellationToken = default)
TestServices\TestExtensionBackchannel.cs (9)
48public Func<string, bool, Task<bool>>? ConfirmAsyncCallback { get; set; } 51public Func<string, string?, Func<string, ValidationResult>?, bool, Task<string>>? PromptForStringAsyncCallback { get; set; } 60public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 63public Func<string, CancellationToken, Task<bool>>? HasCapabilityAsyncCallback { get; set; } 137public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 149public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 157public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, CancellationToken cancellationToken = default) 181public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) 189public Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken)
TestServices\TestExtensionInteractionService.cs (5)
23public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action) 33public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 38public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 84public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
TestServices\TestProjectLocator.cs (4)
10public Func<FileInfo?, CancellationToken, Task<FileInfo?>>? UseOrFindAppHostProjectFileAsyncCallback { get; set; } 12public Func<string, CancellationToken, Task<List<FileInfo>>>? FindAppHostProjectFilesAsyncCallback { get; set; } 14public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, CancellationToken cancellationToken) 31public Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken)
Utils\CliUpdateNotificationServiceTests.cs (4)
295public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 300public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 305public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 310public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, 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 (48)
artifacts\obj\Aspire.Dashboard\Debug\net8.0\DashboardServiceGrpc.cs (2)
124public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ApplicationInformationResponse> GetApplicationInformation(global::Aspire.DashboardService.Proto.V1.ApplicationInformationRequest request, grpc::ServerCallContext context) 142public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ResourceCommandResponse> ExecuteResourceCommand(global::Aspire.DashboardService.Proto.V1.ResourceCommandRequest request, grpc::ServerCallContext context)
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)
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 (3)
53internal async Task<int> GetMessagesProcessedAsync() 149Func<IDialogService, Task<IDialogReference>> openDialog; 556public async Task<IDialogReference> ShowMessageBoxAsync(IDialogService dialogService, MessageBoxContent content, DialogParameters parameters)
Components\Pages\IPageWithSessionAndUrlState.cs (1)
101public static async Task<bool> InitializeViewModelAsync<TViewModel, TSerializableViewModel>(this IPageWithSessionAndUrlState<TViewModel, TSerializableViewModel> page) where TSerializableViewModel : class
Components\Pages\Login.razor.cs (1)
41public 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\ThemeManager.cs (2)
15Task<ThemeSettings> GetThemeSettingsAsync(CancellationToken cancellationToken); 23public async Task<ThemeSettings> GetThemeSettingsAsync(CancellationToken cancellationToken)
Model\TraceLinkHelpers.cs (3)
17public static async Task<bool> WaitForSpanToBeAvailableAsync( 35public static async Task<bool> WaitForDataToBeAvailableAsync( 36Func<CancellationToken, Task<bool>> isAvailableCallback,
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>(
ServiceClient\DashboardClient.cs (6)
297private async Task WatchWithRecoveryAsync(Func<RetryContext, CancellationToken, Task<RetryResult>> action, CancellationToken cancellationToken) 346private async Task<RetryResult> WatchResourcesAsync(RetryContext retryContext, CancellationToken cancellationToken) 430private async Task<RetryResult> WatchInteractionsAsync(RetryContext retryContext, CancellationToken cancellationToken) 508private static async Task<bool> IsUnimplemented(AsyncDuplexStreamingCall<WatchInteractionsRequestUpdate, WatchInteractionsResponseUpdate> call) 563public async Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) 729public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (2)
42Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken); 67Task<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)
354private 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)
131internal static async Task<RequestCulture?> ResolveSetCultureToAcceptedCultureAsync(string acceptLanguage, List<CultureInfo> availableCultures)
Aspire.Dashboard.Components.Tests (51)
Shared\TestDashboardClient.cs (2)
50public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) 80public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
Shared\TestDialogService.cs (29)
11private readonly Func<object, DialogParameters, Task<IDialogReference>>? _onShowDialog; 13public TestDialogService(Func<object, DialogParameters, Task<IDialogReference>>? onShowDialog = null) 20public event Func<IDialogReference, Type?, DialogParameters, object, Task<IDialogReference>>? OnShowAsync; 22public event Func<string, DialogParameters, Task<IDialogReference?>>? OnUpdateAsync; 46public Task<IDialogReference> ShowConfirmationAsync(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) 51public Task<IDialogReference> ShowConfirmationAsync(string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) 68public async Task<IDialogReference> ShowDialogAsync<TData>(Type dialogComponent, TData data, DialogParameters parameters) where TData : class 73public async Task<IDialogReference> ShowDialogAsync<TDialog>(object data, DialogParameters parameters) where TDialog : IDialogContentComponent 78private async Task<IDialogReference> RunShowDialogCallbackAsync(Type dialogComponent, object data, DialogParameters parameters) 89public Task<IDialogReference> ShowDialogAsync<TDialog>(DialogParameters parameters) where TDialog : IDialogContentComponent 94public Task<IDialogReference> ShowDialogAsync(RenderFragment renderFragment, DialogParameters dialogParameters) 99public Task<IDialogReference> ShowDialogAsync<TDialog, TData>(DialogParameters<TData> parameters) 111public Task<IDialogReference> ShowErrorAsync(string message, string? title = null, string? primaryText = null) 121public Task<IDialogReference> ShowInfoAsync(string message, string? title = null, string? primaryText = null) 131public Task<IDialogReference> ShowMessageBoxAsync(DialogParameters<MessageBoxContent> parameters) 148public Task<IDialogReference> ShowPanelAsync<TData>(Type dialogComponent, TData data, DialogParameters parameters) where TData : class 153public Task<IDialogReference> ShowPanelAsync<TDialog>(object data, DialogParameters parameters) where TDialog : IDialogContentComponent 158public Task<IDialogReference> ShowPanelAsync<TDialog>(DialogParameters parameters) where TDialog : IDialogContentComponent 163public Task<IDialogReference> ShowPanelAsync<TDialog, TData>(DialogParameters<TData> parameters) 170public Task<IDialogReference> ShowPanelAsync<TData>(Type dialogComponent, DialogParameters<TData> parameters) where TData : class 190public Task<IDialogReference> ShowSplashScreenAsync(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) 195public Task<IDialogReference> ShowSplashScreenAsync(DialogParameters<SplashScreenContent> parameters) 200public Task<IDialogReference> ShowSplashScreenAsync<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> 205public Task<IDialogReference> ShowSplashScreenAsync<T>(DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> 210public Task<IDialogReference> ShowSplashScreenAsync(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) 215public Task<IDialogReference> ShowSplashScreenAsync(Type component, DialogParameters<SplashScreenContent> parameters) 225public Task<IDialogReference> ShowSuccessAsync(string message, string? title = null, string? primaryText = null) 235public Task<IDialogReference> ShowWarningAsync(string message, string? title = null, string? primaryText = null) 245public Task<IDialogReference?> UpdateDialogAsync<TData>(string id, DialogParameters<TData> parameters) where TData : class
Shared\TestLocalStorage.cs (2)
13public Task<StorageResult<T>> GetAsync<T>(string key) 18public Task<StorageResult<T>> GetUnprotectedAsync<T>(string key)
Shared\TestMessageService.cs (6)
10private readonly Func<MessageOptions, Task<Message>>? _onShowMessage; 12public TestMessageService(Func<MessageOptions, Task<Message>>? onShowMessage = null) 69public Task<Message> ShowMessageBarAsync(Action<MessageOptions> options) 77public Task<Message> ShowMessageBarAsync(string title) 82public Task<Message> ShowMessageBarAsync(string title, MessageIntent intent) 87public Task<Message> ShowMessageBarAsync(string title, MessageIntent intent, string section)
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 (34)
ChannelExtensionsTests.cs (1)
140var read2Task = resultChannel.Reader.ReadAsync().DefaultTimeout();
Integration\DashboardClientAuthTests.cs (3)
67private static async Task<ResourceServiceServer> CreateResourceServiceServerAsync(ILoggerFactory loggerFactory, bool useHttps, Action<TestCalls>? configureCalls = null) 108private static async Task<DashboardClient> CreateDashboardClientAsync( 161public 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 (2)
781private async Task<(string? Host, string? Proto, string EndpointString)> ExecuteForwardedHeadersScenarioAsync( 863private 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 (2)
135var subscribeTask = client.SubscribeResourcesAsync(CancellationToken.None); 287public Task<bool> MoveNext(CancellationToken cancellationToken)
OtlpApiKeyAuthenticationHandlerTests.cs (1)
76private static async Task<OtlpApiKeyAuthenticationHandler> CreateAuthHandlerAsync(string primaryApiKey, string? secondaryApiKey, string? otlpApiKeyHeader)
ResourceOutgoingPeerResolverTests.cs (3)
407private sealed class MockDashboardClient(Task<ResourceViewModelSubscription> subscribeResult) : IDashboardClient 413public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException(); 419public 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( 328public async Task<CommandResult> BuildAsync(string[]? extraBuildArgs = default, CancellationToken token = default, string? workingDirectory = null) 349public 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 (109)
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)
11async Task<string?> EvalEndpointAsync(EndpointReference endpointReference, EndpointProperty property) 35async Task<ResolvedValue> EvalExpressionAsync(ReferenceExpression expr) 58async Task<ResolvedValue> EvalValueProvider(IValueProvider vp) 109async Task<ResolvedValue> ResolveConnectionStringReferenceAsync(ConnectionStringReference cs)
ApplicationModel\HttpCommandOptions.cs (1)
36public Func<HttpCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; }
ApplicationModel\ResourceCommandAnnotation.cs (2)
21Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 66public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; }
ApplicationModel\ResourceCommandService.cs (4)
45public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, string commandName, CancellationToken cancellationToken = default) 62public async Task<ExecuteCommandResult> ExecuteCommandAsync(IResource resource, string commandName, CancellationToken cancellationToken = default) 72var tasks = new List<Task<ExecuteCommandResult>>(); 120internal async Task<ExecuteCommandResult> ExecuteCommandCoreAsync(string resourceId, IResource resource, string commandName, CancellationToken cancellationToken)
ApplicationModel\ResourceExtensions.cs (1)
434private 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) 185public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, CancellationToken cancellationToken = default) 218public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, WaitBehavior waitBehavior, CancellationToken cancellationToken = default) 427/// <returns>A <see cref="Task{ResourceEvent}"/> representing the wait operation and which of the target states the resource reached.</returns> 430public async Task<ResourceEvent> WaitForResourceAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default) 439private async Task<ResourceEvent> WaitForResourceCoreAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default)
artifacts\obj\Aspire.Hosting\Debug\net8.0\Dashboard\proto\DashboardServiceGrpc.cs (2)
124public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ApplicationInformationResponse> GetApplicationInformation(global::Aspire.DashboardService.Proto.V1.ApplicationInformationRequest request, grpc::ServerCallContext context) 142public virtual global::System.Threading.Tasks.Task<global::Aspire.DashboardService.Proto.V1.ResourceCommandResponse> ExecuteResourceCommand(global::Aspire.DashboardService.Proto.V1.ResourceCommandRequest request, grpc::ServerCallContext context)
Backchannel\AppHostRpcTarget.cs (2)
113public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 193public 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( 327public override async Task<ResourceCommandResponse> ExecuteResourceCommand(ResourceCommandRequest request, ServerCallContext context)
Dashboard\DashboardServiceAuth.cs (1)
35protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Dashboard\DashboardServiceData.cs (1)
97internal 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)
1909private async Task<(List<(string Value, bool IsSensitive)>, bool)> BuildArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken) 1937private async Task<List<ContainerCreateFileSystem>> BuildCreateFilesAsync(IResource modelResource, CancellationToken cancellationToken) 1967private async Task<(List<EnvVar>, bool)> BuildEnvVarsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken) 1994private async Task<(List<string>, bool)> BuildRunArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken)
Dcp\DcpHost.cs (1)
434var notificationTask = _interactionService.PromptNotificationAsync(title, message, options, notificationCts.Token);
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)
ExternalServiceBuilderExtensions.cs (1)
272public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Health\ResourceHealthCheckService.cs (1)
348internal async Task<bool> DelayAsync(ResourceEvent? currentEvent, TimeSpan delay, CancellationToken cancellationToken)
IInteractionService.cs (6)
35Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default); 47Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default); 61Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 74Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 87Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 99Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default);
InteractionService.cs (8)
35public async Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 45public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 54private async Task<InteractionResult<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken) 75public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 80public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 91public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 114public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 234private async Task<bool> RunValidationAsync(Interaction interactionState, InteractionCompletionState result, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (1)
90var waitForNonWaitingStateTask = _notificationService.WaitForResourceAsync(
Publishing\DockerContainerRuntime.cs (6)
14private async Task<int> RunDockerBuildAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, CancellationToken cancellationToken) 134public async Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 146private async Task<bool> CheckDockerDaemonAsync(CancellationToken cancellationToken) 181private async Task<bool> CheckDockerBuildxAsync(CancellationToken cancellationToken) 216private async Task<int> CreateBuildkitInstanceAsync(string builderName, CancellationToken cancellationToken) 257private async Task<int> RemoveBuildkitInstanceAsync(string builderName, CancellationToken cancellationToken)
Publishing\IContainerRuntime.cs (1)
11Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken);
Publishing\IPublishingActivityReporter.cs (1)
20Task<IPublishingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default);
Publishing\IPublishingStep.cs (1)
20Task<IPublishingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default);
Publishing\PodmanContainerRuntime.cs (4)
14private async Task<int> RunPodmanBuildAsync(string contextPath, string dockerfilePath, string imageName, ContainerBuildOptions? options, CancellationToken cancellationToken) 96public Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 118async Task<bool> CheckPodmanHealthAsync(Task<ProcessResult> pending, IAsyncDisposable disposable, CancellationToken token)
Publishing\PublishingActivityReporter.cs (2)
36public async Task<IPublishingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 57public async Task<PublishingTask> CreateTaskAsync(PublishingStep step, string statusText, CancellationToken cancellationToken)
Publishing\PublishingExtensions.cs (7)
23public static async Task<IPublishingStep> SucceedAsync( 40public static async Task<IPublishingStep> WarnAsync( 57public static async Task<IPublishingStep> FailAsync( 74public static async Task<IPublishingTask> UpdateStatusAsync( 90public static async Task<IPublishingTask> SucceedAsync( 106public static async Task<IPublishingTask> WarnAsync( 122public static async Task<IPublishingTask> FailAsync(
Publishing\PublishingStep.cs (1)
98public async Task<IPublishingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default)
Publishing\ResourceContainerImageBuilder.cs (2)
249private async Task<bool> ExecuteDotnetPublishAsync(IResource resource, ContainerBuildOptions? options, CancellationToken cancellationToken) 376private static async Task<IPublishingTask?> CreateTaskAsync(
ResourceBuilderExtensions.cs (2)
1634Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 1695Func<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?
VersionChecking\IPackageFetcher.cs (1)
10Task<List<NuGetPackage>> TryFetchPackagesAsync(string appHostDirectory, CancellationToken cancellationToken);
VersionChecking\PackageFetcher.cs (1)
26public async Task<List<NuGetPackage>> TryFetchPackagesAsync(string appHostDirectory, CancellationToken cancellationToken)
Aspire.Hosting.Azure (36)
AzureDeployingContext.cs (3)
63private async Task<bool> TryProvisionAzureBicepResources(List<AzureBicepResource> bicepResources, ProvisioningContext provisioningContext, CancellationToken cancellationToken) 100private async Task<bool> TryDeployContainerImages(DistributedApplicationModel model, CancellationToken cancellationToken) 135private async Task<bool> TryDeployComputeResources(DistributedApplicationModel model,
AzureResourcePreparer.cs (1)
362private async Task<HashSet<IAzureResource>> GetAzureReferences(IResource resource, CancellationToken cancellationToken)
IAzureKeyVaultResource.cs (1)
26Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; }
IProcessRunner.cs (2)
18(Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec); 26public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Provisioning\Internal\BaseProvisioningContextProvider.cs (1)
75public virtual async Task<ProvisioningContext> CreateProvisioningContextAsync(JsonObject userSecrets, CancellationToken cancellationToken = default)
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 (3)
29public async Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 53public async Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 65public async Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default)
Provisioning\Internal\DefaultArmDeploymentCollection.cs (1)
13public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync(
Provisioning\Internal\DefaultSubscriptionResource.cs (2)
32public async Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) 38public 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 (10)
49Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default); 60Task<JsonObject> LoadUserSecretsAsync(CancellationToken cancellationToken = default); 76Task<ProvisioningContext> CreateProvisioningContextAsync(JsonObject userSecrets, CancellationToken cancellationToken = default); 87Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default); 92Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default); 97Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default); 139Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default); 144Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default); 176Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 207Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (1)
60public override async Task<ProvisioningContext> CreateProvisioningContextAsync(JsonObject userSecrets, CancellationToken cancellationToken = default)
Provisioning\Internal\RunModeProvisioningContextProvider.cs (1)
92public override async Task<ProvisioningContext> CreateProvisioningContextAsync(JsonObject userSecrets, 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)
23public async Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken)
Provisioning\Provisioners\IBicepProvisioner.cs (1)
20Task<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.AIFoundry (2)
FoundryLocalHealthCheck.cs (1)
11public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
LocalModelHealthCheck.cs (1)
11public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
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 (29)
AzureAppServiceTests.cs (1)
364private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureBicepProvisionerTests.cs (1)
193public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default)
AzureContainerAppsTests.cs (1)
1466private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureDeployerTests.cs (2)
526public Task<JsonObject> LoadUserSecretsAsync(CancellationToken cancellationToken = default) => Task.FromResult(new JsonObject()); 533public Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken)
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)
ProvisioningContextProviderTests.cs (2)
263var createTask = provider.CreateProvisioningContextAsync(userSecrets); 340var createTask = provider.CreateProvisioningContextAsync(userSecrets);
ProvisioningTestHelpers.cs (11)
198public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 213public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 222public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 301public Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) 315public Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default) 391public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 563public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 578public Task<JsonObject> LoadUserSecretsAsync(CancellationToken cancellationToken = default) 592public Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default) 630public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec) 641var resultTask = Task.FromResult(result);
RoleAssignmentTests.cs (1)
226private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
tests\Shared\TestInteractionService.cs (6)
18public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 23public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 28public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 33public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 48public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 55public Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
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)
284private static async Task<string> GetCommandLineArgs(IResourceBuilder<GarnetResource> builder)
Aspire.Hosting.GitHub.Models (2)
GitHubModelsHealthCheck.cs (2)
27public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 72private static async Task<HealthCheckResult> HandleErrorCode(HttpResponseMessage response, CancellationToken cancellationToken)
Aspire.Hosting.GitHub.Models.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.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 (1)
MySqlBuilderExtensions.cs (1)
375private static async Task<string> WritePhpMyAdminConfiguration(IEnumerable<MySqlServerResource> mySqlInstances, CancellationToken cancellationToken)
Aspire.Hosting.MySql.Tests (11)
MySqlFunctionalTests.cs (2)
557async Task<string?[]> RunContainersAsync() 596static 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.OpenAI (3)
OpenAIModelHealthCheck.cs (2)
27public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 64private static async Task<HealthCheckResult> HandleNotFound(HttpResponseMessage response, CancellationToken cancellationToken)
StatusPageHealthCheck.cs (1)
39public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.Hosting.OpenAI.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 (2)
PostgresBuilderExtensions.cs (2)
491private static async Task<IEnumerable<ContainerFileSystemItem>> WritePgWebBookmarks(IEnumerable<PostgresDatabaseResource> postgresInstances, CancellationToken cancellationToken) 524private static async Task<string> WritePgAdminServerJson(IEnumerable<PostgresServerResource> postgresInstances, CancellationToken cancellationToken)
Aspire.Hosting.PostgreSQL.Tests (11)
PostgresFunctionalTests.cs (2)
546async Task<string?[]> RunContainersAsync() 575static 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)
665private 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) 180public async Task<IDistributedApplicationTestingBuilder> CreateBuilderAsync(CancellationToken cancellationToken) 205public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 245public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 399public Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 488Task<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 (88)
Backchannel\Exec\ExecTestsBase.cs (1)
22internal async Task<List<CommandOutput>> ExecWithLogCollectionAsync(
Dashboard\DashboardLifecycleHookTests.cs (1)
568public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardResourceTests.cs (2)
584public Task<LogMessage> FirstLogTask => _tcs.Task; 622public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardServiceTests.cs (3)
245var resultTask = interactionService.PromptMessageBoxAsync( 314var resultTask = interactionService.PromptInputAsync( 360var resultTask = interactionService.PromptInputAsync(
Dcp\DcpExecutorTests.cs (4)
598var moveNextTask = watchLogsEnumerator.MoveNextAsync().AsTask(); 693var watchLogsTask1 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs1, targetLogCount: 7); 715var watchLogsTask2 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs2, targetLogCount: 7); 735private static async Task<LogStreamPipes> GetStreamPipesAsync(Channel<(string Type, Pipe Pipe)> logStreamPipesChannel)
Dcp\DcpHostNotificationTests.cs (1)
391public Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default)
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)
27async 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 (15)
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"); 73var resultTask3 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 131var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 135var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 179var resultTask = interactionService.PromptInputAsync( 212var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 231var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 251var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 271var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 301var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 635var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 695var resultTask = interactionService.PromptInputsAsync("Validation Test", "Test validation", inputs, options);
Orchestrator\ParameterProcessorTests.cs (3)
314var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameterWithMissingValue); 338var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameterWithError); 369var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameter);
ProjectResourceTests.cs (1)
32async static Task<(string ProjectFilePath, string LaunchSettingsFilePath)> PrepareProjectWithMalformedLaunchSettingsAsync()
Publishing\PublishingActivityReporterTests.cs (2)
473var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 508var notificationTask = _interactionService.PromptNotificationAsync("Test Notification", "This is a test notification message", notificationOptions);
Publishing\ResourceContainerImageBuilderTests.cs (1)
482public Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken)
ResourceLoggerServiceTests.cs (5)
24var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 65var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(service, 2, testResource); 105var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 161var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 1); 226var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator, 4);
ResourceNotificationTests.cs (10)
50async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 68var enumerableTask = GetValuesAsync(cts.Token); 103async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellation) 121var enumerableTask = GetValuesAsync(cts.Token); 223var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"]); 238var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"], default); 444async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 462var enumerableTask = GetValuesAsync(cts.Token); 503async Task<ResourceEvent> GetFirstValueAsync(CancellationToken cancellationToken) 513var enumerableTask = GetFirstValueAsync(cts.Token);
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)
tests\Shared\TestInteractionService.cs (6)
18public Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 23public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 28public Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 33public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 48public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 55public Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
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)
12public static async Task<JsonNode> GetManifest(IResource resource, string? manifestDirectory = null) 19public static async Task<JsonNode?> GetManifestOrNull(IResource resource, string? manifestDirectory = null) 38public static async Task<JsonNode[]> GetManifests(IResource[] resources)
VersionChecking\VersionCheckServiceTests.cs (3)
294private readonly Task<List<NuGetPackage>> _versionTask; 298public TestPackageFetcher(Task<List<NuGetPackage>>? versionTask = null) 303public Task<List<NuGetPackage>> TryFetchPackagesAsync(string appHostDirectory, CancellationToken cancellationToken)
WithHttpCommandTests.cs (1)
247protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Aspire.Hosting.Valkey.Tests (10)
AddValkeyTests.cs (1)
343private 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)
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) 312public 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( 328public async Task<CommandResult> BuildAsync(string[]? extraBuildArgs = default, CancellationToken token = default, string? workingDirectory = null) 349public 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("myblobcontainer/{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)
252Task<Guid> task = serviceProxy.FaultPing(guid); 304Task<Guid> task = serviceProxy.FaultPing(guid); 493Task<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\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\BuildProtocol.cs (2)
124public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 320public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
91internal static async Task<bool> RunServerShutdownRequestAsync( 160internal static Task<BuildResponse> RunServerBuildRequestAsync( 174internal static async Task<BuildResponse> RunServerBuildRequestAsync( 197static Task<NamedPipeClientStream?> tryConnectToServerAsync( 274static async Task<BuildResponse> tryRunRequestAsync( 297var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 368internal 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 (180)
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\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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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)
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)
17public static async Task<ImmutableArray<InheritanceMarginItem>> GenerateInheritanceMarginItemsAsync(
RegexClassifierBenchmarks.cs (2)
67protected Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string code, TextSpan span, ParseOptions parseOptions) 76protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, TextSpan span)
IdeCoreBenchmarks (2)
ClassificationBenchmarks.cs (1)
83protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, TextSpan span)
NavigateToBenchmarks.cs (1)
224private 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()
IdentitySample.PasskeyConformance (11)
InMemoryUserStore.cs (11)
19public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken) 25public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken) 34public Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken) 37public Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) 40public Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 43public Task<UserPasskeyInfo?> FindPasskeyAsync(TUser user, byte[] credentialId, CancellationToken cancellationToken) 46public Task<string?> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken) 49public Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken) 52public Task<string?> GetUserNameAsync(TUser user, CancellationToken cancellationToken) 67public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken) 90public Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken)
IdentitySample.PasskeyUI (11)
InMemoryUserStore.cs (11)
19public Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken) 25public Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken) 34public Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken) 37public Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) 40public Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 43public Task<UserPasskeyInfo?> FindPasskeyAsync(TUser user, byte[] credentialId, CancellationToken cancellationToken) 46public Task<string?> GetNormalizedUserNameAsync(TUser user, CancellationToken cancellationToken) 49public Task<string> GetUserIdAsync(TUser user, CancellationToken cancellationToken) 52public Task<string?> GetUserNameAsync(TUser user, CancellationToken cancellationToken) 67public Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken) 90public Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken)
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)
512private async Task<HttpResponseMessage> SendRequestAsync(string uri, bool http2 = true)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
117private async Task<IISDeploymentResult> SetupFrebApp(IISDeploymentParameters parameters = null)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
388private 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)
82private async Task<(int Status, string Body)> SendSocketRequestAsync(string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
791private 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)
44var requestTasks = new List<Task<HttpResponseMessage>>(); 51foreach (var requestTask in requestTasks)
src\Servers\IIS\IIS\test\Common.FunctionalTests\FrebTests.cs (1)
117private async Task<IISDeploymentResult> SetupFrebApp(IISDeploymentParameters parameters = null)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (1)
388private 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)
82private async Task<(int Status, string Body)> SendSocketRequestAsync(string path)
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
791private 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)
53private async Task<Document> AddAttributeAsync(
DynamicallyAccessedMembersCodeFixProvider.cs (1)
120private static async Task<Document> AddAttributeAsync(
ILLink.RoslynAnalyzer (1)
CompilationExtensions.cs (1)
178=> 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 (4)
Startup.cs (3)
1436var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10); 1472var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10); 1610var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10);
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)
135public async Task<bool> LoadReference(string reference) 140public async Task<bool> Execute(string code) 146public Task<string> ReadErrorOutputToEnd() 165public async Task<string> ReadOutputToEnd(bool isError = false) 215public async Task<string> GetHostRuntimeDirectoryAsync()
InteractiveHost32 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
17private static async Task<int> Main(string[] args)
InteractiveHost64 (1)
src\Interactive\HostProcess\InteractiveHostEntryPoint.cs (1)
17private static async Task<int> Main(string[] args)
Interop.FunctionalTests (47)
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 (21)
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) 930var responseTask1 = client.SendAsync(request1, cts1.Token); 1004var responseTask1 = client.SendAsync(request1, CancellationToken.None); 1174var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1271var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1417var responseTask = client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead); 1935var responseTask1 = client.SendAsync(CreateHttp3Request(HttpMethod.Get, $"https://127.0.0.1:{port}/1"), CancellationToken.None); 2044var responseTask = client.SendAsync(request1, CancellationToken.None); 2164var readTask = context.Request.Body.ReadUntilEndAsync(); 2199var responseTask = client.SendAsync(request, CancellationToken.None); 2299var 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 (101)
Program.cs (3)
41private static async Task<ErrorCode> RunAsync(string[] args, CancellationToken cancellationToken) 223async Task<ErrorCode> writeOutputAsync() 265private static async Task<(ImmutableArray<(string, CodeAnalysisMetricData)>, ErrorCode)> GetMetricDatasAsync(List<string> projectsOrSolutions, bool quiet, CancellationToken cancellationToken)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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!);
Metrics.Legacy (101)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
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) 223async Task<ErrorCode> writeOutputAsync() 265private static async Task<(ImmutableArray<(string, CodeAnalysisMetricData)>, ErrorCode)> GetMetricDatasAsync(List<string> projectsOrSolutions, bool quiet, CancellationToken cancellationToken)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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.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)
170public 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)
387private static async Task<IHost> CreateHostAsync(Action<NegotiateOptions> configureOptions = null) 487private 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)
793private static async Task<IHost> CreateHost(
CookieTests.cs (6)
213public async Task<string> StoreAsync(AuthenticationTicket ticket) 228public Task<AuthenticationTicket> RetrieveAsync(string key) 1831public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal p) 1850private Task<IHost> CreateHost(Action<CookieAuthenticationOptions> configureOptions, Func<HttpContext, Task> testpath = null, Uri baseAddress = null, bool claimsTransform = false) 1864private static async Task<IHost> CreateHostWithServices(Action<IServiceCollection> configureServices, Func<HttpContext, Task> testpath = null, Uri baseAddress = null) 1988private 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)
462private static async Task<IHost> CreateHost(Action<IApplicationBuilder> configure, Action<IServiceCollection> configureServices, Func<HttpContext, Task<bool>> handler)
GoogleTests.cs (6)
403var sendTask = server.SendAsync("https://example.com/signin-google?error=access_denied&error_description=SoBad&error_uri=foobar&state=protected_state", 521var sendTask = server.SendAsync("https://example.com/signin-google?error=itfailed&error_description=whyitfailed&error_uri=https://example.com/fail&state=protected_state", 629var sendTask = server.SendAsync( 681var sendTask = server.SendAsync( 1139public Task<ClaimsPrincipal> TransformAsync(ClaimsPrincipal p) 1151private static async Task<IHost> CreateHost(Action<GoogleOptions> configureOptions, Func<HttpContext, Task> testpath = null)
JwtBearerTests.cs (2)
1157private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null) 1246private static async Task<Transaction> SendAsync(TestServer server, string uri, string authorizationHeader = null)
JwtBearerTests_Handler.cs (5)
1114public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1141public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1202public override Task<TokenValidationResult> ValidateTokenAsync(string token, TokenValidationParameters validationParameters) 1225private static async Task<IHost> CreateHost(Action<JwtBearerOptions> options = null, Func<HttpContext, Func<Task>, Task> handlerBeforeAuth = null) 1314private static async Task<Transaction> SendAsync(TestServer server, string uri, string authorizationHeader = null)
MicrosoftAccountTests.cs (1)
362private static async Task<IHost> CreateHost(Action<MicrosoftAccountOptions> configureOptions)
OAuthTests.cs (2)
518private 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)
542private 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)
281private async Task<HttpClient> CreateClient(bool allowUnsolicited = false) 428var result = context.AuthenticateAsync(); 457protected 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 (41)
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 (8)
24/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether requirement evaluation has succeeded or failed. 27public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, IAuthorizationRequirement requirement) 43/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether policy evaluation has succeeded or failed. 46public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, object? resource, AuthorizationPolicy policy) 61/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether policy evaluation has succeeded or failed. 64public static Task<AuthorizationResult> AuthorizeAsync(this IAuthorizationService service, ClaimsPrincipal user, AuthorizationPolicy policy) 79/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether policy evaluation has succeeded or failed. 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 (5)
59/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded. 62public virtual async Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable<IAuthorizationRequirement> requirements) 96/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded. 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 (4)
25/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded. 32Task<AuthorizationResult> AuthorizeAsync(ClaimsPrincipal user, object? resource, IEnumerable<IAuthorizationRequirement> requirements); 44/// A <see cref="Task{TResult}"/> that contains an <see cref="AuthorizationResult"/> indicating whether authorization has succeeded. 51Task<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)
141async Task<bool> TryPersistState(IPersistentComponentStateStore store) 206internal Task<bool> TryPauseAsync(IPersistentComponentStateStore store) 208List<Task<bool>>? pendingCallbackTasks = null; 229var result = TryExecuteCallback(registration.Callback, _logger); 253static Task<bool> TryExecuteCallback(Func<Task> callback, ILogger<ComponentStatePersistenceManager> logger) 273static async Task<bool> Awaited(Task task, ILogger<ComponentStatePersistenceManager> logger) 288static 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)
200private async Task<RequestValidationState> ValidateRequestAsync(HttpContext context, IAntiforgery? antiforgery)
Rendering\EndpointHtmlRenderer.cs (1)
104Task<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)
485internal async Task<bool> ReceiveJSDataChunk(long streamId, long chunkId, byte[] chunk, string error) 508public async Task<int> SendDotNetStreamAsync(DotNetStreamReference dotNetStreamReference, long streamId, byte[] buffer) 528public async Task<DotNetStreamReference> TryClaimPendingStream(long streamId) 656internal async Task<TResult> HandleInboundActivityAsync<TResult>(Func<Task<TResult>> handler) 947internal async Task<bool> SendPersistedStateToClient(string rootComponents, string applicationState, CancellationToken cancellation)
Circuits\CircuitPersistenceManager.cs (3)
69internal async Task<(string rootComponents, string applicationState)> ToProtectedStateAsync(PersistedCircuitState state) 99public async Task<PersistedCircuitState> ResumeCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default) 218Task<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 (24)
Circuits\CircuitHostTest.cs (1)
1153public async Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Circuits\CircuitPersistenceManagerTest.cs (3)
396private async Task<CircuitHost> CreateCircuitHostAsync( 570public Task<PersistedCircuitState> RestoreCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default) 654Task<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; 216static Task<AuthenticationState> CreateAuthenticationStateTask(string username) 237public Task<bool> NextValidationResult { get; set; } 247protected override Task<bool> ValidateAuthenticationStateAsync(AuthenticationState authenticationState, CancellationToken cancellationToken) 250var result = NextValidationResult;
Microsoft.AspNetCore.Components.Tests (48)
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)
480public Task<IDictionary<string, byte[]>> GetPersistedStateAsync() 504public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
PersistentState\PersistentServicesRegistryTest.cs (1)
296public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
PersistentStateValueProviderKeyResolverTests.cs (1)
410public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
PersistentValueProviderComponentSubscriptionTests.cs (4)
526public override Task<TResult> InvokeAsync<TResult>(Func<TResult> workItem) 530public override Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> workItem) 623public Task<IDictionary<string, byte[]>> GetPersistedStateAsync() => Task.FromResult(state);
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)
501var task = context.InvokeAsync(() => 532var task2 = context.InvokeAsync(() => 555var task = context.InvokeAsync<string>((Func<string>)(() => 571var task = context.InvokeAsync<string>((Func<string>)(() => 683var task = context.InvokeAsync(() => 714var task2 = context.InvokeAsync(() => 737var task = context.InvokeAsync<string>((Func<Task<string>>)(() => 753var task = context.InvokeAsync<string>((Func<Task<string>>)(() =>
Routing\RouterTest.cs (6)
82var janTask = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/jan", false)); 83var febTask = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/feb", false)); 122var jan = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/jan", false)); 123var feb = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/feb", false)); 175var jan = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/jan", false)); 176var feb = _renderer.Dispatcher.InvokeAsync(() => _router.RunOnNavigateAsync("http://example.com/feb", false));
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)
161protected 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)
186private 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)
548returnType.GetGenericTypeDefinition() == typeof(Task<>)) 578private static ValueTask<object?> TaskOfTToValueTaskOfObject<T>(Task<T> task) 580static async ValueTask<object?> ExecuteAwaited(Task<T> task) 1093else if (returnType == typeof(Task<object>)) 1123returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1378static async Task<(object? FormValue, bool Successful)> TryReadBodyAsync( 1507static async Task<(object? FormValue, bool Successful)> TryReadFormAsync( 2450private static Task ExecuteTaskOfObject(Task<object> task, HttpContext httpContext, JsonTypeInfo<object> jsonTypeInfo) 2452static async Task ExecuteAwaited(Task<object> task, HttpContext httpContext, JsonTypeInfo<object> jsonTypeInfo) 2470private static Task ExecuteTaskOfTFast<T>(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2474static async Task ExecuteAwaited(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2487private static Task ExecuteTaskOfT<T>(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2491static async Task ExecuteAwaited(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2504private static Task ExecuteTaskOfString(Task<string?> task, HttpContext httpContext) 2509static async Task ExecuteAwaited(Task<string> task, HttpContext httpContext) 2639private static async Task ExecuteTaskResult<T>(Task<T?> task, HttpContext httpContext) where T : IResult 2843private 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)
1000public static Task<BadBindAsyncStruct> BindAsync(HttpContext context, ParameterInfo parameter) => 1006public static Task<BadBindAsyncClass> BindAsync(HttpContext context, ParameterInfo parameter) => 1337Task<JsonTodo> TaskTestAction() => Task.FromResult<JsonTodo>(originalTodo); 1338async Task<JsonTodo> TaskTestActionAwaited() 1354new object[] { (Func<Task<JsonTodo>>)TaskTestAction}, 1355new object[] { (Func<Task<JsonTodo>>)TaskTestActionAwaited}, 1450Task<CustomResult> TaskTestAction() => Task.FromResult(new CustomResult(resultString)); 1455static Task<CustomResult> StaticTaskTestAction() => Task.FromResult(new CustomResult("Still not enough tests!")); 1463static Task<object> StaticTaskOfIResultAsObject() => Task.FromResult<object>(new CustomResult("Still not enough tests!")); 1468Task<StructResult> TaskTestStructAction() => Task.FromResult(new StructResult(resultString)); 1475new object[] { (Func<Task<CustomResult>>)TaskTestAction}, 1480new object[] { (Func<Task<CustomResult>>)StaticTaskTestAction}, 1486new object[] { (Func<Task<object>>)StaticTaskOfIResultAsObject}, 1491new object[] { (Func<Task<StructResult>>)TaskTestStructAction }, 1521Task<bool?>? TaskBoolAction() => null; 1522Task<IResult?>? TaskNullAction() => null; 1523Task<IResult?> TaskTestAction() => Task.FromResult<IResult?>(null); 1529new object[] { (Func<Task<IResult?>?>)TaskNullAction, "The IResult in Task<IResult> response must not be null." }, 1530new object[] { (Func<Task<bool?>?>)TaskBoolAction, "The Task returned by the Delegate must not be null." }, 1531new object[] { (Func<Task<IResult?>>)TaskTestAction, "The IResult returned by the Delegate must not be null." }, 2272async Task<string> Yield() 2283async Task<object> Yield() 2348Task<FSharp.Core.Unit> TaskOfUnitMethod() 2372async Task<FSharp.Core.Unit> Yield() 2385new object[] { (Func<Task<FSharp.Core.Unit>>)TaskOfUnitMethod }, 2474Task<TodoStruct> TaskOfStructMethod() 2479async Task<TodoStruct> TaskOfStructWithYieldMethod() 2494async Task<TodoStruct> Yield() 2505new object[] { (Func<Task<TodoStruct>>)TaskOfStructMethod }, 2506new object[] { (Func<Task<TodoStruct>>)TaskOfStructWithYieldMethod }, 3881public 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)
554public 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)
554public 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)
45public 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 (74)
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)
193protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
IPasskeyHandler.cs (4)
21Task<PasskeyCreationOptionsResult> MakeCreationOptionsAsync(PasskeyUserEntity userEntity, HttpContext httpContext); 29Task<PasskeyRequestOptionsResult> MakeRequestOptionsAsync(TUser? user, HttpContext httpContext); 36Task<PasskeyAttestationResult> PerformAttestationAsync(PasskeyAttestationContext context); 43Task<PasskeyAssertionResult<TUser>> PerformAssertionAsync(PasskeyAssertionContext context);
PasskeyHandler.cs (8)
38public async Task<PasskeyCreationOptionsResult> MakeCreationOptionsAsync(PasskeyUserEntity userEntity, HttpContext httpContext) 89async Task<PublicKeyCredentialDescriptor[]> GetExcludeCredentialsAsync() 110public async Task<PasskeyRequestOptionsResult> MakeRequestOptionsAsync(TUser? user, HttpContext httpContext) 141async Task<PublicKeyCredentialDescriptor[]> GetAllowCredentialsAsync() 161public async Task<PasskeyAttestationResult> PerformAttestationAsync(PasskeyAttestationContext context) 185public async Task<PasskeyAssertionResult<TUser>> PerformAssertionAsync(PasskeyAssertionContext context) 213private async Task<PasskeyAttestationResult> PerformAttestationCoreAsync(PasskeyAttestationContext context) 368private async Task<PasskeyAssertionResult<TUser>> PerformAssertionCoreAsync(PasskeyAssertionContext context)
SecurityStampValidator.cs (1)
126protected virtual Task<TUser?> VerifySecurityStamp(ClaimsPrincipal? principal)
SignInManager.cs (42)
123public virtual async Task<ClaimsPrincipal> CreateUserPrincipalAsync(TUser user) => await ClaimsFactory.CreateAsync(user); 145public virtual async Task<bool> CanSignInAsync(TUser user) 187private async Task<(bool success, bool? isPersistent)> RefreshSignInCoreAsync(TUser user) 333public virtual async Task<TUser?> ValidateSecurityStampAsync(ClaimsPrincipal? principal) 356public virtual async Task<TUser?> ValidateTwoFactorSecurityStampAsync(ClaimsPrincipal? principal) 378public virtual async Task<bool> ValidateSecurityStampAsync(TUser? user, string? securityStamp) 393public virtual async Task<SignInResult> PasswordSignInAsync(TUser user, string password, 426public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password, 448public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) 466private async Task<SignInResult> CheckPasswordSignInCoreAsync(TUser user, string password, bool lockoutOnFailure) 517public virtual async Task<string> MakePasskeyCreationOptionsAsync(PasskeyUserEntity userEntity) 532public virtual async Task<string> MakePasskeyRequestOptionsAsync(TUser? user) 553public virtual async Task<PasskeyAttestationResult> PerformPasskeyAttestationAsync(string credentialJson) 597public virtual async Task<PasskeyAssertionResult<TUser>> PerformPasskeyAssertionAsync(string credentialJson) 640public virtual async Task<SignInResult> PasskeySignInAsync(string credentialJson) 657private async Task<SignInResult> PasskeySignInCoreAsync(string credentialJson) 698private async Task<PasskeyAuthenticationInfo?> RetrievePasskeyAuthenticationInfoAsync() 702async Task<PasskeyAuthenticationInfo?> RetrievePasskeyInfoCoreAsync() 735public virtual async Task<bool> IsTwoFactorClientRememberedAsync(TUser user) 793public virtual async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode) 810private async Task<SignInResult> TwoFactorRecoveryCodeSignInCoreAsync(string recoveryCode) 828private async Task<SignInResult> DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) 875public virtual async Task<SignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) 892private async Task<SignInResult> TwoFactorAuthenticatorSignInCoreAsync(string code, bool isPersistent, bool rememberClient) 940public virtual async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) 957private async Task<SignInResult> TwoFactorSignInCoreAsync(string provider, string code, bool isPersistent, bool rememberClient) 999public virtual async Task<TUser?> GetTwoFactorAuthenticationUserAsync() 1018public virtual Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) 1030public virtual async Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1047private async Task<SignInResult> ExternalLoginSignInCoreAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1067public virtual async Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync() 1079public virtual async Task<ExternalLoginInfo?> GetExternalLoginInfoAsync(string? expectedXsrf = null) 1117public virtual async Task<IdentityResult> UpdateExternalAuthenticationTokensAsync(ExternalLoginInfo externalLogin) 1177internal async Task<ClaimsPrincipal> StoreRememberClient(TUser user) 1197public virtual async Task<bool> IsTwoFactorEnabledAsync(TUser user) 1211protected virtual async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false) 1251private async Task<TwoFactorAuthenticationInfo?> RetrieveTwoFactorInfoAsync() 1288protected virtual async Task<bool> IsLockedOut(TUser user) 1298protected virtual Task<SignInResult> LockedOut(TUser user) 1309protected virtual async Task<SignInResult?> PreSignInCheck(TUser user) 1341private async Task<IdentityResult> ResetLockoutWithResult(TUser user) 1358if (resetLockoutTask is Task<IdentityResult> resultTask)
TwoFactorSecurityStampValidator.cs (1)
43protected override Task<TUser?> VerifySecurityStamp(ClaimsPrincipal? principal)
Microsoft.AspNetCore.Identity.EntityFrameworkCore (65)
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 (20)
192public override async Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 208public override async Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 234public override async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 260public override Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 276public override Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) 298protected override Task<TUser?> FindUserAsync(TKey userId, CancellationToken cancellationToken) 311protected override Task<TUserLogin?> FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken) 323protected override Task<TUserLogin?> FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken) 333/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a user.</returns> 334public override async Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 453public override async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 472public override async Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey, 493public override Task<TUser?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)) 509public override async Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 532protected override Task<TUserToken?> FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken) 592private Task<TUserPasskey?> FindUserPasskeyAsync(TKey userId, byte[] credentialId, CancellationToken cancellationToken) 605private Task<TUserPasskey?> FindUserPasskeyByIdAsync(byte[] credentialId, CancellationToken cancellationToken) 649public virtual async Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken) 686public virtual async Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 706public virtual async Task<UserPasskeyInfo?> FindPasskeyAsync(TUser user, byte[] credentialId, CancellationToken cancellationToken)
UserStore.cs (27)
196public override async Task<IdentityResult> CreateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 212public override async Task<IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 238public override async Task<IdentityResult> DeleteAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 264public override Task<TUser?> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 280public override Task<TUser?> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken = default(CancellationToken)) 302protected override Task<TRole?> FindRoleAsync(string normalizedRoleName, CancellationToken cancellationToken) 314protected override Task<TUserRole?> FindUserRoleAsync(TKey userId, TKey roleId, CancellationToken cancellationToken) 325protected override Task<TUser?> FindUserAsync(TKey userId, CancellationToken cancellationToken) 338protected override Task<TUserLogin?> FindUserLoginAsync(TKey userId, string loginProvider, string providerKey, CancellationToken cancellationToken) 350protected override Task<TUserLogin?> FindUserLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken) 407/// <returns>A <see cref="Task{TResult}"/> that contains the roles the user is a member of.</returns> 408public override async Task<IList<string>> GetRolesAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 427/// <returns>A <see cref="Task{TResult}"/> containing a flag indicating if the specified user is a member of the given group. If the 429public override async Task<bool> IsInRoleAsync(TUser user, string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken)) 450/// <returns>A <see cref="Task{TResult}"/> that contains the claims granted to a user.</returns> 451public override async Task<IList<Claim>> GetClaimsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 570public override async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user, CancellationToken cancellationToken = default(CancellationToken)) 589public override async Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey, 610public override Task<TUser?> FindByEmailAsync(string normalizedEmail, CancellationToken cancellationToken = default(CancellationToken)) 626public override async Task<IList<TUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 649public override async Task<IList<TUser>> GetUsersInRoleAsync(string normalizedRoleName, CancellationToken cancellationToken = default(CancellationToken)) 677protected override Task<TUserToken?> FindTokenAsync(TUser user, string loginProvider, string name, CancellationToken cancellationToken) 737private Task<TUserPasskey?> FindUserPasskeyAsync(TKey userId, byte[] credentialId, CancellationToken cancellationToken) 750private Task<TUserPasskey?> FindUserPasskeyByIdAsync(byte[] credentialId, CancellationToken cancellationToken) 793public virtual async Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken) 830public virtual async Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 850public virtual async Task<UserPasskeyInfo?> FindPasskeyAsync(TUser user, byte[] credentialId, 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 (138)
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))
Passkeys\PasskeyHandlerAssertionTest.cs (1)
1008protected override async Task<PasskeyAssertionResult<PocoUser>> RunCoreAsync()
Passkeys\PasskeyHandlerAttestationTest.cs (1)
1002protected override async Task<PasskeyAttestationResult> RunCoreAsync()
Passkeys\PasskeyScenarioTest.cs (2)
16public Task<TResult> RunAsync() 27protected abstract Task<TResult> RunCoreAsync();
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)
530public override Task<bool> ValidateAsync(string purpose, string token, UserManager<PocoUser> manager, PocoUser user) 1747public Task<IEnumerable<AuthenticationScheme>> GetAllSchemesAsync() => Task.FromResult<IEnumerable<AuthenticationScheme>>(_defaultCookieSchemes.Values); 1748public Task<AuthenticationScheme> GetSchemeAsync(string name) => Task.FromResult(_defaultCookieSchemes.TryGetValue(name, out var scheme) ? scheme : null); 1752public Task<AuthenticationScheme> GetDefaultAuthenticateSchemeAsync() => throw new NotImplementedException(); 1753public Task<AuthenticationScheme> GetDefaultChallengeSchemeAsync() => throw new NotImplementedException(); 1754public Task<AuthenticationScheme> GetDefaultForbidSchemeAsync() => throw new NotImplementedException(); 1755public Task<AuthenticationScheme> GetDefaultSignInSchemeAsync() => throw new NotImplementedException(); 1756public Task<AuthenticationScheme> GetDefaultSignOutSchemeAsync() => throw new NotImplementedException(); 1757public Task<IEnumerable<AuthenticationScheme>> GetRequestHandlerSchemesAsync() => throw new NotImplementedException();
UserManagerTest.cs (78)
1103public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<PocoUser> manager, PocoUser user) 1108public Task<string> GenerateAsync(string purpose, UserManager<PocoUser> manager, PocoUser user) 1113public Task<bool> ValidateAsync(string purpose, string token, UserManager<PocoUser> manager, PocoUser user) 1160public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken) 1165public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken) 1175public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken) 1180public Task<PocoUser> FindByNameAsync(string normalizedUserName, CancellationToken cancellationToken) 1185public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken) 1190public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken) 1195public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken) 1210public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken) 1552public Task<IdentityResult> ValidateAsync(UserManager<TUser> manager, TUser user, string password) 1568public Task<IList<Claim>> GetClaimsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1593public Task<string> GetEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1598public Task<bool> GetEmailConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1608public Task<PocoUser> FindByEmailAsync(string email, CancellationToken cancellationToken = default(CancellationToken)) 1613public Task<DateTimeOffset?> GetLockoutEndDateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1623public Task<int> IncrementAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1633public Task<int> GetAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1638public Task<bool> GetLockoutEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1658public Task<IList<UserLoginInfo>> GetLoginsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1663public Task<PocoUser> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) 1677public Task<IdentityResult> CreateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1682public Task<IdentityResult> UpdateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1687public Task<IdentityResult> DeleteAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1692public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 1697public Task<PocoUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 1707public Task<string> GetPasswordHashAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1712public Task<bool> HasPasswordAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1722public Task<string> GetPhoneNumberAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1727public Task<bool> GetPhoneNumberConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1747public Task<IList<string>> GetRolesAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1752public Task<bool> IsInRoleAsync(PocoUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) 1762public Task<string> GetSecurityStampAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1772public Task<bool> GetTwoFactorEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1777public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1782public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1787public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1797public Task<IList<PocoUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 1802public Task<IList<PocoUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) 1807public Task<string> GetNormalizedEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1822public Task<IList<UserPasskeyInfo>> GetPasskeysAsync(PocoUser user, CancellationToken cancellationToken) 1827public Task<PocoUser> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 1832public Task<UserPasskeyInfo> FindPasskeyAsync(PocoUser user, byte[] credentialId, CancellationToken cancellationToken) 1847public Task<string> GenerateAsync(string purpose, UserManager<PocoUser> manager, PocoUser user) 1852public Task<bool> ValidateAsync(string purpose, string token, UserManager<PocoUser> manager, PocoUser user) 1857public Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<PocoUser> manager, PocoUser user) 1874public Task<IList<Claim>> GetClaimsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1899public Task<string> GetEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1904public Task<bool> GetEmailConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1914public Task<PocoUser> FindByEmailAsync(string email, CancellationToken cancellationToken = default(CancellationToken)) 1919public Task<DateTimeOffset?> GetLockoutEndDateAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1929public Task<int> IncrementAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1939public Task<int> GetAccessFailedCountAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1944public Task<bool> GetLockoutEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1964public Task<IList<UserLoginInfo>> GetLoginsAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1969public Task<PocoUser> FindByLoginAsync(string loginProvider, string providerKey, CancellationToken cancellationToken = default(CancellationToken)) 1979public Task<string> GetUserIdAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1984public Task<string> GetUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 1994public Task<PocoUser> FindByIdAsync(string userId, CancellationToken cancellationToken = default(CancellationToken)) 1999public Task<PocoUser> FindByNameAsync(string userName, CancellationToken cancellationToken = default(CancellationToken)) 2009public Task<string> GetPasswordHashAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2014public Task<bool> HasPasswordAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2024public Task<string> GetPhoneNumberAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2029public Task<bool> GetPhoneNumberConfirmedAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2044public Task<bool> GetTwoFactorEnabledAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2059public Task<IList<string>> GetRolesAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2064public Task<bool> IsInRoleAsync(PocoUser user, string roleName, CancellationToken cancellationToken = default(CancellationToken)) 2069public Task<string> GetNormalizedUserNameAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2079public Task<IList<PocoUser>> GetUsersForClaimAsync(Claim claim, CancellationToken cancellationToken = default(CancellationToken)) 2084public Task<IList<PocoUser>> GetUsersInRoleAsync(string roleName, CancellationToken cancellationToken = default(CancellationToken)) 2089Task<IdentityResult> IUserStore<PocoUser>.CreateAsync(PocoUser user, CancellationToken cancellationToken) 2094Task<IdentityResult> IUserStore<PocoUser>.UpdateAsync(PocoUser user, CancellationToken cancellationToken) 2099Task<IdentityResult> IUserStore<PocoUser>.DeleteAsync(PocoUser user, CancellationToken cancellationToken) 2104public Task<string> GetNormalizedEmailAsync(PocoUser user, CancellationToken cancellationToken = default(CancellationToken)) 2119public Task<IList<UserPasskeyInfo>> GetPasskeysAsync(PocoUser user, CancellationToken cancellationToken) 2124public Task<PocoUser> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 2129public Task<UserPasskeyInfo> FindPasskeyAsync(PocoUser user, byte[] credentialId, CancellationToken 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)
361(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)
2414private Task<Product> ReturnsTaskOfProduct() 2419private Task<object> ReturnsTaskOfObject() 2429private Task<IActionResult> ReturnsTaskOfActionResult() 2434private Task<JsonResult> ReturnsTaskOfJsonResult() 2474private Task<ActionResult<Product>> ReturnsTaskOfActionResultOfProduct() => null; 2475private Task<Http.HttpResults.Ok<Product>> ReturnsTaskOfResultOfProductWithEndpointMetadata() => null; 2477private Task<ActionResult<IEnumerable<Product>>> ReturnsTaskOfActionResultOfSequenceOfProducts() => null; 2858public override Task<InputFormatterResult> ReadRequestBodyAsync(
EndpointMetadataApiDescriptionProviderTest.cs (1)
603async 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)
58public 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)
342private Task<ActionExecutedContext> InvokeNextActionFilterAwaitedAsync() 360static async Task<ActionExecutedContext> Awaited(ControllerActionInvoker invoker, Task task) 368static 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)
910private Task<ResourceExecutedContext> InvokeNextResourceFilterAwaitedAsync() 929static async Task<ResourceExecutedContext> Awaited(ResourceInvoker invoker, Task task) 937static async Task<ResourceExecutedContext> Throw() 1404private Task<ResultExecutedContext> InvokeNextResultFilterAwaitedAsync<TFilter, TFilterAsync>() 1425static async Task<ResultExecutedContext> Awaited(ResourceInvoker invoker, Task task) 1433static 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)
1910public Task<IActionResult> GetPersonAsync() => null; 1913public 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)
1806public async Task<TestActionResult> AsyncActionMethodWithTestActionResult(int value) 1821public async Task<object> AsyncActionMethodReturningActionResultWithTaskOfObjectAsReturnType(int value = 5) 1831public async Task<IActionResult> AsyncActionMethodWithNullActionResult() 1836public async Task<TestActionResult> AsyncActionMethodWithNullTestActionResult() 1848public async Task<int> TaskValueTypeAction(int i, string s) 1855public async Task<Task<int>> TaskOfTaskAction(int i, string s) 1861public Task<int> TaskValueTypeActionWithoutAsync(int i, string s) 1867public async Task<int> TaskActionWithException(int i, string s) 1873public Task<int> TaskActionWithExceptionWithoutAsync(int i, string s) 1878public async Task<int> TaskActionThrowAfterAwait(int i, string s) 1899/// Returns a <see cref="Task{TResult}"/> instead of a <see cref="Task"/>. 1929public 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)
675private 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 (25)
Extensions\TypeExtensions.cs (1)
56(returnType.GetGenericTypeDefinition() == typeof(Task<>) || returnType.GetGenericTypeDefinition() == typeof(ValueTask<>)))
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( 263private async Task<Dictionary<HttpMethod, OpenApiOperation>> GetOperationsAsync( 316private async Task<OpenApiOperation> GetOperationAsync( 370private async Task<OpenApiResponses> GetResponsesAsync( 403private async Task<OpenApiResponse> GetResponseAsync( 451private async Task<List<IOpenApiParameter>?> GetParametersAsync( 533private async Task<OpenApiRequestBody?> GetRequestBodyAsync(OpenApiDocument document, ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken) 551private async Task<OpenApiRequestBody> GetFormRequestBody( 714private async Task<OpenApiRequestBody> GetJsonRequestBody( 802public Task<OpenApiDocument> GetOpenApiDocumentAsync(CancellationToken cancellationToken = default)
Services\Schemas\OpenApiSchemaService.cs (2)
230internal async Task<OpenApiSchema> GetOrCreateUnresolvedSchemaAsync(OpenApiDocument? document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) 249internal 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 (4)
Integration\OpenApiDocumentIntegrationTests.cs (1)
99private async Task<string> GetOpenApiDocument(string documentName, OpenApiSpecVersion version)
Services\OpenApiSchemaService\OpenApiSchemaService.ParameterSchemas.cs (1)
985public Task<IActionResult> GetWithFromQueryDto([FromQuery] FromQueryModel query)
Services\OpenApiSchemaService\OpenApiSchemaService.ResponseSchemas.cs (1)
234static Task<Todo?> GetTodoAsync() => Task.FromResult(Random.Shared.Next() < 0.5 ? new Todo(1, "Test Title", true, DateTime.Now) : null);
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)
854var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10); 904var readTask = httpContext.Request.Body.ReadAsync(new byte[10], 0, 10); 953var 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)
406public 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)
564private 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)
212public 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)
233var readTask = responseBody.ReadAsync(new byte[100], 0, 100); 317var responseTask = invoker.SendAsync(message, CancellationToken.None); 394Task<HttpResponseMessage> task = httpClient.GetAsync("https://example.com/"); 456Task<int> readTask = responseStream.ReadAsync(new byte[100], 0, 100); 479Task<int> readTask = responseStream.ReadAsync(new byte[100], 0, 100, cts.Token); 497Task<HttpResponseMessage> responseTask;
HttpContextBuilderTests.cs (4)
154var task = server.SendAsync(c => { }); 292Task<int> readTask = responseStream.ReadAsync(new byte[100], 0, 100); 324var contextTask = server.SendAsync(c => { }, cts.Token); 360var 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)
516var 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)
2859public Task<bool> HandleRequestAsync() => Task.FromResult(false); 2861protected 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.Tasks.CodeAnalysis (10)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
568var responseTask = BuildServerConnection.RunServerBuildRequestAsync(
src\Compilers\Shared\BuildProtocol.cs (2)
124public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 320public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
91internal static async Task<bool> RunServerShutdownRequestAsync( 160internal static Task<BuildResponse> RunServerBuildRequestAsync( 174internal static async Task<BuildResponse> RunServerBuildRequestAsync( 197static Task<NamedPipeClientStream?> tryConnectToServerAsync( 274static async Task<BuildResponse> tryRunRequestAsync( 297var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 368internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Microsoft.Build.Tasks.CodeAnalysis.Sdk (10)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
568var responseTask = BuildServerConnection.RunServerBuildRequestAsync(
src\Compilers\Shared\BuildProtocol.cs (2)
124public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 320public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
91internal static async Task<bool> RunServerShutdownRequestAsync( 160internal static Task<BuildResponse> RunServerBuildRequestAsync( 174internal static async Task<BuildResponse> RunServerBuildRequestAsync( 197static Task<NamedPipeClientStream?> tryConnectToServerAsync( 274static async Task<BuildResponse> tryRunRequestAsync( 297var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 368internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Microsoft.CodeAnalysis (82)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
862public async Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(Compilation compilation, CancellationToken cancellationToken) 1519var workerTasks = new Task<CompilationCompletedEvent?>[workerCount]; 1573private async Task<CompilationCompletedEvent?> ProcessCompilationEventsCoreAsync(AnalysisScope analysisScope, bool prePopulatedEventQueue, CancellationToken cancellationToken) 2021private static async Task<(AnalyzerActions actions, ImmutableHashSet<DiagnosticAnalyzer> unsuppressedAnalyzers)> GetAnalyzerActionsAsync( 2222private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>> CreateAnalyzerGateMapAsync( 2247private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags>> CreateGeneratedCodeAnalysisFlagsMapAsync( 2356internal 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)
InternalSpecialType.cs (2)
83/// Indicates that the type is <see cref="System.Threading.Tasks.Task{TResult}"/> from the COR library. 86/// Check for this special type cannot be used to find the "canonical" definition of <see cref="System.Threading.Tasks.Task{TResult}"/>
PEWriter\DebugSourceDocument.cs (1)
24private readonly Task<DebugSourceInfo>? _sourceInfo;
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public 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 (211)
FixAnalyzers\FixerWithFixAllAnalyzer.Fixer.cs (1)
57private static async Task<Document> AddMethodAsync(Document document, SyntaxNode classDecl, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (7)
105private static Task<Solution> AddAnalyzerReleaseTrackingFilesAsync(Project project) 169private static async Task<Solution> AddEntryToUnshippedFileAsync(Project project, string entryToAdd, CancellationToken cancellationToken) 181private static Task<SourceText> AddEntriesToUnshippedFileAsync( 187private static async Task<Solution> UpdateEntryInUnshippedFileAsync(Project project, string ruleId, string entryToUpdate, CancellationToken cancellationToken) 199private static Task<SourceText> UpdateEntriesInUnshippedFileAsync( 205private static Task<SourceText> AddOrUpdateEntriesToUnshippedFileAsync( 249private static async Task<SourceText> AddOrUpdateEntriesToUnshippedFileAsync(
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.FixAllProvider.cs (5)
26public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 90protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 130private static async Task<SourceText> AddEntriesToUnshippedFileForDiagnosticsAsync(TextDocument unshippedDataDocument, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 144private static async Task<SourceText> UpdateEntriesInUnshippedFileForDiagnosticsAsync(TextDocument unshippedDataDocument, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken) 174protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
MetaAnalyzers\Fixers\ApplyDiagnosticAnalyzerAttributeFix.cs (1)
62private Task<Document> GetFixAsync(Document document, SyntaxNode root, SyntaxNode classDecl, SyntaxGenerator generator, params string[] languages)
MetaAnalyzers\Fixers\CompareSymbolsCorrectlyFix.cs (5)
65private async Task<Document> ConvertToEqualsAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 80private async Task<Document> CallOverloadWithEqualityComparerAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 116private static async Task<Document> CallOverloadWithEqualityComparerAsync(Document document, SyntaxNode nodeToReplace, IMethodSymbol? methodSymbol, 187private async Task<Document> EnsureEqualsCorrectAsync(Document document, SemanticModel semanticModel, IInvocationOperation invocationOperation, CancellationToken cancellationToken) 257private static async Task<Document> ConvertToEqualsAsync(Document document, SemanticModel semanticModel, IBinaryOperation binaryOperation, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\ConfigureGeneratedCodeAnalysisFix.cs (1)
43private async Task<Document> ConfigureGeneratedCodeAnalysisAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
159private static async Task<Solution> ApplyFixAsync(Document document, SyntaxNode root, FixInfo fixInfo, CancellationToken cancellationToken)
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (2)
30public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 97protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
MetaAnalyzers\Fixers\EnableConcurrentExecutionFix.cs (1)
42private 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\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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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.AnalyzerUtilities (99)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <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)
4154/// <see cref="INamedTypeSymbol"/> for <see cref="System.Threading.Tasks.Task{TResult}"/>
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\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.BannedApiAnalyzers (185)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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.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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
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\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 (225)
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)
346? new Func<CancellationToken, Task<Solution>>(cancellationToken => FixAsync(document, methodToUpdate, argumentToInsert, arguments, fixAllReferences: true, cancellationToken)) 374private async Task<Solution> FixAsync( 402private async Task<(ITypeSymbol, RefKind)> GetArgumentTypeAndRefKindAsync(Document invocationDocument, TArgumentSyntax argument, CancellationToken cancellationToken) 411private 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)
301static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Document>> action, string equivalenceKey) 314private static async Task<Document> AddEditsAsync( 380private static Task<Document> TakeTopAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 383private static Task<Document> TakeBottomAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 386private static Task<Document> TakeBothAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 392private async Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
18protected abstract Task<string> GetDescriptionAsync(Diagnostic diagnostic, SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 19protected abstract Task<(SyntaxTree syntaxTree, SyntaxNode root)?> GetRootInOtherSyntaxTreeAsync(SyntaxNode node, SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken); 51private 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)
70private 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)
25protected 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)
36protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 44private 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 (4)
58public async Task<Document> ImplementInterfaceAsync( 78private async Task<ImplementInterfaceInfo?> AnalyzeAsync(Document document, SyntaxNode interfaceType, CancellationToken cancellationToken) 107private async Task<Document> ImplementInterfaceAsync( 146public async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode? interfaceType, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ImplementInterface\IImplementInterfaceService.cs (2)
25Task<Document> ImplementInterfaceAsync(Document document, ImplementTypeOptions options, SyntaxNode node, CancellationToken cancellationToken); 40Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
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)
106private async Task<Solution> FixNodeAsync( 158private async Task<Solution> RenameThenAddAsyncTokenAsync( 188private async Task<Solution> FixRelatedSignaturesAsync(
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)
102private Task<Document> FixAsync( 111private Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
45private 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( 889async Task<bool> TryRemoveUnusedLocalAsync(TLocalDeclarationStatementSyntax newDecl, TLocalDeclarationStatementSyntax originalDecl) 913private 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\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (6)
71protected abstract Task<SyntaxNode> UpdatePropertyAsync( 104private async Task<Solution> ProcessResultAsync( 117private async Task<Solution> ProcessResultWorkerAsync( 280private static async Task<Solution> UpdateReferencesAsync( 359private async Task<(IFieldSymbol? fieldSymbol, IPropertySymbol? propertySymbol)> MapDiagnosticToCurrentSolutionAsync( 422private async Task<SyntaxNode> FormatAsync(
src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (3)
30public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 37private async Task<Solution> FixAllAsync(FixAllContext fixAllContext, CancellationToken cancellationToken) 95private static async Task<Solution> GetUpdatedSolutionAsync(
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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpCompilation.cs (1)
2259/// or <see cref="System.Threading.Tasks.Task{T}" /> where the return type of GetAwaiter().GetResult()
Syntax\CSharpSyntaxTree.cs (2)
100public new virtual Task<CSharpSyntaxNode> GetRootAsync(CancellationToken cancellationToken = default) 879protected override async Task<SyntaxNode> GetRootAsyncCore(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (58)
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)
50private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken) 79private 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)
22private static async Task<Document> GetChangedDocumentAsync(
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, 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)
36protected 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)
84internal static async Task<Document> TransformDocumentIfRequiredAsync( 134private 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)
43private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
43private 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)
56private 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\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
80protected override Task<SyntaxNode> UpdatePropertyAsync(
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)
140static async Task<SeparatedSyntaxList<ArgumentSyntax>> GetArgumentsAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
37protected 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\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
110public 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)
1727if (name.Equals(nameof(Task<>.ConfigureAwait)) && 1733else if (name.Equals(nameof(Task<>.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)
44private readonly Task<string?> _eventNameTask; 113Task<string?> eventNameTask) 123public Task<string?> GetEventNameAsync() 126private async Task<string?> DetermineIfEventHookupAndGetHandlerNameAsync(Document document, int position, CancellationToken cancellationToken) 165private 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)
31protected 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)
41protected override Task<Workspace> CreateWorkspaceImplAsync()
CodeActions\MoveStaticMembers\CSharpMoveStaticMembersTests.cs (1)
3379protected 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)
729private async Task<NameDeclarationInfo> GetResultsAsync(string markup)
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (1)
347var description = service.GetDescriptionAsync(document, item, options, displayOptions);
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
584Task<SourceText> ISettingsEditorViewModel.UpdateEditorConfigAsync(SourceText sourceText)
ExtractMethod\ExtractMethodBase.cs (1)
118protected 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( 179protected static Task<(Project, ISymbol)> CompileAndFindSymbolAsync( 194protected 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)
175private 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)
60public 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 (271)
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)
115public override async Task<(ISymbol? symbol, int selectedIndex)> GetInvocationSymbolAsync( 868public 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)
63private 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) 274private readonly Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution; 276protected 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) 64private readonly Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution; 66protected 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)
41public static async Task<NameDeclarationInfo> GetDeclarationInfoAsync(Document document, int position, CancellationToken cancellationToken) 63private static async Task<NameDeclarationInfo> GetDeclarationInfoWorkerAsync(Document document, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
36public 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)
309internal 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)
64protected 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)
48protected 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)
78public 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)
71private static async Task<Solution> ConvertAsync( 140async Task<MultiDictionary<IParameterSymbol, IdentifierNameSyntax>> GetParameterReferencesAsync() 217async 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)
192private static async Task<Document> ConvertToExtensionAsync(
ConvertToExtension\ConvertToExtensionFixAllProvider.cs (1)
28protected override async Task<Document?> FixAllAsync(
ConvertToRawString\ConvertStringToRawStringCodeRefactoringProvider.cs (1)
127private 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)
17Task<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)
134protected 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)
129private static async Task<(SyntaxNode?, ExplicitInterfaceSpecifierSyntax?, SyntaxToken)> GetContainerAsync(CodeRefactoringContext context) 211private async Task<Solution> ChangeImplementationAsync(
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
139static 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 (2)
200protected override async Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoAsync( 213private static async Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoWorkerAsync(
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (2)
26protected override Task<QuickInfoItem?> BuildQuickInfoAsync( 31protected override Task<QuickInfoItem?> BuildQuickInfoAsync(
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
35public 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)
122protected 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)
50private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken) 79private 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)
22private static async Task<Document> GetChangedDocumentAsync(
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, 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)
36protected 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)
84internal static async Task<Document> TransformDocumentIfRequiredAsync( 134private 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)
43private static async Task<Document> UpdateDocumentAsync(
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
43private 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)
56private 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\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
80protected override Task<SyntaxNode> UpdatePropertyAsync(
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)
140static async Task<SeparatedSyntaxList<ArgumentSyntax>> GetArgumentsAsync(
src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
37protected 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)
32public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 38private 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)
24public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 30private static async Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalContext, ImmutableArray<FixAllContext> contexts)
StringIndentation\CSharpStringIndentationService.cs (1)
28public async Task<ImmutableArray<StringIndentationRegion>> GetStringIndentationRegionsAsync(
UseExpressionBody\UseExpressionBodyCodeRefactoringProvider.cs (1)
161private static async Task<Document> UpdateDocumentAsync(
UseExpressionBodyForLambda\UseExpressionBodyForLambdaCodeRefactoringProvider.cs (5)
82var computationTask = analyzerActive 90private static async Task<ImmutableArray<CodeAction>> ComputeOpposingRefactoringsWhenAnalyzerActiveAsync( 146private static async Task<ImmutableArray<CodeAction>> ComputeAllRefactoringsWhenAnalyzerInactiveAsync( 162private static async Task<ImmutableArray<CodeAction>> ComputeRefactoringsAsync( 194private static async Task<Document> UpdateDocumentAsync(
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (20)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (16)
571protected override Task<Workspace> CreateWorkspaceImplAsync() 611public Task<bool> IsRefineOptionEnabledAsync() 614public Task<bool> IsCodeAnalysisOptionEnabledAsync() 617public Task<bool> IsOnTheFlyDocsOptionEnabledAsync() 620public Task<bool> IsGenerateDocumentationCommentOptionEnabledAsync() 623public Task<bool> IsImplementNotImplementedExceptionEnabledAsync() 643public Task<ImmutableArray<string>> GetAvailablePromptTitlesAsync(Document document, CancellationToken cancellationToken) 646public Task<ImmutableArray<Diagnostic>> GetCachedDocumentDiagnosticsAsync(Document document, TextSpan? span, ImmutableArray<string> promptTitles, CancellationToken cancellationToken) 649public Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsAsync(string symbolSignature, ImmutableArray<string> declarationCode, string language, CancellationToken cancellationToken) 652public Task<bool> IsAvailableAsync(CancellationToken cancellationToken) 655public Task<bool> IsFileExcludedAsync(string filePath, CancellationToken cancellationToken) 661Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> ICopilotCodeAnalysisService.GetDocumentationCommentAsync(DocumentationCommentProposal proposal, CancellationToken cancellationToken) 664public Task<ImmutableDictionary<SyntaxNode, ImplementationDetails>> ImplementNotImplementedExceptionsAsync( 695public Task<bool> IsImplementNotImplementedExceptionsAvailableAsync(CancellationToken cancellationToken) 700public Task<string> GetOnTheFlyDocsPromptAsync(OnTheFlyDocsInfo onTheFlyDocsInfo, CancellationToken cancellationToken) 705public Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseAsync(string prompt, CancellationToken cancellationToken)
Diagnostics\Suppression\SuppressionTests.cs (2)
799protected override async Task<(ImmutableArray<CodeAction>, CodeAction actionToInvoke)> GetCodeActionsAsync(TestWorkspace workspace, TestParameters parameters) 1045protected override async Task<(ImmutableArray<CodeAction>, CodeAction actionToInvoke)> GetCodeActionsAsync(TestWorkspace workspace, TestParameters parameters)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
113private 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)
49var s1 = s0.ContinueWithAsync($"#r \"{typeof(Process).Assembly.Location}\""); 50var s2 = s1.ContinueWith("Process.GetCurrentProcess()"); 62var s1 = s0.ContinueWithAsync(@"Process.GetCurrentProcess()", newOptions); 72var s1 = s0.ContinueWithAsync($@" 88var s = 452var s0 = CSharpScript.RunAsync("var x = new { a = 3 }; x", ScriptOptions); 453var 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)
219var state = CSharpScript.RunAsync(@"if (true) 237var state = CSharpScript.RunAsync(@"if (true) 245var state = CSharpScript.RunAsync(@"System.Console.WriteLine(true) ", options: ScriptOptions, globals: new ScriptTests()); 252var state = CSharpScript.RunAsync(@" 266var state = CSharpScript.RunAsync(@"if (e) a = b
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
3224script = CreateSubmission("return await System.Threading.Tasks.Task.FromResult(42);", returnType: typeof(Task<int>));
Microsoft.CodeAnalysis.CSharp.Workspaces (15)
OrganizeImports\CSharpOrganizeImportsService.cs (1)
20public async Task<Document> OrganizeImportsAsync(Document document, OrganizeImportsOptions options, CancellationToken cancellationToken)
Rename\CSharpRenameRewriterLanguageService.cs (2)
780public override async Task<ImmutableArray<Location>> ComputeDeclarationConflictsAsync( 949public override async Task<ImmutableArray<Location>> ComputeImplicitReferenceConflictsAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
427public async Task<ISymbol?> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
110public 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)
1727if (name.Equals(nameof(Task<>.ConfigureAwait)) && 1733else if (name.Equals(nameof(Task<>.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) 866var newSymbolC = editor.SetBaseTypeAsync(symbol, g => g.IdentifierName("A")); 1040var newProperty = editor.EditOneDeclarationAsync(property, (e, d) => 1048var newIProperty = editor.EditOneDeclarationAsync(iproperty, (e, d) =>
Microsoft.CodeAnalysis.EditorFeatures (275)
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)
16Task<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)
140internal async Task<ImmutableArray<CodeDefinitionWindowLocation>> GetContextFromPointAsync( 196private 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(
Copilot\RoslynProposalAdjusterProvider.cs (5)
34public override Task<ProposalBase> AdjustProposalBeforeDisplayAsync(ProposalBase proposal, string providerName, CancellationToken cancellationToken) 37public override Task<ProposalBase> AdjustProposalAfterAcceptAsync(ProposalBase proposal, string providerName, CancellationToken cancellationToken) 48private async Task<ProposalBase> AdjustProposalAsync( 75private async Task<ProposalBase> AdjustProposalAsync( 157private async Task<ProposalBase?> AdjustProposalAsync(
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)
73Func<CancellationToken, Task<ProposalBase?>> generateProposal = async (cancellationToken) => 183private static async Task<IReadOnlyList<ProposedEdit>> GetProposedEditsAsync(
DocumentationComments\DocumentationCommentSuggestion.cs (4)
69Func<CancellationToken, Task<ProposalBase?>> generateProposal, CancellationToken cancellationToken) 94private async Task<bool> StartSuggestionSessionAsync(CancellationToken cancellationToken) 158private async Task<T> RunWithEnqueueActionAsync<T>(string description, Func<Task<T>> action, CancellationToken cancellationToken)
EditorConfigSettings\DataProvider\Analyzer\AnalyzerSettingsProvider.cs (1)
60private async Task<ImmutableArray<AnalyzerSetting>> GetSettingsAsync(
EditorConfigSettings\DataProvider\CombinedProvider.cs (1)
17public async Task<SourceText> GetChangedEditorConfigAsync(SourceText sourceText)
EditorConfigSettings\DataProvider\ISettingsProvider.cs (1)
15Task<SourceText> GetChangedEditorConfigAsync(SourceText sourceText);
EditorConfigSettings\DataProvider\SettingsProviderBase.cs (1)
80public 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) 31internal async Task<WrappedMissingImportsAnalysisResult> AnalyzeAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken) 38internal 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)
31public Task<ImmutableArray<NavigationBarItem>> GetItemsAsync( 38async Task<ImmutableArray<NavigationBarItem>> INavigationBarItemService.GetItemsAsync( 52public 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 (2)
21public static async Task<InlineRenameLocationSet> CreateAsync( 56public async Task<IInlineRenameReplacementInfo> GetReplacementsAsync(
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
131public 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)
58public async Task<InlineRenameSessionInfo> StartInlineSessionAsync( 116static async Task<InlineRenameSessionInfo?> IsReadOnlyOrCannotNavigateToSpanAsync(
InlineRename\InlineRenameSession.cs (3)
576private async Task<(IInlineRenameReplacementInfo replacementInfo, LinkedFileMergeSessionResult mergeResult)> ComputeMergeResultAsync(IInlineRenameReplacementInfo replacementInfo, CancellationToken cancellationToken) 859async Task<ImmutableArray<(DocumentId documentId, string newName, SyntaxNode newRoot, SourceText newText)>> CalculateFinalDocumentChangesAsync( 934private async Task<Solution> GetFinalSolutionAsync(ImmutableArray<(DocumentId, string, SyntaxNode, SourceText)> documentChanges)
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
538private static async Task<IEnumerable<TextChange>> GetTextChangesFromTextDifferencingServiceAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken = default) 581private 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)
128public async Task<FilteredCompletionModel?> UpdateCompletionListAsync(IAsyncCompletionSession session, CancellationToken cancellationToken) 153var 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)
48public async Task<IntellisenseQuickInfoItem> GetQuickInfoItemAsync(IAsyncQuickInfoSession session, CancellationToken cancellationToken)
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)
67public 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)
124public async Task<Connection?> ActivateAsync(CancellationToken cancellationToken) 209internal async Task<AbstractLanguageServer<RequestContext>> CreateAsync<TRequestContext>( 268public 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)
30private static Task<INavigableLocation?> GetNavigableLocationAsync( 41public async Task<DefinitionLocation?> GetDefinitionLocationAsync(Document document, int position, CancellationToken cancellationToken) 129private async Task<INavigableLocation?> GetAlternativeLocationIfAlreadyOnDefinitionAsync( 277private 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)
96Func<ITextSnapshot, IUIThreadOperationContext, Task<Document?>> getCurrentDocumentAsync, 97Func<Document, CancellationToken, Task<Document>> getChangedDocumentAsync) 112Func<ITextSnapshot, IUIThreadOperationContext, Task<Document?>> getCurrentDocumentAsync, 113Func<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) 272private async Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedTextDocumentPreviewViewAsync<TDocument>( 292public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedDocumentPreviewViewAsync(Document document, double zoomLevel, CancellationToken cancellationToken) 300public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedAdditionalDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 308public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateAddedAnalyzerConfigDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 316public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedDocumentPreviewViewAsync(Document document, CancellationToken cancellationToken) 339private async Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedTextDocumentPreviewViewAsync<TDocument>( 369public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedDocumentPreviewViewAsync(Document document, double zoomLevel, CancellationToken cancellationToken) 377public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedAdditionalDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 385public Task<IDifferenceViewerPreview<TDifferenceViewer>> CreateRemovedAnalyzerConfigDocumentPreviewViewAsync(TextDocument document, double zoomLevel, CancellationToken cancellationToken) 393public Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedDocumentPreviewViewAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken) 396public async Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedDocumentPreviewViewAsync(Document oldDocument, Document newDocument, double zoomLevel, CancellationToken cancellationToken) 479private async Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedAdditionalOrAnalyzerConfigDocumentPreviewViewAsync( 529public Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedAdditionalDocumentPreviewViewAsync(TextDocument oldDocument, TextDocument newDocument, double zoomLevel, CancellationToken cancellationToken) 535public Task<IDifferenceViewerPreview<TDifferenceViewer>?> CreateChangedAnalyzerConfigDocumentPreviewViewAsync(TextDocument oldDocument, TextDocument newDocument, double zoomLevel, CancellationToken cancellationToken) 628protected 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)
207async Task<bool?> DispatchSynchronizeTextChangesHelperAsync()
RenameTracking\RenameTrackingTaggerProvider.cs (1)
126Task<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)
27public Task<Solution> GetFixAsync( 45public Task<Solution> GetFixAsync( 63private 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 (7)
97public Task<bool> HasSuggestedActionsAsync( 131public async Task<ISuggestedActionCategorySet?> GetSuggestedActionCategoriesAsync( 165var errorTask = GetFixLevelAsync(document, range, cancellationToken); 174var refactoringTask = selection != null 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 (34)
BraceHighlighting\MultiCharacterBraceHighlightingTests.cs (1)
31public async Task<BraceMatchingResult?> GetMatchingBracesAsync(
Classification\AbstractClassifierTests.cs (4)
28protected abstract Task<ImmutableArray<ClassifiedSpan>> GetClassificationSpansAsync(string text, ImmutableArray<TextSpan> spans, ParseOptions? parseOptions, TestHost testHost); 261protected static async Task<ImmutableArray<ClassifiedSpan>> GetSemanticClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 272protected static async Task<ImmutableArray<ClassifiedSpan>> GetSyntacticClassificationsAsync(Document document, ImmutableArray<TextSpan> spans) 282protected 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) 1332protected async Task<IReadOnlyList<RoslynCompletion.CompletionItem>> GetCompletionItemsAsync(
Extensions\IDiagnosticServiceExtensions.cs (1)
14public static Task<ImmutableArray<DiagnosticData>> ForceAnalyzeProjectAsync(
ExtractInterface\ExtractInterfaceTestState.cs (3)
76public Task<ExtractInterfaceTypeAnalysisResult> GetTypeAnalysisResultAsync(TypeDiscoveryRule typeDiscoveryRule) 85public Task<ExtractInterfaceResult> ExtractViaCommandAsync() 98public async Task<Solution> ExtractViaCodeAction()
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
54protected 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)
148protected 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 (2)
55protected override Task<decimal> InvokeTestMethodAsync(ExceptionAggregator aggregator) 59var task = Task.Factory.StartNew(async () =>
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)
263private static Task<ImmutableArray<CodeFixCollection>> GetAddedFixesWithExceptionValidationAsync(CodeFixProvider codefix) 266private static async Task<ImmutableArray<CodeFixCollection>> GetAddedFixesAsync(CodeFixProvider codefix, DiagnosticAnalyzer diagnosticAnalyzer, bool exception = false, bool throwExceptionInFixerCreation = false) 559public override Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument document, SyntaxTree? tree, CancellationToken cancellationToken) 565public override Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument document, SyntaxTree? tree, CancellationToken cancellationToken) 728private static async Task<ImmutableArray<CodeFixCollection>> GetNuGetAndVsixCodeFixersCoreAsync(
CodeGeneration\CodeGenerationTests.cs (1)
888public 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)
1051public override Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument document, SyntaxTree tree, CancellationToken cancellationToken)
LanguageServer\VSTypeScriptHandlerTests.cs (3)
102private async Task<VSTypeScriptTestLspServer> CreateTsTestLspServerAsync(string workspaceXml, InitializationOptions? options = null) 139public static async Task<VSTypeScriptTestLspServer> CreateAsync(LspTestWorkspace testWorkspace, InitializationOptions options, AbstractLspLogger logger) 181protected 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)
867var notRenamable = Task.FromResult(RenameTrackingTaggerProvider.TriggerIdentifierKind.NotRenamable);
RenameTracking\RenameTrackingTestState.cs (1)
165public async Task<CodeAction> TryGetCodeActionAsync(TextSpan? textSpan = null)
Structure\BlockStructureServiceTests.cs (1)
115private static async Task<ImmutableArray<BlockSpan>> GetSpansFromWorkspaceAsync(
Structure\StructureTaggerTests.cs (1)
404private 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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public 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 (46)
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)
77public async Task<CopilotSemanticSearchQueryResults> ExecuteAsync(string query, int resultCountLimit, CancellationToken cancellationToken)
Internal\SemanticSearch\CopilotSemanticSearchQueryService.cs (1)
82public async Task<ExecuteQueryResult> ExecuteQueryAsync(Solution solution, CompiledQueryId queryId, ISemanticSearchResultsObserver observer, QueryExecutionOptions options, TraceSource traceSource, 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);
SemanticSearch\ICopilotSemanticSearchQueryService.cs (1)
25Task<ExecuteQueryResult> ExecuteQueryAsync(
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<>.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 (60)
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\CodeLens.cs (2)
15public static Task<LSP.CodeLens[]?> GetCodeLensAsync(LSP.TextDocumentIdentifier textDocumentIdentifier, Document document, CancellationToken cancellationToken) 22public static Task<LSP.CodeLens> ResolveCodeLensAsync(LSP.CodeLens codeLens, Document document, CancellationToken cancellationToken)
Cohost\Handlers\Completion.cs (7)
30public static Task<LSP.VSInternalCompletionList?> GetCompletionListAsync( 50public static Task<LSP.VSInternalCompletionList?> GetCompletionListAsync( 69private static async Task<LSP.VSInternalCompletionList?> GetCompletionListAsync( 96public static Task<LSP.CompletionItem> ResolveCompletionItemAsync( 107public static Task<LSP.CompletionItem> ResolveCompletionItemAsync( 119private static Task<LSP.CompletionItem> ResolveCompletionItemAsync( 134public 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 (6)
23public static Task<LSP.InlayHint[]?> GetInlayHintsAsync(Document document, LSP.TextDocumentIdentifier textDocumentIdentifier, LSP.Range range, bool displayAllOverride, CancellationToken cancellationToken) 29public static Task<LSP.InlayHint[]?> GetInlayHintsAsync(Document document, LSP.TextDocumentIdentifier textDocumentIdentifier, LSP.Range range, bool displayAllOverride, InlayHintCacheWrapper cacheWrapper, CancellationToken cancellationToken) 34private static Task<LSP.InlayHint[]?> GetInlayHintsAsync(Document document, LSP.TextDocumentIdentifier textDocumentIdentifier, LSP.Range range, bool displayAllOverride, InlayHintCache cache, CancellationToken cancellationToken) 46public static Task<LSP.InlayHint> ResolveInlayHintAsync(Document document, LSP.InlayHint request, CancellationToken cancellationToken) 52public static Task<LSP.InlayHint> ResolveInlayHintAsync(Document document, LSP.InlayHint request, InlayHintCacheWrapper cacheWrapper, CancellationToken cancellationToken) 57private static Task<LSP.InlayHint> ResolveInlayHintAsync(Document document, LSP.InlayHint request, InlayHintCache cache, 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)
22Task<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);
IRazorSourceGeneratedDocumentSpanMappingService.cs (2)
14Task<ImmutableArray<RazorMappedEditResult>> GetMappedTextChangesAsync(SourceGeneratedDocument oldDocument, SourceGeneratedDocument newDocument, CancellationToken cancellationToken); 15Task<ImmutableArray<RazorMappedSpanResult>> MapSpansAsync(SourceGeneratedDocument document, ImmutableArray<TextSpan> spans, 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 (1)
38public 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(
RazorSourceGeneratedDocumentSpanMappingServiceWrapper.cs (2)
31public async Task<ImmutableArray<MappedTextChange>> GetMappedTextChangesAsync(SourceGeneratedDocument oldDocument, SourceGeneratedDocument newDocument, CancellationToken cancellationToken) 63public async Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(SourceGeneratedDocument document, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken)
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)
31public 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)
24async Task<ImmutableArray<DiagnosticData>> IDiagnosticSource.GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Features (1266)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
46protected override Task<Solution?> GetChangedSolutionAsync(
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (2)
53private static async Task<AddConstructorParameterResult?> AddConstructorParametersFromMembersAsync( 161public 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 (10)
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( 132private async Task<ImmutableArray<Reference>> FindResultsAsync( 170private async Task<ImmutableArray<Reference>> FindResultsAsync( 515public async Task<ImmutableArray<(Diagnostic Diagnostic, ImmutableArray<AddImportFixData> Fixes)>> GetFixesForDiagnosticsAsync( 538public async Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsync( 562private async Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsyncInCurrentProcessAsync( 584foreach (var getFixesForDiagnosticsTask in getFixesForDiagnosticsTasks)
AddImport\CodeActions\AddImportCodeAction.cs (1)
59protected async Task<Document> GetUpdatedDocumentAsync(CancellationToken cancellationToken)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (4)
33protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 36protected override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 39private async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync(bool isPreview, CancellationToken cancellationToken) 81internal 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)
27protected 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)
26public override async Task<AddImportFixData> TryGetFixDataAsync(
AddImport\References\PackageReference.cs (1)
28public override async Task<AddImportFixData> TryGetFixDataAsync(
AddImport\References\Reference.cs (4)
77protected async Task<(SyntaxNode, Document)> ReplaceNameNodeAsync( 100public abstract Task<AddImportFixData> TryGetFixDataAsync( 103protected async Task<ImmutableArray<TextChange>> GetTextChangesAsync( 127protected static async Task<Document> CleanDocumentAsync(Document newDocument, bool cleanupDocument, CodeCleanupOptions options, CancellationToken cancellationToken)
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)
34protected abstract Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(SymbolFilter filter, SearchQuery query, CancellationToken cancellationToken); 38public async Task<ImmutableArray<SymbolResult<ISymbol>>> FindDeclarationsAsync(
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (1)
29protected override async Task<ImmutableArray<ISymbol>> FindDeclarationsAsync(
AddImport\SymbolReferenceFinder.cs (17)
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); 142foreach (var task in 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)
44private static async Task<ImmutableArray<CodeAction>> GetAddReferencesCodeActionsAsync(CodeFixContext context, ISet<AssemblyIdentity> uniqueIdentities) 57private 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)
29protected async Task<ImmutableArray<CodeAction>> GetAddPackagesCodeActionsAsync( 72private 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 (10)
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 async Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync( 334public async Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>( 625private static async Task<ImmutableArray<CodeFix>> GetCodeFixesAsync( 740private async Task<CodeFixCollection?> TryGetFixesOrConfigurationsAsync<TCodeFixProvider>( 747Func<ImmutableArray<Diagnostic>, Task<ImmutableArray<CodeFix>>> getFixes,
CodeFixes\Service\CodeFixService.FixAllDiagnosticProvider.cs (4)
43public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 52public override async Task<IEnumerable<Diagnostic>> GetDocumentSpanDiagnosticsAsync(Document document, TextSpan fixAllSpan, CancellationToken cancellationToken) 65public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 74public 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)
24Task<CodeFixCollection?> GetMostSevereFixAsync(TextDocument document, TextSpan range, ICodeActionRequestPriorityProvider priorityProvider, CancellationToken cancellationToken); 26Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync(TextDocument document, TextSpan textSpan, string diagnosticId, DiagnosticSeverity severity, CancellationToken cancellationToken); 27Task<TDocument> ApplyCodeFixesForSpecificDiagnosticIdAsync<TDocument>(TDocument document, string diagnosticId, DiagnosticSeverity severity, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 37public static Task<ImmutableArray<CodeFixCollection>> GetFixesAsync(this ICodeFixService service, TextDocument document, TextSpan range, CancellationToken cancellationToken) 40public 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)
141public Task<ImmutableArray<CodeFix>> GetFixesAsync( 150internal async Task<ImmutableArray<PragmaWarningCodeAction>> GetPragmaSuppressionsAsync(Document document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 156private async Task<ImmutableArray<CodeFix>> GetSuppressionsAsync( 169public async Task<ImmutableArray<CodeFix>> GetFixesAsync( 185private async Task<ImmutableArray<CodeFix>> GetSuppressionsAsync( 263private 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)
24protected 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)
51protected sealed override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 65protected sealed override Task<Solution?> GetChangedSolutionAsync(
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (4)
25public async Task<Solution?> GetFixAllChangedSolutionAsync(IFixAllContext fixAllContext) 37public async Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync( 50private 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 (10)
44private static async Task<T?> FindAsync<T>(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, 45Func<CodeLensFindReferencesProgress, Task<T>> onResults, Func<CodeLensFindReferencesProgress, Task<T>> onCapped, 91public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, int maxSearchResults, CancellationToken cancellationToken) 103private static async Task<ReferenceLocationDescriptorAndDocument> GetDescriptorOfEnclosingSymbolAsync(Solution solution, Location location, CancellationToken cancellationToken) 199public async Task<ImmutableArray<ReferenceLocationDescriptorAndDocument>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 214public async Task<ImmutableArray<ReferenceLocationDescriptor>> MapReferenceLocationsAsync(Solution solution, ImmutableArray<ReferenceLocationDescriptorAndDocument> referenceLocations, ClassificationOptions classificationOptions, CancellationToken cancellationToken) 373private static async Task<ReferenceMethodDescriptor> TryGetMethodDescriptorAsync(Location commonLocation, Solution solution, CancellationToken cancellationToken) 387public Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 403public 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 (5)
24Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, CancellationToken cancellationToken); 29Task<ImmutableArray<ReferenceLocationDescriptorAndDocument>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken); 34Task<ImmutableArray<ReferenceLocationDescriptor>> MapReferenceLocationsAsync(Solution solution, ImmutableArray<ReferenceLocationDescriptorAndDocument> referenceLocations, ClassificationOptions classificationOptions, CancellationToken cancellationToken); 39Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, CancellationToken cancellationToken); 44Task<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)
33public 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 (4)
23Task<ImmutableArray<AddImportFixData>> AnalyzeAsync(Document document, TextSpan textSpan, bool cleanupDocument, CancellationToken cancellationToken); 30Task<Document> AddMissingImportsAsync(Document document, ImmutableArray<AddImportFixData> analysisResult, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken); 39public static Task<Document> AddMissingImportsAsync( 45public 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( 113private async Task<Document> AddNewDocumentWithSingleTypeDeclarationAsync(DocumentId newDocumentId) 201private async Task<SyntaxNode> AddFinalNewLineIfDesiredAsync(Document document, SyntaxNode modifiedRoot) 230private 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)
40public abstract Task<bool> CanChangeNamespaceAsync(Document document, SyntaxNode container, CancellationToken cancellationToken); 42public abstract Task<Solution> ChangeNamespaceAsync(Document document, SyntaxNode container, string targetNamespace, CancellationToken cancellationToken); 44public abstract Task<Solution?> TryChangeTopLevelNamespacesAsync(Document document, string targetNamespace, CancellationToken cancellationToken); 94protected abstract Task<SyntaxNode?> TryGetApplicableContainerFromSpanAsync(Document document, TextSpan span, CancellationToken cancellationToken); 107protected abstract Task<ImmutableArray<(DocumentId id, SyntaxNode container)>> GetValidContainersFromAllLinkedDocumentsAsync(Document document, SyntaxNode container, CancellationToken cancellationToken); 115public override async Task<bool> CanChangeNamespaceAsync(Document document, SyntaxNode container, CancellationToken cancellationToken) 126public override async Task<Solution?> TryChangeTopLevelNamespacesAsync( 171static async Task<ImmutableArray<SyntaxNode>> GetTopLevelNamespacesAsync(Document document, CancellationToken cancellationToken) 182public override async Task<Solution> ChangeNamespaceAsync( 269protected async Task<ImmutableArray<(DocumentId, SyntaxNode)>> TryGetApplicableContainersFromAllDocumentsAsync( 312protected static async Task<Solution> AnnotateContainersAsync(Solution solution, ImmutableArray<(DocumentId, SyntaxNode)> containers, CancellationToken cancellationToken) 324protected async Task<bool> ContainsPartialTypeWithMultipleDeclarationsAsync( 367private async Task<ImmutableArray<ISymbol>> GetDeclaredSymbolsInContainerAsync( 428private 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)
211internal 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) 77public virtual Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\CompletionService.cs (4)
190public Task<CompletionDescription?> GetDescriptionAsync( 207internal virtual async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default) 235public virtual async Task<CompletionChange> GetChangeAsync( 406public async Task<CompletionContext> GetContextAsync(
Completion\CompletionService_GetCompletions.cs (5)
36public Task<CompletionList> GetCompletionsAsync( 60internal virtual async Task<CompletionList> GetCompletionsAsync( 150static async Task<ImmutableArray<CompletionProvider>> GetAugmentingProvidersAsync( 229private static async Task<ImmutableArray<CompletionContext>> ComputeNonEmptyCompletionContextsAsync( 317private 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)
164public 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)
45private async Task<ImmutableArray<CompletionItem>> RecommendCompletionItemsAsync(Document document, CompletionContext context, CancellationToken cancellationToken) 53private async Task<ImmutableArray<RecommendedKeyword>> RecommendKeywordsAsync( 75public 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)
58protected override async Task<ISymbol> GenerateMemberAsync( 78protected 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)
31protected abstract Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync( 299internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 339private async Task<ImmutableArray<CompletionItem>> GetItemsAsync( 382protected virtual Task<bool> IsSemanticTriggerCharacterAsync(Document document, int characterPosition, CancellationToken cancellationToken) 410private async Task<ImmutableArray<(DocumentId documentId, TSyntaxContext syntaxContext, ImmutableArray<SymbolAndSelectionInfo> symbols)>> GetPerContextSymbolsAsync( 438protected async Task<ImmutableArray<SymbolAndSelectionInfo>> TryGetSymbolsForContextAsync( 469public 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)
48public async Task<(ImmutableArray<ImmutableArray<CompletionItem>>, bool)> GetAllTopLevelTypesAsync( 83private async Task<(ImmutableArray<TypeImportCompletionCacheEntry> results, bool isPartial)> GetCacheEntriesAsync(Project currentProject, Compilation originCompilation, bool forceCacheCreation, CancellationToken cancellationToken) 177private async Task<TypeImportCompletionCacheEntry> GetUpToDateCacheForProjectAsync(Project project, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (3)
55public static async Task<ImmutableArray<SerializableImportCompletionItem>> GetUnimportedExtensionMethodsAsync( 93public static async Task<ImmutableArray<SerializableImportCompletionItem>> GetUnimportedExtensionMethodsInCurrentProcessAsync( 232private static async Task<ExtensionMethodImportCompletionCacheEntry> GetUpToDateCacheEntryAsync(
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (4)
81public async Task<ImmutableArray<IMethodSymbol>> GetExtensionMethodSymbolsAsync(bool forceCacheCreation, bool hideAdvancedMembers, CancellationToken cancellationToken) 86var peReferenceMethodSymbolsTask = ProducerConsumer<IMethodSymbol?>.RunParallelAsync( 93var projectMethodSymbolsTask = ProducerConsumer<IMethodSymbol?>.RunParallelAsync( 194var 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)
131public static async Task<ImmutableArray<ISymbol>> GetSymbolsAsync(CompletionItem item, Document document, CancellationToken cancellationToken) 183public static async Task<CompletionDescription> GetDescriptionAsync( 190public static async Task<CompletionDescription> GetDescriptionForSymbolsAsync( 388public 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)
27private 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)
122static 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)
183private static async Task<(SyntaxNode, INamedTypeSymbol)> TryGetTupleInfoAsync( 216public async Task<Solution> ConvertToStructAsync( 249private static async Task<Solution> AddRenameTokenAsync( 262private async Task<Solution> ConvertToStructInCurrentProcessAsync( 418private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateAsync( 435private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateForDependentProjectAsync( 477private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateForContainingProjectAsync( 517private static async Task<ImmutableArray<DocumentToUpdate>> GetDocumentsToUpdateForContainingTypeAsync( 583private static async Task<Solution> ApplyChangesAsync( 613private async Task<bool> ReplaceTupleExpressionsAndTypesInDocumentAsync( 633private async Task<bool> ReplaceMatchingTupleExpressionsAsync( 747private static async Task<bool> ReplaceMatchingTupleTypesAsync( 798private 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( 79private async Task<CopilotChangeAnalysis> AnalyzeChangeInCurrentProcessAsync( 162private static Task<ImmutableArray<CopilotDiagnosticAnalysis>> ComputeAllDiagnosticAnalysesAsync( 202static Task<ImmutableArray<DiagnosticData>> ComputeDiagnosticsAsync( 233private async Task<CopilotCodeFixAnalysis> ComputeCodeFixAnalysisAsync( 338Task<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)
20Task<bool> IsRefineOptionEnabledAsync(); 25Task<bool> IsCodeAnalysisOptionEnabledAsync(); 30Task<bool> IsOnTheFlyDocsOptionEnabledAsync(); 35Task<bool> IsGenerateDocumentationCommentOptionEnabledAsync(); 40Task<bool> IsImplementNotImplementedExceptionEnabledAsync();
Copilot\IProposalAdjusterService.cs (2)
62private static async Task<ImmutableArray<TextChange>> TryAdjustProposalInCurrentProcessAsync( 91private static async Task<(bool success, ImmutableArray<TextChange> addImportChanges)> TryGetAddImportTextChangesAsync(
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)
26Task<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\CodeAnalysisDiagnosticAnalyzerService.cs (1)
74public static async Task<ImmutableArray<DiagnosticData>> ForceCodeAnalysisDiagnosticsAsync(
Diagnostics\DiagnosticAnalyzerExtensions.cs (1)
48public static Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync(
Diagnostics\IDiagnosticAnalyzerService.cs (9)
44Task<ImmutableArray<DiagnosticAnalyzer>> GetDeprioritizationCandidatesAsync( 72Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync( 87Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync( 102Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 109Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync( 113Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 117Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 130public static Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(this IDiagnosticAnalyzerService service, 147public static Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(this IDiagnosticAnalyzerService service,
Diagnostics\Service\DiagnosticAnalyzerService.cs (4)
101public static Task<VersionStamp> GetDiagnosticVersionAsync(Project project, CancellationToken cancellationToken) 149public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync( 166public Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync( 191public Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeProjectInProcessAsync(
Diagnostics\Service\DiagnosticAnalyzerService.IncrementalMemberEditAnalyzer.cs (4)
54public async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDiagnosticsInProcessAsync( 190private async Task<(SyntaxNode changedMember, int changedMemberId, ImmutableArray<TextSpan> memberSpans, Document lastDocument)?> TryGetChangedMemberAsync( 227private async Task<ImmutableArray<TextSpan>> GetOrCreateMemberSpansAsync(Document document, VersionStamp version, CancellationToken cancellationToken) 244static async Task<ImmutableArray<TextSpan>> CreateMemberSpansAsync(Document document, VersionStamp version, CancellationToken cancellationToken)
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (2)
43private static async Task<CompilationWithAnalyzersPair?> GetOrCreateCompilationWithAnalyzersAsync( 78static async Task<CompilationWithAnalyzersPair?> CreateCompilationWithAnalyzersAsync(
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (4)
25private async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticAnalysisResultsInProcessAsync( 53async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> RemoveCompilerSemanticErrorsIfProjectNotLoadedAsync( 88async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> ComputeDiagnosticsForAnalyzersAsync( 118async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> MergeProjectDiagnosticAnalyzerDiagnosticsAsync(
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (2)
22private async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeInProcessAsync( 34async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeAsync()
Diagnostics\Service\DiagnosticAnalyzerService_DeprioritizationCandidates.cs (2)
26private async Task<ImmutableArray<DiagnosticAnalyzer>> GetDeprioritizationCandidatesInProcessAsync( 63async Task<bool> IsCandidateForDeprioritizationBasedOnRegisteredActionsAsync(DiagnosticAnalyzer analyzer)
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (4)
26private static async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreInProcessAsync( 40public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 269public async Task<ImmutableArray<DiagnosticData>> ComputeDiagnosticsInProcessAsync( 313var computeTask = incrementalAnalysis
Diagnostics\Service\DiagnosticAnalyzerService_ProduceProjectDiagnostics.cs (2)
19public async Task<ImmutableArray<DiagnosticData>> ProduceProjectDiagnosticsInProcessAsync( 70async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetOrComputeDiagnosticAnalysisResultsAsync(
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (6)
22public async Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync( 46public async Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync(Solution solution, CancellationToken cancellationToken) 66public async Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync(Project project, CancellationToken cancellationToken) 86public async Task<ImmutableArray<DiagnosticAnalyzer>> GetDeprioritizationCandidatesAsync( 107internal async Task<ImmutableArray<DiagnosticData>> ProduceProjectDiagnosticsAsync( 143public async Task<ImmutableArray<DiagnosticData>> ComputeDiagnosticsAsync(
Diagnostics\Service\DocumentAnalysisExecutor.cs (7)
73public async Task<ImmutableArray<DiagnosticData>> ComputeDiagnosticsInProcessAsync( 154async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetAnalysisResultInProcessAsync( 172async Task<ImmutableArray<DiagnosticData>> GetCompilerAnalyzerDiagnosticsInProcessAsync(TextSpan? span) 191async Task<ImmutableArray<DiagnosticData>> GetSyntaxDiagnosticsInProcessAsync() 224async Task<ImmutableArray<DiagnosticData>> GetSemanticDiagnosticsInProcessAsync() 260async Task<TextSpan?> GetAdjustedSpanForCompilerAnalyzerAsync(Document document) 348async Task<ImmutableArray<DiagnosticData>> RemapDiagnosticLocationsIfRequiredAsync(
Diagnostics\Service\DocumentAnalysisExecutor_Helpers.cs (1)
78public static async Task<ImmutableArray<Diagnostic>> ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(
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( 2693private async Task<ImmutableArray<SemanticEditInfo>> AnalyzeSemanticsAsync(
EditAndContinue\CommittedSolution.cs (2)
163public async Task<(Document? Document, DocumentState State)> GetDocumentAndStateAsync(Document currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false) 376internal static async Task<IEnumerable<KeyValuePair<DocumentId, DocumentState>>> GetMatchingDocumentsAsync(
EditAndContinue\DebuggingSession.cs (1)
276internal 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)
123private async Task<Diagnostic?> GetUnsupportedChangesDiagnosticAsync(EmitDifferenceResult emitResult, CancellationToken cancellationToken) 156public async Task<string?> ReportModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, ArrayBuilder<Diagnostic> diagnostics, CancellationToken cancellationToken) 228private async Task<EditAndContinueCapabilities> GetCapabilitiesAsync(CancellationToken cancellationToken) 241private async Task<ActiveStatementsMap> GetBaseActiveStatementsAsync(CancellationToken cancellationToken) 609private async Task<(ImmutableArray<DocumentAnalysisResults> results, bool hasOutOfSyncDocument)> AnalyzeProjectDifferencesAsync(
EditAndContinue\IEditAndContinueAnalyzer.cs (1)
18Task<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)
41protected abstract Task<SyntaxNode> RewriteFieldNameAndAccessibilityAsync(string originalFieldName, bool makePrivate, Document document, SyntaxAnnotation declarationAnnotation, CancellationToken cancellationToken); 42protected abstract Task<ImmutableArray<IFieldSymbol>> GetFieldsAsync(Document document, TextSpan span, CancellationToken cancellationToken); 45public async Task<EncapsulateFieldResult?> EncapsulateFieldsInSpanAsync(Document document, TextSpan span, bool useDefaultBehavior, CancellationToken cancellationToken) 58public async Task<ImmutableArray<CodeAction>> GetEncapsulateFieldCodeActionsAsync(Document document, TextSpan span, CancellationToken cancellationToken) 110public async Task<Solution> EncapsulateFieldsAsync( 141private async Task<Solution> EncapsulateFieldsInCurrentProcessAsync(Document document, ImmutableArray<IFieldSymbol> fields, bool updateReferences, CancellationToken cancellationToken) 167private async Task<Solution?> EncapsulateFieldAsync( 230private async Task<Solution> UpdateReferencesAsync( 275private static async Task<Solution> RenameAsync( 316protected 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)
58private 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)
87public 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)
212private 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)
ExternalAccess\Watch\Api\WatchHotReloadService.cs (1)
203public async Task<Updates2> GetUpdatesAsync(Solution solution, ImmutableDictionary<ProjectId, RunningProjectInfo> runningProjects, 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)
34protected 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)
94private static async Task<ImmutableArray<ISymbol>> FindSourceImplementationsAsync( 141private static async Task<ImmutableArray<ISymbol>> FindImplementationsWorkerAsync( 169private 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)
78public async Task<DefaultDefinitionItem?> TryRehydrateAsync(Solution solution, CancellationToken cancellationToken)
FindUsages\DefinitionItemFactory.cs (1)
284public 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)
19Task<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) 217private 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)
77public async Task<ImmutableArray<IntentProcessorResult>> ComputeIntentAsync( 109static async Task<IntentProcessorResult?> GetIntentProcessorResultAsync( 127static async Task<ImmutableArray<CodeActionOperation>> GetCodeActionOperationsAsync( 190private async Task<(CodeAction CodeAction, TextSpan ApplicableToSpan)?> HandleNonSelectionAsync( 265public async Task<ImmutableArray<CodeAction>> GenerateConstructorFromMembersAsync( 293private 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)
168public async Task<ImmutableArray<CodeAction>> GenerateEqualsAndGetHashCodeFromMembersAsync( 199private async Task<ImmutableArray<CodeAction>> CreateActionsAsync( 203using var _ = ArrayBuilder<Task<CodeAction>>.GetInstance(out var tasks); 239private Task<CodeAction> CreateCodeActionAsync( 256private async Task<CodeAction> CreateCodeActionWithDialogAsync( 293private 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)
64protected override async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 171protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
GenerateType\AbstractGenerateTypeService.cs (4)
57internal abstract Task<Solution> TryAddUsingsOrImportToDocumentAsync( 64public abstract Task<(INamespaceSymbol, INamespaceOrTypeSymbol, Location)> GetOrGenerateEnclosingNamespaceSymbolAsync(INamedTypeSymbol namedTypeSymbol, string[] containers, Document selectedDocument, SyntaxNode selectedDocumentRoot, CancellationToken cancellationToken); 66public async Task<ImmutableArray<CodeAction>> GenerateTypeAsync( 272protected 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)
68protected override async Task<ImmutableArray<CodeAction>> GetRefactoringsForAllParametersAsync( 99protected override async Task<ImmutableArray<CodeAction>> GetRefactoringsForSingleParameterAsync( 173private async Task<Document> UpdateDocumentForRefactoringAsync( 541private async Task<Document> AddNullCheckAsync( 564private async Task<Document> AddStringCheckAsync( 580private async Task<Document> AddNumericCheckAsync( 596private static async Task<Document> AddCheckStatementAsync( 630private static async Task<Document> AddEnumIsDefinedCheckStatementAsync( 885private 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)
37protected abstract Task<ImmutableArray<CodeAction>> GetRefactoringsForAllParametersAsync( 46protected abstract Task<ImmutableArray<CodeAction>> GetRefactoringsForSingleParameterAsync(
InlineHints\AbstractInlineHintsService.cs (1)
17public 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( 284private static async Task<TExpressionSyntax> ReplaceAllSyntaxNodesForSymbolAsync(
InlineMethod\AbstractInlineMethodRefactoringProvider.MethodParametersInfo.cs (3)
153private async Task<MethodParametersInfo> GetMethodParametersInfoAsync( 429private static async Task<ImmutableArray<IArgumentOperation>> GetArgumentsReadOnlyOnceAsync( 478private 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)
111protected abstract Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync(ISymbol symbol); 359public async Task<ImmutableArray<SymbolDisplayPart>> BuildDescriptionAsync( 369public async Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> BuildDescriptionSectionsAsync(ImmutableArray<ISymbol> symbolGroup) 636private async Task<ImmutableArray<SymbolDisplayPart>> GetFieldPartsAsync(IFieldSymbol symbol) 668private async Task<ImmutableArray<SymbolDisplayPart>> GetLocalPartsAsync(ILocalSymbol symbol)
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.cs (2)
21public Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups, CancellationToken cancellationToken) 30public async Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> ToDescriptionGroupsAsync(
LanguageServices\SymbolDisplayService\ISymbolDisplayService.cs (4)
15Task<ImmutableArray<SymbolDisplayPart>> ToDescriptionPartsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default); 16Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> ToDescriptionGroupsAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken = default); 23public Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ISymbol symbol, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, CancellationToken cancellationToken = default) 26public async Task<string> ToDescriptionStringAsync(SemanticModel semanticModel, int position, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, SymbolDescriptionGroups groups = SymbolDescriptionGroups.All, 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); 85protected abstract Task<Document> AddAssemblyInfoRegionAsync(Document document, Compilation symbolCompilation, ISymbol symbol, CancellationToken cancellationToken); 87protected abstract Task<Document> ConvertDocCommentsToRegularCommentsAsync(Document document, IDocumentationCommentFormattingService docCommentFormattingService, CancellationToken cancellationToken);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
53public async Task<MetadataAsSourceFile?> GetGeneratedFileAsync( 375private 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)
25Task<Document> AddSourceToAsync(Document document, Compilation symbolCompilation, ISymbol symbol, SyntaxFormattingOptions? formattingOptions, CancellationToken cancellationToken);
MetadataAsSource\MetadataAsSourceFileService.cs (2)
71public async Task<MetadataAsSourceFile> GetGeneratedFileAsync( 257internal 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)
21Task<INavigableLocation?> GetNavigableLocationAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 25Task<bool> TrySymbolNavigationNotifyAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 29Task<(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)
41private 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)
68public 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)
59public static Task<Solution> PullMembersUpAsync( 91private static async Task<Solution> PullMembersIntoInterfaceAsync( 266private static async Task<Solution> PullMembersIntoClassAsync( 468private 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)
15protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token); 16protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(CommonQuickInfoContext context, SyntaxToken token); 18public override async Task<QuickInfoItem?> GetQuickInfoAsync(QuickInfoContext context) 34public async Task<QuickInfoItem?> GetQuickInfoAsync(CommonQuickInfoContext context) 48protected async Task<ImmutableArray<SyntaxToken>> GetTokensAsync(SyntaxTree tree, int position, System.Threading.CancellationToken cancellationToken) 70private async Task<QuickInfoItem?> GetQuickInfoAsync( 83private async Task<QuickInfoItem?> GetQuickInfoAsync(
QuickInfo\CommonSemanticQuickInfoProvider.cs (6)
25protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 40protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 52private async Task<(TokenInformation tokenInformation, SupportedPlatformData? supportedPlatforms)> ComputeQuickInfoDataAsync( 69private async Task<(TokenInformation, SupportedPlatformData supportedPlatforms)> ComputeFromLinkedDocumentsAsync( 156protected static Task<QuickInfoItem> CreateContentAsync( 188protected virtual Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoAsync(QuickInfoContext context, CancellationToken cancellationToken)
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
33public 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 (1)
43internal override async Task<QuickInfoItem?> GetQuickInfoAsync(Document document, int position, SymbolDescriptionOptions options, CancellationToken cancellationToken)
QuickInfo\QuickInfoUtilities.cs (2)
21public static Task<QuickInfoItem> CreateQuickInfoItemAsync(SolutionServices services, SemanticModel semanticModel, TextSpan span, ImmutableArray<ISymbol> symbols, SymbolDescriptionOptions options, CancellationToken cancellationToken) 24public static async Task<QuickInfoItem> CreateQuickInfoItemAsync(
Rename\SymbolicRenameInfo.cs (3)
114public static async Task<SymbolicRenameInfo> GetRenameInfoAsync( 124private static async Task<SyntaxToken> GetTriggerTokenAsync(Document document, int position, CancellationToken cancellationToken) 132private 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)
29public abstract Task<ImmutableArray<SyntaxNode>> GetReplacementMembersAsync( 36public 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( 293private static async Task<Solution> ReplaceDefinitionsWithMethodsAsync( 315private static async Task<MultiDictionary<DocumentId, IPropertySymbol>> GetDefinitionsByDocumentIdAsync( 343private static async Task<Solution> ReplaceDefinitionsWithMethodsAsync( 393private static async Task<ImmutableArray<(IPropertySymbol property, SyntaxNode declaration)>> GetCurrentPropertiesAsync( 415private static async Task<SyntaxNode?> GetPropertyDeclarationAsync(
SemanticSearch\ISemanticSearchQueryService.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)
29public async Task<Document> UpdateQueryDocumentAsync(string? query, string? targetLanguage, CancellationToken cancellationToken)
Shared\Extensions\DocumentExtensions.cs (8)
20public static async Task<Document> ReplaceNodeAsync<TNode>(this Document document, TNode oldNode, TNode newNode, CancellationToken cancellationToken) 42public static async Task<Document> ReplaceNodesAsync(this Document document, 52public static async Task<ImmutableArray<T>> GetUnionItemsFromDocumentAndLinkedDocumentsAsync<T>( 55Func<Document, Task<ImmutableArray<T>>> getItemsWorker) 71public static async Task<bool> IsValidContextForDocumentOrLinkedDocumentsAsync( 73Func<Document, CancellationToken, Task<bool>> contextChecker, 94public static async Task<NamingRule> GetApplicableNamingRuleAsync(this Document document, ISymbol symbol, CancellationToken cancellationToken) 106public 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)
33public abstract Task<string?> GetContainingClassNameAsync(Document document, int position, CancellationToken cancellationToken); 39public static async Task<string?> GetSimplifiedTypeNameAsync(Document document, TextSpan fieldSpan, string fullyQualifiedTypeName, SimplifierOptions simplifierOptions, CancellationToken cancellationToken) 57public async Task<string?> GetSwitchExpansionAsync(Document document, TextSpan caseGenerationLocation, TextSpan switchExpressionLocation, SimplifierOptions simplifierOptions, CancellationToken cancellationToken) 121protected abstract Task<ITypeSymbol?> GetEnumSymbolAsync(Document document, TextSpan switchExpressionSpan, CancellationToken cancellationToken); 123protected abstract Task<(Document, TextSpan)> GetDocumentWithEnumCaseAsync(Document document, string fullyQualifiedTypeName, string firstEnumMemberName, TextSpan caseGenerationLocation, CancellationToken cancellationToken); 125private async Task<string?> GetSimplifiedEnumNameAsync( 141private 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)
346? new Func<CancellationToken, Task<Solution>>(cancellationToken => FixAsync(document, methodToUpdate, argumentToInsert, arguments, fixAllReferences: true, cancellationToken)) 374private async Task<Solution> FixAsync( 402private async Task<(ITypeSymbol, RefKind)> GetArgumentTypeAndRefKindAsync(Document invocationDocument, TArgumentSyntax argument, CancellationToken cancellationToken) 411private 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)
301static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Document>> action, string equivalenceKey) 314private static async Task<Document> AddEditsAsync( 380private static Task<Document> TakeTopAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 383private static Task<Document> TakeBottomAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 386private static Task<Document> TakeBothAsync(Document document, int startPos, int firstMiddlePos, int secondMiddlePos, int endPos, CancellationToken cancellationToken) 392private async Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\ConvertToAsync\AbstractConvertToAsyncCodeFixProvider.cs (3)
18protected abstract Task<string> GetDescriptionAsync(Diagnostic diagnostic, SyntaxNode node, SemanticModel semanticModel, CancellationToken cancellationToken); 19protected abstract Task<(SyntaxTree syntaxTree, SyntaxNode root)?> GetRootInOtherSyntaxTreeAsync(SyntaxNode node, SemanticModel semanticModel, Diagnostic diagnostic, CancellationToken cancellationToken); 51private 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)
70private 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)
25protected 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)
36protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 44private 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 (4)
58public async Task<Document> ImplementInterfaceAsync( 78private async Task<ImplementInterfaceInfo?> AnalyzeAsync(Document document, SyntaxNode interfaceType, CancellationToken cancellationToken) 107private async Task<Document> ImplementInterfaceAsync( 146public async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode? interfaceType, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ImplementInterface\IImplementInterfaceService.cs (2)
25Task<Document> ImplementInterfaceAsync(Document document, ImplementTypeOptions options, SyntaxNode node, CancellationToken cancellationToken); 40Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
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)
106private async Task<Solution> FixNodeAsync( 158private async Task<Solution> RenameThenAddAsyncTokenAsync( 188private async Task<Solution> FixRelatedSignaturesAsync(
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)
102private Task<Document> FixAsync( 111private Task<Document> FixAllAsync(
src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
45private 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( 889async Task<bool> TryRemoveUnusedLocalAsync(TLocalDeclarationStatementSyntax newDecl, TLocalDeclarationStatementSyntax originalDecl) 913private 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\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (6)
71protected abstract Task<SyntaxNode> UpdatePropertyAsync( 104private async Task<Solution> ProcessResultAsync( 117private async Task<Solution> ProcessResultWorkerAsync( 280private static async Task<Solution> UpdateReferencesAsync( 359private async Task<(IFieldSymbol? fieldSymbol, IPropertySymbol? propertySymbol)> MapDiagnosticToCurrentSolutionAsync( 422private async Task<SyntaxNode> FormatAsync(
src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (3)
45public override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 49private async Task<Solution?> FixAllContextsHelperAsync(FixAllContext originalContext, ImmutableArray<FixAllContext> contexts) 95private static async Task<Solution> GetUpdatedSolutionAsync(
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)
16public 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)
14public override Task<IMethodSymbol?> TryGetBestMatchAsync(
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)
21Task<SymbolMappingResult?> MapSymbolAsync(Document document, SymbolKey symbolId, CancellationToken cancellationToken = default); 31Task<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)
21Task<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) 175public 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)
25public static async Task<ImmutableArray<ReferenceInfo>> GetUnusedReferencesAsync(
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)
89private 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)
173internal static async Task<Document?> TryGetCompileTimeDocumentAsync(
Wrapping\AbstractCodeActionComputer.cs (8)
81protected abstract Task<ImmutableArray<WrappingGroup>> ComputeWrappingGroupsAsync(CancellationToken cancellationToken); 83protected Task<string> GetSmartIndentationAfterAsync(SyntaxNodeOrToken nodeOrToken, CancellationToken cancellationToken) 86protected async Task<string> GetIndentationAfterAsync( 120protected async Task<WrapItemsAction?> TryCreateCodeActionAsync( 163private async Task<Document> FormatDocumentAsync( 172private async Task<(SyntaxNode root, SyntaxNode rewrittenRoot, TextSpan spanToFormat)> RewriteTreeAsync( 221private async Task<(SyntaxNode root, SyntaxNode rewrittenRoot, TextSpan spanToFormat)> RewriteTreeAsync( 271public 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 (2)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
168internal async Task<DebuggingSession> StartDebuggingSessionAsync( 509public 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 (77)
Interactive\Core\InteractiveHost.cs (11)
95internal async Task<RemoteService?> TryGetServiceAsync() 216private async Task<InitializedRemoteService> TryGetOrCreateRemoteServiceAsync() 269private async Task<RemoteExecutionResult> ExecuteRemoteAsync(string targetName, params object?[] arguments) 272private async Task<TResult> InvokeRemoteAsync<TResult>(string targetName, params object?[] arguments) 283private static async Task<RemoteExecutionResult> ExecuteRemoteAsync(RemoteService remoteService, string targetName, params object?[] arguments) 286private static async Task<TResult> InvokeRemoteAsync<TResult>(RemoteService remoteService, string targetName, params object?[] arguments) 330public async Task<RemoteExecutionResult> ResetAsync(InteractiveHostOptions options) 362public Task<RemoteExecutionResult> ExecuteAsync(string code) 377public Task<RemoteExecutionResult> ExecuteFileAsync(string path) 391public Task<bool> AddReferenceAsync(string reference) 400public Task<RemoteExecutionResult> SetPathsAsync(ImmutableArray<string> referenceSearchPaths, ImmutableArray<string> sourceSearchPaths, string baseDirectory)
Interactive\Core\InteractiveHost.LazyRemoteService.cs (3)
54internal Task<InitializedRemoteService> GetInitializedServiceAsync() 60private async Task<InitializedRemoteService> TryStartAndInitializeProcessAsync(CancellationToken cancellationToken) 133private 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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
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 (40)
BrokeredServices\BrokeredServiceContainer.cs (1)
37internal 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)
37private async Task<string> GetDotnetSdkFolderFromDotnetExecutableAsync(string projectOutputDirectory, CancellationToken cancellationToken) 116public async Task<string> GetVsTestConsolePathAsync(string projectOutputDirectory, CancellationToken cancellationToken)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (1)
116protected override async Task<RemoteProjectLoadResult?> TryLoadProjectInMSBuildHostAsync(
FileBasedPrograms\VirtualProjectXmlDiagnosticSourceProvider.cs (1)
39public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
FileBasedPrograms\VirtualProjectXmlProvider.cs (2)
47internal async Task<(string VirtualProjectXml, ImmutableArray<SimpleDiagnostic> Diagnostics)?> GetVirtualProjectContentAsync(string documentFilePath, ILogger logger, CancellationToken cancellationToken) 81private async Task<(string VirtualProjectXml, ImmutableArray<SimpleDiagnostic> Diagnostics)?> GetVirtualProjectContentImplAsync(string documentFilePath, ILogger logger, CancellationToken cancellationToken)
HostWorkspace\LanguageServerProjectLoader.cs (3)
200protected abstract Task<RemoteProjectLoadResult?> TryLoadProjectInMSBuildHostAsync( 212private async Task<bool> ReloadProjectAsync(ProjectToLoad projectToLoad, ToastErrorReporter toastErrorReporter, BuildHostProcessManager buildHostProcessManager, CancellationToken cancellationToken) 340async Task<(LoadedProject, bool alreadyExists)> GetOrCreateProjectTargetAsync(ImmutableArray<LoadedProject> previousProjectTargets, ProjectSystemProjectFactory projectFactory, ProjectFileInfo loadedProjectInfo)
HostWorkspace\LanguageServerProjectSystem.cs (1)
83protected override async Task<RemoteProjectLoadResult?> TryLoadProjectInMSBuildHostAsync(
HostWorkspace\ProjectInitializationHandler.cs (1)
65private async Task<bool> TrySubscribeAsync(CancellationToken cancellationToken)
HostWorkspace\ProjectTelemetry\ProjectLoadTelemetryReporter.cs (1)
133private 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)
38public async Task<IWorkspaceProject> CreateAndAddProjectAsync(WorkspaceProjectCreationInfo creationInfo, CancellationToken _) 68public 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)
LanguageServer\RazorDynamicDocumentSyncRegistration.cs (1)
85private static async Task<bool> IsCohostingEnabledAsync(IClientLanguageServerManager languageServerManager, CancellationToken cancellationToken)
LanguageServerExportProviderBuilder.cs (2)
33public static async Task<ExportProvider> CreateExportProviderAsync( 83protected 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)
63internal static async Task<CompletionProvider?> GetCompletionProviderAsync(CancellationToken cancellationToken) 139private static async Task<CompletionProvider> CreateCompletionProviderAsync(MethodInfo createCompletionProviderMethodInfo, IServiceBroker serviceBroker, string modelBasePath, ILogger logger) 146var 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 (196)
Extensions\Extensions.cs (1)
209public static async Task<int> GetPositionFromLinePositionAsync(this TextDocument document, LinePosition linePosition, CancellationToken cancellationToken)
Extensions\ProtocolConversions.cs (9)
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(IEnumerable<DocumentId> changedDocuments, Solution newSolution, 457public static Task<LSP.Location?> TextSpanToLocationAsync( 466public static async Task<LSP.Location?> TextSpanToLocationAsync( 507static async Task<LSP.Location> ConvertTextSpanToLocationAsync( 854public static async Task<SyntaxFormattingOptions> GetFormattingOptionsAsync(
ExternalAccess\Razor\FormatNewFileHandler.cs (2)
39public async Task<string?> HandleRequestAsync(FormatNewFileParams request, RequestContext context, CancellationToken cancellationToken) 67internal 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)
30public async Task<Document> CleanupAsync( 102private static async Task<Document> RemoveSortUsingsAsync( 145private async Task<Document> ApplyCodeFixesAsync( 165private async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdsAsync( 184private async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync( 206private async Task<ImmutableArray<(string diagnosticId, string? title)>> GetThirdPartyDiagnosticIdsAndTitlesAsync( 232private 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)
51public Task<MetadataFile> ResolveAsync(IAssemblyReference name) 56public Task<MetadataFile> ResolveModuleAsync(MetadataFile mainModule, string moduleName)
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (1)
21public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Features\EditAndContinue\EditAndContinueDiagnosticSource_Workspace.cs (2)
23public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken) 30public 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)
24public static Task<LSP.WorkspaceEdit> GetCodeActionResolveEditsAsync(RequestContext context, CodeActionResolveData data, ImmutableArray<CodeActionOperation> operations, CancellationToken cancellationToken) 38public 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 (2)
45public Task<LSP.CodeLens[]?> HandleRequestAsync(LSP.CodeLensParams request, RequestContext context, CancellationToken cancellationToken) 48internal static async Task<LSP.CodeLens[]?> GetCodeLensAsync(LSP.TextDocumentIdentifier textDocumentIdentifier, Document document, IGlobalOptionService globalOptionService, CancellationToken cancellationToken)
Handler\CodeLens\CodeLensResolveHandler.cs (2)
36public Task<LSP.CodeLens> HandleRequestAsync(LSP.CodeLens request, RequestContext context, CancellationToken cancellationToken) 42internal static async Task<LSP.CodeLens> ResolveCodeLensAsync(LSP.CodeLens request, Document document, 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)
37public static async Task<LSP.VSInternalCompletionList> ConvertToLspCompletionListAsync( 117async Task<LSP.CompletionItem> CreateLSPCompletionItemAsync(CompletionItem item, string typedText, int index) 327private static async Task<LSP.CompletionItem> CreateItemAndPopulateTextEditAsync( 377private static async Task<LSP.CompletionItem> CreateVsItemAndPopulateTextEditAsync( 538public static async Task<LSP.TextEdit[]?> GenerateAdditionalTextEditForImportCompletionAsync( 564private static async Task<CompletionChange> GetCompletionChangeOrDisplayNameInCaseOfExceptionAsync(CompletionService completionService, Document document, CompletionItem completionItem, CancellationToken cancellationToken) 577public static Task<LSP.CompletionItem> ResolveAsync( 593private static async Task<LSP.CompletionItem> DefaultResolveAsync( 643private static async Task<LSP.CompletionItem> VsResolveAsync( 683public static async Task<(LSP.TextEdit edit, bool isSnippetString, int? newPosition)> GenerateComplexTextEditAsync(
Handler\Configuration\DidChangeConfigurationNotificationHandler.cs (1)
120private 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)
151public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Handler\Diagnostics\DiagnosticSources\AbstractDocumentDiagnosticSource.cs (1)
19public abstract Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\AbstractProjectDiagnosticSource.cs (3)
27public abstract Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken); 41public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync( 63public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (2)
35public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync( 90public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\DocumentDiagnosticSource.cs (1)
18public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\IDiagnosticSource.cs (1)
23Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\NonLocalDocumentDiagnosticSource.cs (1)
17public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticSources\TaskListDiagnosticSource.cs (1)
32public override async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(
Handler\Diagnostics\DiagnosticsPullCache.cs (2)
36public override async Task<(int globalStateVersion, Checksum dependentChecksum)> ComputeVersionAsync(DiagnosticsRequestState state, CancellationToken cancellationToken) 42public 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)
24protected static async Task<LSP.TextEdit[]?> GetTextEditsAsync( 63public 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 (4)
45public abstract Task<TVersion> ComputeVersionAsync(TState state, CancellationToken cancellationToken); 53public abstract Task<TComputedData> ComputeDataAsync(TState state, CancellationToken cancellationToken); 64public async Task<(string ResultId, TComputedData Data)?> GetOrComputeNewDataAsync( 88private 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)
30public Task<WorkspaceEdit?> HandleRequestAsync(RenameParams request, RequestContext context, CancellationToken cancellationToken) 33internal static async Task<WorkspaceEdit?> GetRenameEditAsync(Document document, LinePosition linePosition, string newName, CancellationToken cancellationToken)
Handler\RequestContext.cs (1)
223public 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)
25internal static async Task<int[]> HandleRequestHelperAsync( 56public static async Task<int[]> HandleRequestHelperAsync( 80public 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 (2)
19public override async Task<(SourceGeneratorExecutionVersion, VersionStamp)> ComputeVersionAsync(SourceGeneratedDocumentGetTextState state, CancellationToken cancellationToken) 33public 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 (2)
21public override async Task<(Checksum parseOptionsChecksum, Checksum textChecksum)> ComputeVersionAsync(SpellCheckState state, CancellationToken cancellationToken) 38public override async Task<ImmutableArray<SpellCheckSpan>> ComputeDataAsync(SpellCheckState state, CancellationToken cancellationToken)
Handler\Symbols\DocumentSymbolsHandler.cs (2)
40public Task<SumType<DocumentSymbol[], SymbolInformation[]>> HandleRequestAsync( 51internal 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\Testing\WaitForAsyncOperationsHandler.cs (1)
42public async Task<WaitForAsyncOperationsResponse> HandleRequestAsync(WaitForAsyncOperationsParams request, RequestContext context, 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)
22Task<TResponse> HandleRequestAsync(TRequest request, TRequestContext context, CancellationToken cancellationToken); 33Task<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)
226public async Task<(Workspace?, Solution?)> GetLspSolutionInfoAsync(CancellationToken cancellationToken) 244public async Task<(Workspace?, Solution?, TextDocument?)> GetLspDocumentInfoAsync(TextDocumentIdentifier textDocumentIdentifier, CancellationToken cancellationToken) 321private async Task<ImmutableArray<(Workspace workspace, Solution Solution, bool IsForked)>> GetLspSolutionsAsync(CancellationToken cancellationToken) 346async Task<(Solution Solution, bool IsForked)> GetLspSolutionForWorkspaceAsync(Workspace workspace, CancellationToken cancellationToken) 509private 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 (106)
CodeActions\CodeActionResolveTests.cs (1)
514private 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)
446var firstDocumentResult2 = Assert.ThrowsAsync<StreamJsonRpc.RemoteInvocationException>(async () => await testLspServer.ExecuteRequestAsync<LSP.CodeLens, LSP.CodeLens>(LSP.Methods.CodeLensResolveName, firstCodeLens, CancellationToken.None));
Commands\ExecuteWorkspaceCommandTests.cs (1)
70public override Task<object> HandleRequestAsync(ExecuteCommandParams request, RequestContext context, CancellationToken cancellationToken)
Completion\CompletionFeaturesTests.cs (3)
605internal override async Task<CodeAnalysis.Completion.CompletionList> GetCompletionsAsync( 906internal override async Task<CodeAnalysis.Completion.CompletionList> GetCompletionsAsync( 916public override Task<CompletionChange> GetChangeAsync(Document document, CodeAnalysis.Completion.CompletionItem item, char? commitCharacter = null, CancellationToken cancellationToken = default)
Completion\CompletionResolveTests.cs (6)
396private static async Task<LSP.CompletionItem> RunResolveCompletionItemAsync(TestLspServer testLspServer, LSP.CompletionItem completionItem) 459private static async Task<T> GetCompletionItemToResolveAsync<T>( 478private static async Task<LSP.CompletionList> RunGetCompletionsAsync( 508internal override Task<CodeAnalysis.Completion.CompletionList> GetCompletionsAsync(Document document, 516public override Task<CompletionChange> GetChangeAsync( 538internal override Task<CompletionDescription> GetDescriptionAsync(Document document, CodeAnalysis.Completion.CompletionItem item, CodeAnalysis.Completion.CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default)
Completion\CompletionTests.cs (1)
1601internal 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)
377private static async Task<LSP.Location[]> RunGotoDefinitionAsync(TestLspServer testLspServer, LSP.Location caret)
Definitions\GoToTypeDefinitionTests.cs (2)
288private static async Task<LSP.Location[]> RunGotoTypeDefinitionAsync(TestLspServer testLspServer, LSP.Location caret) 294private 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\AdditionalFileDiagnosticsTests.cs (1)
242public Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Diagnostics\DiagnosticsPullCacheTests.cs (1)
121public override Task<ImmutableArray<DiagnosticData>> GetDiagnosticsAsync(RequestContext context, CancellationToken cancellationToken)
Diagnostics\PullDiagnosticTests.cs (5)
2071var resultTask = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, triggerConnectionClose: false); 2099var resultTask = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, triggerConnectionClose: false); 2128var resultTask = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, triggerConnectionClose: false); 2155var resultTaskOne = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, category: PullDiagnosticCategories.WorkspaceDocumentsAndProject, triggerConnectionClose: false); 2156var resultTaskTwo = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, category: PullDiagnosticCategories.EditAndContinue, triggerConnectionClose: false);
DocumentChanges\DocumentChangesTests.cs (1)
428private async Task<(TestLspServer, LSP.Location, string)> GetTestLspServerAndLocationAsync(string source, bool mutatingLspWorkspace)
DocumentChanges\DocumentChangesTests.LinkedDocuments.cs (1)
104private static async Task<Solution> GetLSPSolutionAsync(TestLspServer testLspServer, DocumentUri uri)
FoldingRanges\FoldingRangesTests.cs (1)
80private static async Task<LSP.FoldingRange[]> RunGetFoldingRangeAsync(TestLspServer testLspServer)
FormatNewFile\FormatNewFileTests.cs (1)
64private static async Task<string?> RunHandlerAsync(TestLspServer testLspServer, string newFilePath, string input)
Formatting\FormatDocumentRangeTests.cs (1)
83private static async Task<LSP.TextEdit[]> RunFormatDocumentRangeAsync(
Formatting\FormatDocumentTests.cs (1)
308private static async Task<LSP.TextEdit[]?> RunFormatDocumentAsync(
HandlerTests.cs (11)
156var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 184var response = Task.FromException<TestConfigurableResponse>(new StreamJsonRpc.LocalRpcException(nameof(HandlerTests)) { ErrorCode = LspErrorCodes.ContentModified }); 212var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 242var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 270var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 319public Task<string> HandleRequestAsync(TestRequestTypeOne request, RequestContext context, CancellationToken cancellationToken) 341public Task<string> HandleRequestAsync(TestRequestTypeOne request, RequestContext context, CancellationToken cancellationToken) 358public Task<string> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken) 441public Task<string> HandleRequestAsync(TestRequestTypeOne request, RequestContext context, CancellationToken cancellationToken) 465public Task<string> HandleRequestAsync(TestRequestTypeTwo request, RequestContext context, CancellationToken cancellationToken) 484public Task<string> HandleRequestAsync(RequestContext context, CancellationToken cancellationToken)
Highlights\DocumentHighlightTests.cs (1)
101private static async Task<LSP.DocumentHighlight[]> RunGetDocumentHighlightAsync(TestLspServer testLspServer, LSP.Location caret)
Hover\HoverTests.cs (1)
603private static async Task<LSP.Hover> RunGetHoverAsync(
Initialize\LocaleTests.cs (1)
96public Task<Response> HandleRequestAsync(Request request, RequestContext context, CancellationToken cancellationToken)
InlineCompletions\InlineCompletionsTests.cs (2)
243var document = testLspServer.GetDocumentAsync(locationTyped.DocumentUri); 256private static async Task<LSP.VSInternalInlineCompletionList> GetInlineCompletionsAsync(
MapCode\MapCodeTests.cs (1)
34public async Task<ImmutableArray<TextChange>?> MapCodeAsync(
Metadata\LspMetadataAsSourceWorkspaceTests.cs (1)
120private static async Task<Workspace> GetWorkspaceForDocument(TestLspServer testLspServer, DocumentUri fileUri)
OnAutoInsert\OnAutoInsertTests.cs (2)
343Task<TestLspServer> testLspServerTask; 382private 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)
153var longRunningWaitable = waitables[0]; 267private static async Task<Solution?> GetLSPSolution(TestLspServer testLspServer, string methodName) 282private static async Task<TestResponse[]> TestAsync(TestLspServer testLspServer, TestRequest[] requests) 296private static List<Task<TestResponse?>> StartTestRun(TestLspServer testLspServer, TestRequest[] requests, CancellationToken cancellationToken = default) 298var waitables = new List<Task<TestResponse?>>();
ProjectContext\GetTextDocumentWithContextHandlerTests.cs (1)
106internal static async Task<LSP.VSProjectContextList?> RunGetProjectContext(TestLspServer testLspServer, DocumentUri uri)
ProtocolConversionsTests.cs (1)
339internal static async Task<TextDocument?> GetTextDocumentAsync(TestLspServer testLspServer, DocumentUri uri)
References\FindAllReferencesHandlerTests.cs (2)
397internal static async Task<LSP.VSInternalReferenceItem[]> RunFindAllReferencesAsync(TestLspServer testLspServer, LSP.Location caret, BufferedProgress<object>? progress = null) 414internal static async Task<LSP.Location[]> RunFindAllReferencesNonVSAsync(TestLspServer testLspServer, LSP.Location caret, BufferedProgress<object>? progress = null)
References\FindImplementationsTests.cs (1)
164private 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)
102private static async Task<LSP.Range?> RunPrepareRenameAsync(TestLspServer testLspServer, LSP.PrepareRenameParams prepareRenameParams)
Rename\RenameTests.cs (1)
382private static async Task<WorkspaceEdit> RunRenameAsync(TestLspServer testLspServer, LSP.RenameParams renameParams)
SemanticTokens\AbstractSemanticTokensTests.cs (3)
29private protected static async Task<LSP.SemanticTokens> RunGetSemanticTokensFullAsync(TestLspServer testLspServer, LSP.Location caret) 37private protected static async Task<LSP.SemanticTokens> RunGetSemanticTokensRangeAsync(TestLspServer testLspServer, LSP.Location location) 45private 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)
50private static async Task<TextEdit[]?> RunRenameAsync(TestLspServer testLspServer, SimplifyMethodParams @params)
SpellCheck\SpellCheckTests.cs (2)
611private static async Task<VSInternalSpellCheckableRangeReport[]> RunGetDocumentSpellCheckSpansAsync( 634private 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)
TestSourceGeneratedDocumentSpanMappingService.cs (2)
31public Task<ImmutableArray<MappedTextChange>> GetMappedTextChangesAsync(SourceGeneratedDocument oldDocument, SourceGeneratedDocument newDocument, CancellationToken cancellationToken) 36public Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(SourceGeneratedDocument document, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken)
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)
710private static async Task<Document> OpenDocumentAndVerifyLspTextAsync(DocumentUri documentUri, TestLspServer testLspServer, string openText = "LSP text") 726private static async Task<(Workspace? workspace, Document? document)> GetLspWorkspaceAndDocumentAsync(DocumentUri uri, TestLspServer testLspServer) 732private static Task<(Workspace?, Solution?)> GetLspHostWorkspaceAndSolutionAsync(TestLspServer testLspServer)
Workspaces\SourceGeneratedDocumentTests.cs (1)
379private async Task<TestLspServer> CreateTestLspServerWithGeneratorAsync(
Microsoft.CodeAnalysis.LanguageServer.UnitTests (14)
TelemetryReporterTests.cs (1)
15private async Task<ITelemetryReporter> CreateReporterAsync()
Utilities\AbstractLanguageServerClientTests.cs (1)
33private protected async Task<TestLspClient> CreateCSharpLanguageServerAsync(
Utilities\AbstractLanguageServerClientTests.TestLspClient.cs (2)
34internal static async Task<TestLspClient> CreateAsync( 191public 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) 45internal static async Task<TestLspServer> CreateAsync(ClientCapabilities clientCapabilities, ILoggerFactory loggerFactory, string cacheDirectory, bool includeDevKitComponents = true, string[]? extensionPaths = null) 88public 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)
15public static async Task<InitializeResult?> Initialize(this ILspClient lspClient, ClientCapabilities clientCapabilities) 23public static async Task<VSInternalCodeAction[]> RunGetCodeActionsAsync( 32public static async Task<VSInternalCodeAction> RunGetCodeActionResolveAsync(
VirtualProjectXmlProviderTests.cs (1)
44private async Task<VirtualProjectXmlProvider> GetProjectXmlProviderAsync()
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (185)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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.PublicApiAnalyzers (98)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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.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)
48public 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)
37private readonly Task<Solution> _disconnectedSolutionTask; 44private Task<Solution>? _primaryBranchTask; 56Func<CancellationToken, Task<Solution>> computeDisconnectedSolutionAsync) 85public Task<Solution> PreferredSolutionTask_NoLock 104public void TryKickOffPrimaryBranchWork_NoLock(Func<Solution, CancellationToken, Task<Solution>> updatePrimaryBranchAsync) 134async Task<Solution> ComputePrimaryBranchAsync(CancellationToken cancellationToken)
Host\RemoteWorkspace.SolutionCreator.cs (8)
35public async Task<Solution> CreateSolutionAsync(Checksum newSolutionChecksum, CancellationToken cancellationToken) 148private async Task<Solution> UpdateProjectsAsync( 232private async Task<Solution> UpdateProjectsAsync( 340private async Task<Solution> UpdateProjectAsync(Project project, ProjectStateChecksums oldProjectChecksums, ProjectStateChecksums newProjectChecksums, CancellationToken cancellationToken) 425private async Task<Project> UpdateDocumentsAsync<TDocumentState>( 472private async Task<Project> UpdateDocumentsAsync( 536private async Task<Project> UpdateDocumentAsync( 568private 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)
82public static Task<DiagnosticAnalysisResults> GetDiagnosticsAsync( 123private async Task<DiagnosticAnalysisResults> GetDiagnosticsAsync( 168private async Task<DiagnosticAnalysisResults> AnalyzeAsync( 324private async Task<(CompilationWithAnalyzersPair? compilationWithAnalyzers, BidirectionalMap<string, DiagnosticAnalyzer> projectAnalyzerToIdMap, BidirectionalMap<string, DiagnosticAnalyzer> hostAnalyzerToIdMap)> GetOrCreateCompilationWithAnalyzersAsync(CancellationToken cancellationToken) 329async Task<CompilationWithAnalyzersCacheEntry> GetOrCreateCacheEntryAsync() 357private async Task<CompilationWithAnalyzersCacheEntry> CreateCompilationWithAnalyzersCacheEntryAsync(CancellationToken cancellationToken) 432private 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 (98)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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.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)
303var task = (state == null)
Script.cs (19)
164internal Task<object> EvaluateAsync(object globals = null, CancellationToken cancellationToken = default(CancellationToken)) 167internal abstract Task<object> CommonEvaluateAsync(object globals, CancellationToken cancellationToken); 178public Task<ScriptState> RunAsync(object globals, CancellationToken cancellationToken) 194public Task<ScriptState> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 197internal abstract Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken); 207public Task<ScriptState> RunFromAsync(ScriptState previousState, CancellationToken cancellationToken) 222public Task<ScriptState> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 225internal abstract Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken); 342private Func<object[], Task<T>> _lazyExecutor; 377internal override Task<object> CommonEvaluateAsync(object globals, CancellationToken cancellationToken) 380internal override Task<ScriptState> CommonRunAsync(object globals, Func<Exception, bool> catchException, CancellationToken cancellationToken) 383internal override Task<ScriptState> CommonRunFromAsync(ScriptState previousState, Func<Exception, bool> catchException, CancellationToken cancellationToken) 387private Func<object[], Task<T>> GetExecutor(CancellationToken cancellationToken) 454internal new Task<T> EvaluateAsync(object globals = null, CancellationToken cancellationToken = default(CancellationToken)) 468public new Task<ScriptState<T>> RunAsync(object globals, CancellationToken cancellationToken) 486public new Task<ScriptState<T>> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 529public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, CancellationToken cancellationToken) 546public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 574private 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>( 160return runtimeEntryPoint.CreateDelegate<Func<object[], Task<T>>>();
ScriptExecutionState.cs (2)
67internal async Task<TResult> RunSubmissionsAsync<TResult>( 112result = 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)
13internal static async Task<T> CastAsync<S, T>(this Task<S> task) where S : T 18internal 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 (25)
AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public 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.Workspaces (874)
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 (1)
29public static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
Classification\SemanticClassificationCacheUtilities.cs (1)
13public static async Task<(DocumentKey documentKey, Checksum checksum)> GetDocumentKeyAndChecksumAsync(
CodeActions\CodeAction.cs (46)
123static codeAction => new Func<CancellationToken, Task<IEnumerable<CodeActionOperation>>>(codeAction.ComputeOperationsAsync).Method.DeclaringType != typeof(CodeAction)); 131static codeAction => new Func<CancellationToken, Task<Solution?>>(codeAction.GetChangedSolutionAsync).Method.DeclaringType != typeof(CodeAction)); 232public Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync(CancellationToken cancellationToken) 238public Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync( 244private protected virtual async Task<ImmutableArray<CodeActionOperation>> GetOperationsCoreAsync( 260public Task<ImmutableArray<CodeActionOperation>> GetPreviewOperationsAsync(CancellationToken cancellationToken) 263internal async Task<ImmutableArray<CodeActionOperation>> GetPreviewOperationsAsync( 282protected virtual async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(CancellationToken cancellationToken) 298protected virtual async Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 323protected virtual async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 332protected virtual async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 344protected virtual async Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 361internal async Task<Solution> GetRequiredChangedSolutionAsync(IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken) 380protected virtual Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 396protected virtual Task<Document> GetChangedDocumentAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 402internal async Task<Solution?> GetChangedSolutionInternalAsync( 412internal Task<Document> GetChangedDocumentInternalAsync(CancellationToken cancellation) 422protected Task<ImmutableArray<CodeActionOperation>> PostProcessAsync(IEnumerable<CodeActionOperation> operations, CancellationToken cancellationToken) 426internal async Task<ImmutableArray<CodeActionOperation>> PostProcessAsync( 453protected Task<Solution> PostProcessChangesAsync(Solution changedSolution, CancellationToken cancellationToken) 465protected virtual async Task<Document> PostProcessChangesAsync(Document document, CancellationToken cancellationToken) 486public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey) 490internal static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey) 493/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?)"/> 496public static CodeAction Create(string title, Func<CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 499/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Document}}, string?, CodeActionPriority)"/> 501public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 520public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey) 531public static CodeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 534/// <inheritdoc cref="Create(string, Func{CancellationToken, Task{Solution}}, string?, CodeActionPriority)"/> 536public static CodeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey = null, CodeActionPriority priority = CodeActionPriority.Default) 540string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, string? equivalenceKey, CodeActionPriority priority, CodeActionCleanup cleanup) 652private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> _createChangedDocument; 653private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>>? _createChangedDocumentPreview; 657Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 658Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>>? createChangedDocumentPreview, 670Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 679Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Document>> createChangedDocument, 684protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 693protected sealed override Task<Document> GetChangedDocumentAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 699private readonly Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution; 705Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 718Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 728Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution, 734protected sealed override Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 755protected sealed override Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
CodeActions\CodeAction_Cleanup.cs (12)
44private static readonly Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>> s_cleanupSyntaxPass = 47private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_cleanupSyntaxPasses = [s_cleanupSyntaxPass]; 53private static readonly ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> s_allCleanupPasses = 71internal static Task<Document> CleanupSyntaxAsync(Document document, CodeCleanupOptions options, CancellationToken cancellationToken) 88internal static async Task<Solution> PostProcessChangesAsync( 110private static async Task<Solution> CleanSyntaxAndSemanticsAsync( 114ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes, 126async Task<ImmutableArray<(DocumentId documentId, CodeCleanupOptions codeCleanupOptions)>> GetDocumentIdsAndOptionsToCleanAsync() 163private static async Task<Solution> RunCleanupPassesInOrderAsync( 167ImmutableArray<Func<Document, CodeCleanupOptions, CancellationToken, Task<Document>>> passes, 179async Task<Solution> RunParallelCleanupPassAsync( 180Solution 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)
222public async Task<ImmutableArray<Diagnostic>> GetDocumentDiagnosticsAsync(Document document) 234var getDiagnosticsTask = State.DiagnosticProvider.GetDocumentDiagnosticsAsync(document, this.CancellationToken); 238private static async Task<ImmutableArray<Diagnostic>> GetFilteredDiagnosticsAsync( 239Task<IEnumerable<Diagnostic>> getDiagnosticsTask, 259internal async Task<ImmutableArray<Diagnostic>> GetDocumentSpanDiagnosticsAsync(Document document, TextSpan filterSpan) 271var getDiagnosticsTask = State.DiagnosticProvider is FixAllContext.SpanBasedDiagnosticProvider spanBasedDiagnosticProvider 280public Task<ImmutableArray<Diagnostic>> GetProjectDiagnosticsAsync(Project project) 294public Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(Project project) 309private async Task<ImmutableArray<Diagnostic>> GetProjectDiagnosticsAsync(Project project, bool includeAllDocumentDiagnostics) 318var getDiagnosticsTask = includeAllDocumentDiagnostics 344internal Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync() 347internal 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\FixAllProvider.cs (7)
42public abstract Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext); 55public static FixAllProvider Create(Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync) 75Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync, 82Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync, 99Task<CodeAction?> IFixAllProvider.GetFixAsync(IFixAllContext fixAllContext) 104Func<FixAllContext, Document, ImmutableArray<Diagnostic>, Task<Document?>> fixAllAsync, 110protected 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)
70public 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) 50private static Task<Solution?> GetDocumentFixesAsync<TFixAllContext>( 52Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 56private static Task<Solution?> GetProjectFixesAsync<TFixAllContext>( 58Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync) 62private static Task<Solution?> GetSolutionFixesAsync<TFixAllContext>( 64Func<TFixAllContext, ImmutableArray<TFixAllContext>, Task<Solution?>> fixAllContextsAsync)
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (2)
23public static async Task<Solution?> FixAllContextsAsync<TFixAllContext>( 60async Task<Solution> GetInitialUncleanedSolutionAsync(Solution originalSolution)
CodeFixesAndRefactorings\IFixAllProvider.cs (1)
26Task<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)
94public Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetFixAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\FixAllOccurences\FixAllProvider.cs (7)
35public abstract Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext); 38Task<CodeAction?> IFixAllProvider.GetFixAsync(IFixAllContext fixAllContext) 53public static FixAllProvider Create(Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync) 73Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync, 80Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync, 97Func<FixAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> fixAllAsync, 103protected 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)
37protected Task<Document> FixAsync( 48protected Task<Document> FixAllAsync( 65internal static async Task<Document> FixAllWithEditorAsync(
Diagnostics\CompilationWithAnalyzersPair.cs (5)
50public Task<AnalyzerTelemetryInfo> GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 63public async Task<AnalysisResultPair?> GetAnalysisResultAsync(CancellationToken cancellationToken) 75public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 87public async Task<AnalysisResultPair?> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken) 99public async Task<AnalysisResultPair?> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> projectAnalyzers, ImmutableArray<DiagnosticAnalyzer> hostAnalyzers, CancellationToken cancellationToken)
Diagnostics\DiagnosticData.cs (1)
155public 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( 327public static async Task<(AnalysisResultPair? analysisResult, ImmutableArray<Diagnostic> additionalDiagnostics)> GetAnalysisResultAsync( 340private static async Task<AnalysisResultPair?> GetAnalysisResultAsync( 375private static async Task<ImmutableArray<Diagnostic>> GetPragmaSuppressionAnalyzerDiagnosticsAsync( 472public static Task<Checksum> GetDiagnosticChecksumAsync(this Project? project, CancellationToken cancellationToken) 485static async Task<Checksum> ComputeDiagnosticChecksumAsync(Project project, CancellationToken cancellationToken) 517public 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)
28public abstract Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 669protected virtual Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 675public sealed override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 727protected 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)
164private async Task<ImmutableArray<(ISymbol symbol, SymbolGroup group)>> ReportGroupsSeriallyAsync( 206private 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)
119public Task<ImmutableArray<ISymbol>> FindAsync( 130public async Task<ImmutableArray<ISymbol>> FindAsync( 143private Task<ImmutableArray<ISymbol>> FindCoreAsync( 168private async Task<ImmutableArray<ISymbol>> FuzzyFindAsync( 214private 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)
34public static Task<SymbolTreeInfo> GetInfoForSourceAssemblyAsync( 53public static async Task<SymbolTreeInfo?> LoadAnyInfoForSourceAssemblyAsync( 71public static Task<Checksum> GetSourceSymbolsChecksumAsync(Project project, CancellationToken cancellationToken) 82private 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)
47public static Task<Document> FormatAsync(Document document, OptionSet? options = null, CancellationToken cancellationToken = default) 52internal static Task<Document> FormatAsync(Document document, SyntaxFormattingOptions options, CancellationToken cancellationToken) 63public static Task<Document> FormatAsync(Document document, TextSpan span, OptionSet? options = null, CancellationToken cancellationToken = default) 68internal static Task<Document> FormatAsync(Document document, TextSpan span, SyntaxFormattingOptions options, CancellationToken cancellationToken) 79public static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, OptionSet? options = null, CancellationToken cancellationToken = default) 91internal static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, SyntaxFormattingOptions? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 107public static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, OptionSet? options = null, CancellationToken cancellationToken = default) 116internal static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 119internal static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 122internal static async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, OptionSet? optionSet, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 353public 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);
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)
22internal async Task<LinkedFileMergeSessionResult> MergeDiffsAsync(CancellationToken cancellationToken) 91private async Task<LinkedFileMergeResult> MergeLinkedDocumentGroupAsync( 135private 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)
58public static async Task<Solution> UpdateSolutionAsync(
Rename\ConflictEngine\ConflictResolver.cs (3)
47internal static async Task<ConflictResolution> ResolveLightweightConflictsAsync( 89internal static async Task<ConflictResolution> ResolveSymbolicLocationConflictsInCurrentProcessAsync( 108private static Task<MutableConflictResolution> ResolveMutableConflictsAsync(
Rename\ConflictEngine\ConflictResolver.Session.cs (6)
89public async Task<MutableConflictResolution> ResolveConflictsAsync() 306private async Task<bool> IdentifyConflictsAsync( 488private async Task<bool> CheckForConflictAsync( 654private async Task<ISymbol> GetRenamedSymbolInCurrentSolutionAsync(MutableConflictResolution conflictResolution) 679private async Task<(ImmutableHashSet<DocumentId> documentIds, ImmutableArray<string> possibleNameConflicts)> FindDocumentsAndPossibleNameConflictsAsync() 754private async Task<Solution> AnnotateAndRename_WorkerAsync(
Rename\ConflictEngine\MutableConflictResolution.cs (1)
62internal async Task<Solution> RemoveAllRenameAnnotationsAsync(
Rename\ConflictEngine\RenamedSpansTracker.cs (1)
146internal async Task<Solution> SimplifyAsync(
Rename\IRemoteRenamerService.cs (3)
117internal static async Task<SymbolicRenameLocations?> TryRehydrateAsync( 182public async Task<ConflictResolution> RehydrateAsync(Solution oldSolution, CancellationToken cancellationToken) 243public 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, 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( 184private 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)
31private static async Task<bool> ShouldIncludeSymbolAsync( 136private static async Task<bool> IsPropertyAccessorOrAnOverrideAsync( 161public static async Task<ImmutableArray<RenameLocation>> GetRenamableDefinitionLocationsAsync( 245internal static async Task<IEnumerable<RenameLocation>> GetRenamableReferenceLocationsAsync( 325internal 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)
43public Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken) 72static 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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (3)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 113static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetSpanDiagnosticsAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
265public 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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)
35public Task<ITemporaryStorageTextHandle> WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 77public 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\ISourceGeneratedDocumentSpanMappingService.cs (2)
16Task<ImmutableArray<MappedTextChange>> GetMappedTextChangesAsync(SourceGeneratedDocument oldDocument, SourceGeneratedDocument newDocument, CancellationToken cancellationToken); 18Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(SourceGeneratedDocument document, ImmutableArray<TextSpan> spans, 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\DocumentService\SpanMappingHelper.cs (1)
25public static async Task<ImmutableArray<MappedSpanResult>?> TryGetMappedSpanResultAsync(Document document, ImmutableArray<TextSpan> textSpans, 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)
667public override Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
271var isFullyLoadedTask = workspaceStatusService.IsFullyLoadedAsync(CancellationToken.None);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
100public 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)
126private async Task<Dictionary<ImmutableArray<byte>, DocumentId>> ComputeContentHashToDocumentIdAsync(CancellationToken cancellationToken) 258private static async Task<VersionStamp> ComputeTopLevelChangeTextVersionAsync( 271private static async Task<VersionStamp> ComputeLatestDocumentTopLevelChangeVersionAsync(TextDocumentStates<DocumentState> documentStates, TextDocumentStates<AdditionalDocumentState> additionalDocumentStates, CancellationToken cancellationToken) 610public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken) 613public 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)
1502internal Task<Solution> WithFrozenPartialCompilationsAsync(CancellationToken cancellationToken) 1566internal 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 (4)
31private async Task<(Compilation compilationWithGeneratedFiles, CompilationTrackerGeneratorInfo nextGeneratorInfo)> AddExistingOrComputeNewGeneratorInfoAsync( 97private async Task<bool> HasRequiredGeneratorsAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 103private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments)?> TryComputeNewGeneratorInfoInRemoteProcessAsync( 259private 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)
110public async Task<Compilation> GetCompilationAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 153public Task<VersionStamp> GetDependentVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 156public Task<VersionStamp> GetDependentSemanticVersionAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 191public Task<bool> HasSuccessfullyLoadedAsync( 235public Task<MetadataReference?> GetOrBuildSkeletonReferenceAsync(SolutionCompilationState compilationState, MetadataReferenceProperties properties, CancellationToken cancellationToken)
Workspace\Solution\SolutionCompilationState_Checksum.cs (5)
59public Task<SolutionCompilationStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 62public async Task<Checksum> GetChecksumAsync(CancellationToken cancellationToken) 69public async Task<(SolutionCompilationStateChecksums checksums, ProjectCone projectCone)> GetStateChecksumsAsync( 96public async Task<Checksum> GetChecksumAsync(ProjectId projectId, CancellationToken cancellationToken) 102private async Task<(SolutionCompilationStateChecksums checksums, ProjectCone? projectCone)> ComputeChecksumsAsync(
Workspace\Solution\SolutionCompilationState_SourceGenerators.cs (3)
105public async Task<bool> HasSourceGeneratorsAsync(ProjectId projectId, CancellationToken cancellationToken) 111public async Task<SourceGeneratorPresence> GetProjectGeneratorPresenceAsync(ProjectId projectId, CancellationToken cancellationToken) 135static async Task<SourceGeneratorPresence> 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)
103public 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 (38)
MSBuild\BuildHostProcessManager.cs (5)
50public async Task<RemoteBuildHost> GetBuildHostWithFallbackAsync(string projectFilePath, CancellationToken cancellationToken) 60public async Task<(RemoteBuildHost buildHost, BuildHostProcessKind actualKind)> GetBuildHostWithFallbackAsync(BuildHostProcessKind buildHostKind, string projectOrSolutionFilePath, CancellationToken cancellationToken) 86public Task<RemoteBuildHost> GetBuildHostAsync(BuildHostProcessKind buildHostKind, CancellationToken cancellationToken) 91public async Task<RemoteBuildHost> GetBuildHostAsync(BuildHostProcessKind buildHostKind, string? projectOrSolutionFilePath, string? dotnetPath, CancellationToken cancellationToken) 105async Task<BuildHostProcess> NoLock_GetBuildHostAsync(BuildHostProcessKind buildHostKind, string? projectOrSolutionFilePath, string? dotnetPath, CancellationToken cancellationToken)
MSBuild\MSBuildProjectLoader.cs (2)
156public async Task<SolutionInfo> LoadSolutionInfoAsync( 222public async Task<ImmutableArray<ProjectInfo>> LoadProjectInfoAsync(
MSBuild\MSBuildProjectLoader.Worker.cs (6)
99private async Task<TResult> DoOperationAndReportProgressAsync<TResult>(ProjectLoadOperation operation, string? projectPath, string? targetFramework, Func<Task<TResult>> doFunc) 122public async Task<ImmutableArray<ProjectInfo>> LoadAsync(CancellationToken cancellationToken) 164private async Task<ImmutableArray<ProjectFileInfo>> LoadProjectFileInfosAsync(string projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken) 212private async Task<ImmutableArray<ProjectInfo>> LoadProjectInfosFromPathAsync( 267private Task<ProjectInfo> CreateProjectInfoAsync(ProjectFileInfo projectFileInfo, ProjectId projectId, bool addDiscriminator, CancellationToken cancellationToken)
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (4)
187private async Task<ResolvedReferences> ResolveReferencesAsync(ProjectId id, ProjectFileInfo projectFileInfo, CommandLineArguments commandLineArgs, CancellationToken cancellationToken) 268private async Task<bool> TryLoadAndAddReferenceAsync(ProjectId id, string projectReferencePath, ImmutableArray<string> aliases, ResolvedReferencesBuilder builder, CancellationToken cancellationToken) 341private async Task<bool> VerifyUnloadableProjectOutputExistsAsync(string projectPath, ResolvedReferencesBuilder builder, CancellationToken cancellationToken) 350private 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 (5)
28public Task<MSBuildLocation?> FindBestMSBuildAsync(string projectOrSolutionFilePath, CancellationToken cancellationToken) 37public Task<bool> HasUsableMSBuildAsync(string projectOrSolutionFilePath, CancellationToken cancellationToken) 40public async Task<RemoteProjectFile> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 52public async Task<RemoteProjectFile> LoadProjectAsync(string projectFilePath, string projectContent, string languageName, CancellationToken cancellationToken) 59public 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)
31Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken); 40Task<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)
156public Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 175private async Task<int> LoadProjectFileCoreAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 211public 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)
31Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken); 40Task<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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public 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)
966var getTextTask = doc.GetTextAsync();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (9)
Remote\InProcRemostHostClient.cs (2)
46public static async Task<InProcRemoteHostClient> GetTestClientAsync(Workspace workspace) 308public 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 (31)
BatchFixAllProviderTests.cs (1)
112private 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)
561static async Task<Project> MakeChangesToDocument(Project project) 1271static async Task<SourceGeneratedDocument> FreezeAndGetDocument(Project project, SourceGeneratedDocumentIdentity identity) 1308static async Task<SourceGeneratedDocument> FreezeAndGetDocument(Project project, SourceGeneratedDocumentIdentity identity) 1339static async Task<Solution> FreezeDocumentAndGetSolution(Project project, SourceGeneratedDocumentIdentity identity) 1374static 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 (9)
26var t = lazy.GetValueAsync(CancellationToken.None); 208var task = lazy.GetValueAsync(cancellationTokenSource.Token); 278Func<CancellationToken, Task<object>> asynchronousComputeFunction = 311Func<CancellationToken, Task<string>>? asynchronousComputation = null; 329var synchronousRequest = Task.Run(() => lazy.GetValue(CancellationToken.None)); 336var asynchronousRequestToBeCancelled = lazy.GetValueAsync(cancellationTokenSource.Token); 344var asynchronousRequest = lazy.GetValueAsync(CancellationToken.None); 396var asynchronousRequest = Task.Run(() => lazy.GetValueAsync(asynchronousRequestCancellationToken.Token)); 401var synchronousRequest = Task.Run(() => lazy.GetValue(CancellationToken.None));
Microsoft.CommonLanguageServerProtocol.Framework.Example (3)
ExampleRequestContextFactory.cs (1)
19public override Task<ExampleRequestContext> CreateRequestContextAsync<TRequestParam>(IQueueItem<ExampleRequestContext> queueItem, IMethodHandler methodHandler, TRequestParam requestParam, CancellationToken cancellationToken)
MultiRegisteringHandler.cs (2)
25Task<SemanticTokensDeltaPartialResult> IRequestHandler<DidOpenTextDocumentParams, SemanticTokensDeltaPartialResult, ExampleRequestContext>.HandleRequestAsync(DidOpenTextDocumentParams request, ExampleRequestContext context, CancellationToken cancellationToken) 31Task<SemanticTokensDeltaPartialResult> IRequestHandler<DidChangeTextDocumentParams, SemanticTokensDeltaPartialResult, ExampleRequestContext>.HandleRequestAsync(DidChangeTextDocumentParams request, ExampleRequestContext context, CancellationToken cancellationToken)
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)
22Task<TResponse> HandleRequestAsync(TRequest request, TRequestContext context, CancellationToken cancellationToken); 33Task<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) 94public async Task<int> WaitForShutdown() 99internal async Task<int> WaitForExit() 147internal async Task<InitializeResult> InitializeServerAsync() 169Task<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.Baselines.Tasks (16)
CreateUpdatePR.cs (1)
81private async Task<bool> ExecuteAsync()
PRCreator.cs (15)
42public async Task<bool> ExecuteAsync( 70private async Task<List<NewTreeItem>> FetchOriginalTreeItemsAsync( 151private async Task<List<NewTreeItem>> UpdateAllFilesAsync( 171private async Task<List<NewTreeItem>> UpdateExclusionFileAsync( 237private async Task<List<NewTreeItem>> UpdateRegularFilesAsync( 255private async Task<List<NewTreeItem>> UpdateFileAsync( 294private async Task<BlobReference> CreateBlobAsync(string content) 316private async Task<TreeResponse> CreateTreeFromItemsAsync(List<NewTreeItem> items, string path = "") 362private async Task<TreeResponse> CreateParentTreeAsync( 433private async Task<PullRequest?> GetExistingPullRequestAsync(string title, string targetBranch) 446private async Task<string> CreateCommitAsync(string newSha, string headSha, string commitMessage) 453private async Task<bool> ShouldMakeUpdatesAsync(string headSha, string commitSha) 490private async Task<string> GetHeadShaAsync(string branchName) 508private async Task<T> ApiRequestWithRetries<T>(Func<Task<T>> action)
Microsoft.DotNet.Build.Tasks.Feed (45)
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\ITargetChannelValidator.cs (1)
41Task<TargetChannelValidationResult> ValidateAsync(ProductConstructionService.Client.Models.Build build, TargetChannelConfig targetChannel);
src\ProductionChannelValidator.cs (7)
40public async Task<TargetChannelValidationResult> ValidateAsync(ProductConstructionService.Client.Models.Build build, TargetChannelConfig targetChannel) 149private async Task<AzureDevOpsBuildInfo> GetAzureDevOpsBuildInfoAsync(ProductConstructionService.Client.Models.Build build) 201private async Task<TargetChannelValidationResult> ValidateBranchIsProductionAsync(ProductConstructionService.Client.Models.Build build, AzureDevOpsBuildInfo buildInfo) 328Task<AzureDevOpsBuildInfo> GetBuildInfoAsync(string account, string project, int buildId); 333Task<BranchClassificationResponse> GetBranchClassificationsAsync(string organizationName, string projectId, string repositoryId); 391public async Task<AzureDevOpsBuildInfo> GetBuildInfoAsync(string account, string project, int buildId) 442public async Task<BranchClassificationResponse> GetBranchClassificationsAsync(string organizationName, string projectId, string repositoryId)
src\PublishArtifactsInManifest.cs (1)
291public async Task<bool> ExecuteAsync()
src\PublishArtifactsInManifestBase.cs (11)
252public abstract Task<bool> ExecuteAsync(); 261protected async Task<bool> ValidateTargetChannelAsync(ProductConstructionService.Client.Models.Build build, TargetChannelConfig targetChannel) 478private async Task<bool> PublishSymbolsUsingStreamingAsync( 495async Task<bool> PublishSymbolPackageWithDownload(BlobArtifactModel symbolAsset) 553private async Task<bool> PublishSymbolsFromBlobArtifactsAsync( 718Task<SymbolUploadHelper> CreatePublishSymbolHelper(string symbolPublishingExclusionsFile, bool publishSpecialClrFiles, bool dryRun) 781internal async Task<string> PrepLoosePdbsForPublish(string pdbArtifactsBasePath, SemaphoreSlim clientThrottle) 1019private async Task<IArtifactUrlHelper> CreateArtifactUrlHelper(HttpClient client, string artifactName) 1426public static async Task<NuGetFeedUploadPackageResult> NuGetFeedUploadPackageAsync(HttpClient httpClient, string feedName, string feedUri, Stream packageContentReadStream) 1493Func<string, string, HttpClient, MsBuildUtils.TaskLoggingHelper, Task<PackageFeedStatus>> CompareLocalPackageToFeedPackageCallBack = null, 1494Func<HttpClient, string, string, Stream, Task<NuGetFeedUploadPackageResult>> AttemptPushPackageCallback = null)
src\PublishArtifactsInManifestV3.cs (1)
53public override async Task<bool> ExecuteAsync()
src\PublishArtifactsInManifestV4.cs (1)
49public 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 (10)
PublishArtifactsInManifestTests.cs (6)
53public Task<TargetChannelValidationResult> ValidateAsync(ProductConstructionService.Client.Models.Build build, TargetChannelConfig targetChannel) 75public override Task<bool> ExecuteAsync() 80public new async Task<bool> ValidateTargetChannelAsync( 294Func<string, string, HttpClient, MsBuildUtils.TaskLoggingHelper, Task<PackageFeedStatus>> testCompareLocalPackage = async (string localPackageFullPath, string packageContentUrl, HttpClient client, MsBuildUtils.TaskLoggingHelper log) => 308Func<HttpClient, string, string, Stream, Task<NuGetFeedUploadPackageResult>> testPush = (_, feedName, feedUri, _) => 385public 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 (43)
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)
77protected override async Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken) 91protected override async Task<IReadOnlyList<ChatResponseUpdate>?> ReadCacheStreamingAsync(string key, CancellationToken cancellationToken)
ChatCompletion\FunctionInvokingChatClient.cs (4)
228public override async Task<ChatResponse> GetResponseAsync( 585private async Task<(bool ShouldTerminate, int NewConsecutiveErrorCount, IList<ChatMessage> MessagesAdded)> ProcessFunctionCallsAsync( 714private async Task<FunctionInvocationResult> ProcessFunctionCallAsync( 836private 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(
ChatCompletion\ReducingChatClient.cs (1)
31public override async Task<ChatResponse> GetResponseAsync(
ChatReduction\MessageCountingChatReducer.cs (1)
39public Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken)
ChatReduction\SummarizingChatReducer.cs (2)
75public async Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken) 120public async Task<SummarizedConversation> ResummarizeAsync(
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( 123protected abstract Task<TEmbedding?> ReadCacheAsync(string key, CancellationToken cancellationToken);
Embeddings\ConfigureOptionsEmbeddingGenerator.cs (1)
44public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(
Embeddings\DistributedCachingEmbeddingGenerator.cs (1)
76protected 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)
Image\ConfigureOptionsImageGenerator.cs (1)
38public override async Task<ImageGenerationResponse> GenerateAsync(
Image\LoggingImageGenerator.cs (1)
58public override async Task<ImageGenerationResponse> GenerateAsync(
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
40public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (1)
57public override async Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.Abstractions (30)
ChatCompletion\ChatClientExtensions.cs (2)
91public static Task<ChatResponse> GetResponseAsync( 111public static Task<ChatResponse> GetResponseAsync(
ChatCompletion\ChatResponseExtensions.cs (2)
163public static Task<ChatResponse> ToChatResponseAsync( 170static async Task<ChatResponse> ToChatResponseAsync(
ChatCompletion\DelegatingChatClient.cs (1)
42public virtual Task<ChatResponse> GetResponseAsync(
ChatCompletion\IChatClient.cs (1)
42Task<ChatResponse> GetResponseAsync(
ChatReduction\IChatReducer.cs (1)
21Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken);
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)
744if (t == typeof(Task<>) || t == typeof(ValueTask<>) || t == typeof(IAsyncEnumerable<>)) 873/// Gets a delegate for handling the result value of a method, converting it into the <see cref="Task{FunctionResult}"/> to return from the invocation. 937if (returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1019private 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
Image\DelegatingImageGenerator.cs (1)
43public virtual Task<ImageGenerationResponse> GenerateAsync(
Image\IImageGenerator.cs (1)
25Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? options = null, CancellationToken cancellationToken = default);
Image\ImageGeneratorExtensions.cs (4)
107public static Task<ImageGenerationResponse> GenerateImagesAsync( 129public static Task<ImageGenerationResponse> EditImagesAsync( 153public static Task<ImageGenerationResponse> EditImageAsync( 180public static Task<ImageGenerationResponse> EditImageAsync(
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)
44public static Task<SpeechToTextResponse> ToSpeechToTextResponseAsync( 51static async Task<SpeechToTextResponse> ToResponseAsync(
Microsoft.Extensions.AI.Abstractions.Tests (12)
ChatCompletion\DelegatingChatClientTests.cs (1)
43var resultTask = delegating.GetResponseAsync(expectedChatContents, expectedChatOptions, expectedCancellationToken);
Embeddings\DelegatingEmbeddingGeneratorTests.cs (1)
42var resultTask = delegating.GenerateAsync(expectedInput, options: null, expectedCancellationToken);
Image\DelegatingImageGeneratorTests.cs (1)
42var resultTask = delegating.GenerateAsync(expectedRequest, expectedOptions, 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)
TestImageGenerator.cs (2)
19public Func<ImageGenerationRequest, ImageGenerationOptions?, CancellationToken, Task<ImageGenerationResponse>>? GenerateImagesAsyncCallback { get; set; } 28public Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? 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 (6)
Utilities\TaskExtensions.cs (5)
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) 59await foreach (Task<T> task in
Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Evaluation.Console (6)
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)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
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.NLP (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
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)
34protected override async Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken) 64protected override async Task<IReadOnlyList<ChatResponseUpdate>?> ReadCacheStreamingAsync(
SimpleChatClient.cs (1)
25public 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)
55public async Task<ChatResponse> GetResponseAsync(
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
79Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Integration.Tests (15)
CallCountingChatClient.cs (1)
19public override Task<ChatResponse> GetResponseAsync(
CallCountingEmbeddingGenerator.cs (1)
20public override Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
ChatClientIntegrationTests.cs (1)
1382public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
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 (1)
71public async Task<IEnumerable<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\TestImageGenerator.cs (2)
19public Func<ImageGenerationRequest, ImageGenerationOptions?, CancellationToken, Task<ImageGenerationResponse>>? GenerateImagesAsyncCallback { get; set; } 28public Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? 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.OllamaSharp.Integration.Tests (1)
OllamaSharpChatClientIntegrationTests.cs (1)
109public override Task<ChatResponse> GetResponseAsync(
Microsoft.Extensions.AI.OpenAI (6)
OpenAIAssistantsChatClient.cs (1)
83public Task<ChatResponse> GetResponseAsync(
OpenAIChatClient.cs (1)
68public async Task<ChatResponse> GetResponseAsync(
OpenAIEmbeddingGenerator.cs (1)
61public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
OpenAIImageGenerator.cs (1)
63public async Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? options = null, CancellationToken cancellationToken = default)
OpenAIResponsesChatClient.cs (1)
70public async Task<ChatResponse> GetResponseAsync(
OpenAISpeechToTextClient.cs (1)
68public 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 (24)
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); 764private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> values)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
867async Task InvokeAsync(Func<Task<List<ChatMessage>>> work) 1077private static async Task<List<ChatMessage>> InvokeAndAssertAsync( 1177private static async Task<List<ChatMessage>> InvokeAndAssertStreamingAsync(
ChatCompletion\ReducingChatClientTests.cs (1)
181public Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken)
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (3)
155var result1 = outer.GenerateAsync("abc"); 156var result2 = outer.GenerateAsync("abc"); 228var 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)
167func = 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\TestImageGenerator.cs (2)
19public Func<ImageGenerationRequest, ImageGenerationOptions?, CancellationToken, Task<ImageGenerationResponse>>? GenerateImagesAsyncCallback { get; set; } 28public Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? 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 (9)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
39protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Logging\Internal\HttpResponseBodyReader.cs (1)
172private static async Task<string> BufferStreamAndWriteToPipeAsync(Stream stream, PipeWriter writer, int bufferSize, CancellationToken cancellationToken)
src\LegacySupport\TaskWaitAsync\TaskExtensions.cs (7)
16/// Gets a <see cref="Task{TResult}"/> that will complete when the <paramref name="task"/> completes or when the specified <paramref name="cancellationToken"/> has cancellation requested. 21/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait.</returns> 22public static Task<TResult> WaitAsync<TResult>(this Task<TResult> task, CancellationToken cancellationToken) 37private static async Task<TResult> WaitTaskAsync<TResult>(Task<TResult> task, CancellationToken cancellationToken) 43var t = await Task.WhenAny(task, tcs.Task).ConfigureAwait(false);
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 (8)
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\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 (210)
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);
IUserPasskeyStore.cs (3)
33Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken); 43Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken); 52Task<UserPasskeyInfo?> FindPasskeyAsync(TUser user, byte[] credentialId, 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 (108)
454public virtual Task<TUser?> GetUserAsync(ClaimsPrincipal principal) 469public virtual Task<string> GenerateConcurrencyStampAsync(TUser user) 483public virtual async Task<IdentityResult> CreateAsync(TUser user) 500private async Task<IdentityResult> CreateCoreAsync(TUser user) 527public virtual async Task<IdentityResult> UpdateAsync(TUser user) 553public virtual async Task<IdentityResult> DeleteAsync(TUser user) 581public virtual Task<TUser?> FindByIdAsync(string userId) 594public virtual async Task<TUser?> FindByNameAsync(string userName) 633public virtual async Task<IdentityResult> CreateAsync(TUser user, string password) 707public virtual async Task<string?> GetUserNameAsync(TUser user) 720public virtual async Task<IdentityResult> SetUserNameAsync(TUser user, string? userName) 744public virtual async Task<string> GetUserIdAsync(TUser user) 759public virtual async Task<bool> CheckPasswordAsync(TUser user, string password) 781private async Task<(PasswordVerificationResult? result, bool userMissing)> CheckPasswordCoreAsync(TUser user, string password) 810public virtual Task<bool> HasPasswordAsync(TUser user) 829public virtual async Task<IdentityResult> AddPasswordAsync(TUser user, string password) 845private async Task<IdentityResult> AddPasswordCoreAsync(TUser user, string password) 876public virtual async Task<IdentityResult> ChangePasswordAsync(TUser user, string currentPassword, string newPassword) 892private async Task<IdentityResult> ChangePasswordCoreAsync(TUser user, string currentPassword, string newPassword) 919public virtual async Task<IdentityResult> RemovePasswordAsync(TUser user) 948protected virtual async Task<PasswordVerificationResult> VerifyPasswordAsync(IUserPasswordStore<TUser> store, TUser user, string password) 965public virtual async Task<string> GetSecurityStampAsync(TUser user) 990public virtual async Task<IdentityResult> UpdateSecurityStampAsync(TUser user) 1016public virtual Task<string> GeneratePasswordResetTokenAsync(TUser user) 1033public virtual async Task<IdentityResult> ResetPasswordAsync(TUser user, string token, string newPassword) 1065public virtual Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey) 1085public virtual async Task<IdentityResult> RemoveLoginAsync(TUser user, string loginProvider, string providerKey) 1116public virtual async Task<IdentityResult> AddLoginAsync(TUser user, UserLoginInfo login) 1132private async Task<IdentityResult> AddLoginCoreAsync(TUser user, UserLoginInfo login) 1156public virtual async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user) 1173public virtual Task<IdentityResult> AddClaimAsync(TUser user, Claim claim) 1187public virtual async Task<IdentityResult> AddClaimsAsync(TUser user, IEnumerable<Claim> claims) 1217public virtual async Task<IdentityResult> ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim) 1247public virtual Task<IdentityResult> RemoveClaimAsync(TUser user, Claim claim) 1261public virtual async Task<IdentityResult> RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims) 1286/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <see cref="Claim"/>s. 1288public virtual async Task<IList<Claim>> GetClaimsAsync(TUser user) 1305public virtual async Task<IdentityResult> AddToRoleAsync(TUser user, string role) 1321private async Task<IdentityResult> AddToRoleCoreAsync(TUser user, string role) 1345public virtual async Task<IdentityResult> AddToRolesAsync(TUser user, IEnumerable<string> roles) 1361private async Task<IdentityResult> AddToRolesCoreAsync(TUser user, IEnumerable<string> roles) 1389public virtual async Task<IdentityResult> RemoveFromRoleAsync(TUser user, string role) 1436public virtual async Task<IdentityResult> RemoveFromRolesAsync(TUser user, IEnumerable<string> roles) 1452private async Task<IdentityResult> RemoveFromRolesCoreAsync(TUser user, IEnumerable<string> roles) 1476public virtual async Task<IList<string>> GetRolesAsync(TUser user) 1493public virtual async Task<bool> IsInRoleAsync(TUser user, string role) 1506public virtual async Task<string?> GetEmailAsync(TUser user) 1523public virtual async Task<IdentityResult> SetEmailAsync(TUser user, string? email) 1553public virtual async Task<TUser?> FindByEmailAsync(string email) 1605public virtual Task<string> GenerateEmailConfirmationTokenAsync(TUser user) 1620public virtual async Task<IdentityResult> ConfirmEmailAsync(TUser user, string token) 1636private async Task<IdentityResult> ConfirmEmailCoreAsync(TUser user, string token) 1659public virtual async Task<bool> IsEmailConfirmedAsync(TUser user) 1675public virtual Task<string> GenerateChangeEmailTokenAsync(TUser user, string newEmail) 1691public virtual async Task<IdentityResult> ChangeEmailAsync(TUser user, string newEmail, string token) 1705private async Task<IdentityResult> ChangeEmailCoreAsync(TUser user, string newEmail, string token, long startTimestamp) 1727public virtual async Task<string?> GetPhoneNumberAsync(TUser user) 1744public virtual async Task<IdentityResult> SetPhoneNumberAsync(TUser user, string? phoneNumber) 1776public virtual async Task<IdentityResult> ChangePhoneNumberAsync(TUser user, string phoneNumber, string token) 1792private async Task<IdentityResult> ChangePhoneNumberCoreAsync(TUser user, string phoneNumber, string token) 1817public virtual Task<bool> IsPhoneNumberConfirmedAsync(TUser user) 1833public virtual Task<string> GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) 1849public virtual Task<bool> VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) 1870public virtual async Task<bool> VerifyUserTokenAsync(TUser user, string tokenProvider, string purpose, string token) 1909public virtual Task<string> GenerateUserTokenAsync(TUser user, string tokenProvider, string purpose) 1953public virtual async Task<IList<string>> GetValidTwoFactorProvidersAsync(TUser user) 1978public virtual async Task<bool> VerifyTwoFactorTokenAsync(TUser user, string tokenProvider, string token) 2015public virtual Task<string> GenerateTwoFactorTokenAsync(TUser user, string tokenProvider) 2045public virtual async Task<bool> GetTwoFactorEnabledAsync(TUser user) 2062public virtual async Task<IdentityResult> SetTwoFactorEnabledAsync(TUser user, bool enabled) 2091public virtual async Task<bool> IsLockedOutAsync(TUser user) 2113public virtual async Task<IdentityResult> SetLockoutEnabledAsync(TUser user, bool enabled) 2139public virtual async Task<bool> GetLockoutEnabledAsync(TUser user) 2153/// A <see cref="Task{TResult}"/> that represents the lookup, a <see cref="DateTimeOffset"/> containing the last time a user's lockout expired, if any. 2155public virtual async Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user) 2169public virtual async Task<IdentityResult> SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd) 2185private async Task<IdentityResult> SetLockoutEndDateCoreAsync(TUser user, DateTimeOffset? lockoutEnd) 2207public virtual async Task<IdentityResult> AccessFailedAsync(TUser user) 2240public virtual async Task<IdentityResult> ResetAccessFailedCountAsync(TUser user) 2256private async Task<IdentityResult> ResetAccessFailedCountCoreAsync(TUser user) 2276public virtual async Task<int> GetAccessFailedCountAsync(TUser user) 2289/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/>s who 2292public virtual Task<IList<TUser>> GetUsersForClaimAsync(Claim claim) 2305/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/>s who 2308public virtual Task<IList<TUser>> GetUsersInRoleAsync(string roleName) 2324public virtual Task<string?> GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 2343public virtual async Task<IdentityResult> SetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName, string? tokenValue) 2372public virtual async Task<IdentityResult> RemoveAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 2398public virtual Task<string?> GetAuthenticatorKeyAsync(TUser user) 2411public virtual async Task<IdentityResult> ResetAuthenticatorKeyAsync(TUser user) 2443public virtual async Task<IEnumerable<string>?> GenerateNewTwoFactorRecoveryCodesAsync(TUser user, int number) 2556public virtual async Task<IdentityResult> RedeemTwoFactorRecoveryCodeAsync(TUser user, string code) 2572private async Task<IdentityResult> RedeemTwoFactorRecoveryCodeCoreAsync(TUser user, string code) 2591public virtual Task<int> CountRecoveryCodesAsync(TUser user) 2606public virtual async Task<IdentityResult> AddOrUpdatePasskeyAsync(TUser user, UserPasskeyInfo passkey) 2622private async Task<IdentityResult> AddOrUpdatePasskeyCoreAsync(TUser user, UserPasskeyInfo passkey) 2640public virtual Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user) 2657public virtual Task<UserPasskeyInfo?> GetPasskeyAsync(TUser user, byte[] credentialId) 2674public virtual Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId) 2692public virtual async Task<IdentityResult> RemovePasskeyAsync(TUser user, byte[] credentialId) 2708private async Task<IdentityResult> RemovePasskeyCoreAsync(TUser user, byte[] credentialId) 2781public virtual async Task<byte[]> CreateSecurityTokenAsync(TUser user) 2802protected virtual Task<IdentityResult> UpdatePasswordHash(TUser user, string newPassword, bool validatePassword) 2805private async Task<IdentityResult> UpdatePasswordHash(IUserPasswordStore<TUser> passwordStore, 2887protected async Task<IdentityResult> ValidateUserAsync(TUser user) 2927protected async Task<IdentityResult> ValidatePasswordAsync(TUser user, string? password) 2961protected virtual async Task<IdentityResult> UpdateUserAsync(TUser user) 2975private async Task<IdentityResult> UpdateUserAndRecordMetricAsync(TUser user, UserUpdateType updateType, long startTimestamp)
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 (3)
Resolver\CancellationTests.cs (1)
31var task = Assert.ThrowsAnyAsync<OperationCanceledException>(async () => await Resolver.ResolveIPAddressesAsync("example.com", AddressFamily.InterNetwork, cts.Token));
Resolver\LoopbackDnsServer.cs (1)
32private static async Task<int> ProcessRequestCore(IPEndPoint remoteEndPoint, ArraySegment<byte> message, Func<LoopbackDnsResponseBuilder, IPEndPoint, Task> action, Memory<byte> responseBuffer)
Resolver\RetryTests.cs (1)
281private async Task<AddressResult[]> RunWithFallbackServerHelper(string name, Func<LoopbackDnsResponseBuilder, Task> primaryHandler, Func<LoopbackDnsResponseBuilder, Task> fallbackHandler)
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.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)
583internal 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.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.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.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)
1381public static async Task<TiktokenTokenizer> CreateAsync( 1413public static async Task<TiktokenTokenizer> CreateAsync( 1478public 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.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)
53public async Task<CallHierarchyItem?> CreateItemAsync( 99public 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)
68public async Task<ImmutableDictionary<Guid, string>> GetProjectVersionsAsync(ImmutableArray<Guid> projectGuids, CancellationToken cancellationToken) 87public async Task<ReferenceCount?> GetReferenceCountAsync( 119public async Task<(string projectVersion, ImmutableArray<ReferenceLocationDescriptor> references)?> FindReferenceLocationsAsync( 147public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync( 161public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync( 176private async Task<(Document?, SyntaxNode?)> GetDocumentAndNodeAsync( 199private async Task<int> GetMaxResultCapAsync(CancellationToken cancellationToken) 237private async Task<Document?> GetDocumentAsync(
CodeLens\VisualStudioCodeLensReferencesService.cs (5)
32public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, int maxSearchResults, 57public async Task<ImmutableArray<ReferenceLocationDescriptorAndDocument>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 83public Task<ImmutableArray<ReferenceLocationDescriptor>> MapReferenceLocationsAsync(Solution solution, ImmutableArray<ReferenceLocationDescriptorAndDocument> referenceLocations, ClassificationOptions classificationOptions, CancellationToken cancellationToken) 89public async Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode? syntaxNode, 114public async Task<string?> GetFullyQualifiedNameAsync(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)
414private async Task<(ImmutableArray<DocumentSymbolData> documentSymbolData, ITextSnapshot newTextSnapshot)> ComputeDocumentSymbolDataAsync(CancellationToken cancellationToken)
DocumentOutline\DocumentOutlineViewModel_Utilities.cs (2)
22internal delegate Task<TResponse?> LanguageServiceBrokerCallback<TRequest, TResponse>(Request<TRequest, TResponse> request, CancellationToken cancellationToken); 30public 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)
17public 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)
43private async Task<(string pbstrText, int result)> GetDataTipTextAsync(TextSpan[] pSpan) 58protected virtual async Task<(string pbstrText, int result)> GetDataTipTextImplAsync(TextSpan[] pSpan) 67protected async Task<(string pbstrText, int result)> GetDataTipTextImplAsync(ITextBuffer subjectBuffer, TextSpan[] pSpan) 136private async Task<int> GetPairExtentsAsync(int iLine, int iIndex, TextSpan[] pSpan) 159internal static async Task<int> GetPairExtentsAsync(
Interactive\VsResetInteractive.cs (2)
282protected override Task<bool> BuildProjectAsync() 304protected override async Task<IEnumerable<string>> GetNamespacesToImportAsync(IEnumerable<string> namespacesToImport, IInteractiveWindow interactiveWindow)
KeybindingReset\KeybindingResetDetector.cs (1)
317async 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)
257private async Task<int> ValidateBreakpointLocationAsync(
LanguageService\AbstractPackage`2.cs (1)
140protected 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)
50public 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\FileChangeWatcherProvider.cs (1)
28var fileChangeService = Task.Factory.StartNew(
ProjectSystem\VisualStudioProjectFactory.cs (2)
71public Task<ProjectSystemProject> CreateAndAddToWorkspaceAsync(string projectSystemName, string language, CancellationToken cancellationToken) 74public 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)
601async Task<MultiDictionary<string, (TextChange TextChange, ProjectId ProjectId)>> GetMappedTextChangesAsync(SolutionChanges solutionChanges, CancellationToken cancellationToken)
PullMemberUp\MainDialog\PullMemberUpDialogViewModel.cs (2)
28private readonly ImmutableDictionary<ISymbol, Task<ImmutableArray<ISymbol>>> _symbolToDependentsMap; 34ImmutableDictionary<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)
173protected 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 (3)
121public async Task<bool> IsSupportedDiagnosticIdAsync(ProjectId projectId, string id, CancellationToken cancellationToken) 281private async Task<IDiagnosticManagerService> GetOrCreateDiagnosticManagerAsync(CancellationToken cancellationToken) 334public async Task<bool> IsSupportedDiagnosticIdAsync(ProjectId projectId, string id, 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) 528public Task<bool> NavigateToSpanAsync(TextSpan sourceSpan, CancellationToken cancellationToken)
Workspace\VisualStudioDocumentNavigationService.cs (16)
51public async Task<bool> CanNavigateToSpanAsync(Workspace workspace, DocumentId documentId, TextSpan textSpan, bool allowInvalidSpan, CancellationToken cancellationToken) 67public async Task<bool> CanNavigateToPositionAsync( 99public async Task<INavigableLocation?> GetLocationForSpanAsync( 113public async Task<INavigableLocation?> GetLocationForPositionAsync( 126static async Task<TextSpan> GetTextSpanFromPositionAsync(Document document, int position, int virtualSpace, CancellationToken cancellationToken) 155private async Task<INavigableLocation?> GetNavigableLocationAsync( 158Func<Document, Task<TextSpan>> getTextSpanForMappingAsync, 179private async Task<Func<CancellationToken, Task<bool>>?> GetNavigationCallbackAsync( 182Func<Document, Task<TextSpan>> getTextSpanForMappingAsync, 240private Func<CancellationToken, Task<bool>>? GetNavigationCallback( 292private async Task<Func<CancellationToken, Task<bool>>?> GetNavigableLocationForMappedFileAsync( 315private static async Task<MappedSpanResult?> GetMappedSpanAsync(Document generatedDocument, TextSpan textSpan, CancellationToken cancellationToken) 377public async Task<bool> NavigateToTextBufferAsync( 415private 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 (16)
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\SemanticSearchQueryExecutor.cs (1)
104public async Task<(Solution solution, ImmutableArray<(string filePath, string? newContent)> fileUpdates)> ExecuteAsync(string? query, Document? queryDocument, Solution solution, CancellationToken cancellationToken)
SemanticSearch\SemanticSearchToolWindow.cs (1)
55public override Task<IRemoteUserControl> GetContentAsync(CancellationToken cancellationToken)
SemanticSearch\SemanticSearchToolWindowImpl.cs (2)
110public async Task<IRemoteUserControl> InitializeAsync(CancellationToken cancellationToken) 123private 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)
72protected async Task<DocumentOutlineTestMocks> CreateMocksAsync(string code) 82async Task<RoslynDocumentSymbol[]?> RequestAsync(Request<RoslynDocumentSymbolParams, RoslynDocumentSymbol[]> request, CancellationToken cancellationToken) 92private async Task<EditorTestLspServer> CreateTestLspServerAsync(EditorTestWorkspace workspace) 106public 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)
907private static void DoSimultaneousReads(Func<Task<string>> read, string expectedValue) 1000internal async Task<IChecksummedPersistentStorage> GetStorageAsync( 1024internal 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.Implementation (11)
CodeModel\RootCodeModel.cs (1)
42private Task<Compilation> GetCompilationAsync()
ProjectSystem\CPS\CPSProjectFactory.cs (1)
60public async Task<IWorkspaceProjectContext> CreateProjectContextAsync(Guid id, string uniqueName, string languageName, EvaluationData data, object? hostObject, CancellationToken cancellationToken)
ProjectSystem\CPS\TempPECompiler.cs (1)
29public async Task<bool> CompileAsync(IWorkspaceProjectContext context, string outputFileName, ISet<string> filesToInclude, CancellationToken cancellationToken)
RoslynVisualStudioWorkspace.cs (2)
94public override async Task<bool> TryGoToDefinitionAsync( 125internal override async Task<object?> GetBrowseObjectAsync(
SolutionExplorer\AnalyzerItem\AnalyzerItemSource.cs (1)
143async Task<ImmutableArray<AnalyzerReference>> GetAnalyzerReferencesWithAnalyzersOrGeneratorsAsync(
SolutionExplorer\DiagnosticItem\BaseDiagnosticAndGeneratorItemSource.cs (4)
141private async Task<(ImmutableArray<BaseItem>, ImmutableArray<BaseItem>)> GetLatestItemsAsync( 153async Task<ImmutableArray<BaseItem>> GenerateDiagnosticItemsAsync() 199async Task<ImmutableArray<BaseItem>> GenerateSourceGeneratorItemsAsync() 206async Task<ImmutableArray<SourceGeneratorIdentity>> GetIdentitiesAsync()
SolutionExplorer\DiagnosticItem\DiagnosticItem.cs (1)
62internal Task<Solution> GetSolutionWithUpdatedAnalyzerConfigSeverityAsync(ReportDiagnostic value, Project project, 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.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)
16Task<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)
14Task<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)
44public 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)
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)
72static async Task<int> RunAsync(ReplayOptions options) 148var tasks = new List<Task<BuildData>>(capacity: maxParallel); 160var completedTask = await Task.WhenAny(tasks).ConfigureAwait(false); 191static async Task<BuildData> BuildAsync(
src\Compilers\Shared\BuildProtocol.cs (2)
124public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 320public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
91internal static async Task<bool> RunServerShutdownRequestAsync( 160internal static Task<BuildResponse> RunServerBuildRequestAsync( 174internal static async Task<BuildResponse> RunServerBuildRequestAsync( 197static Task<NamedPipeClientStream?> tryConnectToServerAsync( 274static async Task<BuildResponse> tryRunRequestAsync( 297var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 368internal 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 (206)
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)
81private static async Task<Document> RunIterationsAsync(Document document, TMethodDeclarationSyntax method, bool convertToTheory, CancellationToken cancellationToken)
ExportedPartsShouldHaveImportingConstructorCodeFixProvider.cs (4)
45Func<CancellationToken, Task<Document>> createChangedDocument; 79private static async Task<Document> AddExplicitImportingConstructorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 141private static async Task<Document> MakeConstructorPublicAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 158private static async Task<Document> AddImportingConstructorAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
ImportingConstructorShouldBeObsoleteCodeFixProvider.cs (6)
42Func<CancellationToken, Task<Document>> createChangedDocument; 85private async Task<Document> AddObsoleteAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 117private static async Task<Document> AddDescriptionAndErrorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 138private static async Task<Document> UpdateDescriptionAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 163private static async Task<Document> AddErrorAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken) 182private 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\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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
src\RoslynAnalyzers\Utilities\Refactoring\CodeRefactoringContextExtensions.cs (4)
19internal static Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>(this CodeRefactoringContext context, IRefactoringHelpers helpers) 23internal static Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(this CodeRefactoringContext context, IRefactoringHelpers helpers) 27internal static async Task<TSyntaxNode?> TryGetRelevantNodeAsync<TSyntaxNode>( 38internal static async Task<ImmutableArray<TSyntaxNode>> GetRelevantNodesAsync<TSyntaxNode>(
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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)
TestExportsShouldNotBeDiscoverableCodeFixProvider.cs (1)
50private static async Task<Document> AddPartNotDiscoverableAttributeAsync(Document document, TextSpan sourceSpan, CancellationToken cancellationToken)
Roslyn.Diagnostics.CSharp.Analyzers (15)
CSharpAvoidOptSuffixForNullableEnableCodeCodeFixProvider.cs (1)
67private 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)
51private 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)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
110public 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)
1727if (name.Equals(nameof(Task<>.ConfigureAwait)) && 1733else if (name.Equals(nameof(Task<>.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(
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)
124private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, Workspace remoteWorkspace, Solution solution, Dictionary<Checksum, object> map = null) 225public Task<ImmutableArray<DesignerAttributeData>> Infos => _infosSource.Task; 1733private 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)
454static async Task<Solution> GetInitialOOPSolutionAsync(RemoteWorkspace remoteWorkspace, AssetProvider assetProvider, Solution solution) 1307private static async Task<AssetProvider> GetAssetProviderAsync(Workspace workspace, RemoteWorkspace remoteWorkspace, Solution solution, Dictionary<Checksum, object>? map = null)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (2)
115var task = Task.Run(() => AnalyzeAsync(workspace, workspace.CurrentSolution.ProjectIds.First(), analyzerType, isHostAnalyzer: false, source.Token)); 215private static async Task<DiagnosticAnalysisResult> AnalyzeAsync(TestWorkspace workspace, ProjectId projectId, Type analyzerType, bool isHostAnalyzer, CancellationToken cancellationToken = default)
RunTests (16)
HelixTestRunner.cs (1)
45internal 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)
30public static async Task<ImmutableDictionary<string, TimeSpan>> GetTestHistoryAsync(Options options, CancellationToken cancellationToken) 146private static async Task<Build?> GetLastSuccessfulBuildAsync(int definitionId, string branchName, BuildHttpClient buildClient, CancellationToken cancellationToken) 169private static async Task<TestRun?> GetRunForStageAsync(Build build, string phaseName, TestResultsHttpClient testClient, CancellationToken cancellationToken) 191private static async Task<List<TestCaseResult>> GetTestResultsAsync(TestRun testRun, int skip, int top, TestResultsHttpClient testClient, CancellationToken cancellationToken)
TestRunner.cs (4)
72internal async Task<RunAllResult> RunAllAsync(ImmutableArray<AssemblyInfo> assemblies, CancellationToken cancellationToken) 80var running = new List<Task<TestResult>>(); 91var task = running[i]; 134var 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)
InteractionCommands.cs (2)
18var resultTask1 = interactionService.PromptConfirmationAsync("Command confirmation", "Are you sure?", cancellationToken: commandContext.CancellationToken); 19var resultTask2 = interactionService.PromptMessageBoxAsync("Command confirmation", "Are you really sure?", new MessageBoxInteractionOptions { Intent = MessageIntent.Warning, ShowSecondaryButton = true }, 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 (38)
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (2)
22internal static Task<bool> TrueTask => field ??= Task.FromResult(true); 23internal static Task<bool> FalseTask => field ??= 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 (7)
Common\System\Data\ProviderBase\DbConnectionFactory.cs (1)
47Task<DbConnectionInternal> newTask;
src\libraries\Common\src\System\Data\Common\AdapterUtil.cs (2)
22internal static Task<bool> TrueTask => field ??= Task.FromResult(true); 23internal static Task<bool> FalseTask => field ??= 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)
128public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Compression (26)
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 (2)
17internal static async Task<bool> SeekBackwardsToSignatureAsync(Stream stream, ReadOnlyMemory<byte> signatureToFind, int maxBytesToRead, CancellationToken cancellationToken) 91private 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)
426Task<int> t = ReadAsync(array, offset, count, cts?.Token ?? CancellationToken.None); 442public override Task<int> ReadAsync(byte[] array, int offset, int count, CancellationToken cancellationToken) 447return 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)
368protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\HttpContent.cs (16)
88public Task<string> ReadAsStringAsync() => 91public Task<string> ReadAsStringAsync(CancellationToken cancellationToken) 184public Task<byte[]> ReadAsByteArrayAsync() => 187public Task<byte[]> ReadAsByteArrayAsync(CancellationToken cancellationToken) 230public Task<Stream> ReadAsStreamAsync() => 233public Task<Stream> ReadAsStreamAsync(CancellationToken cancellationToken) 243Task<Stream> t = IsBuffered ? 249else if (_contentReadStream is Task<Stream> t) // have a Task<Stream> 256Task<Stream> ts = Task.FromResult((Stream)_contentReadStream); 284Debug.Assert(_contentReadStream is Task<Stream>, $"Expected a Task<Stream>, got ${_contentReadStream}"); 285Task<Stream> t = (Task<Stream>)_contentReadStream; 540protected virtual Task<Stream> CreateContentReadStreamAsync() 548protected virtual Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) 640(_contentReadStream is Task<Stream> t && t.Status == TaskStatus.RanToCompletion ? t.Result : null); 763private 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)
372private Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 382public 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)
346public Task<bool> WaitForAvailableStreamsAsync() 1997public 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)
154public 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)
24private Task<HttpMessageHandlerStage>? _handlerChainSetupTask; 602protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 626async 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)
111internal 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)
755var 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(); 250public Task<int> ReceiveAsync(ArraySegment<byte> buffer) => 259public Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) => ReceiveAsync(buffer, socketFlags, fromNetworkStream: false); 261internal Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, bool fromNetworkStream) 309public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers) => 318public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 340public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 350public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 442public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 452public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 501public Task<int> SendAsync(ArraySegment<byte> buffer) => 510public Task<int> SendAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) 573public Task<int> SendAsync(IList<ArraySegment<byte>> buffers) => 582public Task<int> SendAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 604public Task<int> SendToAsync(ArraySegment<byte> buffer, EndPoint remoteEP) => 614public Task<int> SendToAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) 827private Task<int> GetTaskForSendReceive(bool pending, TaskSocketAsyncEventArgs<int> saea, bool fromNetworkStream, bool isReceive) 829Task<int> t;
System\Net\Sockets\SocketAsyncEventArgs.cs (2)
696Task<IPAddress[]> addressesTask = Dns.GetHostAddressesAsync(endPoint.Host, endPoint.AddressFamily, cancellationToken); 717async 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 (3)
System\Net\WebSockets\ManagedWebSocket.cs (1)
351public 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\WebSocketStream.cs (1)
125public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
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 (963)
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)
1083public static Task<string> ReadAllTextAsync(string path, CancellationToken cancellationToken = default) 1086public static Task<string> ReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1095private static async Task<string> InternalReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken) 1168public static Task<byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken = default) 1197private static async Task<byte[]> InternalReadAllBytesAsync(SafeFileHandle sfh, int count, CancellationToken cancellationToken) 1218private static async Task<byte[]> InternalReadAllBytesUnknownLengthAsync(SafeFileHandle sfh, CancellationToken cancellationToken) 1291public static Task<string[]> ReadAllLinesAsync(string path, CancellationToken cancellationToken = default) 1294public static Task<string[]> ReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1303private 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 (7)
346Task<bool>? asyncWaitTask = null; 567public Task<bool> WaitAsync(int millisecondsTimeout) 592public Task<bool> WaitAsync(TimeSpan timeout) 625public Task<bool> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken) 657public Task<bool> WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken) 683private Task<bool> WaitAsyncCore(long millisecondsTimeout, CancellationToken cancellationToken) 777private async Task<bool> WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, long 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); 96/// Initializes a new <see cref="Task{TResult}"/> with the specified function. 113/// Initializes a new <see cref="Task{TResult}"/> with the specified function. 133/// Initializes a new <see cref="Task{TResult}"/> with the specified function and creation options. 156/// Initializes a new <see cref="Task{TResult}"/> with the specified function and creation options. 183/// Initializes a new <see cref="Task{TResult}"/> with the specified function and state. 200/// Initializes a new <see cref="Task{TResult}"/> with the specified action, state, and options. 221/// Initializes a new <see cref="Task{TResult}"/> with the specified action, state, and options. 247/// Initializes a new <see cref="Task{TResult}"/> with the specified action, state, and options. 308internal static Task<TResult> StartNew(Task? parent, Func<TResult> function, CancellationToken cancellationToken, 321Task<TResult> f = new Task<TResult>(function, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); 328internal static Task<TResult> StartNew(Task? parent, Func<object?, TResult> function, object? state, CancellationToken cancellationToken, 341Task<TResult> f = new Task<TResult>(function, state, parent, cancellationToken, creationOptions, internalOptions | InternalTaskOptions.QueuedByRuntime, scheduler); 418/// Gets the result value of this <see cref="Task{TResult}"/>. 432/// Gets the result value of this <see cref="Task{TResult}"/> once the task has completed successfully. 467/// Provides access to factory methods for creating <see cref="Task{TResult}"/> instances. 500/// <summary>Gets an awaiter used to await this <see cref="Task{TResult}"/>.</summary> 507/// <summary>Configures an awaiter used to await this <see cref="Task{TResult}"/>.</summary> 542/// <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> 544/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 545public new Task<TResult> WaitAsync(CancellationToken cancellationToken) => 548/// <summary>Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes or when the specified timeout expires.</summary> 550/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 551public new Task<TResult> WaitAsync(TimeSpan timeout) => 555/// Gets a <see cref="Task{TResult}"/> that will complete when this <see cref="Task{TResult}"/> completes or when the specified timeout expires. 559/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 560public new Task<TResult> WaitAsync(TimeSpan timeout, TimeProvider timeProvider) 566/// <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> 569/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 570public new Task<TResult> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken) => 574/// 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. 579/// <returns>The <see cref="Task{TResult}"/> representing the asynchronous wait. It may or may not be the same instance as the current instance.</returns> 580public new Task<TResult> WaitAsync(TimeSpan timeout, TimeProvider timeProvider, CancellationToken cancellationToken) 586private Task<TResult> WaitAsync(uint millisecondsTimeout, TimeProvider timeProvider, CancellationToken cancellationToken) 612/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 615/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 627public Task ContinueWith(Action<Task<TResult>> continuationAction) 634/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 637/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 650public Task ContinueWith(Action<Task<TResult>> continuationAction, CancellationToken cancellationToken) 657/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 660/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 678public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler) 684/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 687/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 711public Task ContinueWith(Action<Task<TResult>> continuationAction, TaskContinuationOptions continuationOptions) 717/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 720/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 751public Task ContinueWith(Action<Task<TResult>> continuationAction, CancellationToken cancellationToken, 758internal Task ContinueWith(Action<Task<TResult>> continuationAction, TaskScheduler scheduler, CancellationToken cancellationToken, 792/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 795/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 808public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state) 815/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 818/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 832public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, CancellationToken cancellationToken) 839/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 842/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 861public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler) 867/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 870/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 895public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskContinuationOptions continuationOptions) 901/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 904/// An action to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 936public Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, CancellationToken cancellationToken, 943internal Task ContinueWith(Action<Task<TResult>, object?> continuationAction, object? state, TaskScheduler scheduler, CancellationToken cancellationToken, 978/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 984/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 987/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 989/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 996public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction) 1003/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1009/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1013/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1015/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1025public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken) 1031/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1037/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1043/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1045/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1055public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler) 1061/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1067/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1077/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1080/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1086/// cref="Task{TNewResult}"/>. This task's completion state will be transferred to the task returned 1097public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskContinuationOptions continuationOptions) 1103/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1109/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be passed as 1124/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1127/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1132/// The <paramref name="continuationFunction"/>, when executed, should return a <see cref="Task{TNewResult}"/>. 1150public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, CancellationToken cancellationToken, 1157internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, TNewResult> continuationFunction, TaskScheduler scheduler, 1175Task<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult, TNewResult>( 1191/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1197/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1201/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1203/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1210public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state) 1217/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1223/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1228/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1230/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1240public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1247/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1253/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1260/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1262/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1272public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1279/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1285/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1296/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1299/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current 1305/// cref="Task{TNewResult}"/>. This task's completion state will be transferred to the task returned 1316public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1323/// Creates a continuation that executes when the target <see cref="Task{TResult}"/> completes. 1329/// A function to run when the <see cref="Task{TResult}"/> completes. When run, the delegate will be 1345/// <returns>A new continuation <see cref="Task{TNewResult}"/>.</returns> 1348/// The returned <see cref="Task{TNewResult}"/> will not be scheduled for execution until the current task has 1353/// The <paramref name="continuationFunction"/>, when executed, should return a <see cref="Task{TNewResult}"/>. 1371public Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1378internal Task<TNewResult> ContinueWith<TNewResult>(Func<Task<TResult>, object?, TNewResult> continuationFunction, object? state, 1396Task<TNewResult> continuationFuture = new ContinuationResultTaskFromResultTask<TResult, TNewResult>( 1416private readonly Task<TResult> m_task; 1418public 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); 6252public static Task<TResult[]> WhenAll<TResult>(IEnumerable<Task<TResult>> tasks) 6255if (tasks is Task<TResult>[] taskArray) 6261if (tasks is ICollection<Task<TResult>> taskCollection) 6269taskArray = new Task<TResult>[count]; 6271foreach (Task<TResult> task in taskArray) 6288List<Task<TResult>> taskList = new List<Task<TResult>>(); 6289foreach (Task<TResult> task in tasks) 6335public static Task<TResult[]> WhenAll<TResult>(params Task<TResult>[] tasks) 6342return WhenAll((ReadOnlySpan<Task<TResult>>)tasks); 6373public static Task<TResult[]> WhenAll<TResult>(params ReadOnlySpan<Task<TResult>> tasks) 6380Task<TResult>[] tasksCopy = tasks.ToArray(); 6381foreach (Task<TResult> task in tasksCopy) 6403private readonly Task<T>?[] m_tasks; 6407internal WhenAllPromise(Task<T>[] tasks) 6421foreach (Task<T> task in tasks) 6447Task<T>? task = m_tasks[i]; 6525public static Task<Task> WhenAny(params Task[] tasks) 6544public static Task<Task> WhenAny(params ReadOnlySpan<Task> tasks) => 6559private static Task<TTask> WhenAnyCore<TTask>(ReadOnlySpan<TTask> tasks) where TTask : Task 6597public static Task<Task> WhenAny(Task task1, Task task2) => 6611private static Task<TTask> WhenAny<TTask>(TTask task1, TTask task2) where TTask : Task 6717public static Task<Task> WhenAny(IEnumerable<Task> tasks) => 6733private static Task<TTask> WhenAny<TTask>(IEnumerable<TTask> tasks) where TTask : Task 6811public static Task<Task<TResult>> WhenAny<TResult>(params Task<TResult>[] tasks) 6815return WhenAnyCore((ReadOnlySpan<Task<TResult>>)tasks); 6831public static Task<Task<TResult>> WhenAny<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => 6846public static Task<Task<TResult>> WhenAny<TResult>(Task<TResult> task1, Task<TResult> task2) => 6847WhenAny<Task<TResult>>(task1, task2); 6865public static Task<Task<TResult>> WhenAny<TResult>(IEnumerable<Task<TResult>> tasks) => 6866WhenAny<Task<TResult>>(tasks); 6898public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params Task<TResult>[] tasks) 6901return WhenEach((ReadOnlySpan<Task<TResult>>)tasks); 6907public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => 6908WhenEachState.Iterate<Task<TResult>>(WhenEachState.Create(ReadOnlySpan<Task>.CastUp(tasks))); 6913public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(IEnumerable<Task<TResult>> tasks) => 6914WhenEachState.Iterate<Task<TResult>>(WhenEachState.Create(tasks)); 7062internal static Task<TResult> CreateUnwrapPromise<TResult>(Task outerTask, bool lookForOce) 7506ProcessInnerTask(task is Task<Task<TResult>> taskOfTaskOfTResult ? // it's either a Task<Task> or Task<Task<TResult>> 7507taskOfTaskOfTResult.Result : ((Task<Task>)task).Result); 7552result = 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)
537private static 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)
461public static Task<XNode> ReadFromAsync(XmlReader reader, CancellationToken cancellationToken) 470private static async Task<XNode> ReadFromAsyncInternal(XmlReader reader, CancellationToken cancellationToken)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
822[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) 822/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 853public Task<bool> VerifyDetachedAsync(AsymmetricAlgorithm key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 885/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 915public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 938private async Task<bool> VerifyAsyncCore(CoseKey key, Stream content, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
System\Security\Cryptography\Cose\CoseSignature.cs (5)
496/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 527public Task<bool> VerifyDetachedAsync(AsymmetricAlgorithm key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 560/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 591public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 614private 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.Http (42)
System\ServiceModel\Channels\HttpChannelFactory.cs (8)
245internal async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, 444private async Task<SecurityTokenProviderContainer> CreateAndOpenTokenProviderAsync(TimeSpan timeout, AuthenticationSchemes authenticationScheme, 742private async Task<(SecurityTokenProviderContainer tokenProvider, SecurityTokenProviderContainer proxyTokenProvider)> CreateAndOpenTokenProvidersCoreAsync(EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 759internal Task<(SecurityTokenProviderContainer tokenProvider, SecurityTokenProviderContainer proxyTokenProvider)> CreateAndOpenTokenProvidersAsync(EndpointAddress to, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 913internal virtual Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper) 918protected async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, SecurityTokenContainer clientCertificateToken, TimeoutHelper timeoutHelper) 1129public async Task<Message> ReceiveReplyAsync(TimeoutHelper timeoutHelper) 1383public async Task<IWebProxy> CreateWebProxyAsync(AuthenticationLevel requestAuthenticationLevel, TokenImpersonationLevel requestImpersonationLevel, SecurityTokenProviderContainer tokenProvider, TimeSpan timeout)
System\ServiceModel\Channels\HttpChannelHelpers.cs (2)
58public static Task<(NetworkCredential networkCredential, TokenImpersonationLevel impersonationLevel, AuthenticationLevel authenticationLevel)> GetCredentialAsync( 72private static async Task<(NetworkCredential credential, TokenImpersonationLevel impersonationLevel, AuthenticationLevel authenticationLevel)>GetCredentialCoreAsync(
System\ServiceModel\Channels\HttpResponseMessageHelper.cs (12)
38internal async Task<Message> ParseIncomingResponse(TimeoutHelper timeoutHelper) 130private async Task<bool> ValidateContentTypeAsync(TimeoutHelper timeoutHelper) 169private Task<Message> ReadStreamAsMessageAsync(TimeoutHelper timeoutHelper) 172Task<Stream> contentStreamTask = GetStreamAsync(timeoutHelper); 187private async Task<Message> ReadChunkedBufferedMessageAsync(Task<Stream> inputStreamTask, TimeoutHelper timeoutHelper) 200private async Task<Message> ReadBufferedMessageAsync(Task<Stream> inputStreamTask, TimeoutHelper timeoutHelper) 237private async Task<Message> ReadStreamedMessageAsync(Task<Stream> inputStreamTask) 272private async Task<Message> DecodeBufferedMessageAsync(ArraySegment<byte> buffer, Stream inputStream, TimeoutHelper timeoutHelper) 307private async Task<Stream> GetStreamAsync(TimeoutHelper timeoutHelper)
System\ServiceModel\Channels\HttpsChannelFactory.cs (3)
153internal async Task<SecurityTokenProvider> CreateAndOpenCertificateTokenProviderAsync(EndpointAddress target, Uri via, ChannelParameterCollection channelParameters, TimeSpan timeout) 166internal async Task<SecurityTokenContainer> GetCertificateSecurityTokenAsync(SecurityTokenProvider certificateProvider, 391internal override async Task<HttpClient> GetHttpClientAsync(EndpointAddress to, Uri via, TimeoutHelper timeoutHelper)
System\ServiceModel\Channels\IMessageSource.cs (2)
12Task<Message> ReceiveAsync(TimeSpan timeout); 13Task<bool> WaitForMessageAsync(TimeSpan timeout);
System\ServiceModel\Channels\MessageContent.cs (2)
179protected override Task<Stream> CreateContentReadStreamAsync() 235protected override Task<Stream> CreateContentReadStreamAsync()
System\ServiceModel\Channels\SynchronizedMessageSource.cs (2)
23public async Task<bool> WaitForMessageAsync(TimeSpan timeout) 47public async Task<Message> ReceiveAsync(TimeSpan timeout)
System\ServiceModel\Channels\TransportDuplexSessionChannel.cs (4)
67public Task<Message> ReceiveAsync() 72public async Task<Message> ReceiveAsync(TimeSpan timeout) 143public async Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout) 179public async Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (7)
500public async Task<Message> ReceiveAsync(TimeSpan timeout) 527private async Task<Message> ReceiveAsyncInternal(TimeSpan timeout) 646public async Task<bool> WaitForMessageAsync(TimeSpan timeout) 989public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 1020private async Task<int> ReadAsyncCore(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 1177var cancelTokenTask = timeoutHelper.GetCancellationTokenAsync(); 1243Task<WebSocketReceiveResult> receiveTask =
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.NetTcp (4)
System\ServiceModel\Channels\DnsCache.cs (2)
54public static async Task<IPAddress[]> ResolveAsync(Uri uri) 111internal static async Task<IPAddress[]> LookupHostName(string hostName)
System\ServiceModel\Channels\SocketConnection.cs (2)
808private async Task<IConnection> CreateConnectionAsync(IPAddress address, int port) 872private static async Task<IPAddress[]> GetIPAddressesAsync(Uri uri)
System.ServiceModel.Primitives (158)
Internals\System\Runtime\ActionItem.cs (1)
86Task<Task>.Factory.StartNew(callback, state, CancellationToken.None, TaskCreationOptions.DenyChildAttach, IOThreadScheduler.IOTaskScheduler);
Internals\System\Runtime\AsyncLock.cs (2)
24public Task<IAsyncDisposable> TakeLockAsync() 37private async Task<IAsyncDisposable> TakeLockCoreAsync(SemaphoreSlim currentSemaphore, SafeSemaphoreRelease safeSemaphoreRelease)
Internals\System\Runtime\InputQueue.cs (5)
153public async Task<T> DequeueAsync(TimeSpan timeout) 165public async Task<(bool, T)> TryDequeueAsync(TimeSpan timeout) 497public Task<bool> WaitForItemAsync(TimeSpan timeout) 1166public async Task<(bool, T)> WaitAsync(TimeSpan timeout) 1232public async Task<bool> WaitAsync(TimeSpan timeout)
Internals\System\Runtime\TaskHelpers.cs (8)
34public static Task<TResult> ToApm<TResult>(this Task<TResult> task, AsyncCallback callback, object state) 145Task<TResult> task = iar as Task<TResult>; 161public static Task<(TOut1, TOut2)> FromAsync<TIn, TOut1, TOut2>(Func<TIn, AsyncCallback, object, IAsyncResult> beginDelegate, EndWithOutDelegate<TOut2, TOut1> endDelegate, TIn arg1, object state) 219public static async Task<bool> AwaitWithTimeout(this Task task, TimeSpan timeout) 276public static TResult WaitForCompletion<TResult>(this Task<TResult> task) 284public static TResult WaitForCompletionNoSpin<TResult>(this Task<TResult> task)
Internals\System\Runtime\TimeoutHelper.cs (6)
40public async Task<CancellationToken> GetCancellationTokenAsync() 258private static readonly ConcurrentDictionary<long, Task<CancellationToken>> s_tokenCache = 259new ConcurrentDictionary<long, Task<CancellationToken>>(); 264Task<CancellationToken> ignored; 280public static Task<CancellationToken> FromTimeoutAsync(int millisecondsTimeout) 309Task<CancellationToken> tokenTask;
Internals\System\Xml\XmlMtomWriter.cs (1)
1370internal async Task<Stream> GetContentStreamAsync()
System\IdentityModel\Selectors\KerberosSecurityTokenProvider.cs (1)
63internal override Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout)
System\IdentityModel\Selectors\SecurityTokenProvider.cs (8)
60public async Task<SecurityToken> GetTokenAsync(TimeSpan timeout) 84protected virtual Task<SecurityToken> GetTokenCoreAsync(TimeSpan timeout) 86return Task<SecurityToken>.Factory.FromAsync(BeginGetTokenCore, EndGetTokenCore, timeout, null); 91internal virtual Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout) 140public async Task<SecurityToken> RenewTokenAsync(TimeSpan timeout, SecurityToken tokenToBeRenewed) 171protected virtual Task<SecurityToken> RenewTokenCoreAsync(TimeSpan timeout, SecurityToken tokenToBeRenewed) 173return Task<SecurityToken>.Factory.FromAsync(BeginRenewTokenCore, EndRenewTokenCore, timeout, tokenToBeRenewed, null); 176internal virtual Task<SecurityToken> RenewTokenCoreInternalAsync(TimeSpan timeout, SecurityToken tokenToBeRenewed)
System\IdentityModel\Selectors\UserNameSecurityTokenProvider.cs (1)
31internal override Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout)
System\IdentityModel\Selectors\X509SecurityTokenProvider.cs (1)
43internal override Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout)
System\ServiceModel\Channels\BufferedReadStream.cs (5)
42private Task<int> _lastSyncCompletedReadTask; // The last successful Task returned from ReadAsync 254private Task<int> LastSyncCompletedReadTask(int val) 256Task<int> t = _lastSyncCompletedReadTask; 303public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 368private async Task<int> ReadFromUnderlyingStreamAsync(Byte[] array, int offset, int count,
System\ServiceModel\Channels\BufferedWriteStream.cs (1)
235public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\ServiceModel\Channels\ClientReliableChannelBinder.cs (8)
111public Task<bool> EnsureChannelForRequestAsync() 130protected virtual Task<Message> OnRequestAsync(TChannel channel, Message message, TimeSpan timeout, 136public Task<Message> RequestAsync(Message message, TimeSpan timeout) 141public async Task<Message> RequestAsync(Message message, TimeSpan timeout, MaskingMode maskingMode) 200protected override Task<bool> TryGetChannelAsync(TimeSpan timeout) 285protected override async Task<(bool, RequestContext)> OnTryReceiveAsync(TDuplexChannel channel, TimeSpan timeout) 449protected override Task<Message> OnRequestAsync(TRequestChannel channel, Message message, 477public override async Task<(bool, RequestContext)> TryReceiveAsync(TimeSpan timeout)
System\ServiceModel\Channels\DelegatingStream.cs (1)
91public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => BaseStream.ReadAsync(buffer, offset, count, cancellationToken);
System\ServiceModel\Channels\DetectEofStream.cs (1)
22public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, Threading.CancellationToken cancellationToken)
System\ServiceModel\Channels\DuplexChannel.cs (4)
88public Task<Message> ReceiveAsync() 93public Task<Message> ReceiveAsync(TimeSpan timeout) 128public Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout) 157public Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Channels\IInputChannel.cs (4)
31Task<Message> ReceiveAsync(); 32Task<Message> ReceiveAsync(TimeSpan timeout); 33Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout); 34Task<bool> WaitForMessageAsync(TimeSpan timeout);
System\ServiceModel\Channels\InputChannel.cs (1)
11internal static async Task<Message> HelpReceiveAsync(IAsyncInputChannel channel, TimeSpan timeout)
System\ServiceModel\Channels\InputQueueChannel.cs (2)
94protected async Task<(bool dequeued, TDisposable item)> DequeueAsync(TimeSpan timeout) 108protected async Task<bool> WaitForItemAsync(TimeSpan timeout)
System\ServiceModel\Channels\IReliableChannelBinder.cs (5)
32Task<(bool success, RequestContext requestContext)> TryReceiveAsync(TimeSpan timeout); 33Task<(bool success, RequestContext requestContext)> TryReceiveAsync(TimeSpan timeout, MaskingMode maskingMode); 47Task<bool> EnsureChannelForRequestAsync(); 49Task<Message> RequestAsync(Message message, TimeSpan timeout); 50Task<Message> RequestAsync(Message message, TimeSpan timeout, MaskingMode maskingMode);
System\ServiceModel\Channels\IRequestChannel.cs (2)
26Task<Message> RequestAsync(Message message); 27Task<Message> RequestAsync(Message message, TimeSpan timeout);
System\ServiceModel\Channels\LayeredChannelFactory.cs (4)
120public async Task<Message> ReceiveAsync(TimeSpan timeout) 136public async Task<Message> ReceiveAsync() 184public async Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout) 208public Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Channels\LifetimeManager.cs (3)
90private async Task<CommunicationWaitResult> CloseCoreAsync(TimeSpan timeout, bool aborting) 277Task<CommunicationWaitResult> WaitAsync(TimeSpan timeout, bool aborting); 323public async Task<CommunicationWaitResult> WaitAsync(TimeSpan timeout, bool aborting)
System\ServiceModel\Channels\MaxMessageSizeStream.cs (1)
24public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\ServiceModel\Channels\MessageEncoder.cs (2)
61internal async Task<ArraySegment<byte>> BufferMessageStreamAsync(Stream stream, BufferManager bufferManager, int maxBufferSize, CancellationToken cancellationToken) 96internal virtual async Task<Message> ReadMessageAsync(Stream stream, BufferManager bufferManager, int maxBufferSize, string contentType, CancellationToken cancellationToken)
System\ServiceModel\Channels\ProducerConsumerStream.cs (1)
56public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\ServiceModel\Channels\ReliableChannelBinder.cs (11)
549protected virtual Task<(bool success, RequestContext requestContext)> OnTryReceiveAsync(TChannel channel, TimeSpan timeout) 728protected abstract Task<bool> TryGetChannelAsync(TimeSpan timeout); 730public virtual Task<(bool, RequestContext)> TryReceiveAsync(TimeSpan timeout) 735public virtual async Task<(bool, RequestContext)> TryReceiveAsync(TimeSpan timeout, MaskingMode maskingMode) 998public async Task<bool> EnsureChannelAsync() 1535public Task<(bool success, TChannel channel)> TryGetChannelForInputAsync(bool canGetChannel, TimeSpan timeout) 1540public Task<(bool success, TChannel channel)> TryGetChannelForOutputAsync(TimeSpan timeout, MaskingMode maskingMode) 1545private async Task<(bool success, TChannel channel)> TryGetChannelAsync(bool canGetChannel, bool canCauseFault, TimeSpan timeout, 1777private async Task<bool> TryGetChannelAsync() 1831public async Task<(bool success, TChannel channel)> TryWaitAsync() 1855private async Task<bool> WaitAsync()
System\ServiceModel\Channels\ReliableMessagingHelpers.cs (8)
370public Task<bool> WaitAsync(TimeSpan timeout) 375public async Task<bool> WaitAsync(TimeSpan timeout, bool throwTimeoutException) 848private Task<bool> EnsureChannelAsync() 912protected abstract Task<Message> OnRequestAsync(Message request, TimeSpan timeout, bool last); 914public async Task<Message> RequestAsync(TimeSpan timeout) 1042protected override async Task<Message> OnRequestAsync(Message request, TimeSpan timeout, bool last) 1085protected override async Task<Message> OnRequestAsync(Message request, TimeSpan timeout, bool last) 1157protected override async Task<Message> OnRequestAsync(Message request, TimeSpan timeout, bool last)
System\ServiceModel\Channels\ReliableOutputConnection.cs (2)
94public Task<bool> AddMessageAsync(Message message, TimeSpan timeout, object state) 133private async Task<bool> InternalAddMessageAsync(Message message, TimeSpan timeout, object state, bool isLast)
System\ServiceModel\Channels\ReliableRequestSessionChannel.cs (1)
768public async Task<Message> ReceiveReplyAsync(TimeoutHelper timeoutHelper)
System\ServiceModel\Channels\RequestChannel.cs (4)
230public Task<Message> RequestAsync(Message message) 235private async Task<Message> RequestAsyncInternal(Message message, TimeSpan timeout) 241public async Task<Message> RequestAsync(Message message, TimeSpan timeout) 314Task<Message> ReceiveReplyAsync(TimeoutHelper timeoutHelper);
System\ServiceModel\Channels\SecurityChannelFactory.cs (7)
459public Task<Message> RequestAsync(Message message) 464public async Task<Message> RequestAsync(Message message, TimeSpan timeout) 476private async Task<Message> RequestAsyncInternal(Message message, TimeSpan timeout) 529public Task<Message> ReceiveAsync() 534public Task<Message> ReceiveAsync(TimeSpan timeout) 607public async Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout) 641public Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Channels\TimeoutStream.cs (1)
54public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\ServiceModel\Channels\TransmissionStrategy.cs (4)
176public Task<(MessageAttemptInfo attemptInfo, bool success)> AddAsync(Message message, TimeSpan timeout, object state) 181public async Task<MessageAttemptInfo> AddLastAsync(Message message, TimeSpan timeout, object state) 411private async Task<(MessageAttemptInfo attemptInfo, bool success)> InternalAddAsync(Message message, bool isLast, TimeSpan timeout, object state) 777public async Task<MessageAttemptInfo> WaitAsync(TimeSpan timeout)
System\ServiceModel\Channels\TransportSecurityHelpers.cs (2)
137private static async Task<T> GetTokenAsync<T>(SecurityTokenProvider tokenProvider, TimeSpan timeout) 149public static async Task<NetworkCredential> GetUserNameCredentialAsync(SecurityTokenProviderContainer tokenProvider, TimeSpan timeout)
System\ServiceModel\Description\ServiceReflector.cs (1)
388internal static readonly Type taskTResultType = typeof(Task<>);
System\ServiceModel\Dispatcher\DispatchRuntime.cs (1)
352public Task<object> InvokeAsync(object instance, object[] inputs, out object[] outputs)
System\ServiceModel\Dispatcher\StreamFormatter.cs (2)
89private async Task<Stream> GetStreamAndWriteStartWrapperIfNecessaryAsync(XmlDictionaryWriter writer, object[] parameters, object returnValue) 299public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\ServiceModel\Dispatcher\SyncMethodInvoker.cs (3)
55var task = result as Task<Tuple<object, object[]>>; 66private Task<Tuple<object, object[]>> InvokeAsync(object instance, object[] inputs)
System\ServiceModel\Dispatcher\TaskMethodInvoker.cs (3)
66var invokeTask = result as Task<Tuple<object, object[]>>; 124private async Task<Tuple<object, object[]>> InvokeAsync(object instance, object[] inputs)
System\ServiceModel\Security\AcceleratedTokenProvider.cs (1)
155protected override Task<AcceleratedTokenProviderState> CreateNegotiationStateAsync(EndpointAddress target, Uri via, TimeSpan timeout)
System\ServiceModel\Security\ClientCredentialsSecurityTokenManager.cs (2)
351internal Task<SecurityToken> GetTokenAsync(TimeSpan timeout, ChannelBinding channelbinding) 356internal override Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout)
System\ServiceModel\Security\InitiatorSessionSymmetricTransportSecurityProtocol.cs (1)
125protected override async Task<Message> SecureOutgoingMessageAtInitiatorAsync(Message message, string actor, TimeSpan timeout)
System\ServiceModel\Security\IssuanceTokenProviderBase.cs (3)
365internal override Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout) 399protected abstract Task<T> CreateNegotiationStateAsync(EndpointAddress target, Uri via, TimeSpan timeout); 440protected async Task<SecurityToken> DoNegotiationAsync(TimeSpan timeout)
System\ServiceModel\Security\SecurityProtocol.cs (4)
492internal async Task<IList<SupportingTokenSpecification>> TryGetSupportingTokensAsync(SecurityProtocolFactory factory, EndpointAddress target, Uri via, Message message, TimeSpan timeout) 587internal static async Task<SecurityToken> GetTokenAsync(SecurityTokenProvider provider, EndpointAddress target, TimeSpan timeout) 612public abstract Task<Message> SecureOutgoingMessageAsync(Message message, TimeSpan timeout); 615public virtual async Task<(SecurityProtocolCorrelationState, Message)> SecureOutgoingMessageAsync(Message message, TimeSpan timeout, SecurityProtocolCorrelationState correlationState)
System\ServiceModel\Security\SecuritySessionClientSettings.cs (12)
617protected async Task<SecurityProtocolCorrelationState> SendCloseMessageAsync(TimeSpan timeout) 1066protected async Task<(SecurityProtocolCorrelationState, Message)> SecureOutgoingMessageAsync(Message message, TimeSpan timeout) 1120protected async Task<Message> ReceiveInternalAsync(TimeSpan timeout, SecurityProtocolCorrelationState correlationState) 1151protected async Task<(bool, bool)> CloseSessionAsync(TimeSpan timeout) 1205protected virtual async Task<SecurityProtocolCorrelationState> CloseOutputSessionAsync(TimeSpan timeout) 1443protected override async Task<SecurityProtocolCorrelationState> CloseOutputSessionAsync(TimeSpan timeout) 1462public Task<Message> RequestAsync(Message message) 1518public async Task<Message> RequestAsync(Message message, TimeSpan timeout) 1579public Task<Message> ReceiveAsync() => ReceiveAsync(DefaultReceiveTimeout); 1583public Task<Message> ReceiveAsync(TimeSpan timeout) => InputChannel.HelpReceiveAsync(this, timeout); 1613public async Task<(bool, Message)> TryReceiveAsync(TimeSpan timeout) 1712public Task<bool> WaitForMessageAsync(TimeSpan timeout)
System\ServiceModel\Security\SecuritySessionSecurityTokenProvider.cs (3)
405internal override Task<SecurityToken> GetTokenCoreInternalAsync(TimeSpan timeout) 411internal override Task<SecurityToken> RenewTokenCoreInternalAsync(TimeSpan timeout, SecurityToken tokenToBeRenewed) 491private async Task<SecurityToken> DoOperationAsync(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout)
System\ServiceModel\Security\TransportSecurityProtocol.cs (2)
23public override async Task<Message> SecureOutgoingMessageAsync(Message message, TimeSpan timeout) 52protected virtual async Task<Message> SecureOutgoingMessageAtInitiatorAsync(Message message, string actor, TimeSpan timeout)
System\ServiceModel\Security\WSSecurityTokenSerializer.cs (1)
493public virtual Task<SecurityToken> ReadTokenCoreAsync(XmlDictionaryReader reader, SecurityTokenResolver tokenResolver)
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 (12)
System\Windows\Forms\Control_InvokeAsync.cs (4)
152/// <b>Important:</b> If you pass a callback that returns a <see cref="Task"/> or <see cref="Task{T}"/>, 175public async Task<T> InvokeAsync<T>(Func<T> callback, CancellationToken cancellationToken = default) 354/// To pass a callback that returns a <see cref="Task{T}"/> instead of <see cref="ValueTask{T}"/>, 379public async Task<T> InvokeAsync<T>(
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (3)
326public static Task<TaskDialogButton> ShowDialogAsync( 358public static Task<TaskDialogButton> ShowDialogAsync( 391public static async Task<TaskDialogButton> ShowDialogAsync(
System\Windows\Forms\Form.cs (5)
5826/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. The task completes when the form is 5856public Task<DialogResult> ShowDialogAsync() => ShowDialogAsyncInternal(owner: null); 5866/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. 5896public Task<DialogResult> ShowDialogAsync(IWin32Window owner) => ShowDialogAsyncInternal(owner); 5898private 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 (89)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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!);
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 (185)
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)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\Dependencies\Collections\Extensions\ImmutableArrayExtensions.cs (5)
573public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 584public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 595public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\Dependencies\Threading\AsyncBatchingWorkQueue`2.cs (4)
92private Task<(bool ranToCompletion, TResult? result)> _updateTask = Task.FromResult((ranToCompletion: true, default(TResult?))); 197async Task<(bool ranToCompletion, TResult? result)> ContinueAfterDelayAsync(Task lastTask) 229public async Task<TResult?> WaitUntilCurrentBatchCompletesAsync() 231Task<(bool ranToCompletion, TResult? result)> updateTask;
src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\Dependencies\Threading\ProducerConsumer.cs (13)
23private static async Task<VoidResult> BatchReaderIntoArraysAsync<TArgs>( 157public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 160Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 171public static Task<TResult> RunParallelAsync<TSource, TArgs, TResult>( 174Func<IAsyncEnumerable<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 191public static Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 204public static async Task<ImmutableArray<TItem>> RunParallelAsync<TSource, TArgs>( 223private static Task<TResult> RunParallelChannelAsync<TSource, TArgs, TResult>( 226Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 319private static async Task<TResult> RunChannelAsync<TArgs, TResult>( 322Func<ChannelReader<TItem>, TArgs, CancellationToken, Task<TResult>> consumeItems, 343var readTask = ReadFromChannelAndConsumeItemsAsync(); 348async Task<TResult> ReadFromChannelAndConsumeItemsAsync()
src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
186public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 199public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 226public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 244public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 263static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 323internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\RoslynAnalyzers\Utilities\Compiler\WellKnownTypeProvider.cs (3)
196/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 199/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 201/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
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\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\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\FixAllContextHelper.cs (2)
22public static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync( 132private static async Task<ImmutableDictionary<Document, ImmutableArray<Diagnostic>>> GetDocumentDiagnosticsToFixAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\SyntaxEditorBasedCodeFixProvider.cs (3)
63protected Func<CancellationToken, Task<Document>> GetDocumentUpdater(CodeFixContext context, Diagnostic? diagnostic = null) 69private Task<Document> FixAllAsync( 78internal static async Task<Document> FixAllWithEditorAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\AbstractFixAllSpanMappingService.cs (4)
20protected abstract Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync( 23public Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 32private async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync( 72private static async Task<SyntaxNode?> GetContainingMemberOrTypeDeclarationAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
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)
164public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 170public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 205public 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\Formatting\FormatterShared.cs (2)
21public Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, CancellationToken cancellationToken) 24public async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, 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)
36protected abstract Task<bool> TypesAreCompatibleAsync(Document document, ILocalSymbol localSymbol, TLocalDeclarationStatementSyntax declarationStatement, SyntaxNode right, CancellationToken cancellationToken); 38public async Task<(bool canMove, bool mayChangeSemantics)> CanMoveDeclarationNearReferenceAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 47private async Task<State> ComputeStateAsync(Document document, SyntaxNode node, CancellationToken cancellationToken) 77public async Task<Document> MoveDeclarationNearReferenceAsync( 204private 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)
19public Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 22public abstract Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken); 24protected 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)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private 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)
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\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\BuildProtocol.cs (2)
124public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 320public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
91internal static async Task<bool> RunServerShutdownRequestAsync( 160internal static Task<BuildResponse> RunServerBuildRequestAsync( 174internal static async Task<BuildResponse> RunServerBuildRequestAsync( 197static Task<NamedPipeClientStream?> tryConnectToServerAsync( 274static async Task<BuildResponse> tryRunRequestAsync( 297var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 368internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
VBCSCompiler (32)
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\BuildProtocol.cs (2)
124public static async Task<BuildRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken) 320public static async Task<BuildResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
src\Compilers\Shared\BuildServerConnection.cs (7)
91internal static async Task<bool> RunServerShutdownRequestAsync( 160internal static Task<BuildResponse> RunServerBuildRequestAsync( 174internal static async Task<BuildResponse> RunServerBuildRequestAsync( 197static Task<NamedPipeClientStream?> tryConnectToServerAsync( 274static async Task<BuildResponse> tryRunRequestAsync( 297var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 368internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
VBCSCompiler.UnitTests (32)
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 (4)
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]; 1486var compileTask = serverData.SendAsync(request);
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 (7)
61internal Task<TestableDiagnosticListener> ServerTask { get; } 65private ServerData(CancellationTokenSource cancellationTokenSource, string pipeName, ICompilerServerLogger logger, Task<TestableDiagnosticListener> serverTask) 94var task = Task.Run(() => 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 (3)
57private Task<int> RunShutdownAsync(string pipeName, bool waitForProcess = true, CancellationToken cancellationToken = default(CancellationToken)) 208var compileTask = serverData.SendAsync(ProtocolUtil.EmptyCSharpBuildRequest); 247var compileTask = serverData.SendAsync(ProtocolUtil.EmptyCSharpBuildRequest);
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)