16 types derived from Task
System.Private.CoreLib (16)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
748private sealed class RuntimeAsyncTask<T> : Task<T>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (1)
637private sealed class ReadWriteTask : Task<int>, ITaskCompletionAction
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncStateMachineDispatcher.cs (1)
262internal sealed class AsyncStateMachineDispatcher : Task<VoidTaskResult>, IAsyncStateMachineBox, IAsyncStateMachineDispatcher
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (1)
415Task<TResult>, IAsyncStateMachineBox
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
69private sealed class TaskNode : Task<bool>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (4)
3007private protected sealed class CancellationPromise<TResult> : Task<TResult>, ITaskCompletionAction 6564private sealed class WhenAllPromise<T> : Task<T[]>, ITaskCompletionAction 6795private sealed class TwoTaskWhenAnyPromise<TTask> : Task<TTask>, ITaskCompletionAction where TTask : Task 7559internal sealed class UnwrapPromise<TResult> : Task<TResult>, ITaskCompletionAction
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (1)
1228private sealed class FromAsyncTrimPromise<TInstance> : Task<TResult> where TInstance : class
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (1)
650private sealed class ValueTaskSourceAsTask : Task<TResult>
34 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));
rzc (1)
DefaultRequestDispatcher.cs (1)
423var task = new Task<ServerResponse>(func, cancellationToken, TaskCreationOptions.LongRunning);
System.Private.CoreLib (28)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (1)
1350Task<T?> task = new();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilder.cs (1)
87return m_task = new Task<VoidTaskResult>();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncTaskMethodBuilderT.cs (2)
618return m_task = new Task<TResult>(); 700Task<TResult> task = (taskField ??= new Task<TResult>());
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
635var t = new Task<bool>(s =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (8)
1615internal static readonly Task<VoidTaskResult> s_cachedCompleted = new Task<VoidTaskResult>(false, default, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default); 5602return new Task<TResult>(result); 5626var task = new Task<TResult>(); 5650return new Task<TResult>(true, default, TaskCreationOptions.None, cancellationToken); 5674var task = new Task<TResult>(); 6433return new Task<TResult[]>(false, [], TaskCreationOptions.None, default); 6467new Task<TResult[]>(false, [], TaskCreationOptions.None, default) : 6544return new Task<TResult[]>(false, [], TaskCreationOptions.None, default);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskCache.cs (1)
28new Task<TResult>(false, result, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (6)
649Task<TResult> promise = new Task<TResult>((object?)null, creationOptions); 768Task<TResult> promise = new Task<TResult>(state, creationOptions); 885Task<TResult> promise = new Task<TResult>(state, creationOptions); 1010Task<TResult> promise = new Task<TResult>(state, creationOptions); 1143Task<TResult> promise = new Task<TResult>(state, creationOptions); 1328return new Task<TResult>(true, default, tco, ct);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (1)
631var 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\roslyn\src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
172var task = new Task<BuildResponse>(func, cancellationToken, TaskCreationOptions.LongRunning);
13459 references to Task
aspire (574)
Agents\AgentEnvironmentDetector.cs (1)
12public async Task<AgentEnvironmentApplicator[]> DetectAsync(
Agents\ClaudeCode\ClaudeCodeCliRunner.cs (3)
17public async Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 42var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 43var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Agents\ClaudeCode\IClaudeCodeCliRunner.cs (1)
18Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken);
Agents\CopilotCli\CopilotCliRunner.cs (3)
17public async Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 42var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 43var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Agents\CopilotCli\ICopilotCliRunner.cs (1)
18Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken);
Agents\IAgentEnvironmentDetector.cs (1)
17Task<AgentEnvironmentApplicator[]> DetectAsync(
Agents\McpConfigFileHelper.cs (1)
68public static async Task<JsonObject> ReadConfigAsync(string configFilePath, CancellationToken cancellationToken, Func<string, string>? preprocessContent = null)
Agents\OpenCode\IOpenCodeCliRunner.cs (1)
18Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken);
Agents\OpenCode\OpenCodeCliRunner.cs (3)
17public async Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 42var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 43var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Agents\Playwright\IPlaywrightCliRunner.cs (2)
18Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken); 26Task<bool> InstallSkillsAsync(string workingDirectory, CancellationToken cancellationToken);
Agents\Playwright\PlaywrightCliInstaller.cs (2)
78public async Task<bool> InstallAsync(AgentEnvironmentScanContext context, CancellationToken cancellationToken) 85private async Task<bool> InstallCoreAsync(AgentEnvironmentScanContext context, CancellationToken cancellationToken)
Agents\Playwright\PlaywrightCliRunner.cs (6)
16public async Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 38var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 39var errorTask = process.StandardError.ReadToEndAsync(cancellationToken); 81public async Task<bool> InstallSkillsAsync(string workingDirectory, CancellationToken cancellationToken) 107var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 108var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Agents\VsCode\IVsCodeCliRunner.cs (1)
30Task<SemVersion?> GetVersionAsync(VsCodeRunOptions options, CancellationToken cancellationToken);
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (1)
115private async Task<bool> IsVsCodeAvailableAsync(CancellationToken cancellationToken)
Agents\VsCode\VsCodeCliRunner.cs (3)
17public async Task<SemVersion?> GetVersionAsync(VsCodeRunOptions options, CancellationToken cancellationToken) 43var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 44var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Backchannel\AppHostAuxiliaryBackchannel.cs (16)
112public static Task<AppHostAuxiliaryBackchannel> ConnectAsync( 133internal static async Task<AppHostAuxiliaryBackchannel> CreateFromSocketAsync( 174private static async Task<string[]?> FetchCapabilitiesAsync(JsonRpc rpc, ILogger? logger = null) 202public async Task<AppHostInformation?> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 217public async Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default) 246public async Task<DashboardMcpConnectionInfo?> GetDashboardMcpConnectionInfoAsync(CancellationToken cancellationToken = default) 261public async Task<DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 285public async Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default) 383public async Task<CallToolResult> CallResourceMcpToolAsync( 407public async Task<GetAppHostInfoResponse?> GetAppHostInfoV2Async(CancellationToken cancellationToken = default) 444public async Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default) 490public async Task<GetResourcesResponse> GetResourcesV2Async(GetResourcesRequest? request = null, CancellationToken cancellationToken = default) 635public async Task<CallMcpToolResponse> CallMcpToolV2Async( 684public async Task<bool> StopAppHostV2Async(StopAppHostRequest? request = null, CancellationToken cancellationToken = default) 714public async Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync( 740public async Task<WaitForResourceResponse> WaitForResourceAsync(
Backchannel\AppHostCliBackchannel.cs (8)
17Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken); 23Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 42private Task<JsonRpc> GetRpcTaskAsync() 67public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 209Task<JsonRpc>? initialTask = null; 212var currentTask = GetRpcTaskAsync(); 235var rpcTask = GetRpcTaskAsync(); 407public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Backchannel\AppHostConnectionHelper.cs (1)
26public static async Task<IAppHostAuxiliaryBackchannel?> GetSelectedConnectionAsync(
Backchannel\AppHostConnectionResolver.cs (3)
47public async Task<AppHostConnectionResult[]> ResolveAllConnectionsAsync( 76public async Task<AppHostConnectionResult> ResolveConnectionAsync( 171private async Task<IAppHostAuxiliaryBackchannel?> PromptForAppHostSelectionAsync(
Backchannel\AuxiliaryBackchannelMonitor.cs (1)
199private async Task<IReadOnlyList<Task>> ProcessDirectoryChangesAsync(CancellationToken cancellationToken)
Backchannel\ExtensionBackchannel.cs (16)
34Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 35Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull; 36Task<bool> ConfirmAsync(string promptText, bool defaultValue, CancellationToken cancellationToken); 37Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 38Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken); 39Task<string?> PromptForFilePathAsync(string promptText, string? defaultValue, bool directory, CancellationToken cancellationToken); 42Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken); 43Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken); 411public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 441public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 471public async Task<bool> ConfirmAsync(string promptText, bool defaultValue, CancellationToken cancellationToken) 495public async Task<string> PromptForStringAsync(string promptText, string? defaultValue, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken) 521public async Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator, bool required, CancellationToken cancellationToken) 547public async Task<string?> PromptForFilePathAsync(string promptText, string? defaultValue, bool directory, CancellationToken cancellationToken) 632public async Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken) 638public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Backchannel\ExtensionRpcTarget.cs (8)
17Task<string> GetCliVersionAsync(); 20Task<ValidationResult?> ValidatePromptInputStringAsync(string input); 26Task<string?> GetDebugSessionIdAsync(); 29Task<string[]> GetCliCapabilitiesAsync(); 36public Task<string> GetCliVersionAsync() 41public Task<ValidationResult?> ValidatePromptInputStringAsync(string input) 52public Task<string?> GetDebugSessionIdAsync() 57public Task<string[]> GetCliCapabilitiesAsync()
Backchannel\IAppHostAuxiliaryBackchannel.cs (7)
54Task<DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default); 61Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default); 87Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default); 97Task<CallToolResult> CallResourceMcpToolAsync( 109Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default); 118Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync( 131Task<WaitForResourceResponse> WaitForResourceAsync(
Bundles\BundleService.cs (3)
82public async Task<LayoutConfiguration?> EnsureExtractedAndGetLayoutAsync(CancellationToken cancellationToken = default) 89public async Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 128private async Task<BundleExtractResult> ExtractCoreAsync(string destinationPath, CancellationToken cancellationToken)
Bundles\IBundleService.cs (2)
32Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default); 41Task<LayoutConfiguration?> EnsureExtractedAndGetLayoutAsync(CancellationToken cancellationToken = default);
Caching\DiskCache.cs (1)
49public async Task<string?> GetAsync(string key, CancellationToken cancellationToken = default)
Caching\IDiskCache.cs (1)
8Task<string?> GetAsync(string key, CancellationToken cancellationToken = default);
Certificates\CertificateService.cs (3)
28Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken); 38public async Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken) 54private async Task<CertificateTrustResult> CheckMachineReadableAsync()
Commands\AddCommand.cs (9)
63protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 283private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> GetPackageByInteractiveFlow(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> possiblePackages, string? preferredVersion, CancellationToken cancellationToken) 324private async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> GetPackageByInteractiveFlowWithNoMatchesMessage(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> possiblePackages, string? searchTerm, CancellationToken cancellationToken) 346Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken); 347Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken); 352public virtual async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 362async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForChannelPackagesAsync( 412var rootChoices = new List<(string Label, Func<CancellationToken, Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)>> Action)>(); 456public virtual async Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken)
Commands\AgentCommand.cs (1)
37protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\AgentInitCommand.cs (5)
60internal Task<int> ExecuteCommandAsync(ParseResult parseResult, CancellationToken cancellationToken) 69internal async Task<int> PromptAndChainAsync( 99protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 105private async Task<DirectoryInfo> PromptForWorkspaceRootAsync(CancellationToken cancellationToken) 135private async Task<int> ExecuteAgentInitAsync(DirectoryInfo workspaceRoot, CancellationToken cancellationToken)
Commands\AgentMcpCommand.cs (3)
91internal Task<int> ExecuteCommandAsync(ParseResult parseResult, CancellationToken cancellationToken) 96protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 256private Task<IAppHostAuxiliaryBackchannel?> GetSelectedConnectionAsync(CancellationToken cancellationToken)
Commands\AppHostLauncher.cs (2)
76public async Task<int> LaunchDetachedAsync( 217private async Task<LaunchResult> LaunchAndWaitForBackchannelAsync(
Commands\BaseCommand.cs (1)
72protected abstract Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken);
Commands\BaseConfigSubCommand.cs (1)
18public abstract Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken);
Commands\CacheCommand.cs (2)
29protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 44protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\CertificatesCleanCommand.cs (1)
30protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\CertificatesCommand.cs (1)
30protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\CertificatesTrustCommand.cs (1)
31protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ConfigCommand.cs (16)
47protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 84protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 96public override async Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 102private async Task<int> ExecuteAsync(string key, CancellationToken cancellationToken) 144protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 165public override async Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 178private async Task<int> ExecuteAsync(string key, string value, bool isGlobal, CancellationToken cancellationToken) 216protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 222public override Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 227private async Task<int> ExecuteAsync(bool showAll, CancellationToken cancellationToken) 364protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 378public override async Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 398private async Task<int> ExecuteAsync(string key, bool isGlobal, CancellationToken cancellationToken) 450protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 456public override Task<int> InteractiveExecuteAsync(CancellationToken cancellationToken) 461private Task<int> ExecuteAsync(bool useJson)
Commands\DeployCommand.cs (1)
38protected override Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, ParseResult parseResult, CancellationToken cancellationToken)
Commands\DescribeCommand.cs (4)
113protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 140var dashboardUrlsTask = connection.GetDashboardUrlsAsync(cancellationToken); 141var snapshotsTask = connection.GetResourceSnapshotsAsync(cancellationToken); 194private async Task<int> ExecuteWatchAsync(IAppHostAuxiliaryBackchannel connection, IReadOnlyList<ResourceSnapshot> initialSnapshots, string? dashboardBaseUrl, string? resourceName, OutputFormat format, CancellationToken cancellationToken)
Commands\DoCommand.cs (1)
46protected override async Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsCommand.cs (1)
39protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsGetCommand.cs (1)
60protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsListCommand.cs (1)
49protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DocsSearchCommand.cs (1)
61protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\DoctorCommand.cs (1)
43protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ExecCommand.cs (2)
71protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 114Task<int>? pendingRun = null;
Commands\ExportCommand.cs (1)
70protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ExtensionInternalCommand.cs (2)
24protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 40protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\InitCommand.cs (5)
129protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 189private async Task<int> InitializeExistingSolutionAsync(InitContext initContext, ParseResult parseResult, CancellationToken cancellationToken) 572private async Task<int> CreatePolyglotAppHostAsync(LanguageInfo language, CancellationToken cancellationToken) 601private async Task<int> CreateEmptyAppHostAsync(ParseResult parseResult, CancellationToken cancellationToken) 718private async Task<(NuGetPackage Package, PackageChannel Channel)> GetProjectTemplatesVersionAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\LogsCommand.cs (4)
130protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 199private async Task<int> ExecuteGetAsync( 248private async Task<int> ExecuteWatchAsync( 292private static async Task<IList<LogEntry>> CollectLogsAsync(
Commands\McpCallCommand.cs (1)
64protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpCommand.cs (1)
46protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpInitCommand.cs (1)
57protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpStartCommand.cs (1)
36protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\McpToolsCommand.cs (1)
51protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\NewCommand.cs (13)
140private async Task<ITemplate?> GetProjectTemplateAsync(ITemplate[] availableTemplates, ParseResult parseResult, CancellationToken cancellationToken) 188private async Task<ResolveTemplateVersionResult> ResolveCliTemplateVersionAsync(ParseResult parseResult, CancellationToken cancellationToken) 234protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 295Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken); 296Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken); 297Task<string> PromptForOutputPath(string v, CancellationToken cancellationToken); 308Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken); 313public virtual async Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken) 344async Task<(NuGetPackage Package, PackageChannel Channel)> PromptForChannelPackagesAsync( 367var rootChoices = new List<(string Label, Func<CancellationToken, Task<(NuGetPackage, PackageChannel)>> Action)>(); 410public virtual async Task<string> PromptForOutputPath(string path, CancellationToken cancellationToken) 422public virtual async Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 435public virtual async Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken)
Commands\PipelineCommandBase.cs (8)
114protected abstract Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, ParseResult parseResult, CancellationToken cancellationToken); 125protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 158Task<int>? pendingRun = null; 375public async Task<bool> ProcessPublishingActivitiesDebugAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, IAppHostCliBackchannel backchannel, CancellationToken cancellationToken) 482public async Task<bool> ProcessAndDisplayPublishingActivitiesAsync(IAsyncEnumerable<PublishingActivity> publishingActivities, IAppHostCliBackchannel backchannel, bool isDebugOrTraceLoggingEnabled, CancellationToken cancellationToken) 798private async Task<string?> HandleSingleInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken) 840private async Task<string?> HandleSelectInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken) 874private async Task<string?> HandleNumberInputAsync(PublishingPromptInput input, string promptText, CancellationToken cancellationToken)
Commands\PsCommand.cs (2)
96protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 149private async Task<List<AppHostDisplayInfo>> GatherAppHostInfosAsync(List<IAppHostAuxiliaryBackchannel> connections, bool includeResources, CancellationToken cancellationToken)
Commands\PublishCommand.cs (3)
20Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken); 25public virtual async Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken) 52protected override Task<string[]> GetRunArgumentsAsync(string? fullyQualifiedOutputPath, string[] unmatchedTokens, ParseResult parseResult, CancellationToken cancellationToken)
Commands\RenderCommand.cs (4)
52protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 97private async Task<int> TestShowStatusAsync(CancellationToken cancellationToken) 114private async Task<int> TestShowStatusWithMarkupAsync(CancellationToken cancellationToken) 129private async Task<int> TestShowStatusEscapedAsync(CancellationToken cancellationToken)
Commands\ResourceCommand.cs (1)
66protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\ResourceCommandHelper.cs (2)
29public static async Task<int> ExecuteResourceCommandAsync( 52public static async Task<int> ExecuteGenericCommandAsync(
Commands\RestoreCommand.cs (1)
58protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\RunCommand.cs (3)
129protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 233var pendingRun = project.RunAsync(context, cancellationToken); 614private Task<int> ExecuteDetachedAsync(ParseResult parseResult, FileInfo? passedAppHostProjectFile, bool isExtensionHost, CancellationToken cancellationToken)
Commands\Sdk\SdkCommand.cs (1)
36protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\Sdk\SdkDumpCommand.cs (2)
69protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 133private async Task<int> DumpCapabilitiesAsync(
Commands\Sdk\SdkGenerateCommand.cs (3)
62protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 101private async Task<LanguageInfo?> GetLanguageInfoAsync(string language, CancellationToken cancellationToken) 111private async Task<int> GenerateSdkAsync(
Commands\SecretCommand.cs (1)
43protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretDeleteCommand.cs (1)
43protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretGetCommand.cs (1)
43protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretListCommand.cs (1)
44protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretPathCommand.cs (1)
35protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SecretSetCommand.cs (1)
48protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\SetupCommand.cs (1)
47protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\StartCommand.cs (1)
44protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\StopCommand.cs (5)
57protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 88private async Task<int> ExecuteNonInteractiveAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 126private async Task<int> ExecuteInteractiveAsync(FileInfo? passedAppHostProjectFile, CancellationToken cancellationToken) 147private async Task<int> StopAllAppHostsAsync(CancellationToken cancellationToken) 181private async Task<int> StopAppHostAsync(IAppHostAuxiliaryBackchannel connection, CancellationToken cancellationToken)
Commands\TelemetryCommand.cs (1)
43protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\TelemetryCommandHelpers.cs (2)
104public static async Task<(bool Success, string? BaseUrl, string? ApiToken, string? DashboardUrl, int ExitCode)> GetDashboardApiAsync( 206public static async Task<ResourceInfoJson[]> GetAllResourcesAsync(HttpClient client, string baseUrl, CancellationToken cancellationToken)
Commands\TelemetryLogsCommand.cs (4)
75protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 105private async Task<int> FetchLogsAsync( 168private async Task<int> GetLogsSnapshotAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, CancellationToken cancellationToken) 194private async Task<int> StreamLogsAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, CancellationToken cancellationToken)
Commands\TelemetrySpansCommand.cs (4)
71protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 101private async Task<int> FetchSpansAsync( 169private async Task<int> GetSpansSnapshotAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, CancellationToken cancellationToken) 195private async Task<int> StreamSpansAsync(HttpClient client, string url, OutputFormat format, IReadOnlyList<IOtlpResource> allResources, CancellationToken cancellationToken)
Commands\TelemetryTracesCommand.cs (3)
69protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 105private async Task<int> FetchSingleTraceAsync( 165private async Task<int> FetchTracesAsync(
Commands\TemplateCommand.cs (3)
15private readonly Func<ParseResult, CancellationToken, Task<int>> _executeCallback; 17public TemplateCommand(ITemplate template, Func<ParseResult, CancellationToken, Task<int>> executeCallback, IFeatures features, ICliUpdateNotifier updateNotifier, CliExecutionContext executionContext, IInteractionService interactionService, AspireCliTelemetry telemetry) 27protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\UpdateCommand.cs (3)
110protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 268private async Task<int> ExecuteSelfUpdateAsync(ParseResult parseResult, CancellationToken cancellationToken, string? selectedChannel = null) 488private async Task<string?> GetNewVersionAsync(string exePath, CancellationToken cancellationToken)
Commands\WaitCommand.cs (2)
66protected override async Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 108private async Task<int> WaitForResourceAsync(
Configuration\ConfigurationService.cs (5)
39public async Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 127public async Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 138public async Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 146public async Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 327public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default)
Configuration\IConfigurationService.cs (5)
9Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default); 10Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default); 11Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default); 12Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default); 13Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default);
DotNet\DotNetCliExecution.cs (1)
87public async Task<int> WaitForExitAsync(CancellationToken cancellationToken)
DotNet\DotNetCliRunner.cs (30)
29Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 30Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 31Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, 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> RestoreAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 35Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 36Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 37Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 38Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 39Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 40Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 41Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 42Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken); 99private async Task<int> ExecuteAsync( 231public async Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 314public async Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 415public async Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 490public async Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 619public async Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 634public async Task<int> RestoreAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 650public async Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 673public async Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 737public async Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 766public async Task<string> ComputeNuGetConfigHierarchySha256Async(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 829public async Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 998public async Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 1038public async Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 1104public async Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 1133public Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
DotNet\DotNetSdkInstaller.cs (1)
22public async Task<(bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)> CheckAsync(CancellationToken cancellationToken = default)
DotNet\IDotNetCliExecution.cs (1)
37Task<int> WaitForExitAsync(CancellationToken cancellationToken);
DotNet\IDotNetSdkInstaller.cs (1)
16Task<(bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)> CheckAsync(CancellationToken cancellationToken = default);
Git\GitRepository.cs (3)
17public async Task<DirectoryInfo?> GetRootAsync(CancellationToken cancellationToken) 36var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 37var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Git\IGitRepository.cs (1)
16Task<DirectoryInfo?> GetRootAsync(CancellationToken cancellationToken);
Interaction\ConsoleInteractionService.cs (7)
45public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 129public async Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 159public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 164public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 200public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 389public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
Interaction\ExtensionInteractionService.cs (7)
67public async Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 101public async Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 149public async Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 201public async Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 232public async Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, 264public async Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter,
Interaction\IInteractionService.cs (7)
13Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false); 15Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default); 16Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default); 17public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default); 18Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull; 19Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull;
Layout\LayoutProcessRunner.cs (3)
35public static async Task<(int ExitCode, string Output, string Error)> RunAsync( 46var outputTask = process.StandardOutput.ReadToEndAsync(ct); 47var errorTask = process.StandardError.ReadToEndAsync(ct);
Mcp\Docs\DocsCache.cs (6)
32public async Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 74public async Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 121public async Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) 211private async Task<string?> GetFromDiskAsync(string key, CancellationToken cancellationToken) 249private async Task<string?> GetETagFromDiskAsync(CancellationToken cancellationToken) 320private async Task<LlmsDocument[]?> GetIndexFromDiskAsync(CancellationToken cancellationToken)
Mcp\Docs\DocsFetcher.cs (2)
21Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default); 35public async Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default)
Mcp\Docs\DocsSearchService.cs (2)
22Task<DocsSearchResponse?> SearchAsync(string query, int topK = 5, CancellationToken cancellationToken = default); 132public async Task<DocsSearchResponse?> SearchAsync(string query, int topK = 5, CancellationToken cancellationToken = default)
Mcp\Docs\IDocsCache.cs (3)
17Task<string?> GetAsync(string key, CancellationToken cancellationToken = default); 33Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default); 48Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default);
Mcp\Docs\LlmsTxtParser.cs (1)
75public static Task<IReadOnlyList<LlmsDocument>> ParseAsync(string content, CancellationToken cancellationToken = default)
Mcp\IMcpResourceToolRefreshService.cs (1)
31Task<(IReadOnlyDictionary<string, ResourceToolEntry> ToolMap, bool Changed)> RefreshResourceToolMapAsync(CancellationToken cancellationToken);
Mcp\McpResourceToolRefreshService.cs (1)
74public async Task<(IReadOnlyDictionary<string, ResourceToolEntry> ToolMap, bool Changed)> RefreshResourceToolMapAsync(CancellationToken cancellationToken)
Mcp\Tools\ListResourcesTool.cs (2)
69var dashboardUrlsTask = connection.GetDashboardUrlsAsync(cancellationToken); 70var snapshotsTask = connection.GetResourceSnapshotsAsync(cancellationToken);
Mcp\Tools\McpToolHelpers.cs (1)
12public static async Task<(string apiToken, string apiBaseUrl, string? dashboardBaseUrl)> GetDashboardInfoAsync(IAuxiliaryBackchannelMonitor auxiliaryBackchannelMonitor, ILogger logger, CancellationToken cancellationToken)
Npm\INpmProvenanceChecker.cs (1)
193Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, CancellationToken cancellationToken, string? sriIntegrity = null);
Npm\INpmRunner.cs (4)
36Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken); 46Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken); 58Task<bool> AuditSignaturesAsync(string packageName, string version, CancellationToken cancellationToken); 66Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken);
Npm\NpmRunner.cs (7)
16public async Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken) 75public async Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken) 113public async Task<bool> AuditSignaturesAsync(string packageName, string version, CancellationToken cancellationToken) 165public async Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken) 226private async Task<string?> RunNpmCommandInDirectoryAsync(string npmPath, string[] args, string workingDirectory, CancellationToken cancellationToken) 250var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 251var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Npm\SigstoreNpmProvenanceChecker.cs (3)
22public async Task<ProvenanceVerificationResult> VerifyProvenanceAsync( 87private async Task<string?> FetchAttestationJsonAsync( 182private async Task<(ProvenanceVerificationResult? Failure, VerificationResult? Result)> VerifySigstoreBundleAsync(
NuGet\BundleNuGetPackageCache.cs (5)
40public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync( 56public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync( 72public async Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync( 88public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync( 107private async Task<IEnumerable<NuGetPackage>> SearchPackagesInternalAsync(
NuGet\BundleNuGetService.cs (2)
24Task<string> RestorePackagesAsync( 50public async Task<string> RestorePackagesAsync(
NuGet\NuGetPackageCache.cs (9)
16Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 17Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 18Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken); 19Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken); 32public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 47public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 52public async Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 68private static async Task<string> ComputeNuGetConfigHashSuffixAsync(FileInfo nugetConfigFile, CancellationToken cancellationToken) 76public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string query, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
NuGet\NuGetPackagePrefetcher.cs (1)
71private async Task<SystemCommand?> WaitForCommandSelectionAsync(CancellationToken cancellationToken)
OpenCode\IOpenCodeCliRunner.cs (1)
18Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken);
OpenCode\OpenCodeCliRunner.cs (3)
17public async Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 35var outputTask = process.StandardOutput.ReadToEndAsync(cancellationToken); 36var errorTask = process.StandardError.ReadToEndAsync(cancellationToken);
Packaging\NuGetConfigMerger.cs (4)
33public static async Task CreateOrUpdateAsync(DirectoryInfo targetDirectory, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback = null, CancellationToken cancellationToken = default) 60private static async Task CreateNewNuGetConfigAsync(DirectoryInfo targetDirectory, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback, CancellationToken cancellationToken) 95private static async Task UpdateExistingNuGetConfigAsync(FileInfo nugetConfigFile, PackageChannel channel, Func<FileInfo, XmlDocument?, XmlDocument, CancellationToken, Task<bool>>? confirmationCallback, CancellationToken cancellationToken) 147private static async Task<NuGetConfigContext> LoadAndValidateConfigAsync(FileInfo nugetConfigFile, PackageMapping[] mappings)
Packaging\PackageChannel.cs (6)
43public async Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 50var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 83public async Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, CancellationToken cancellationToken) 85var tasks = new List<Task<IEnumerable<NuGetPackage>>>(); 125public async Task<IEnumerable<NuGetPackage>> GetPackagesAsync(string packageId, DirectoryInfo workingDirectory, CancellationToken cancellationToken) 132var tasks = new List<Task<IEnumerable<NuGetPackage>>>();
Packaging\PackagingService.cs (2)
13public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default); 18public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default)
Packaging\TemporaryNuGetConfig.cs (1)
20public static async Task<TemporaryNuGetConfig> CreateAsync(PackageMapping[] mappings)
Program.cs (2)
243internal static async Task<IHost> BuildApplicationAsync(string[] args, CliStartupContext startupContext, Dictionary<string, string?>? configurationValues = null) 648public static async Task<int> Main(string[] args)
Projects\AppHostRpcClient.cs (8)
29public static async Task<AppHostRpcClient> ConnectAsync(string socketPath, CancellationToken cancellationToken) 46public Task<RuntimeSpec> GetRuntimeSpecAsync(string languageId, CancellationToken cancellationToken) 50public Task<Dictionary<string, string>> ScaffoldAppHostAsync( 56public Task<Dictionary<string, string>> GenerateCodeAsync(string languageId, CancellationToken cancellationToken) 61public Task<Commands.Sdk.CapabilitiesInfo> GetCapabilitiesAsync(CancellationToken cancellationToken) 70public Task<T> InvokeAsync<T>(string methodName, object?[] parameters, CancellationToken cancellationToken) 91private static async Task<Stream> ConnectToServerAsync(string socketPath, CancellationToken cancellationToken) 163public async Task<IAppHostRpcClient> ConnectAsync(string socketPath, CancellationToken cancellationToken)
Projects\AppHostServerProject.cs (2)
21Task<IAppHostServerProject> CreateAsync(string appPath, CancellationToken cancellationToken = default); 37public async Task<IAppHostServerProject> CreateAsync(string appPath, CancellationToken cancellationToken = default)
Projects\AppHostServerSession.cs (2)
45public async Task<IAppHostRpcClient> GetRpcClientAsync(CancellationToken cancellationToken) 101public async Task<AppHostServerSessionResult> CreateAsync(
Projects\DefaultLanguageDiscovery.cs (3)
77public Task<IEnumerable<LanguageInfo>> GetAvailableLanguagesAsync(CancellationToken cancellationToken = default) 83public Task<string?> GetPackageForLanguageAsync(LanguageId languageId, CancellationToken cancellationToken = default) 92public Task<LanguageId?> DetectLanguageAsync(DirectoryInfo directory, CancellationToken cancellationToken = default)
Projects\DotNetAppHostProject.cs (10)
83public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) 157public async Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 200public async Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 371public async Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 472public async Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 495public async Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 502public async Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 522public async Task<string?> GetUserSecretsIdAsync(FileInfo projectFile, bool autoInit, CancellationToken cancellationToken) 550private async Task<string?> QueryUserSecretsIdAsync(FileInfo projectFile, CancellationToken cancellationToken) 590private async Task<string?> ConfigureIsolatedModeAsync(
Projects\DotNetBasedAppHostServerProject.cs (3)
272public async Task<(string ProjectPath, string? ChannelName)> CreateProjectFilesAsync( 422public async Task<(bool Success, OutputCollector Output)> BuildAsync(CancellationToken cancellationToken = default) 439public async Task<AppHostServerPrepareResult> PrepareAsync(
Projects\ExtensionGuestLauncher.cs (1)
29public async Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\GuestAppHostProject.cs (15)
122public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) 152private async Task<List<IntegrationReference>> GetIntegrationReferencesAsync( 226private static async Task<(bool Success, OutputCollector? Output, string? ChannelName, bool NeedsCodeGen)> PrepareAppHostServerAsync( 240internal async Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, CancellationToken cancellationToken) 298Task<bool> IGuestAppHostSdkGenerator.BuildAndGenerateSdkAsync(DirectoryInfo directory, CancellationToken cancellationToken) 308public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 338public async Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 748public async Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 1002public async Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 1022public async Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 1158public async Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 1298private async Task<int> InstallDependenciesAsync( 1331private async Task<(int ExitCode, OutputCollector? Output)> ExecuteGuestAppHostAsync( 1354private async Task<(int ExitCode, OutputCollector? Output)> ExecuteGuestAppHostForPublishAsync( 1376public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken)
Projects\GuestRuntime.cs (4)
59public async Task<(int ExitCode, OutputCollector Output)> InstallDependenciesAsync(DirectoryInfo directory, CancellationToken cancellationToken) 93public async Task<(int ExitCode, OutputCollector? Output)> RunAsync( 118public async Task<(int ExitCode, OutputCollector? Output)> PublishAsync( 131private async Task<(int ExitCode, OutputCollector? Output)> ExecuteCommandAsync(
Projects\IAppHostProject.cs (8)
164Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default); 193Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken); 201Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken); 210Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken); 218Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken); 226Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken); 235Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken); 243Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken);
Projects\IAppHostRpcClient.cs (6)
23Task<RuntimeSpec> GetRuntimeSpecAsync(string languageId, CancellationToken cancellationToken); 29Task<Dictionary<string, string>> ScaffoldAppHostAsync( 39Task<Dictionary<string, string>> GenerateCodeAsync(string languageId, CancellationToken cancellationToken); 45Task<CapabilitiesInfo> GetCapabilitiesAsync(CancellationToken cancellationToken); 55Task<T> InvokeAsync<T>(string methodName, object?[] parameters, CancellationToken cancellationToken); 72Task<IAppHostRpcClient> ConnectAsync(string socketPath, CancellationToken cancellationToken);
Projects\IAppHostServerProject.cs (1)
45Task<AppHostServerPrepareResult> PrepareAsync(
Projects\IAppHostServerSession.cs (2)
35Task<IAppHostRpcClient> GetRpcClientAsync(CancellationToken cancellationToken); 53Task<AppHostServerSessionResult> CreateAsync(
Projects\IGuestAppHostSdkGenerator.cs (1)
17Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, CancellationToken cancellationToken);
Projects\IGuestProcessLauncher.cs (1)
16Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\ILanguageDiscovery.cs (3)
64Task<IEnumerable<LanguageInfo>> GetAvailableLanguagesAsync(CancellationToken cancellationToken = default); 72Task<string?> GetPackageForLanguageAsync(LanguageId languageId, CancellationToken cancellationToken = default); 81Task<LanguageId?> DetectLanguageAsync(DirectoryInfo directory, CancellationToken cancellationToken = default);
Projects\ILanguageService.cs (3)
16Task<IAppHostProject?> GetConfiguredProjectAsync(CancellationToken cancellationToken = default); 31Task<IAppHostProject> PromptForProjectAsync(CancellationToken cancellationToken = default); 40Task<IAppHostProject> GetOrPromptForProjectAsync(string? explicitLanguageId = null, bool saveSelection = true, CancellationToken cancellationToken = default);
Projects\LanguageService.cs (4)
34public async Task<IAppHostProject?> GetConfiguredProjectAsync(CancellationToken cancellationToken = default) 67public async Task<IAppHostProject> PromptForProjectAsync(CancellationToken cancellationToken = default) 76private async Task<(IAppHostProject project, LanguageInfo language)> PromptForProjectWithLanguageAsync(CancellationToken cancellationToken) 107public async Task<IAppHostProject> GetOrPromptForProjectAsync(
Projects\PrebuiltAppHostServer.cs (6)
99public async Task<AppHostServerPrepareResult> PrepareAsync( 164private async Task<string> RestoreNuGetPackagesAsync( 189private async Task<string> BuildIntegrationProjectAsync( 337private async Task<string?> ResolveChannelNameAsync(CancellationToken cancellationToken) 360private async Task<IEnumerable<string>?> GetNuGetSourcesAsync(string? channelName, CancellationToken cancellationToken) 514private async Task<List<string>> ReadProjectRefAssemblyNamesAsync(string libsPath, CancellationToken cancellationToken)
Projects\ProcessGuestLauncher.cs (2)
29public async Task<(int ExitCode, OutputCollector? Output)> LaunchAsync( 115private static async Task<bool> WaitForDrainAsync(Task drainTask, CancellationToken cancellationToken)
Projects\ProjectLocator.cs (10)
20Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default); 21Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken); 28Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default); 42public async Task<List<FileInfo>> FindAppHostProjectFilesAsync(string searchDirectory, CancellationToken cancellationToken) 48private async Task<(List<FileInfo> BuildableAppHost, List<FileInfo> UnbuildableSuspectedAppHostProjects, bool HasUnsupportedProjects)> FindAppHostProjectFilesAsync(DirectoryInfo searchDirectory, CancellationToken cancellationToken) 163public async Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 168private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(CancellationToken cancellationToken) 173private async Task<FileInfo?> GetAppHostProjectFileFromSettingsAsync(bool silent, CancellationToken cancellationToken) 254public async Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 401public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken = default)
Projects\ProjectUpdater.cs (11)
23Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default); 28public async Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default) 155private async Task<(IEnumerable<UpdateStep> UpdateSteps, bool FallbackUsed)> GetUpdateStepsAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken) 172private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, CancellationToken cancellationToken) 177private async Task<JsonDocument> GetItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, CancellationToken cancellationToken) 197private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, UpdateContext context, CancellationToken cancellationToken) 202private async Task<JsonDocument> GetItemsAndPropertiesWithFallbackAsync(FileInfo projectFile, string[] items, string[] properties, UpdateContext context, CancellationToken cancellationToken) 240private async Task<NuGetPackageCli> GetLatestVersionOfPackageAsync(UpdateContext context, string packageId, CancellationToken cancellationToken) 761private async Task<string?> GetPackageVersionFromDirectoryPackagesPropsAsync(string packageId, FileInfo directoryPackagesPropsFile, FileInfo projectFile, CancellationToken cancellationToken) 831private async Task<string?> ResolveMSBuildPropertyAsync(string propertyName, FileInfo projectFile, CancellationToken cancellationToken) 895private async Task<bool> AnalyzeAndConfirmNuGetConfigChanges(FileInfo targetFile, XmlDocument? originalDocument, XmlDocument proposedDocument, CancellationToken cancellationToken)
Projects\RunningInstanceManager.cs (2)
43public async Task<bool> StopRunningInstanceAsync(string socketPath, CancellationToken cancellationToken) 93public async Task<bool> MonitorProcessesForTerminationAsync(AppHostInformation appHostInfo, CancellationToken cancellationToken)
Projects\SolutionLocator.cs (5)
13Task<FileInfo?> FindSolutionFileAsync(DirectoryInfo startDirectory, CancellationToken cancellationToken = default); 18public async Task<FileInfo?> FindSolutionFileAsync(DirectoryInfo startDirectory, CancellationToken cancellationToken = default) 50private static async Task<List<FileInfo>> GetSolutionFilesInDirectoryAndSubfoldersAsync(DirectoryInfo directory, CancellationToken cancellationToken) 53var slnTask = Task.Run(() => 66var slnxTask = Task.Run(() =>
Scaffolding\IScaffoldingService.cs (1)
30Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken);
Scaffolding\ScaffoldingService.cs (3)
36public async Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken) 46private async Task<bool> ScaffoldGuestLanguageAsync(ScaffoldContext context, CancellationToken cancellationToken) 173private async Task<int> InstallDependenciesAsync(
Secrets\SecretStoreResolver.cs (1)
19public async Task<SecretsStoreResult?> ResolveAsync(
Telemetry\AspireCliTelemetry.cs (2)
193var macAddressHashTask = _machineInformationProvider.GetMacAddressHash(); 194var deviceIdTask = _machineInformationProvider.GetOrCreateDeviceId();
Telemetry\DefaultMachineInformationProvider.cs (1)
21public override Task<string?> GetOrCreateDeviceId() => Task.FromResult<string?>(null);
Telemetry\IMachineInformationProvider.cs (2)
15Task<string?> GetOrCreateDeviceId(); 20Task<string> GetMacAddressHash();
Telemetry\MachineInformationProviderBase.cs (2)
31public abstract Task<string?> GetOrCreateDeviceId(); 34public virtual Task<string> GetMacAddressHash()
Telemetry\UnixMachineInformationProvider.cs (3)
23public override async Task<string?> GetOrCreateDeviceId() 62public async virtual Task<bool> WriteValueToDisk(string directoryPath, string fileName, string? value) 102public async virtual Task<string?> ReadValueFromDisk(string directoryPath, string fileName)
Telemetry\WindowsMachineInformationProvider.cs (1)
24public override Task<string?> GetOrCreateDeviceId()
Templating\CallbackTemplate.cs (2)
13Func<CallbackTemplate, TemplateInputs, ParseResult, CancellationToken, Task<TemplateResult>> applyTemplateCallback, 35public Task<TemplateResult> ApplyTemplateAsync(TemplateInputs inputs, ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.cs (2)
77public Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) 82public Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default)
Templating\CliTemplateFactory.EmptyTemplate.cs (2)
15private async Task<TemplateResult> ApplyEmptyAppHostTemplateAsync(CallbackTemplate _, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken) 109private async Task<bool> ResolveUseLocalhostTldAsync(System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Templating\CliTemplateFactory.TypeScriptStarterTemplate.cs (1)
15private async Task<TemplateResult> ApplyTypeScriptStarterTemplateAsync(CallbackTemplate _, TemplateInputs inputs, System.CommandLine.ParseResult parseResult, CancellationToken cancellationToken)
Templating\DotNetTemplateFactory.cs (19)
71public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) 83public async Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default) 93private async Task<bool> IsDotNetSdkAvailableAsync(CancellationToken cancellationToken) 273private async Task<string[]> PromptForExtraAspireStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 284private async Task<string[]> PromptForExtraAspireSingleFileOptionsAsync(ParseResult result, CancellationToken cancellationToken) 293private async Task<string[]> PromptForExtraAspirePythonStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 303private async Task<string[]> PromptForExtraAspireJsFrontendStarterOptionsAsync(ParseResult result, CancellationToken cancellationToken) 313private async Task<string[]> PromptForExtraAspireXUnitOptionsAsync(ParseResult result, CancellationToken cancellationToken) 448private async Task<TemplateResult> ApplyTemplateWithNoExtraArgsAsync(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, CancellationToken cancellationToken) 453private async Task<TemplateResult> ApplySingleFileTemplate(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 480private Task<TemplateResult> ApplySingleFileTemplateWithNoExtraArgsAsync(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, CancellationToken cancellationToken) 490private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, TemplateInputs inputs, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 503private async Task<TemplateResult> ApplyTemplateAsync(CallbackTemplate template, TemplateInputs inputs, string name, string outputPath, ParseResult parseResult, Func<ParseResult, CancellationToken, Task<string[]>> extraArgsCallback, CancellationToken cancellationToken) 622private async Task<string> GetProjectNameAsync(TemplateInputs inputs, CancellationToken cancellationToken) 633private async Task<string> GetOutputPathAsync(TemplateInputs inputs, Func<string, string> pathDeriver, string projectName, CancellationToken cancellationToken) 643private async Task<(NuGetPackage Package, PackageChannel Channel)> GetProjectTemplatesVersionAsync(TemplateInputs inputs, CancellationToken cancellationToken)
Templating\ITemplate.cs (1)
56Task<TemplateResult> ApplyTemplateAsync(TemplateInputs inputs, ParseResult parseResult, CancellationToken cancellationToken);
Templating\ITemplateFactory.cs (2)
18Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default); 19Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default);
Templating\ITemplateProvider.cs (2)
22Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default); 28Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default);
Templating\TemplateProvider.cs (2)
28public async Task<IEnumerable<ITemplate>> GetTemplatesAsync(CancellationToken cancellationToken = default) 34public async Task<IEnumerable<ITemplate>> GetInitTemplatesAsync(CancellationToken cancellationToken = default)
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, string logFilePath, 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) 69internal static async Task<int> BuildAppHostAsync(IDotNetCliRunner runner, IInteractionService interactionService, FileInfo projectFile, bool noRestore, DotNetCliRunnerInvocationOptions options, DirectoryInfo workingDirectory, CancellationToken cancellationToken)
Utils\CliDownloader.cs (2)
18Task<string> DownloadLatestCliAsync(string channelName, CancellationToken cancellationToken); 31public async Task<string> DownloadLatestCliAsync(string channelName, CancellationToken cancellationToken)
Utils\EnvironmentChecker\ContainerRuntimeCheck.cs (3)
31public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 85private async Task<EnvironmentCheckResult> CheckSpecificContainerRuntimeAsync(string runtime, CancellationToken cancellationToken) 451private async Task<bool> IsCliInstalledAsync(string runtimeLower, CancellationToken cancellationToken)
Utils\EnvironmentChecker\DeprecatedAgentConfigCheck.cs (1)
37public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\DeprecatedWorkloadCheck.cs (1)
22public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\DevCertsCheck.cs (1)
23public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\DotNetSdkCheck.cs (2)
26public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default) 89private async Task<bool> IsDotNetAppHostAsync(CancellationToken cancellationToken)
Utils\EnvironmentChecker\EnvironmentChecker.cs (1)
16public async Task<IReadOnlyList<EnvironmentCheckResult>> CheckAllAsync(CancellationToken cancellationToken = default)
Utils\EnvironmentChecker\IEnvironmentCheck.cs (1)
21Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default);
Utils\EnvironmentChecker\IEnvironmentChecker.cs (1)
16Task<IReadOnlyList<EnvironmentCheckResult>> CheckAllAsync(CancellationToken cancellationToken = default);
Utils\EnvironmentChecker\WslEnvironmentCheck.cs (1)
16public Task<IReadOnlyList<EnvironmentCheckResult>> CheckAsync(CancellationToken cancellationToken = default)
Utils\FileLock.cs (1)
55public static async Task<FileLock> AcquireAsync(string lockPath, CancellationToken cancellationToken = default, TimeSpan? timeout = null)
Utils\SdkInstallHelper.cs (1)
25public static async Task<bool> EnsureSdkInstalledAsync(
aspire-managed (5)
NuGet\Commands\RestoreCommand.cs (1)
133private static async Task<int> ExecuteRestoreAsync(
NuGet\Commands\SearchCommand.cs (2)
105private static async Task<int> ExecuteSearchAsync( 234private static async Task<List<PackageInfo>> SearchSourceAsync(
Program.cs (2)
28static async Task<int> RunServer(string[] args) 34static async Task<int> RunNuGet(string[] args)
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.Azure.Storage.Files.DataLake (2)
AzureDataLakeFileSystemHealthCheck.cs (1)
19public async Task<HealthCheckResult> CheckHealthAsync(
AzureDataLakeStorageHealthCheck.cs (1)
19public async Task<HealthCheckResult> CheckHealthAsync(
Aspire.Cli.EndToEnd.Tests (57)
AgentCommandTests.cs (4)
34var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 96var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 173var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 213var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
BannerTests.cs (3)
26var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 67var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 100var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
BundleSmokeTests.cs (1)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
CentralPackageManagementTests.cs (2)
29var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 132var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
CertificatesCommandTests.cs (3)
26var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 70var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 113var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
ConfigHealingTests.cs (1)
37var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
ConfigMigrationTests.cs (7)
116var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 181var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 231var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 290var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 360var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 444var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 529var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
DescribeCommandTests.cs (2)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 98var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
DockerDeploymentTests.cs (2)
32var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 154var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
DoctorCommandTests.cs (2)
26var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 65var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
EmptyAppHostTemplateTests.cs (1)
26var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
JsReactTemplateTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
KubernetesPublishTests.cs (1)
46var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
LogsCommandTests.cs (1)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
MultipleAppHostTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
PlaywrightCliInstallTests.cs (2)
37var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 120var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
ProjectReferenceTests.cs (1)
30var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
PsCommandTests.cs (2)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 98var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
PythonReactTemplateTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
SecretDotNetAppHostTests.cs (1)
25var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
SecretTypeScriptAppHostTests.cs (1)
25var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
SmokeTests.cs (1)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
StagingChannelTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
StartStopTests.cs (4)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 76var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 110var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 170var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
StopNonInteractiveTests.cs (4)
28var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 85var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 152var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 224var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
TypeScriptCodegenValidationTests.cs (2)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken); 109var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
TypeScriptEmptyAppHostTemplateTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
TypeScriptPolyglotTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
TypeScriptPublishTests.cs (1)
26var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
TypeScriptStarterTemplateTests.cs (1)
27var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
WaitCommandTests.cs (1)
30var pendingRun = terminal.RunAsync(TestContext.Current.CancellationToken);
Aspire.Cli.Tests (382)
Agents\ClaudeCodeAgentEnvironmentScannerTests.cs (1)
137public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken)
Agents\CopilotCliAgentEnvironmentScannerTests.cs (1)
319public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken)
Agents\OpenCodeAgentEnvironmentScannerTests.cs (1)
117public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken)
Agents\PlaywrightCliInstallerTests.cs (7)
552public Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken) 558public Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken) 564public Task<bool> AuditSignaturesAsync(string packageName, string version, CancellationToken cancellationToken) 567public Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken) 579public Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, CancellationToken cancellationToken, string? sriIntegrity = null) 599public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 602public Task<bool> InstallSkillsAsync(string workingDirectory, CancellationToken cancellationToken)
Agents\VsCodeAgentEnvironmentScannerTests.cs (1)
361public Task<SemVersion?> GetVersionAsync(VsCodeRunOptions options, CancellationToken cancellationToken) => Task.FromResult(version);
Commands\AddCommandTests.cs (2)
822public override Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 831public override Task<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> PromptForIntegrationVersionAsync(IEnumerable<(string FriendlyName, NuGetPackage Package, PackageChannel Channel)> packages, CancellationToken cancellationToken)
Commands\ConfigCommandTests.cs (5)
663public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 668public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 677public Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 685public Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 690public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default)
Commands\DeployCommandTests.cs (1)
474public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\DocsCommandTests.cs (1)
221public Task<DocsSearchResponse?> SearchAsync(string query, int topK = 5, CancellationToken cancellationToken = default)
Commands\ExecCommandTests.cs (9)
171public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 176public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 181public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 186public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 191public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 196public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 201public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 206public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 211public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
Commands\ExtensionInternalCommandTests.cs (24)
201public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 211public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 219public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 228public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 236public Task<FileInfo?> UseOrFindSolutionFileAsync( 244public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 256public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 266public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 274public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 283public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 291public Task<FileInfo?> UseOrFindSolutionFileAsync( 299public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 304public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 313public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 321public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 330public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 338public Task<FileInfo?> UseOrFindSolutionFileAsync( 346public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 351public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync( 360public Task<FileInfo?> UseOrFindAppHostProjectFileAsync( 368public Task<AppHostProjectSearchResult> UseOrFindServiceProjectFileAsync( 377public Task<FileInfo?> UseOrFindServiceProjectFileAsync( 385public Task<FileInfo?> UseOrFindSolutionFileAsync( 393public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
Commands\InitCommandTests.cs (13)
397public override Task<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken) 406public override Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 415public override Task<string> PromptForOutputPath(string defaultPath, CancellationToken cancellationToken) 428public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default) 438public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 449public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 454public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 459public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 548public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default) 562public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 574public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 579public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 584public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Commands\NewCommandTests.cs (33)
686public Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken) 1483public override Task<ITemplate> PromptForTemplateAsync(ITemplate[] validTemplates, CancellationToken cancellationToken) 1492public override Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 1501public override Task<string> PromptForOutputPath(string path, CancellationToken cancellationToken) 1510public override Task<(NuGetPackage Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(NuGetPackage Package, PackageChannel Channel)> candidatePackages, CancellationToken cancellationToken) 1524public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 1534public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 1539public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 1558public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 1579public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) => Task.FromResult(true); 1580public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 1596public Func<CancellationToken, Task<IEnumerable<PackageChannel>>>? GetChannelsAsyncCallback { get; set; } 1598public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default) 1613public Func<DirectoryInfo, bool, FileInfo?, CancellationToken, Task<IEnumerable<NuGetPackage>>>? GetTemplatePackagesAsyncCallback { get; set; } 1615public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 1631public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 1636public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 1641public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 1649public Func<ScaffoldContext, CancellationToken, Task<bool>>? ScaffoldAsyncCallback { get; set; } 1651public Task<bool> ScaffoldAsync(ScaffoldContext context, CancellationToken cancellationToken) 1674internal sealed class TestTypeScriptStarterProjectFactory(Func<DirectoryInfo, CancellationToken, Task<bool>> buildAndGenerateSdkAsync) : IAppHostProjectFactory 1701internal sealed class TestTypeScriptStarterProject(Func<DirectoryInfo, CancellationToken, Task<bool>> buildAndGenerateSdkAsync) : IAppHostProject, IGuestAppHostSdkGenerator 1711public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) 1726public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 1731public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 1736public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 1741public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 1746public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 1751public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 1756public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) 1761public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 1766public Task<bool> BuildAndGenerateSdkAsync(DirectoryInfo directory, CancellationToken cancellationToken)
Commands\PublishCommandPromptingIntegrationTests.cs (9)
813public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) => 833public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) => Task.FromResult(new[] { "baseline.v2" }); 873public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 890public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 893public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 913public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 931public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 949public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) => action();
Commands\PublishCommandTests.cs (1)
238public override Task<string> PromptForPublisherAsync(IEnumerable<string> publishers, CancellationToken cancellationToken)
Commands\RunCommandTests.cs (19)
167public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 172public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 177public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 214public Task<Aspire.Cli.Certificates.EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken) 222public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 227public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 232public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 237public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 242public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 247public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 329var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 384var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 548var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 618var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 688var pendingRun = result.InvokeAsync(cancellationToken: cts.Token); 1266public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken) 1271public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 1277public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null); 1404var pendingRun = result.InvokeAsync(cancellationToken: cts.Token);
Commands\SecretCommandTests.cs (11)
85public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) 88public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 91public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 111public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 113public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) => throw new NotSupportedException(); 114public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken = default) => Task.FromResult<string[]>([]); 115public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken) => Task.FromResult<string?>(userSecretsId); 117public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 118public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 119public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) => throw new NotSupportedException(); 120public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) => throw new NotSupportedException();
Commands\UpdateCommandTests.cs (11)
1044public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) => _innerService.ShowStatusAsync(statusText, action, emoji, allowMarkup); 1046public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 1048public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 1050public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 1052public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 1054public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 1084public Func<FileInfo, PackageChannel, CancellationToken, Task<ProjectUpdateResult>>? UpdateProjectAsyncCallback { get; set; } 1086public Task<ProjectUpdateResult> UpdateProjectAsync(FileInfo projectFile, PackageChannel channel, CancellationToken cancellationToken = default) 1101public Func<CancellationToken, Task<IEnumerable<PackageChannel>>>? GetChannelsAsyncCallback { get; set; } 1103public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default)
Mcp\Docs\DocsFetcherTests.cs (4)
369protected override Task<HttpResponseMessage> SendAsync( 387public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) 399public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) 418public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default)
Mcp\Docs\DocsIndexServiceTests.cs (7)
987public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 995public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1003public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1011public async Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 1020public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 1022public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 1024public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) => Task.FromResult<LlmsDocument[]?>(null);
Mcp\Docs\DocsSearchServiceTests.cs (5)
404public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 412public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default) 420public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 422public Task<string?> GetETagAsync(string url, CancellationToken cancellationToken = default) => Task.FromResult<string?>(null); 424public Task<LlmsDocument[]?> GetIndexAsync(CancellationToken cancellationToken = default) => Task.FromResult<LlmsDocument[]?>(null);
Mcp\MockPackagingService.cs (5)
20public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default) 37public Task<IEnumerable<NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 40public Task<IEnumerable<NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 43public Task<IEnumerable<NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 46public Task<IEnumerable<NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Mcp\TestMcpServerTransport.cs (1)
56public Task<McpClient> CreateClientAsync(ILoggerFactory? loggerFactory = null, CancellationToken cancellationToken = default)
NuGet\NuGetPackagePrefetcherTests.cs (2)
110protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken) 125protected override Task<int> ExecuteAsync(ParseResult parseResult, CancellationToken cancellationToken)
Packaging\NuGetConfigMergerSnapshotTests.cs (5)
27public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 28public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 29public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 30public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 45private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content)
Packaging\NuGetConfigMergerTests.cs (5)
22private static async Task<FileInfo> WriteConfigAsync(DirectoryInfo dir, string content) 31public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 35public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 39public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 43public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Packaging\PackageChannelTests.cs (4)
14public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 15public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 16public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 17public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]);
Packaging\PackagingServiceTests.cs (8)
19public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 20public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 21public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 22public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) => Task.FromResult<IEnumerable<Aspire.Shared.NuGetPackageCli>>([]); 897public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 906public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 909public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 912public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Projects\AppHostServerProjectTests.cs (5)
321public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default) 346public Task<IEnumerable<NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 349public Task<IEnumerable<NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 352public Task<IEnumerable<NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 355public Task<IEnumerable<NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Projects\ExtensionGuestLauncherTests.cs (7)
159public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) => throw new NotImplementedException(); 161public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, Spectre.Console.ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 162public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, Spectre.Console.ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) => throw new NotImplementedException(); 163public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull => throw new NotImplementedException(); 164public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull => throw new NotImplementedException(); 171public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) => throw new NotImplementedException();
Projects\GuestRuntimeTests.cs (1)
421public Task<(int ExitCode, OutputCollector? Output)> LaunchAsync(
Projects\ProjectLocatorTests.cs (5)
675public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 681public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 686public Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 691public Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 696public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default)
Telemetry\TelemetryConfigurationTests.cs (1)
18private static async Task<IHost> BuildHostAsync(Dictionary<string, string?>? config = null)
Telemetry\TelemetryFixture.cs (2)
84public Task<string?> GetOrCreateDeviceId() => Task.FromResult(DeviceId); 85public Task<string> GetMacAddressHash() => Task.FromResult(MacAddressHash);
Telemetry\TestTelemetryHelper.cs (2)
40public Task<string?> GetOrCreateDeviceId() => Task.FromResult<string?>("test-device-id"); 41public Task<string> GetMacAddressHash() => Task.FromResult("test-mac-hash");
Templating\DotNetTemplateFactoryTests.cs (36)
36public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 40public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 44public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 48public Task<IEnumerable<Aspire.Shared.NuGetPackageCli>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken) 403public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 408public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 413public Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 418public Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 423public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default) 457public Task<T> PromptForSelectionAsync<T>(string prompt, IEnumerable<T> choices, Func<T, string> displaySelector, CancellationToken cancellationToken) where T : notnull 460public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 463public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 466public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 469public Task<bool> ConfirmAsync(string prompt, bool defaultAnswer, CancellationToken cancellationToken) 472public Task<TResult> ShowStatusAsync<TResult>(string message, Func<Task<TResult>> work, KnownEmoji? emoji = null, bool allowMarkup = false) 501public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 504public Task<int> NewProjectAsync(string templateName, string projectName, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions? options, CancellationToken cancellationToken) 507public Task<int> RestoreAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 510public Task<int> BuildAsync(FileInfo projectFile, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 513public Task<int> AddPackageAsync(FileInfo projectFile, string packageName, string version, string? packageSourceUrl, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 516public Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 519public Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 522public Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProjectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 525public Task<(int ExitCode, NuGetPackageCli[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 528public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 531public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 534public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 537public Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 540public Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 546public Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken) 552public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken) 558public Task<string> PromptForProjectNameAsync(string defaultName, CancellationToken cancellationToken) 561public Task<string> PromptForOutputPath(string defaultPath, CancellationToken cancellationToken) 564public Task<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> PromptForTemplatesVersionAsync(IEnumerable<(Aspire.Shared.NuGetPackageCli Package, PackageChannel Channel)> packages, CancellationToken cancellationToken) 567public Task<ITemplate> PromptForTemplateAsync(ITemplate[] templates, CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
TestServices\FakeNuGetPackageCache.cs (4)
11public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 14public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 17public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 20public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
TestServices\FakePlaywrightServices.cs (7)
15public Task<NpmPackageInfo?> ResolvePackageAsync(string packageName, string versionRange, CancellationToken cancellationToken) 18public Task<string?> PackAsync(string packageName, string version, string outputDirectory, CancellationToken cancellationToken) 21public Task<bool> AuditSignaturesAsync(string packageName, string version, CancellationToken cancellationToken) 24public Task<bool> InstallGlobalAsync(string tarballPath, CancellationToken cancellationToken) 33public Task<ProvenanceVerificationResult> VerifyProvenanceAsync(string packageName, string version, string expectedSourceRepository, string expectedWorkflowPath, string expectedBuildType, Func<WorkflowRefInfo, bool>? validateWorkflowRef, CancellationToken cancellationToken, string? sriIntegrity = null) 46public Task<SemVersion?> GetVersionAsync(CancellationToken cancellationToken) 49public Task<bool> InstallSkillsAsync(string workingDirectory, CancellationToken cancellationToken)
TestServices\NoProjectFileProjectLocator.cs (3)
10public Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 15public Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 20public Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default) => Task.FromResult<FileInfo?>(null);
TestServices\NullDiskCache.cs (1)
14public Task<string?> GetAsync(string key, CancellationToken cancellationToken = default)
TestServices\TestAppHostAuxiliaryBackchannel.cs (9)
47public Func<string, string, IReadOnlyDictionary<string, JsonElement>?, CancellationToken, Task<CallToolResult>>? CallResourceMcpToolHandler { get; set; } 53public Func<CancellationToken, Task<List<ResourceSnapshot>>>? GetResourceSnapshotsHandler { get; set; } 55public Task<DashboardUrlsState?> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 60public Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default) 96public Task<bool> StopAppHostAsync(CancellationToken cancellationToken = default) 106public Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync( 119public Task<WaitForResourceResponse> WaitForResourceAsync( 128public Task<CallToolResult> CallResourceMcpToolAsync( 150public Task<GetDashboardInfoResponse?> GetDashboardInfoV2Async(CancellationToken cancellationToken = default)
TestServices\TestAppHostCliBackchannel.cs (4)
15public Func<CancellationToken, Task<DashboardUrlsState>>? GetDashboardUrlsAsyncCallback { get; set; } 30public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 45public Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 213public async Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
TestServices\TestAppHostProjectFactory.cs (9)
126public Task<string[]> GetDetectionPatternsAsync(CancellationToken cancellationToken) 146public Task<int> RunAsync(AppHostProjectContext context, CancellationToken cancellationToken) 149public Task<int> PublishAsync(PublishContext context, CancellationToken cancellationToken) 152public Task<IReadOnlyList<(string PackageId, string Version)>> GetPackageReferencesAsync(FileInfo appHostFile, CancellationToken cancellationToken) 155public Task<AppHostValidationResult> ValidateAppHostAsync(FileInfo appHostFile, CancellationToken cancellationToken) 176public Task<bool> AddPackageAsync(AddPackageContext context, CancellationToken cancellationToken) 179public Task<UpdatePackagesResult> UpdatePackagesAsync(UpdatePackagesContext context, CancellationToken cancellationToken) 182public Task<RunningInstanceResult> FindAndStopRunningInstanceAsync(FileInfo appHostFile, DirectoryInfo homeDirectory, CancellationToken cancellationToken) 185public Task<string?> GetUserSecretsIdAsync(FileInfo appHostFile, bool autoInit, CancellationToken cancellationToken)
TestServices\TestAppHostServerProjectFactory.cs (1)
10public Task<IAppHostServerProject> CreateAsync(string appPath, CancellationToken cancellationToken = default)
TestServices\TestAppHostServerSessionFactory.cs (1)
15public Task<AppHostServerSessionResult> CreateAsync(
TestServices\TestCertificateService.cs (1)
10public Task<EnsureCertificatesTrustedResult> EnsureCertificatesTrustedAsync(CancellationToken cancellationToken)
TestServices\TestCliDownloader.cs (2)
20public Func<string, CancellationToken, Task<string>>? DownloadLatestCliAsyncCallback { get; set; } 22public Task<string> DownloadLatestCliAsync(string quality, CancellationToken cancellationToken)
TestServices\TestConfigurationService.cs (5)
23public Task<bool> DeleteConfigurationAsync(string key, bool isGlobal = false, CancellationToken cancellationToken = default) 29public Task<Dictionary<string, string>> GetAllConfigurationAsync(CancellationToken cancellationToken = default) 34public Task<Dictionary<string, string>> GetLocalConfigurationAsync(CancellationToken cancellationToken = default) 39public Task<Dictionary<string, string>> GetGlobalConfigurationAsync(CancellationToken cancellationToken = default) 44public Task<string?> GetConfigurationAsync(string key, CancellationToken cancellationToken = default)
TestServices\TestDocsFetcher.cs (1)
13public Task<string?> FetchDocsAsync(CancellationToken cancellationToken = default)
TestServices\TestDotNetCliExecutionFactory.cs (1)
111public Task<int> WaitForExitAsync(CancellationToken cancellationToken)
TestServices\TestDotNetCliRunner.cs (15)
23public Func<FileInfo, bool, bool, bool, string[], IDictionary<string, string>?, TaskCompletionSource<IAppHostCliBackchannel>?, DotNetCliRunnerInvocationOptions, CancellationToken, Task<int>>? RunAsyncCallback { get; set; } 28public Task<int> AddPackageAsync(FileInfo projectFilePath, string packageName, string packageVersion, string? nugetSource, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 35public Task<int> AddProjectToSolutionAsync(FileInfo solutionFile, FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 42public Task<int> BuildAsync(FileInfo projectFilePath, bool noRestore, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 49public Task<int> RestoreAsync(FileInfo projectFilePath, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 56public Task<(int ExitCode, bool IsAspireHost, string? AspireHostingVersion)> GetAppHostInformationAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 65public Task<(int ExitCode, string[] ConfigPaths)> GetNuGetConfigPathsAsync(DirectoryInfo workingDirectory, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 81public Task<(int ExitCode, JsonDocument? Output)> GetProjectItemsAndPropertiesAsync(FileInfo projectFile, string[] items, string[] properties, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 88public Task<(int ExitCode, string? TemplateVersion)> InstallTemplateAsync(string packageName, string version, FileInfo? nugetConfigFile, string? nugetSource, bool force, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 95public Task<int> NewProjectAsync(string templateName, string name, string outputPath, string[] extraArgs, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 102public Task<int> RunAsync(FileInfo projectFile, bool watch, bool noBuild, bool noRestore, string[] args, IDictionary<string, string>? env, TaskCompletionSource<IAppHostCliBackchannel>? backchannelCompletionSource, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 109public Task<(int ExitCode, NuGetPackage[]? Packages)> SearchPackagesAsync(DirectoryInfo workingDirectory, string query, bool prerelease, int take, int skip, FileInfo? nugetConfigFile, bool useCache, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 116public Task<(int ExitCode, IReadOnlyList<FileInfo> Projects)> GetSolutionProjectsAsync(FileInfo solutionFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 123public Task<int> AddProjectReferenceAsync(FileInfo projectFile, FileInfo referencedProject, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken) 130public Task<int> InitUserSecretsAsync(FileInfo projectFile, DotNetCliRunnerInvocationOptions options, CancellationToken cancellationToken)
TestServices\TestDotNetSdkInstaller.cs (1)
12public Task<(bool Success, string? HighestDetectedVersion, string MinimumRequiredVersion)> CheckAsync(CancellationToken cancellationToken = default)
TestServices\TestExtensionBackchannel.cs (14)
51public Func<string, bool, Task<bool>>? ConfirmAsyncCallback { get; set; } 54public Func<string, string?, Func<string, ValidationResult>?, bool, Task<string>>? PromptForStringAsyncCallback { get; set; } 57public Func<string, Func<string, ValidationResult>?, bool, Task<string>>? PromptForSecretStringAsyncCallback { get; set; } 60public Func<string, string?, bool, Task<string?>>? PromptForFilePathAsyncCallback { get; set; } 69public Func<CancellationToken, Task<string[]>>? GetCapabilitiesAsyncCallback { get; set; } 72public Func<string, CancellationToken, Task<bool>>? HasCapabilityAsyncCallback { get; set; } 155public Task<string?> PromptForFilePathAsync(string promptText, string? defaultValue, bool directory, CancellationToken cancellationToken) 163public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 175public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken) where T : notnull 187public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default) 195public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool required = false, CancellationToken cancellationToken = default) 203public Task<string> PromptForSecretStringAsync(string promptText, Func<string, ValidationResult>? validator = null, bool required = false, CancellationToken cancellationToken = default) 227public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken) 235public async Task<bool> HasCapabilityAsync(string capability, CancellationToken cancellationToken)
TestServices\TestExtensionInteractionService.cs (7)
28public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 38public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 43public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 48public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 58public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 124public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
TestServices\TestInteractionService.cs (7)
53public Task<T> ShowStatusAsync<T>(string statusText, Func<Task<T>> action, KnownEmoji? emoji = null, bool allowMarkup = false) 64public Task<string> PromptForStringAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool isSecret = false, bool required = false, CancellationToken cancellationToken = default) 81public Task<string> PromptForFilePathAsync(string promptText, string? defaultValue = null, Func<string, ValidationResult>? validator = null, bool directory = false, bool required = false, CancellationToken cancellationToken = default) 86public Task<T> PromptForSelectionAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, CancellationToken cancellationToken = default) where T : notnull 116public Task<IReadOnlyList<T>> PromptForSelectionsAsync<T>(string promptText, IEnumerable<T> choices, Func<T, string> choiceFormatter, IEnumerable<T>? preSelected = null, bool optional = false, CancellationToken cancellationToken = default) where T : notnull 165public Task<bool> ConfirmAsync(string promptText, bool defaultValue = true, CancellationToken cancellationToken = default)
TestServices\TestLanguageDiscovery.cs (3)
32public Task<IEnumerable<LanguageInfo>> GetAvailableLanguagesAsync(CancellationToken cancellationToken = default) 35public Task<string?> GetPackageForLanguageAsync(LanguageId languageId, CancellationToken cancellationToken = default) 42public Task<LanguageId?> DetectLanguageAsync(DirectoryInfo directory, CancellationToken cancellationToken = default)
TestServices\TestLanguageService.cs (6)
10public Func<CancellationToken, Task<IAppHostProject?>>? GetConfiguredProjectAsyncCallback { get; set; } 12public Func<CancellationToken, Task<IAppHostProject>>? PromptForProjectAsyncCallback { get; set; } 13public Func<string?, bool, CancellationToken, Task<IAppHostProject>>? GetOrPromptForProjectAsyncCallback { get; set; } 20public Task<IAppHostProject?> GetConfiguredProjectAsync(CancellationToken cancellationToken = default) 34public Task<IAppHostProject> PromptForProjectAsync(CancellationToken cancellationToken = default) 49public Task<IAppHostProject> GetOrPromptForProjectAsync(string? explicitLanguageId = null, bool saveSelection = true, CancellationToken cancellationToken = default)
TestServices\TestPackagingService.cs (1)
10public Task<IEnumerable<PackageChannel>> GetChannelsAsync(CancellationToken cancellationToken = default)
TestServices\TestProjectLocator.cs (6)
11public Func<FileInfo?, bool, CancellationToken, Task<FileInfo?>>? UseOrFindAppHostProjectFileAsyncCallback { get; set; } 13public Func<FileInfo?, MultipleAppHostProjectsFoundBehavior, bool, CancellationToken, Task<AppHostProjectSearchResult>>? UseOrFindAppHostProjectFileWithBehaviorAsyncCallback { get; set; } 15public Func<CancellationToken, Task<FileInfo?>>? GetAppHostFromSettingsAsyncCallback { get; set; } 17public async Task<FileInfo?> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, bool createSettingsFile, CancellationToken cancellationToken) 34public async Task<AppHostProjectSearchResult> UseOrFindAppHostProjectFileAsync(FileInfo? projectFile, MultipleAppHostProjectsFoundBehavior multipleAppHostProjectsFoundBehavior, bool createSettingsFile, CancellationToken cancellationToken = default) 51public async Task<FileInfo?> GetAppHostFromSettingsAsync(CancellationToken cancellationToken = default)
Utils\CliTestHelper.cs (4)
591public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 594public Task<Layout.LayoutConfiguration?> EnsureExtractedAndGetLayoutAsync(CancellationToken cancellationToken = default) 607public Task<BundleExtractResult> ExtractAsync(string destinationPath, bool force = false, CancellationToken cancellationToken = default) 610public Task<Layout.LayoutConfiguration?> EnsureExtractedAndGetLayoutAsync(CancellationToken cancellationToken = default)
Utils\CliUpdateNotificationServiceTests.cs (4)
296public Task<IEnumerable<NuGetPackage>> GetTemplatePackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 301public Task<IEnumerable<NuGetPackage>> GetIntegrationPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 306public Task<IEnumerable<NuGetPackage>> GetCliPackagesAsync(DirectoryInfo workingDirectory, bool prerelease, FileInfo? nugetConfigFile, CancellationToken cancellationToken) 311public Task<IEnumerable<NuGetPackage>> GetPackagesAsync(DirectoryInfo workingDirectory, string packageId, Func<string, bool>? filter, bool prerelease, FileInfo? nugetConfigFile, bool useCache, CancellationToken cancellationToken)
Utils\MockHttpMessageHandler.cs (1)
51protected override Task<HttpResponseMessage> SendAsync(
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 (76)
Api\ApiAuthenticationHandler.cs (1)
34protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
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)
92public 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)
92public 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)
92public 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)
18protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Components\Controls\UserProfile.razor.cs (1)
27public required Task<AuthenticationState> AuthenticationState { get; set; }
Components\Interactions\InteractionsProvider.cs (3)
55internal async Task<int> GetMessagesProcessedAsync() 159Func<DashboardDialogService, Task<IDialogReference>> openDialog; 573public async Task<IDialogReference> ShowMessageBoxAsync(DashboardDialogService dialogService, MessageBoxContent content, DialogParameters parameters)
Components\Layout\MainLayout.razor.cs (1)
176static async Task<bool> ShouldSkipMessageAsync(ILocalStorage localStorage, string storageKey)
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; }
Mcp\AspireResourceMcpTools.cs (1)
75public async Task<string> ListConsoleLogsAsync(
Mcp\McpApiKeyAuthenticationHandler.cs (1)
31protected override Task<AuthenticateResult> HandleAuthenticateAsync()
Mcp\McpCompositeAuthenticationHandler.cs (1)
20protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
Mcp\McpExtensions.cs (1)
69private static async Task<TResult> RecordCallToolNameAsync<TParams, TResult>(McpRequestHandler<TParams, TResult> next, RequestContext<TParams> request, string? toolCallName, CancellationToken cancellationToken)
Model\Assistant\AIContextProvider.cs (1)
272public async Task<GhcpInfoResponse> GetInfoAsync(CancellationToken cancellationToken)
Model\Assistant\AssistantChatDataContext.cs (6)
62public async Task<string> GetResourceGraphAsync(CancellationToken cancellationToken) 83public async Task<string> GetTraceAsync( 106public async Task<string> GetStructuredLogsAsync( 151public async Task<string> GetTracesAsync( 194public async Task<string> GetTraceStructuredLogsAsync( 233public async Task<string> GetConsoleLogsAsync(
Model\Assistant\AssistantChatViewModel.cs (3)
331private async Task<bool> InitializeCoreAsync() 342var assistantSettingsTask = _localStorage.GetUnprotectedAsync<AssistantChatAssistantSettings>(BrowserStorageKeys.AssistantChatAssistantSettings); 343var getInfoTask = _aiContextProvider.GetInfoAsync(_cts.Token);
Model\Assistant\ChatClientFactory.cs (1)
95public async Task<GhcpInfoResponse> GetInfoAsync(CancellationToken cancellationToken)
Model\Assistant\IAIContextProvider.cs (1)
29Task<GhcpInfoResponse> GetInfoAsync(CancellationToken cancellationToken);
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\ConsoleLogsFetcher.cs (2)
29private async Task<List<LogEntry>> FetchLogEntriesAsync(string resourceName, DateTime? filterDate, CancellationToken cancellationToken) 56public async Task<Dictionary<string, List<LogEntry>>> FetchLogEntriesAsync(HashSet<string> resourceNames, CancellationToken cancellationToken)
Model\DashboardDialogService.cs (6)
39public async Task<IDialogReference> ShowDialogAsync<TDialog>(object content, DialogParameters parameters) 53public async Task<IDialogReference> ShowDialogAsync<TDialog>(DialogParameters parameters) 68public async Task<IDialogReference> ShowPanelAsync<TDialog>(object content, DialogParameters parameters) 82public async Task<IDialogReference> ShowPanelAsync<TDialog>(DialogParameters parameters) 94public async Task<IDialogReference> ShowConfirmationAsync(string message) 105public async Task<IDialogReference> ShowMessageBoxAsync(DialogParameters<MessageBoxContent> parameters)
Model\TelemetryExportService.cs (1)
50public async Task<MemoryStream> ExportSelectedAsync(
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 (2)
186private static async Task<TMessage?> ReadOtlpJsonData<TMessage>(HttpContext httpContext) where TMessage : IMessage<TMessage>, new() 248private static async Task<T> ReadOtlpData<T>(
ServiceClient\DashboardClient.cs (6)
298private async Task WatchWithRecoveryAsync(Func<RetryContext, CancellationToken, Task<RetryResult>> action, string actionName, CancellationToken cancellationToken) 357private async Task<RetryResult> WatchResourcesAsync(RetryContext retryContext, CancellationToken cancellationToken) 450private async Task<RetryResult> WatchInteractionsAsync(RetryContext retryContext, CancellationToken cancellationToken) 528private static async Task<bool> IsUnimplemented(AsyncDuplexStreamingCall<WatchInteractionsRequestUpdate, WatchInteractionsResponseUpdate> call) 595public async Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken) 754public async Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken)
ServiceClient\IDashboardClient.cs (2)
42Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken); 73Task<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)
355private 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)
82public 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 (53)
Shared\TestLocalStorage.cs (2)
14public Task<StorageResult<T>> GetAsync<T>(string key) 24public Task<StorageResult<T>> GetUnprotectedAsync<T>(string key)
Shared\TestMessageService.cs (7)
11private readonly Func<MessageOptions, Task<Message>>? _onShowMessage; 13public TestMessageService(Func<MessageOptions, Task<Message>>? onShowMessage = null) 75public Task<Message> ShowMessageBarAsync(Action<MessageOptions> options) 83public Task<Message> ShowMessageBarAsync(string title) 88public Task<Message> ShowMessageBarAsync(string title, MessageIntent intent) 93public Task<Message> ShowMessageBarAsync(string title, MessageIntent intent, string section) 98public Task<Message> ShowMessageBarAsync(MarkupString title, MessageIntent intent, string section)
Shared\TestThemeResolver.cs (1)
12public Task<ThemeSettings> GetThemeSettingsAsync(CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
tests\Shared\TestAIContextProvider.cs (1)
29public Task<GhcpInfoResponse> GetInfoAsync(CancellationToken cancellationToken)
tests\Shared\TestDashboardClient.cs (2)
52public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) 92public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
tests\Shared\TestDashboardTelemetrySender.cs (1)
15public Task<bool> TryStartTelemetrySessionAsync()
tests\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; 30public Task<IDialogReference> ShowConfirmationAsync(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 31public Task<IDialogReference> ShowConfirmationAsync(string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 35public async Task<IDialogReference> ShowDialogAsync<TData>(Type dialogComponent, TData data, DialogParameters parameters) where TData : class 40public async Task<IDialogReference> ShowDialogAsync<TDialog>(object data, DialogParameters parameters) where TDialog : IDialogContentComponent 45private async Task<IDialogReference> RunShowDialogCallbackAsync(Type dialogComponent, object data, DialogParameters parameters) 56public Task<IDialogReference> ShowDialogAsync<TDialog>(DialogParameters parameters) where TDialog : IDialogContentComponent => throw new NotImplementedException(); 57public Task<IDialogReference> ShowDialogAsync(RenderFragment renderFragment, DialogParameters dialogParameters) => throw new NotImplementedException(); 58public Task<IDialogReference> ShowDialogAsync<TDialog, TData>(DialogParameters<TData> parameters) where TDialog : IDialogContentComponent<TData> where TData : class => throw new NotImplementedException(); 60public Task<IDialogReference> ShowErrorAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 62public Task<IDialogReference> ShowInfoAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 64public async Task<IDialogReference> ShowMessageBoxAsync(DialogParameters<MessageBoxContent> parameters) 77public Task<IDialogReference> ShowPanelAsync<TData>(Type dialogComponent, TData data, DialogParameters parameters) where TData : class => throw new NotImplementedException(); 78public Task<IDialogReference> ShowPanelAsync<TDialog>(object data, DialogParameters parameters) where TDialog : IDialogContentComponent => throw new NotImplementedException(); 79public Task<IDialogReference> ShowPanelAsync<TDialog>(DialogParameters parameters) where TDialog : IDialogContentComponent => throw new NotImplementedException(); 80public Task<IDialogReference> ShowPanelAsync<TDialog, TData>(DialogParameters<TData> parameters) where TDialog : IDialogContentComponent<TData> where TData : class => throw new NotImplementedException(); 81public Task<IDialogReference> ShowPanelAsync<TData>(Type dialogComponent, DialogParameters<TData> parameters) where TData : class => throw new NotImplementedException(); 85public Task<IDialogReference> ShowSplashScreenAsync(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 86public Task<IDialogReference> ShowSplashScreenAsync(DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 87public Task<IDialogReference> ShowSplashScreenAsync<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 88public Task<IDialogReference> ShowSplashScreenAsync<T>(DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 89public Task<IDialogReference> ShowSplashScreenAsync(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 90public Task<IDialogReference> ShowSplashScreenAsync(Type component, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 92public Task<IDialogReference> ShowSuccessAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 94public Task<IDialogReference> ShowWarningAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 96public Task<IDialogReference?> UpdateDialogAsync<TData>(string id, DialogParameters<TData> parameters) where TData : class => throw new NotImplementedException();
tests\Shared\TestSessionStorage.cs (1)
13public Task<StorageResult<T>> GetAsync<T>(string key)
Aspire.Dashboard.Tests (72)
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\McpServiceTests.cs (2)
341internal static async Task<string> InitializeSessionAsync(HttpClient httpClient, Action<HttpRequestMessage>? configureRequest = null) 402internal static async Task<string?> GetDataFromSseResponseAsync(HttpResponseMessage response)
Integration\MockOpenIdAuthority.cs (1)
24public static async Task<Authority> CreateAsync()
Integration\Playwright\Infrastructure\MockDashboardClient.cs (2)
43public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException(); 47public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
Integration\Playwright\Infrastructure\PlaywrightTestsBase.cs (1)
36private async Task<IPage> CreateNewPageAsync()
Integration\StartupTests.cs (2)
1035private async Task<(string? Host, string? Proto, string EndpointString)> ExecuteForwardedHeadersScenarioAsync( 1145private 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)
Model\TelemetryExportServiceTests.cs (1)
1093private static async Task<TelemetryExportService> CreateExportServiceAsync(TelemetryRepository repository, bool isDashboardClientEnabled = true)
OtlpApiKeyAuthenticationHandlerTests.cs (1)
76private static async Task<OtlpApiKeyAuthenticationHandler> CreateAuthHandlerAsync(string primaryApiKey, string? secondaryApiKey, string? otlpApiKeyHeader)
ResourceOutgoingPeerResolverTests.cs (3)
412private sealed class MockDashboardClient(Task<ResourceViewModelSubscription> subscribeResult) : IDashboardClient 418public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) => throw new NotImplementedException(); 425public 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)
TelemetryRepositoryTests\TelemetryRepositoryTests.cs (2)
450var watchTask = Task.Run(async () => 567var watchTask = Task.Run(async () =>
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public 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\TestAIContextProvider.cs (1)
29public Task<GhcpInfoResponse> GetInfoAsync(CancellationToken cancellationToken)
tests\Shared\TestDashboardClient.cs (2)
52public Task<ResourceCommandResponseViewModel> ExecuteResourceCommandAsync(string resourceName, string resourceType, CommandViewModel command, CancellationToken cancellationToken) 92public Task<ResourceViewModelSubscription> SubscribeResourcesAsync(CancellationToken cancellationToken)
tests\Shared\TestDashboardTelemetrySender.cs (1)
15public Task<bool> TryStartTelemetrySessionAsync()
tests\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; 30public Task<IDialogReference> ShowConfirmationAsync(object receiver, Func<DialogResult, Task> callback, string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 31public Task<IDialogReference> ShowConfirmationAsync(string message, string primaryText = "Yes", string secondaryText = "No", string? title = null) => throw new NotImplementedException(); 35public async Task<IDialogReference> ShowDialogAsync<TData>(Type dialogComponent, TData data, DialogParameters parameters) where TData : class 40public async Task<IDialogReference> ShowDialogAsync<TDialog>(object data, DialogParameters parameters) where TDialog : IDialogContentComponent 45private async Task<IDialogReference> RunShowDialogCallbackAsync(Type dialogComponent, object data, DialogParameters parameters) 56public Task<IDialogReference> ShowDialogAsync<TDialog>(DialogParameters parameters) where TDialog : IDialogContentComponent => throw new NotImplementedException(); 57public Task<IDialogReference> ShowDialogAsync(RenderFragment renderFragment, DialogParameters dialogParameters) => throw new NotImplementedException(); 58public Task<IDialogReference> ShowDialogAsync<TDialog, TData>(DialogParameters<TData> parameters) where TDialog : IDialogContentComponent<TData> where TData : class => throw new NotImplementedException(); 60public Task<IDialogReference> ShowErrorAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 62public Task<IDialogReference> ShowInfoAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 64public async Task<IDialogReference> ShowMessageBoxAsync(DialogParameters<MessageBoxContent> parameters) 77public Task<IDialogReference> ShowPanelAsync<TData>(Type dialogComponent, TData data, DialogParameters parameters) where TData : class => throw new NotImplementedException(); 78public Task<IDialogReference> ShowPanelAsync<TDialog>(object data, DialogParameters parameters) where TDialog : IDialogContentComponent => throw new NotImplementedException(); 79public Task<IDialogReference> ShowPanelAsync<TDialog>(DialogParameters parameters) where TDialog : IDialogContentComponent => throw new NotImplementedException(); 80public Task<IDialogReference> ShowPanelAsync<TDialog, TData>(DialogParameters<TData> parameters) where TDialog : IDialogContentComponent<TData> where TData : class => throw new NotImplementedException(); 81public Task<IDialogReference> ShowPanelAsync<TData>(Type dialogComponent, DialogParameters<TData> parameters) where TData : class => throw new NotImplementedException(); 85public Task<IDialogReference> ShowSplashScreenAsync(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 86public Task<IDialogReference> ShowSplashScreenAsync(DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 87public Task<IDialogReference> ShowSplashScreenAsync<T>(object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 88public Task<IDialogReference> ShowSplashScreenAsync<T>(DialogParameters<SplashScreenContent> parameters) where T : IDialogContentComponent<SplashScreenContent> => throw new NotImplementedException(); 89public Task<IDialogReference> ShowSplashScreenAsync(Type component, object receiver, Func<DialogResult, Task> callback, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 90public Task<IDialogReference> ShowSplashScreenAsync(Type component, DialogParameters<SplashScreenContent> parameters) => throw new NotImplementedException(); 92public Task<IDialogReference> ShowSuccessAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 94public Task<IDialogReference> ShowWarningAsync(string message, string? title = null, string? primaryText = null) => throw new NotImplementedException(); 96public Task<IDialogReference?> UpdateDialogAsync<TData>(string id, DialogParameters<TData> parameters) where TData : class => throw new NotImplementedException();
tests\Shared\TestSessionStorage.cs (1)
13public Task<StorageResult<T>> GetAsync<T>(string key)
Aspire.Deployment.EndToEnd.Tests (27)
AcaCompactNamingDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AcaCompactNamingUpgradeDeploymentTests.cs (1)
66var pendingRun = terminal.RunAsync(cancellationToken);
AcaCustomRegistryDeploymentTests.cs (1)
68var pendingRun = terminal.RunAsync(cancellationToken);
AcaDeploymentErrorOutputTests.cs (1)
70var pendingRun = terminal.RunAsync(cancellationToken);
AcaExistingRegistryDeploymentTests.cs (1)
78var pendingRun = terminal.RunAsync(cancellationToken);
AcaManagedRedisDeploymentTests.cs (1)
68var pendingRun = terminal.RunAsync(cancellationToken);
AcaStarterDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
AcrPurgeTaskDeploymentTests.cs (1)
67var pendingRun = terminal.RunAsync(cancellationToken);
AksStarterDeploymentTests.cs (1)
76var pendingRun = terminal.RunAsync(cancellationToken);
AksStarterWithRedisDeploymentTests.cs (1)
77var pendingRun = terminal.RunAsync(cancellationToken);
AppServicePythonDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
AppServiceReactDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
AzureAppConfigDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
AzureContainerRegistryDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
AzureEventHubsDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
AzureKeyVaultDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
AzureLogAnalyticsDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
AzureServiceBusDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
AzureStorageDeploymentTests.cs (1)
64var pendingRun = terminal.RunAsync(cancellationToken);
PythonFastApiDeploymentTests.cs (1)
69var pendingRun = terminal.RunAsync(cancellationToken);
TypeScriptExpressDeploymentTests.cs (1)
66var pendingRun = terminal.RunAsync(cancellationToken);
VnetKeyVaultConnectivityDeploymentTests.cs (1)
65var pendingRun = terminal.RunAsync(cancellationToken);
VnetKeyVaultInfraDeploymentTests.cs (1)
62var pendingRun = terminal.RunAsync(cancellationToken);
VnetSqlServerConnectivityDeploymentTests.cs (1)
65var pendingRun = terminal.RunAsync(cancellationToken);
VnetSqlServerInfraDeploymentTests.cs (1)
62var pendingRun = terminal.RunAsync(cancellationToken);
VnetStorageBlobConnectivityDeploymentTests.cs (1)
65var pendingRun = terminal.RunAsync(cancellationToken);
VnetStorageBlobInfraDeploymentTests.cs (1)
62var pendingRun = terminal.RunAsync(cancellationToken);
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( 330public async Task<CommandResult> BuildAsync(string[]? extraBuildArgs = default, CancellationToken token = default, string? workingDirectory = null) 351public 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 (187)
ApplicationModel\CertificateTrustConfigurationCallbackAnnotation.cs (2)
125public ReferenceExpression CreateCustomBundle(Func<X509Certificate2Collection, CancellationToken, Task<byte[]>> bundleGenerator) 151internal Dictionary<string, Func<X509Certificate2Collection, CancellationToken, Task<byte[]>>> CustomBundlesFactories { get; } = new();
ApplicationModel\CertificateTrustExecutionConfigurationGatherer.cs (1)
148public Dictionary<string, Func<X509Certificate2Collection, CancellationToken, Task<byte[]>>> CustomBundlesFactories { get; } = new();
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\CommandsConfigurationExtensions.cs (2)
149Task<ExecuteCommandResult>? activeRebuildTask = null; 182private static async Task<ExecuteCommandResult> ExecuteRebuildAsync(ExecuteCommandContext context, ProjectResource projectResource)
ApplicationModel\ContainerFileSystemCallbackAnnotation.cs (1)
263public required Func<ContainerFileSystemCallbackContext, CancellationToken, Task<IEnumerable<ContainerFileSystemItem>>> Callback { get; init; }
ApplicationModel\ContainerImagePushOptions.cs (1)
72public async Task<string> GetFullRemoteImageNameAsync(
ApplicationModel\DockerfileBuildAnnotation.cs (1)
47public Func<DockerfileFactoryContext, Task<string>>? DockerfileFactory { get; init; }
ApplicationModel\EndpointAnnotation.cs (1)
331public Task<AllocatedEndpoint> GetAllocatedEndpointAsync(NetworkIdentifier networkID, CancellationToken cancellationToken = default)
ApplicationModel\ExecutionConfigurationBuilder.cs (1)
93public async Task<IExecutionConfigurationResult> BuildAsync(DistributedApplicationExecutionContext executionContext, ILogger? resourceLogger = null, CancellationToken cancellationToken = default)
ApplicationModel\ExecutionConfigurationGathererContext.cs (1)
37internal async Task<IExecutionConfigurationResult> ResolveAsync(
ApplicationModel\ExpressionResolver.cs (3)
11async Task<ResolvedValue> EvalExpressionAsync(ReferenceExpression expr, ValueProviderContext context) 48async Task<ResolvedValue> EvalValueProvider(IValueProvider vp, ValueProviderContext context) 58async Task<ResolvedValue> ResolveConnectionStringReferenceAsync(ConnectionStringReference cs, ValueProviderContext context)
ApplicationModel\HttpCommandOptions.cs (1)
36public Func<HttpCommandResultContext, Task<ExecuteCommandResult>>? GetCommandResult { get; set; }
ApplicationModel\IExecutionConfigurationBuilder.cs (1)
27Task<IExecutionConfigurationResult> BuildAsync(DistributedApplicationExecutionContext executionContext, ILogger? resourceLogger = null, CancellationToken cancellationToken = default);
ApplicationModel\IRequiredCommandValidator.cs (1)
30Task<RequiredCommandValidationResult> ValidateAsync(IResource resource, RequiredCommandAnnotation annotation, CancellationToken cancellationToken);
ApplicationModel\McpServerEndpointAnnotation.cs (2)
19public McpServerEndpointAnnotation(Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> endpointUrlResolver) 28public Func<IResourceWithEndpoints, CancellationToken, Task<Uri?>> EndpointUrlResolver { get; }
ApplicationModel\ProjectResource.cs (1)
239private static async Task<string> GetContainerWorkingDirectoryAsync(string projectPath, ILogger logger, CancellationToken cancellationToken)
ApplicationModel\RequiredCommandAnnotation.cs (1)
34public Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>>? ValidationCallback { get; init; }
ApplicationModel\RequiredCommandValidator.cs (1)
50public async Task<RequiredCommandValidationResult> ValidateAsync(
ApplicationModel\ResourceCommandAnnotation.cs (2)
21Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 66public Func<ExecuteCommandContext, Task<ExecuteCommandResult>> ExecuteCommand { get; }
ApplicationModel\ResourceCommandService.cs (4)
55public async Task<ExecuteCommandResult> ExecuteCommandAsync(string resourceId, string commandName, CancellationToken cancellationToken = default) 72public async Task<ExecuteCommandResult> ExecuteCommandAsync(IResource resource, string commandName, CancellationToken cancellationToken = default) 82var tasks = new List<Task<ExecuteCommandResult>>(); 130internal async Task<ExecuteCommandResult> ExecuteCommandCoreAsync(string resourceId, IResource resource, string commandName, CancellationToken cancellationToken)
ApplicationModel\ResourceExtensions.cs (6)
595private static async Task<ResolvedValue?> GetValue(this IResource resource, DistributedApplicationExecutionContext executionContext, string? key, IValueProvider valueProvider, ILogger logger, CancellationToken cancellationToken) 1131internal static async Task<ContainerImagePushOptions> ProcessImagePushOptionsCallbackAsync( 1218internal static async Task<string> GetFullRemoteImageNameAsync( 1281public static Task<IReadOnlySet<IResource>> GetResourceDependenciesAsync( 1317internal static async Task<IReadOnlySet<IResource>> GetDependenciesAsync( 1400private static async Task<List<object>> GatherRawEnvironmentAndArgumentValuesAsync(
ApplicationModel\ResourceNotificationService.cs (7)
118/// <returns>A <see cref="Task{String}"/> representing the wait operation and which of the target states the resource reached.</returns> 121public async Task<string> WaitForResourceAsync(string resourceName, IEnumerable<string> targetStates, CancellationToken cancellationToken = default) 189public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, CancellationToken cancellationToken = default) 222public async Task<ResourceEvent> WaitForResourceHealthyAsync(string resourceName, WaitBehavior waitBehavior, CancellationToken cancellationToken = default) 473/// <returns>A <see cref="Task{ResourceEvent}"/> representing the wait operation and which of the target states the resource reached.</returns> 476public async Task<ResourceEvent> WaitForResourceAsync(string resourceName, Func<ResourceEvent, bool> predicate, CancellationToken cancellationToken = default) 489private async Task<ResourceEvent> WaitForResourceCoreAsync(string resourceName, Func<ResourceEvent, bool> predicate, string cancellationMessage, CancellationToken cancellationToken = default)
ApplicationModel\ValueSnapshot.cs (2)
24private Task<T>? _currentValue; 38public Task<T> GetValueAsync(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)
Ats\AspireExportAttribute.cs (1)
222/// <see cref="Task{TResult}"/> are awaited normally and do not use this option.
Ats\NotificationExports.cs (2)
43public static Task<string> WaitForResourceStates( 55public static async Task<ResourceEventDto> WaitForResourceHealthy(
Ats\PipelineExports.cs (2)
36public static Task<IReportingTask> CreateTask(this IReportingStep reportingStep, string statusText, CancellationToken cancellationToken = default) 48public static Task<IReportingTask> CreateMarkdownTask(this IReportingStep reportingStep, string markdownString, CancellationToken cancellationToken = default)
Backchannel\AppHostRpcTarget.cs (2)
151public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken) 173public Task<string[]> GetCapabilitiesAsync(CancellationToken cancellationToken)
Backchannel\AuxiliaryBackchannelRpcTarget.cs (18)
39public Task<GetCapabilitiesResponse> GetCapabilitiesAsync(GetCapabilitiesRequest? request = null, CancellationToken cancellationToken = default) 57public async Task<GetAppHostInfoResponse> GetAppHostInfoAsync(GetAppHostInfoRequest? request = null, CancellationToken cancellationToken = default) 79public async Task<GetDashboardInfoResponse> GetDashboardInfoAsync(GetDashboardInfoRequest? request = null, CancellationToken cancellationToken = default) 112public async Task<GetResourcesResponse> GetResourcesAsync(GetResourcesRequest? request = null, CancellationToken cancellationToken = default) 169public async Task<CallMcpToolResponse> CallMcpToolAsync(CallMcpToolRequest request, CancellationToken cancellationToken = default) 202public async Task<StopAppHostResponse> StopAsync(StopAppHostRequest? request = null, CancellationToken cancellationToken = default) 215public async Task<ExecuteResourceCommandResponse> ExecuteResourceCommandAsync(ExecuteResourceCommandRequest request, CancellationToken cancellationToken = default) 233public async Task<WaitForResourceResponse> WaitForResourceAsync(WaitForResourceRequest request, CancellationToken cancellationToken = default) 273private static async Task<WaitForResourceResponse> WaitForHealthyAsync(ResourceNotificationService notificationService, string resourceName, CancellationToken cancellationToken) 285private static async Task<WaitForResourceResponse> WaitForRunningAsync(ResourceNotificationService notificationService, string resourceName, CancellationToken cancellationToken) 304private static async Task<WaitForResourceResponse> WaitForTerminalAsync(ResourceNotificationService notificationService, string resourceName, CancellationToken cancellationToken) 329public Task<AppHostInformation> GetAppHostInformationAsync(CancellationToken cancellationToken = default) 371public async Task<DashboardMcpConnectionInfo?> GetDashboardMcpConnectionInfoAsync(CancellationToken cancellationToken = default) 423public async Task<DashboardUrlsState> GetDashboardUrlsAsync(CancellationToken cancellationToken = default) 434public async Task<List<ResourceSnapshot>> GetResourceSnapshotsAsync(CancellationToken cancellationToken = default) 502private async Task<ResourceSnapshot?> CreateResourceSnapshotFromEventAsync( 752public async Task<CallToolResult> CallResourceMcpToolAsync( 868private async Task<Tool[]?> TryListToolsAsync(Uri endpointUri, CancellationToken cancellationToken)
Backchannel\DashboardUrlsHelper.cs (2)
29public static async Task<DashboardConnectionInfo> GetDashboardConnectionInfoAsync( 132public static async Task<DashboardUrlsState> GetDashboardUrlsAsync(
ContainerResourceBuilderExtensions.cs (4)
727public static IResourceBuilder<T> WithDockerfileFactory<T>(this IResourceBuilder<T> builder, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) where T : ContainerResource 881public static IResourceBuilder<ContainerResource> AddDockerfileFactory(this IDistributedApplicationBuilder builder, [ResourceName] string name, string contextPath, Func<DockerfileFactoryContext, Task<string>> dockerfileFactory, string? stage = null) 1303public 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 1460Func<DockerfileFactoryContext, Task<string>> dockerfileFactory = async factoryContext =>
Dashboard\DashboardService.cs (2)
37public override Task<ApplicationInformationResponse> GetApplicationInformation( 361public 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) 53Task<ProcessResult> task;
Dcp\DcpExecutor.cs (4)
2752private async Task<List<ContainerCreateFileSystem>> BuildCreateFilesAsync(BuildCreateFilesContext context, CancellationToken cancellationToken) 2788private async Task<(List<string>, bool)> BuildRunArgsAsync(ILogger resourceLogger, IResource modelResource, CancellationToken cancellationToken) 2822private async Task<(char[]? keyPem, byte[]? pfxBytes)> GetCertificateKeyMaterialAsync(HttpsCertificateExecutionConfigurationData configuration, CancellationToken cancellationToken) 3080private async Task<ContainerCreationSets> GetContainerCreationSetsAsync(CancellationToken cancellationToken)
Dcp\DcpHost.cs (1)
483var 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) 304public Task<Stream> GetLogStreamAsync<T>( 450private Task<TResult> ExecuteWithRetry<TResult>( 465private async Task<TResult> ExecuteWithRetry<TResult>( 468Func<DcpKubernetesClient, Task<TResult>> operation,
Dcp\Process\ProcessUtil.cs (1)
20public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
ExternalServiceBuilderExtensions.cs (1)
276public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Health\ResourceHealthCheckService.cs (1)
366internal async Task<bool> DelayAsync(ResourceEvent? currentEvent, TimeSpan delay, CancellationToken cancellationToken)
IInteractionService.cs (6)
36Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default); 48Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default); 62Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 75Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 88Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default); 100Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default);
InteractionService.cs (8)
58public async Task<InteractionResult<bool>> PromptConfirmationAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 68public async Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default) 77private async Task<InteractionResult<bool>> PromptMessageBoxCoreAsync(string title, string message, MessageBoxInteractionOptions options, CancellationToken cancellationToken) 106public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, string inputLabel, string placeHolder, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 111public async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 122public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 219public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 362private async Task<bool> RunValidationAsync(Interaction interactionState, InteractionCompletionState result, CancellationToken cancellationToken)
Orchestrator\ApplicationOrchestrator.cs (1)
106var waitForNonWaitingStateTask = _notificationService.WaitForResourceAsync(
Pipelines\DistributedApplicationPipeline.cs (1)
479private static async Task<List<PipelineStep>> CollectStepsFromAnnotationsAsync(PipelineContext context)
Pipelines\IDeploymentStateManager.cs (1)
26Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default);
Pipelines\Internal\DeploymentStateManagerBase.cs (2)
70protected async Task<JsonObject> LoadStateAsync(CancellationToken cancellationToken = default) 136public async Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
Pipelines\IPipelineActivityReporter.cs (1)
20Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default);
Pipelines\IReportingStep.cs (2)
21Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default); 29Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default);
Pipelines\NullPipelineActivityReporter.cs (3)
18public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 40public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 45public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Pipelines\PipelineActivityReporter.cs (2)
41public async Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 62public async Task<ReportingTask> CreateTaskAsync(ReportingStep step, string statusText, bool enableMarkdown, CancellationToken cancellationToken)
Pipelines\PipelineStepAnnotation.cs (4)
17private readonly Func<PipelineStepFactoryContext, Task<IEnumerable<PipelineStep>>> _factory; 32public PipelineStepAnnotation(Func<PipelineStepFactoryContext, Task<PipelineStep>> factory) 50public PipelineStepAnnotation(Func<PipelineStepFactoryContext, Task<IEnumerable<PipelineStep>>> factory) 60public Task<IEnumerable<PipelineStep>> CreateStepsAsync(PipelineStepFactoryContext context) => _factory(context);
Pipelines\PipelineStepFactoryExtensions.cs (2)
45Func<PipelineStepFactoryContext, Task<PipelineStep>> factory) where T : IResource 83Func<PipelineStepFactoryContext, Task<IEnumerable<PipelineStep>>> factory) where T : IResource
Pipelines\ReportingStep.cs (2)
94public async Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 105public async Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Publishing\ContainerRuntimeBase.cs (2)
38public abstract Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken); 181protected async Task<int> ExecuteContainerCommandWithExitCodeAsync(
Publishing\DockerContainerRuntime.cs (6)
21private async Task<int> RunDockerBuildAsync(string contextPath, string dockerfilePath, ContainerImageBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, BuildImageSecretValue> buildSecrets, string? stage, CancellationToken cancellationToken) 169public override async Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken) 181private async Task<bool> CheckDockerDaemonAsync(CancellationToken cancellationToken) 200private async Task<bool> CheckDockerBuildxAsync(CancellationToken cancellationToken) 219private async Task<int> CreateBuildkitInstanceAsync(string builderName, CancellationToken cancellationToken) 231private async Task<int> RemoveBuildkitInstanceAsync(string builderName, CancellationToken cancellationToken)
Publishing\IContainerRuntime.cs (1)
25Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken);
Publishing\PipelineExecutor.cs (1)
102public async Task<PipelineSummary> ExecutePipelineAsync(DistributedApplicationModel model, CancellationToken cancellationToken)
Publishing\PodmanContainerRuntime.cs (2)
19private async Task<int> RunPodmanBuildAsync(string contextPath, string dockerfilePath, ContainerImageBuildOptions? options, Dictionary<string, string?> buildArguments, Dictionary<string, BuildImageSecretValue> buildSecrets, string? stage, CancellationToken cancellationToken) 100public override async Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken)
Publishing\PublishingExtensions.cs (14)
23public static async Task<IReportingStep> SucceedAsync( 40public static async Task<IReportingStep> SucceedAsync( 56public static async Task<IReportingStep> WarnAsync( 73public static async Task<IReportingStep> WarnAsync( 89public static async Task<IReportingStep> FailAsync( 106public static async Task<IReportingStep> FailAsync( 122public static async Task<IReportingTask> UpdateStatusAsync( 138public static async Task<IReportingTask> UpdateStatusAsync( 154public static async Task<IReportingTask> SucceedAsync( 170public static async Task<IReportingTask> SucceedAsync( 186public static async Task<IReportingTask> WarnAsync( 202public static async Task<IReportingTask> WarnAsync( 218public static async Task<IReportingTask> FailAsync( 234public static async Task<IReportingTask> FailAsync(
Publishing\ResourceContainerImageManager.cs (4)
180private async Task<ResolvedContainerBuildOptions> ResolveContainerBuildOptionsAsync( 322private async Task<bool> ExecuteDotnetPublishAsync(IResource resource, ResolvedContainerBuildOptions options, CancellationToken cancellationToken) 492internal static async Task<string?> ResolveValue(object? value, CancellationToken cancellationToken) 521private async Task<bool> ResourcesRequireContainerRuntimeAsync(IEnumerable<IResource> resources, CancellationToken cancellationToken)
RequiredCommandResourceExtensions.cs (1)
68Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> validationCallback,
ResourceBuilderExtensions.cs (2)
2189Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand, 2250Func<ExecuteCommandContext, Task<ExecuteCommandResult>> executeCommand,
Utils\DotnetSdkUtils.cs (1)
19public static async Task<Version?> TryGetVersionAsync(string? workingDirectory)
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 (43)
AcrLoginService.cs (1)
82private async Task<string> ExchangeAadTokenForAcrRefreshTokenAsync(
AzureResourcePreparer.cs (1)
365private async Task<HashSet<IAzureResource>> GetAzureReferences(IResource resource, CancellationToken cancellationToken)
IAzureKeyVaultResource.cs (1)
27Func<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 (6)
78public virtual async Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default) 201protected async Task<(List<KeyValuePair<string, string>>? tenantOptions, bool fetchSucceeded)> TryGetTenantsAsync(CancellationToken cancellationToken) 250protected async Task<(List<KeyValuePair<string, string>>? subscriptionOptions, bool fetchSucceeded)> TryGetSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken) 278protected async Task<(List<KeyValuePair<string, string>>? subscriptionOptions, bool fetchSucceeded)> TryGetSubscriptionsAsync(CancellationToken cancellationToken) 283protected async Task<(List<(string Name, string Location)>? resourceGroupOptions, bool fetchSucceeded)> TryGetResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken) 316protected async Task<(List<KeyValuePair<string, string>> locationOptions, bool fetchSucceeded)> TryGetLocationsAsync(string subscriptionId, CancellationToken cancellationToken)
Provisioning\Internal\BicepCompiler.cs (2)
23public async Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 77private static async Task<int> ExecuteCommand(ProcessSpec processSpec)
Provisioning\Internal\DefaultArmClientProvider.cs (6)
29public async Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 53public async Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 65public async Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 77public async Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 98public async Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 111public async Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(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\IProvisioningServices.cs (12)
48Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default); 61Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default); 72Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default); 77Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default); 82Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default); 87Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default); 92Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default); 97Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(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( 212Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default);
Provisioning\Internal\PublishModeProvisioningContextProvider.cs (1)
63public override async Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default)
Provisioning\Internal\RunModeProvisioningContextProvider.cs (1)
93public override async Task<ProvisioningContext> CreateProvisioningContextAsync(CancellationToken cancellationToken = default)
Provisioning\Provisioners\AzureProvisioner.cs (3)
112async Task<bool> WaitForRoleAssignments((IResource Resource, IAzureResource AzureResource) resource) 166var provisioningContextLazy = new Lazy<Task<ProvisioningContext>>(() => provisioningContextProvider.CreateProvisioningContextAsync(cancellationToken)); 187private async Task ProcessResourceAsync(IConfiguration configuration, Lazy<Task<ProvisioningContext>> provisioningContextLazy, (IResource Resource, IAzureResource AzureResource) resource, CancellationToken cancellationToken)
Provisioning\Provisioners\BicepProvisioner.cs (1)
33public 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.AppContainers (1)
ContainerAppEnvironmentContext.cs (1)
74public async Task<AzureBicepResource> CreateContainerAppAsync(IResource resource, AzureProvisioningOptions provisioningOptions, CancellationToken cancellationToken)
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceEnvironmentContext.cs (1)
36public async Task<AzureBicepResource> CreateAppServiceAsync(IResource resource, AzureProvisioningOptions provisioningOptions, CancellationToken cancellationToken)
AzureAppServiceWebSiteResource.cs (1)
108private async Task<string> GetAppServiceWebsiteNameAsync(PipelineStepContext context, string? deploymentSlot = null)
Aspire.Hosting.Azure.KeyVault (2)
AzureKeyVaultResource.cs (2)
95internal Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? SecretResolver { get; set; } 97Func<IAzureKeyVaultSecretReference, CancellationToken, Task<string?>>? IAzureKeyVaultResource.SecretResolver
Aspire.Hosting.Azure.Kusto (5)
AzureKustoBuilderExtensions.cs (2)
362static async Task<ExecuteCommandResult> OnOpenInKustoExplorerDesktop(IResourceBuilder<AzureKustoClusterResource> resourceBuilder, ExecuteCommandContext context) 377static async Task<ExecuteCommandResult> OnOpenInKustoExplorerWeb(IResourceBuilder<AzureKustoClusterResource> resourceBuilder, ExecuteCommandContext context)
AzureKustoHealthCheck.cs (3)
27public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken) 46private async Task<HealthCheckResult> CheckClusterHealthAsync() 59private async Task<HealthCheckResult> CheckDatabaseHealthAsync(CancellationToken cancellationToken)
Aspire.Hosting.Azure.Kusto.Tests (13)
AddAzureKustoTests.cs (2)
432public static async Task<Dictionary<string, object>> GetEnvironmentVariables(this IDistributedApplicationTestingBuilder builder, EnvironmentCallbackAnnotation annotation) 440public static async Task<IList<object>> GetContainerRuntimeArgs(this ContainerRuntimeArgsCallbackAnnotation annotation)
KustoFunctionalTests.cs (2)
77static async Task<string?> ExecuteQueryAsync(ICslQueryProvider client, CancellationToken cancellationToken) 156static async Task<List<object[]>> ReadDataAsync(ICslQueryProvider client, CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Azure.Tests (39)
AzureAppServiceTests.cs (1)
989private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureBicepProvisionerTests.cs (2)
234public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 258public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
AzureContainerAppsTests.cs (1)
1645private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureDeployerTests.cs (3)
1304public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1314public Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken) 1327public Task<bool> ConfigureResourceAsync(IConfiguration configuration, AzureBicepResource resource, CancellationToken cancellationToken)
AzureFunctionsTests.cs (1)
457private static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource) =>
AzureManifestUtils.cs (3)
17public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(IResource resource, bool skipPreparer = false) => 20public static Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource) => 23private static async Task<(JsonNode ManifestNode, string BicepText)> GetManifestWithBicep(DistributedApplicationModel appModel, IResource resource, bool skipPreparer)
ProvisioningContextProviderTests.cs (4)
267var createTask = provider.CreateProvisioningContextAsync(CancellationToken.None); 373var createTask = provider.CreateProvisioningContextAsync(CancellationToken.None); 436var createTask = provider.CreateProvisioningContextAsync(CancellationToken.None); 676var createTask = provider.CreateProvisioningContextAsync(CancellationToken.None);
ProvisioningTestHelpers.cs (14)
199public Task<(ISubscriptionResource subscription, ITenantResource tenant)> GetSubscriptionAndTenantAsync(CancellationToken cancellationToken = default) 214public Task<IEnumerable<ITenantResource>> GetAvailableTenantsAsync(CancellationToken cancellationToken = default) 223public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(CancellationToken cancellationToken = default) 232public Task<IEnumerable<ISubscriptionResource>> GetAvailableSubscriptionsAsync(string? tenantId, CancellationToken cancellationToken = default) 244public Task<IEnumerable<(string Name, string DisplayName)>> GetAvailableLocationsAsync(string subscriptionId, CancellationToken cancellationToken = default) 255public Task<IEnumerable<(string Name, string Location)>> GetAvailableResourceGroupsWithLocationAsync(string subscriptionId, CancellationToken cancellationToken = default) 334public Task<Response<IResourceGroupResource>> GetAsync(string resourceGroupName, CancellationToken cancellationToken = default) 348public Task<ArmOperation<IResourceGroupResource>> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceGroupName, ResourceGroupData data, CancellationToken cancellationToken = default) 424public Task<ArmOperation<ArmDeploymentResource>> CreateOrUpdateAsync( 597public Task<string> CompileBicepToArmAsync(string bicepFilePath, CancellationToken cancellationToken = default) 614public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 636public Task<UserPrincipal> GetUserPrincipalAsync(CancellationToken cancellationToken = default) 674public (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec) 685var resultTask = Task.FromResult(result);
RoleAssignmentTests.cs (1)
366private 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 async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 36public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 51public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 58public Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
tests\Shared\TestPipelineActivityReporter.cs (3)
148public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 187public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 226public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.CodeGeneration.Go.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
173Func<TestCallbackContext, Task<bool>> asyncCallback) 361Func<Task<string>> asyncValueProvider) 514Func<TestResourceContext, Task<bool>> validator) where T : IResource 608public static Task<string> GetStatusAsync( 630public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
31public Task<string> GetValueAsync() 48public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.Java.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
173Func<TestCallbackContext, Task<bool>> asyncCallback) 361Func<Task<string>> asyncValueProvider) 514Func<TestResourceContext, Task<bool>> validator) where T : IResource 608public static Task<string> GetStatusAsync( 630public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
31public Task<string> GetValueAsync() 48public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.Python.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
173Func<TestCallbackContext, Task<bool>> asyncCallback) 361Func<Task<string>> asyncValueProvider) 514Func<TestResourceContext, Task<bool>> validator) where T : IResource 608public static Task<string> GetStatusAsync( 630public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
31public Task<string> GetValueAsync() 48public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.Rust.Tests (7)
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestExtensions.cs (5)
173Func<TestCallbackContext, Task<bool>> asyncCallback) 361Func<Task<string>> asyncValueProvider) 514Func<TestResourceContext, Task<bool>> validator) where T : IResource 608public static Task<string> GetStatusAsync( 630public static Task<bool> WaitForReadyAsync(
tests\Aspire.Hosting.CodeGeneration.TypeScript.Tests\TestTypes\TestTypes.cs (2)
31public Task<string> GetValueAsync() 48public Task<bool> ValidateAsync()
Aspire.Hosting.CodeGeneration.TypeScript.Tests (7)
TestTypes\TestExtensions.cs (5)
173Func<TestCallbackContext, Task<bool>> asyncCallback) 361Func<Task<string>> asyncValueProvider) 514Func<TestResourceContext, Task<bool>> validator) where T : IResource 608public static Task<string> GetStatusAsync( 630public static Task<bool> WaitForReadyAsync(
TestTypes\TestTypes.cs (2)
31public Task<string> GetValueAsync() 48public Task<bool> ValidateAsync()
Aspire.Hosting.DevTunnels (44)
DevTunnelCli.cs (19)
35public Task<int> GetVersionAsync(TextWriter? outputWriter = null, TextWriter? errorWriter = null, ILogger? logger = default, CancellationToken cancellationToken = default) 38public Task<int> UserLoginMicrosoftAsync(ILogger? logger = default, CancellationToken cancellationToken = default) 41public Task<int> UserLoginGitHubAsync(ILogger? logger = default, CancellationToken cancellationToken = default) 44public Task<int> UserLogoutAsync(TextWriter? outputWriter = null, TextWriter? errorWriter = null, ILogger? logger = default, CancellationToken cancellationToken = default) 48public Task<int> UserStatusAsync(TextWriter? outputWriter = null, TextWriter? errorWriter = null, ILogger? logger = default, CancellationToken cancellationToken = default) 51public Task<int> CreateTunnelAsync( 70public Task<int> UpdateTunnelAsync( 87public Task<int> ListPortsAsync( 100public Task<int> ListAccessAsync( 115public Task<int> ResetAccessAsync( 130public Task<int> CreateAccessAsync( 154public Task<int> DeleteTunnelAsync( 162public Task<int> ShowTunnelAsync( 170public Task<int> CreatePortAsync( 189public Task<int> UpdatePortAsync( 208public Task<int> DeletePortAsync( 217private Task<int> RunAsync(string[] args, TextWriter? outputWriter = null, TextWriter? errorWriter = null, ILogger? logger = default, CancellationToken cancellationToken = default) 220private Task<int> RunAsync(string[] args, TextWriter? outputWriter = null, TextWriter? errorWriter = null, bool useShellExecute = false, ILogger? logger = default, CancellationToken cancellationToken = default) 235private async Task<int> RunAsync(Action<bool, string> onOutput, string[] args, bool useShellExecute = false, ILogger? logger = default, CancellationToken cancellationToken = default)
DevTunnelCliClient.cs (13)
18public async Task<Version> GetVersionAsync(ILogger? logger = default, CancellationToken cancellationToken = default) 52public async Task<DevTunnelStatus> CreateTunnelAsync(string tunnelId, DevTunnelOptions options, ILogger? logger = default, CancellationToken cancellationToken = default) 127public async Task<DevTunnelStatus> GetTunnelAsync(string tunnelId, ILogger? logger = default, CancellationToken cancellationToken = default) 137public async Task<DevTunnelPortList> GetPortListAsync(string tunnelId, ILogger? logger = default, CancellationToken cancellationToken = default) 146public async Task<DevTunnelPortStatus> CreatePortAsync(string tunnelId, int portNumber, DevTunnelPortOptions options, ILogger? logger = default, CancellationToken cancellationToken = default) 215public async Task<DevTunnelPortDeleteResult> DeletePortAsync(string tunnelId, int portNumber, ILogger? logger = default, CancellationToken cancellationToken = default) 224public async Task<DevTunnelAccessStatus> GetAccessAsync(string tunnelId, int? portNumber = null, ILogger? logger = default, CancellationToken cancellationToken = default) 233public async Task<UserLoginStatus> GetUserLoginStatusAsync(ILogger? logger = default, CancellationToken cancellationToken = default) 242public async Task<UserLoginStatus> UserLoginAsync(LoginProvider provider, ILogger? logger = default, CancellationToken cancellationToken = default) 261private async Task<(T? Result, int ExitCode, string? Error)> CallCliAsJsonAsync<T>(Func<TextWriter, TextWriter, ILogger?, CancellationToken, Task<int>> cliCall, ILogger? logger = default, CancellationToken cancellationToken = default) 266private async Task<(T? Result, int ExitCode, string? Error)> CallCliAsJsonAsync<T>(Func<TextWriter, TextWriter, ILogger?, CancellationToken, Task<int>> cliCall, string? propertyName, ILogger? logger = default, CancellationToken cancellationToken = default)
DevTunnelHealthCheck.cs (1)
23public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
DevTunnelPortHealthCheck.cs (1)
15public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
DevTunnelResourceBuilderExtensions.cs (1)
781internal static async Task<RequiredCommandValidationResult> ValidateDevTunnelCliVersionAsync(RequiredCommandValidationContext context)
IDevTunnelClient.cs (9)
10Task<Version> GetVersionAsync(ILogger? logger = default, CancellationToken cancellationToken = default); 12Task<UserLoginStatus> GetUserLoginStatusAsync(ILogger? logger = default, CancellationToken cancellationToken = default); 14Task<UserLoginStatus> UserLoginAsync(LoginProvider provider, ILogger? logger = default, CancellationToken cancellationToken = default); 16Task<DevTunnelStatus> CreateTunnelAsync(string tunnelId, DevTunnelOptions options, ILogger? logger = default, CancellationToken cancellationToken = default); 18Task<DevTunnelPortList> GetPortListAsync(string tunnelId, ILogger? logger = default, CancellationToken cancellationToken = default); 20Task<DevTunnelPortStatus> CreatePortAsync(string tunnelId, int portNumber, DevTunnelPortOptions options, ILogger? logger = default, CancellationToken cancellationToken = default); 22Task<DevTunnelPortDeleteResult> DeletePortAsync(string tunnelId, int portNumber, ILogger? logger = default, CancellationToken cancellationToken = default); 24Task<DevTunnelStatus> GetTunnelAsync(string tunnelId, ILogger? logger = default, CancellationToken cancellationToken = default); 26Task<DevTunnelAccessStatus> GetAccessAsync(string tunnelId, int? portNumber = null, ILogger? logger = default, CancellationToken cancellationToken = default);
Aspire.Hosting.DevTunnels.Tests (18)
DevTunnelCliVersionValidationTests.cs (9)
51public Task<Version> GetVersionAsync(ILogger? logger = null, CancellationToken cancellationToken = default) => Task.FromResult(cliVersion); 53public Task<DevTunnelPortStatus> CreatePortAsync(string tunnelId, int portNumber, DevTunnelPortOptions options, ILogger? logger = null, CancellationToken cancellationToken = default) 58public Task<DevTunnelStatus> CreateTunnelAsync(string tunnelId, DevTunnelOptions options, ILogger? logger = null, CancellationToken cancellationToken = default) 63public Task<DevTunnelAccessStatus> GetAccessAsync(string tunnelId, int? portNumber = null, ILogger? logger = null, CancellationToken cancellationToken = default) 68public Task<DevTunnelStatus> GetTunnelAsync(string tunnelId, ILogger? logger = null, CancellationToken cancellationToken = default) 73public Task<UserLoginStatus> GetUserLoginStatusAsync(ILogger? logger = null, CancellationToken cancellationToken = default) 78public Task<UserLoginStatus> UserLoginAsync(LoginProvider provider, ILogger? logger = null, CancellationToken cancellationToken = default) 83public Task<DevTunnelPortList> GetPortListAsync(string tunnelId, ILogger? logger = null, CancellationToken cancellationToken = default) 88public Task<DevTunnelPortDeleteResult> DeletePortAsync(string tunnelId, int portNumber, ILogger? logger = null, CancellationToken cancellationToken = default)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Docker (5)
DockerComposeEnvironmentContext.cs (1)
12public async Task<DockerComposeServiceResource> CreateDockerComposeServiceResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
DockerComposeServiceResource.cs (2)
113internal async Task<Service> BuildComposeServiceAsync() 365private static async Task<List<string>?> RunDockerComposePsAsync(
DockerComposeServiceResourceExtensions.cs (1)
11internal static async Task<object> ProcessValueAsync(this DockerComposeServiceResource resource, object value)
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
20public static (Task<ProcessResult>, IAsyncDisposable) Run(ProcessSpec processSpec)
Aspire.Hosting.Docker.Tests (3)
tests\Shared\TestPipelineActivityReporter.cs (3)
148public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 187public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 226public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
Aspire.Hosting.DotnetTool.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Foundry (6)
FoundryLocalHealthCheck.cs (1)
11public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
HostedAgent\AzureHostedAgentResource.cs (3)
96public async Task<HostedAgentConfiguration> ToHostedAgentConfigurationAsync(PipelineStepContext context) 133public async Task<AgentVersion> DeployAsync(PipelineStepContext context, AzureCognitiveServicesProjectResource project) 152internal static async Task<Dictionary<string, string>> GetResolvedEnvironmentVariablesAsync(
HostedAgent\AzurePromptAgentResource.cs (1)
110public async Task<AgentVersion> DeployAsync(PipelineStepContext context, AzureCognitiveServicesProjectResource project)
LocalModelHealthCheck.cs (1)
11public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.Hosting.Foundry.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
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)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.JavaScript.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public 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)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Kubernetes (3)
KubernetesEnvironmentContext.cs (1)
15public async Task<KubernetesResource> CreateKubernetesResourceAsync(IResource resource, DistributedApplicationExecutionContext executionContext, CancellationToken cancellationToken)
KubernetesResource.cs (2)
380private async Task<object> ProcessValueAsync(KubernetesEnvironmentContext context, DistributedApplicationExecutionContext executionContext, object value, bool embedded = false) 482private async Task<object> BuildHelmConditional(KubernetesEnvironmentContext context, DistributedApplicationExecutionContext executionContext, ReferenceExpression expr, ParameterResource conditionParam, bool embedded)
Aspire.Hosting.Maui (2)
Utilities\MauiEnvironmentHelper.cs (2)
33public static async Task<string?> CreateAndroidEnvironmentTargetsFileAsync( 221public static async Task<string?> CreateiOSEnvironmentTargetsFileAsync(
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
389private static async Task<string> WritePhpMyAdminConfiguration(IFileSystemService fileSystemService, IEnumerable<MySqlServerResource> mySqlInstances, CancellationToken cancellationToken)
Aspire.Hosting.MySql.Tests (11)
MySqlFunctionalTests.cs (2)
561async Task<string?[]> RunContainersAsync() 600static async Task<string?> GetContainerIdAsync(ResourceNotificationService rns, string resourceName, CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public 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.OpenAI (4)
OpenAIHealthCheck.cs (2)
41public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 57private async Task<HealthCheckResult> CheckStatusPageAsync(CancellationToken cancellationToken)
OpenAIModelHealthCheck.cs (2)
27public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default) 64private static async Task<HealthCheckResult> HandleNotFound(HttpResponseMessage response, CancellationToken cancellationToken)
Aspire.Hosting.OpenAI.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.PostgreSQL (2)
PostgresBuilderExtensions.cs (2)
592private static async Task<IEnumerable<ContainerFileSystemItem>> WritePgWebBookmarks(IEnumerable<PostgresDatabaseResource> postgresInstances, CancellationToken cancellationToken) 625private static async Task<string> WritePgAdminServerJson(IEnumerable<PostgresServerResource> postgresInstances, CancellationToken cancellationToken)
Aspire.Hosting.PostgreSQL.Tests (11)
PostgresFunctionalTests.cs (2)
548async Task<string?[]> RunContainersAsync() 577static async Task<string?> GetContainerIdAsync(ResourceNotificationService rns, string resourceName, CancellationToken cancellationToken)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public 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)
65static Task<IConnection> CreateConnection(string connectionString)
Aspire.Hosting.RabbitMQ.Tests (9)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Hosting.Redis.Tests (1)
AddRedisTests.cs (1)
658private static async Task<string> GetCommandLineArgs(IResourceBuilder<RedisResource> builder)
Aspire.Hosting.RemoteHost (13)
Ats\AtsCallbackProxyFactory.cs (1)
270private async Task<T?> InvokeAsyncResult<T>(string callbackId, JsonObject? args, CancellationToken cancellationToken, int ctParamIndex)
Ats\CapabilityDispatcher.cs (4)
19internal delegate Task<JsonNode?> CapabilityHandler( 412public async Task<JsonNode?> InvokeAsync(string capabilityId, JsonObject? args) 460private static async Task<object?> InvokeMethodAsync(MethodInfo method, object? target, object?[] methodArgs, bool runSyncOnBackgroundThread) 480private static async Task<object?> UnwrapAsyncResultAsync(object? result, Type returnType)
AtsCapabilityScanner.cs (5)
1629else if (returnType.IsGenericType && returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1721else if (funcReturnType.IsGenericType && funcReturnType.GetGenericTypeDefinition() == typeof(Task<>)) 1767if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Task<>)) 2024if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Task<>)) 2440if (genericDef == typeof(Task<>))
ICallbackInvoker.cs (1)
22Task<TResult> InvokeAsync<TResult>(string callbackId, JsonNode? args, CancellationToken cancellationToken = default);
JsonRpcCallbackInvoker.cs (1)
31public async Task<TResult> InvokeAsync<TResult>(string callbackId, JsonNode? args, CancellationToken cancellationToken = default)
RemoteAppHostService.cs (1)
70public async Task<JsonNode?> InvokeCapabilityAsync(string capabilityId, JsonObject? args)
Aspire.Hosting.RemoteHost.Tests (9)
AtsCapabilityScannerTests.cs (2)
59var result = AtsCapabilityScanner.MapToAtsTypeId(typeof(Task<string>)); 67var result = AtsCapabilityScanner.MapToAtsTypeId(typeof(Task<int>));
CallbackProxyTests.cs (3)
382public delegate Task<int> TestCallbackWithIntResult(); 388public delegate Task<string> TestCallbackWithStringResult(string input); 417public Task<TResult> InvokeAsync<TResult>(string callbackId, JsonNode? args, CancellationToken cancellationToken = default)
CapabilityDispatcherTests.cs (4)
1475public static async Task<string> AsyncWithResult(string value) 1489public static async Task<string> AsyncThrows(string value) 1581public async Task<string> ProcessAsync(string input) 1640public static int WithAsyncCallback(Func<Task<int>> callback)
Aspire.Hosting.Testing (17)
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)
DistributedApplicationHostingTestingExtensions.cs (1)
69internal static Task<string?> GetConnectionStringAsyncExport(this DistributedApplication app, string resourceName)
DistributedApplicationTestingBuilder.cs (11)
36public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(CancellationToken cancellationToken = default) 49public static Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, CancellationToken cancellationToken = default) 64public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(string[] args, CancellationToken cancellationToken = default) 78public static Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, string[] args, CancellationToken cancellationToken = default) 94public static Task<IDistributedApplicationTestingBuilder> CreateAsync<TEntryPoint>(string[] args, Action<DistributedApplicationOptions, HostApplicationBuilderSettings> configureBuilder, CancellationToken cancellationToken = default) 108public static async Task<IDistributedApplicationTestingBuilder> CreateAsync(Type entryPoint, string[] args, Action<DistributedApplicationOptions, HostApplicationBuilderSettings> configureBuilder, CancellationToken cancellationToken = default) 186public async Task<IDistributedApplicationTestingBuilder> CreateBuilderAsync(CancellationToken cancellationToken) 211public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 255public async Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 413public Task<DistributedApplication> BuildAsync(CancellationToken cancellationToken) 511Task<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 (131)
Backchannel\Exec\ExecTestsBase.cs (1)
22internal async Task<List<CommandOutput>> ExecWithLogCollectionAsync(
Dashboard\DashboardLifecycleHookTests.cs (1)
652public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardResourceTests.cs (2)
764public Task<LogMessage> FirstLogTask => _tcs.Task; 802public Task<string> GetResourceServiceUriAsync(CancellationToken cancellationToken = default)
Dashboard\DashboardServiceTests.cs (3)
248var resultTask = interactionService.PromptMessageBoxAsync( 318var resultTask = interactionService.PromptInputAsync( 365var resultTask = interactionService.PromptInputAsync(
Dcp\DcpExecutorTests.cs (5)
635var moveNextTask = watchLogsEnumerator.MoveNextAsync().AsTask(); 736var watchLogsTask1 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs1, targetLogCount: 8); 758var watchLogsTask2 = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs2, targetLogCount: 8); 817var watchLogsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(watchLogs, targetLogCount: 3); 843private static async Task<LogStreamPipes> GetStreamPipesAsync(Channel<(string Type, Pipe Pipe)> logStreamPipesChannel)
Dcp\DcpHostNotificationTests.cs (1)
872public 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, IKubernetesStaticMetadata 59public Task<T> CreateAsync<T>(T obj, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 104public async Task<T> DeleteAsync<T>(string name, string? namespaceParameter = null, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 124public Task<List<T>> ListAsync<T>(string? namespaceParameter = null, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata 165public Task<Stream> GetLogStreamAsync<T>( 180public Task<T> PatchAsync<T>(T obj, V1Patch patch, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata
ExpressionResolverTests.cs (1)
35async Task<ResolvedValue> ResolveAsync() => await ExpressionResolver.ResolveAsync(testData.ValueProvider, context, 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, IKubernetesStaticMetadata 28public static async Task<T> GetResourceByNameMatchAsync<T>(IKubernetesService kubernetes, string resourceNamePattern, Func<T, bool> ready, CancellationToken cancellationToken = default) where T : CustomResource, IKubernetesStaticMetadata
Helpers\Network.cs (1)
23public static async Task<int> GetAvailablePortAsync(
InteractionServiceTests.cs (18)
26var resultTask = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 51var resultTask = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation", cancellationToken: cts.Token); 75var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 76var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 77var resultTask3 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 135var resultTask1 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 139var resultTask2 = interactionService.PromptConfirmationAsync("Are you sure?", "Confirmation"); 280var resultTask = interactionService.PromptInputAsync( 317var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 340var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 363var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 384var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 407var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 440var resultTask = interactionService.PromptInputAsync("Please provide", "please", input); 778var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 843var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 898var resultTask = interactionService.PromptInputsAsync("Login", "Please enter credentials", inputs); 961var resultTask = interactionService.PromptInputsAsync("Validation Test", "Test validation", inputs, options);
Orchestrator\ApplicationOrchestratorTests.cs (1)
510public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
Orchestrator\ParameterProcessorTests.cs (5)
325var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameterWithMissingValue); 349var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameterWithError); 380var logsTask = ConsoleLoggingTestHelpers.WatchForLogsAsync(loggerService, 1, parameter); 1161public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default) 1581public Task<DeploymentStateSection> AcquireSectionAsync(string sectionName, CancellationToken cancellationToken = default)
Pipelines\PipelineLoggerProviderTests.cs (2)
131public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 136public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
ProjectResourceTests.cs (2)
41async static Task<(string ProjectFilePath, string LaunchSettingsFilePath)> PrepareProjectWithTrailingCommasInLaunchSettingsAsync() 90async static Task<(string ProjectFilePath, string LaunchSettingsFilePath)> PrepareProjectWithMalformedLaunchSettingsAsync()
Publishing\FakeContainerRuntime.cs (1)
34public Task<bool> CheckIfRunningAsync(CancellationToken cancellationToken)
Publishing\PipelineActivityReporterTests.cs (4)
521var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 546var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 575var promptTask = _interactionService.PromptInputAsync("Test Prompt", "test-description", "text-label", "test-placeholder"); 610var notificationTask = _interactionService.PromptNotificationAsync("Test Notification", "This is a test notification message", notificationOptions);
RequiredCommandAnnotationTests.cs (2)
44Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> callback = 89Func<RequiredCommandValidationContext, Task<RequiredCommandValidationResult>> callback =
ResourceLoggerServiceTests.cs (8)
25var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 66var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(service, 2, testResource); 106var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 2); 162var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator1, 1); 227var logsLoop = ConsoleLoggingTestHelpers.WatchForLogsAsync(logsEnumerator, 4); 319var watchTask = Task.Run(async () => 353var watchTask = Task.Run(async () => 384var watchTask = Task.Run(async () =>
ResourceNotificationTests.cs (16)
71var watchTask = Task.Run(async () => 95async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 113var enumerableTask = GetValuesAsync(cts.Token); 148async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellation) 166var enumerableTask = GetValuesAsync(cts.Token); 268var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"]); 283var waitTask = notificationService.WaitForResourceAsync("myResource1", ["SomeState", "SomeOtherState"], default); 490async Task<List<ResourceEvent>> GetValuesAsync(CancellationToken cancellationToken) 508var enumerableTask = GetValuesAsync(cts.Token); 550async Task<ResourceEvent> GetFirstValueAsync(CancellationToken cancellationToken) 560var enumerableTask = GetFirstValueAsync(cts.Token); 586async Task<ResourceEvent> GetFirstValueAsync(CancellationToken cancellationToken) 596var enumerableTask = GetFirstValueAsync(cts.Token); 624var waitTask = notificationService.WaitForResourceHealthyAsync("myResource"); 669var waitTask = notificationService.WaitForResourceHealthyAsync("myResource"); 694var waitTask = notificationService.WaitForResourceHealthyAsync("myResource");
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public 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 async Task<InteractionResult<InteractionInput>> PromptInputAsync(string title, string? message, InteractionInput input, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 36public async Task<InteractionResult<InteractionInputCollection>> PromptInputsAsync(string title, string? message, IReadOnlyList<InteractionInput> inputs, InputsDialogInteractionOptions? options = null, CancellationToken cancellationToken = default) 51public async Task<InteractionResult<bool>> PromptNotificationAsync(string title, string message, NotificationInteractionOptions? options = null, CancellationToken cancellationToken = default) 58public Task<InteractionResult<bool>> PromptMessageBoxAsync(string title, string message, MessageBoxInteractionOptions? options = null, CancellationToken cancellationToken = default)
tests\Shared\TestPipelineActivityReporter.cs (3)
148public Task<IReportingStep> CreateStepAsync(string title, CancellationToken cancellationToken = default) 187public Task<IReportingTask> CreateTaskAsync(string statusText, CancellationToken cancellationToken = default) 226public Task<IReportingTask> CreateTaskAsync(MarkdownString statusText, CancellationToken cancellationToken = default)
UserSecretsParameterDefaultTests.cs (5)
105var tasks = new List<Task<bool>>(); 155var sqlTask = Task.Run(() => 160var rabbitTask = Task.Run(() => 194var tasks = new List<Task<bool>>(); 298var tasks = new List<Task<string>>();
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 (4)
13public static async Task<JsonNode> GetManifest(IResource resource, string? manifestDirectory = null) 20public static async Task<JsonNode?> GetManifestOrNull(IResource resource, string? manifestDirectory = null) 45public static async Task<JsonNode> GetManifestForModel(DistributedApplicationModel model, string? manifestDirectory = null) 66public static async Task<JsonNode[]> GetManifests(IResource[] resources)
ValueSnapshotTests.cs (10)
14var getTask = snapshot.GetValueAsync(); 29var getTask = snapshot.GetValueAsync(); 58var task1 = snapshot.GetValueAsync(); 59var task2 = snapshot.GetValueAsync(); 60var task3 = snapshot.GetValueAsync(); 91var task1 = snapshot.GetValueAsync(); 92var task2 = snapshot.GetValueAsync(); 182var getTask = snapshot.GetValueAsync(cts.Token); 194var cancelledTask = snapshot.GetValueAsync(cts.Token); 195var normalTask = snapshot.GetValueAsync();
VersionChecking\VersionCheckServiceTests.cs (3)
300private readonly Task<List<NuGetPackage>> _versionTask; 304public TestPackageFetcher(Task<List<NuGetPackage>>? versionTask = null) 309public Task<List<NuGetPackage>> TryFetchPackagesAsync(string appHostDirectory, CancellationToken cancellationToken)
WithHttpCommandTests.cs (1)
264protected 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)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public 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)
211public static async Task<bool> TryApplyEfMigrationsAsync(this DistributedApplication app, ProjectResource project)
Infrastructure\DistributedApplicationTestFactory.cs (1)
19public static async Task<IDistributedApplicationTestingBuilder> CreateAsync(Type appHostProgramType, ITestOutputHelper? testOutput)
tests\Shared\AsyncTestHelpers.cs (9)
113public static Task<T> DefaultTimeout<T>(this Task<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 123public static Task<T> DefaultTimeout<T>(this Task<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 128public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, int milliseconds = -1, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 138public static Task<T> DefaultTimeout<T>(this ValueTask<T> task, TimeSpan timeout, [CallerFilePath] string? filePath = null, [CallerLineNumber] int lineNumber = default) 143public static async Task<T> TimeoutAfter<T>(this Task<T> task, TimeSpan timeout, 220public static async Task AssertIsTrueRetryAsync(Func<Task<bool>> assert, string message, ILogger? logger = null, int retries = 10)
Aspire.Qdrant.Client (1)
QdrantHealthCheck.cs (1)
18public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
Aspire.RabbitMQ.Client (1)
src\Components\Aspire.RabbitMQ.Client\AspireRabbitMQExtensions.cs (1)
180public 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.v6.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)
125static 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( 330public async Task<CommandResult> BuildAsync(string[]? extraBuildArgs = default, CancellationToken token = default, string? workingDirectory = null) 351public 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)
AzureFunctionsEndToEnd.Functions (1)
MyAzureBlobTrigger.cs (1)
11public async Task<string> RunAsync([BlobTrigger("myblobcontainer/{name}", Connection = "blob")] string triggerString, FunctionContext context)
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;
blazor-gateway (1)
BlazorGateway.cs (1)
172public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken) =>
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)
cdac-build-tool (3)
ComposeCommand.cs (1)
28private async Task<int> Run(ParseResult parse, CancellationToken token = default)
ObjectFileScraper.cs (1)
29public async Task<bool> ScrapeInput(string inputPath, CancellationToken token)
Program.cs (1)
11public static async Task<int> Main(string[] args)
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)
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");
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");
CosmosEndToEnd.ApiService (1)
Program.cs (1)
24static async Task<object> AddAndGetStatus<T>(Container container, T newEntry)
csc (12)
src\roslyn\src\Compilers\Shared\BuildClient.cs (3)
25internal delegate Task<BuildResponse> CompileOnServerFunc(BuildRequest buildRequest, string pipeName, CancellationToken cancellationToken); 168public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> originalArguments, BuildPaths buildPaths, TextWriter? textWriter = null) 231var buildResponseTask = _compileOnServerFunc(
src\roslyn\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\roslyn\src\Compilers\Shared\BuildServerConnection.cs (7)
99internal static async Task<bool> RunServerShutdownRequestAsync( 177internal static Task<BuildResponse> RunServerBuildRequestAsync( 191internal static async Task<BuildResponse> RunServerBuildRequestAsync( 214static Task<NamedPipeClientStream?> tryConnectToServerAsync( 291static async Task<BuildResponse> tryRunRequestAsync( 314var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 385internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
dotnet (71)
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (1)
231private static async Task<bool> FileExistsWithLock(string path)
Commands\New\BuiltInTemplatePackageProvider.cs (1)
31public Task<IReadOnlyList<ITemplatePackage>> GetAllTemplatePackagesAsync(CancellationToken cancellationToken)
Commands\New\MSBuildEvaluation\ProjectCapabilityConstraint.cs (1)
21public Task<ITemplateConstraint> CreateTemplateConstraintAsync(IEngineEnvironmentSettings environmentSettings, CancellationToken cancellationToken)
Commands\New\MSBuildEvaluation\ProjectContextSymbolSource.cs (1)
26public Task<string?> GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindname, CancellationToken cancellationToken)
Commands\New\OptionalWorkloadProvider.cs (1)
30public Task<IReadOnlyList<ITemplatePackage>> GetAllTemplatePackagesAsync(CancellationToken cancellationToken)
Commands\New\SdkInfoProvider.cs (2)
32public Task<string> GetCurrentVersionAsync(CancellationToken cancellationToken) 37public Task<IEnumerable<string>> GetInstalledVersionsAsync(CancellationToken cancellationToken)
Commands\New\WorkloadsInfoProvider.cs (1)
16public Task<IEnumerable<WorkloadInfo>> GetInstalledWorkloadsAsync(CancellationToken cancellationToken)
Commands\Package\PackageCommandParser.cs (2)
71private static async Task<IEnumerable<string>> QueryNuGet(string packageStem, bool allowPrerelease, CancellationToken cancellationToken) 85private static async Task<IEnumerable<NuGetVersion>> QueryVersionsForPackage(string packageId, string versionFragment, bool allowPrerelease, CancellationToken cancellationToken)
Commands\Run\CSharpCompilerCommand.cs (1)
109var responseTask = BuildServerConnection.RunServerBuildRequestAsync(
Commands\Test\MTP\IPC\NamedPipeServer.cs (2)
16private readonly Func<NamedPipeServer, IRequest, Task<IResponse>> _callback; 29Func<NamedPipeServer, IRequest, Task<IResponse>> callback,
Commands\Test\MTP\TestApplication.cs (3)
81public async Task<int> RunAsync(CtrlCCancellationManager ctrlC) 540private Task<IResponse> OnControlRequest(NamedPipeServer _, IRequest request) 587private Task<IResponse> OnRequest(NamedPipeServer server, IRequest request)
Commands\Test\MTP\TestRunPolicy.cs (1)
62public Task<TestRunCancellationReason> Cancellation => _cancellation.Task;
Commands\Workload\Install\FileBasedInstaller.cs (1)
133public async Task<WorkloadSet> GetWorkloadSetContentsAsync(string workloadSetVersion)
Commands\Workload\Install\IWorkloadManifestUpdater.cs (1)
24Task<IEnumerable<WorkloadDownload>> GetManifestPackageDownloadsAsync(bool includePreviews, SdkFeatureBand providedSdkFeatureBand, SdkFeatureBand installedSdkFeatureBand);
Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (3)
185private async Task<bool> UpdateManifestWithVersionAsync( 341private async Task<bool> UpdatedAdManifestPackagesExistAsync() 349private async Task<bool> NewerManifestPackageExists(ManifestId manifest)
Commands\Workload\Install\WorkloadInstallCommand.cs (1)
324private async Task<IEnumerable<string>> GetPackageDownloadUrlsAsync(IEnumerable<WorkloadId> workloadIds, bool skipManifestUpdate, bool includePreview,
Commands\Workload\Install\WorkloadManifestUpdater.Managed.cs (1)
114public async Task<IEnumerable<WorkloadDownload>> GetManifestPackageDownloadsAsync(
Commands\Workload\InstallingWorkloadCommand.cs (1)
371protected async Task<List<WorkloadDownload>> GetDownloads(IEnumerable<WorkloadId> workloadIds, bool skipManifestUpdate, bool includePreview, string downloadFolder = null,
Commands\Workload\Update\WorkloadUpdateCommand.cs (1)
210private async Task<IEnumerable<string>> GetUpdatablePackageUrlsAsync(bool includePreview, IReporter reporter = null, INuGetPackageDownloader packageDownloader = null)
NugetPackageDownloader\INuGetPackageDownloader.cs (7)
15Task<string> DownloadPackageAsync(PackageId packageId, 23Task<string> GetPackageUrl(PackageId packageId, 28Task<IEnumerable<string>> ExtractPackageAsync(string packagePath, DirectoryPath targetFolder); 30Task<NuGetVersion> GetLatestPackageVersion(PackageId packageId, 34Task<IEnumerable<NuGetVersion>> GetLatestPackageVersions(PackageId packageId, 39Task<NuGetVersion> GetBestPackageVersionAsync(PackageId packageId, 43Task<(NuGetVersion version, PackageSource source)> GetBestPackageVersionAndSourceAsync(PackageId packageId,
NugetPackageDownloader\NuGetPackageDownloader.cs (22)
159public async Task<string> DownloadPackageAsync(PackageId packageId, 301public async Task<string> GetPackageUrl(PackageId packageId, 324public async Task<IEnumerable<string>> ExtractPackageAsync(string packagePath, DirectoryPath targetFolder) 365public async Task<IEnumerable<IPackageSearchMetadata>> GetLatestVersionsOfPackage(string packageId, bool includePreview, int numberOfResults) 371private async Task<(PackageSource, NuGetVersion)> GetPackageSourceAndVersion(PackageId packageId, 632private async Task<(PackageSource, IPackageSearchMetadata)> GetMatchingVersionInternalAsync( 713private async Task<(PackageSource, IPackageSearchMetadata)> GetLatestVersionInternalAsync( 720private async Task<IEnumerable<(PackageSource, IPackageSearchMetadata)>> GetLatestVersionsInternalAsync( 784public async Task<NuGetVersion> GetBestPackageVersionAsync(PackageId packageId, 798public async Task<(NuGetVersion version, PackageSource source)> GetBestPackageVersionAndSourceAsync(PackageId packageId, 812private async Task<(PackageSource, IPackageSearchMetadata)> GetPackageMetadataAsync(string packageIdentifier, 827List<Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)>> tasks = [.. sources 859foreach (Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> task in tasks) 872Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> finishedTask = 895private async Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> 937public async Task<NuGetVersion> GetLatestPackageVersion(PackageId packageId, 944public async Task<IEnumerable<NuGetVersion>> GetLatestPackageVersions(PackageId packageId, int numberOfResults, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) 954public async Task<IEnumerable<string>> GetPackageIdsAsync(string idStem, bool allowPrerelease, PackageSourceLocation packageSourceLocation = null, CancellationToken cancellationToken = default) 969public async Task<IEnumerable<NuGetVersion>> GetPackageVersionsAsync(PackageId packageId, string versionPrefix = null, bool allowPrerelease = false, PackageSourceLocation packageSourceLocation = null, CancellationToken cancellationToken = default) 983private async Task<IEnumerable<AutoCompleteResource>> GetAutocompleteAsync(PackageSource source, CancellationToken cancellationToken) 996private async Task<IEnumerable<NuGetVersion>> GetPackageVersionsForSource(AutoCompleteResource autocomplete, PackageId packageId, string versionPrefix, bool allowPrerelease, CancellationToken cancellationToken) 1015private static async Task<IEnumerable<string>> GetPackageIdsForSource(AutoCompleteResource autocomplete, PackageId packageId, bool allowPrerelease, CancellationToken cancellationToken)
NugetSearch\INugetToolSearchApiRequest.cs (1)
10Task<string> GetResult(NugetSearchApiParameter nugetSearchApiParameter);
NugetSearch\NugetToolSearchApiRequest.cs (3)
20public async Task<string> GetResult(NugetSearchApiParameter nugetSearchApiParameter) 50internal static async Task<Uri> ConstructUrl(string searchTerm = null, int? skip = null, int? take = null, 168private static async Task<Uri> DomainAndPath()
Parser.cs (2)
354public static Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) => parseResult.InvokeAsync(InvocationConfiguration, cancellationToken); 356public static Task<int> InvokeAsync(string[] args, CancellationToken cancellationToken = default) => InvokeAsync(Parse(args), cancellationToken);
ShellShim\ShellShimTemplateFinder.cs (1)
24public async Task<string> ResolveAppHostSourceDirectoryAsync(string archOption, NuGetFramework targetFramework, Architecture arch)
src\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26410.101\contentFiles\cs\net11.0\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\sdk\artifacts\.packages\microsoft.codeanalysis.buildclient\5.11.0-1.26410.101\contentFiles\cs\net11.0\BuildServerConnection.cs (7)
99internal static async Task<bool> RunServerShutdownRequestAsync( 177internal static Task<BuildResponse> RunServerBuildRequestAsync( 191internal static async Task<BuildResponse> RunServerBuildRequestAsync( 214static Task<NamedPipeClientStream?> tryConnectToServerAsync( 291static async Task<BuildResponse> tryRunRequestAsync( 314var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 385internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
dotnet-aot (38)
src\sdk\src\Cli\dotnet\Commands\Workload\Install\WorkloadAdvertisingManifestUpdater.cs (3)
185private async Task<bool> UpdateManifestWithVersionAsync( 341private async Task<bool> UpdatedAdManifestPackagesExistAsync() 349private async Task<bool> NewerManifestPackageExists(ManifestId manifest)
src\sdk\src\Cli\dotnet\NugetPackageDownloader\INuGetPackageDownloader.cs (7)
15Task<string> DownloadPackageAsync(PackageId packageId, 23Task<string> GetPackageUrl(PackageId packageId, 28Task<IEnumerable<string>> ExtractPackageAsync(string packagePath, DirectoryPath targetFolder); 30Task<NuGetVersion> GetLatestPackageVersion(PackageId packageId, 34Task<IEnumerable<NuGetVersion>> GetLatestPackageVersions(PackageId packageId, 39Task<NuGetVersion> GetBestPackageVersionAsync(PackageId packageId, 43Task<(NuGetVersion version, PackageSource source)> GetBestPackageVersionAndSourceAsync(PackageId packageId,
src\sdk\src\Cli\dotnet\NugetPackageDownloader\NuGetPackageDownloader.cs (22)
159public async Task<string> DownloadPackageAsync(PackageId packageId, 301public async Task<string> GetPackageUrl(PackageId packageId, 324public async Task<IEnumerable<string>> ExtractPackageAsync(string packagePath, DirectoryPath targetFolder) 365public async Task<IEnumerable<IPackageSearchMetadata>> GetLatestVersionsOfPackage(string packageId, bool includePreview, int numberOfResults) 371private async Task<(PackageSource, NuGetVersion)> GetPackageSourceAndVersion(PackageId packageId, 632private async Task<(PackageSource, IPackageSearchMetadata)> GetMatchingVersionInternalAsync( 713private async Task<(PackageSource, IPackageSearchMetadata)> GetLatestVersionInternalAsync( 720private async Task<IEnumerable<(PackageSource, IPackageSearchMetadata)>> GetLatestVersionsInternalAsync( 784public async Task<NuGetVersion> GetBestPackageVersionAsync(PackageId packageId, 798public async Task<(NuGetVersion version, PackageSource source)> GetBestPackageVersionAndSourceAsync(PackageId packageId, 812private async Task<(PackageSource, IPackageSearchMetadata)> GetPackageMetadataAsync(string packageIdentifier, 827List<Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)>> tasks = [.. sources 859foreach (Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> task in tasks) 872Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> finishedTask = 895private async Task<(PackageSource source, IEnumerable<IPackageSearchMetadata> foundPackages)> 937public async Task<NuGetVersion> GetLatestPackageVersion(PackageId packageId, 944public async Task<IEnumerable<NuGetVersion>> GetLatestPackageVersions(PackageId packageId, int numberOfResults, PackageSourceLocation packageSourceLocation = null, bool includePreview = false) 954public async Task<IEnumerable<string>> GetPackageIdsAsync(string idStem, bool allowPrerelease, PackageSourceLocation packageSourceLocation = null, CancellationToken cancellationToken = default) 969public async Task<IEnumerable<NuGetVersion>> GetPackageVersionsAsync(PackageId packageId, string versionPrefix = null, bool allowPrerelease = false, PackageSourceLocation packageSourceLocation = null, CancellationToken cancellationToken = default) 983private async Task<IEnumerable<AutoCompleteResource>> GetAutocompleteAsync(PackageSource source, CancellationToken cancellationToken) 996private async Task<IEnumerable<NuGetVersion>> GetPackageVersionsForSource(AutoCompleteResource autocomplete, PackageId packageId, string versionPrefix, bool allowPrerelease, CancellationToken cancellationToken) 1015private static async Task<IEnumerable<string>> GetPackageIdsForSource(AutoCompleteResource autocomplete, PackageId packageId, bool allowPrerelease, CancellationToken cancellationToken)
src\sdk\src\Cli\dotnet\NugetSearch\INugetToolSearchApiRequest.cs (1)
10Task<string> GetResult(NugetSearchApiParameter nugetSearchApiParameter);
src\sdk\src\Cli\dotnet\NugetSearch\NugetToolSearchApiRequest.cs (3)
20public async Task<string> GetResult(NugetSearchApiParameter nugetSearchApiParameter) 50internal static async Task<Uri> ConstructUrl(string searchTerm = null, int? skip = null, int? take = null, 92private static async Task<Uri> DomainAndPath()
src\sdk\src\Cli\dotnet\Parser.cs (2)
354public static Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) => parseResult.InvokeAsync(InvocationConfiguration, cancellationToken); 356public static Task<int> InvokeAsync(string[] args, CancellationToken cancellationToken = default) => InvokeAsync(Parse(args), cancellationToken);
dotnet-dev-certs (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-format (47)
Analyzers\AnalyzerFormatter.cs (5)
55public async Task<Solution> FormatAsync( 119async static Task<ImmutableHashSet<string>> GetFormattablePathsAsync(Solution solution, ImmutableArray<DocumentId> formattableDocuments, CancellationToken cancellationToken) 143private async Task<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetProjectDiagnosticsAsync( 197private async Task<Solution> FixDiagnosticsAsync( 288internal static async Task<ImmutableDictionary<ProjectId, ImmutableArray<DiagnosticAnalyzer>>> FilterAnalyzersAsync(
Analyzers\AnalyzerRunner.cs (1)
96static async Task<bool> AllReferencedProjectsLoadedAsync(Project project, CancellationToken cancellationToken)
Analyzers\Extensions.cs (1)
32public static async Task<DiagnosticSeverity> GetSeverityAsync(
Analyzers\Interfaces\ICodeFixApplier.cs (1)
11Task<Solution> ApplyCodeFixesAsync(
Analyzers\SolutionCodeFixApplier.cs (5)
14public async Task<Solution> ApplyCodeFixesAsync( 96private static Task<IEnumerable<Diagnostic>> EmptyDignosticResult => Task.FromResult(Enumerable.Empty<Diagnostic>()); 104public override Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 109public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 115public override Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
CodeFormatter.cs (4)
25public static async Task<WorkspaceFormatResult> FormatWorkspaceAsync( 120private static async Task<Workspace?> OpenMSBuildWorkspaceAsync( 141private static async Task<Solution> RunCodeFormattersAsync( 166internal static async Task<(int, ImmutableArray<DocumentId>)> DetermineFormattableFilesAsync(
Commands\FormatAnalyzersCommand.cs (1)
31public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\FormatCommandCommon.cs (1)
103internal static async Task<int> FormatAsync(FormatOptions formatOptions, ILogger<Program> logger, CancellationToken cancellationToken)
Commands\FormatStyleCommand.cs (1)
31public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\FormatWhitespaceCommand.cs (1)
62public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\RootFormatCommand.cs (1)
34public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Formatters\CharsetFormatter.cs (1)
22internal override Task<SourceText> FormatFileAsync(
Formatters\DocumentFormatter.cs (9)
32public async Task<Solution> FormatAsync( 48internal abstract Task<SourceText> FormatFileAsync( 60private ImmutableArray<(Document, Task<(SourceText originalText, SourceText? formattedText)>)> FormatFiles( 67var formattedDocuments = ImmutableArray.CreateBuilder<(Document, Task<(SourceText originalText, SourceText? formattedText)>)>(formattableDocuments.Length); 77var formatTask = Task.Run(async () => 102private async Task<(SourceText originalText, SourceText? formattedText)> GetFormattedSourceTextAsync( 121private async Task<Solution> ApplyFileChangesAsync( 123ImmutableArray<(Document, Task<(SourceText originalText, SourceText? formattedText)>)> formattedDocuments, 205protected static async Task<bool> IsSameDocumentAndVersionAsync(Document a, Document b, CancellationToken cancellationToken)
Formatters\EndOfLineFormatter.cs (1)
19internal override Task<SourceText> FormatFileAsync(
Formatters\FinalNewlineFormatter.cs (1)
18internal override async Task<SourceText> FormatFileAsync(
Formatters\ICodeFormatter.cs (1)
19Task<Solution> FormatAsync(
Formatters\OrganizeImportsFormatter.cs (1)
23internal override async Task<SourceText> FormatFileAsync(
Formatters\WhitespaceFormatter.cs (3)
22internal override async Task<SourceText> FormatFileAsync( 44private static async Task<SourceText> GetFormattedDocument(Document document, OptionSet optionSet, CancellationToken cancellationToken) 53private static async Task<SourceText> GetFormattedDocumentWithDetailedChanges(Document document, SourceText sourceText, OptionSet optionSet, CancellationToken cancellationToken)
Program.cs (1)
10private static async Task<int> Main(string[] args)
Reflection\RemoveUnnecessaryImportsHelper.cs (2)
14public static async Task<Document?> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken) 21return await (Task<Document>)s_removeUnnecessaryImportsAsyncMethod.Invoke(obj: null, new object[] { document, cancellationToken })!;
Utilities\DotNetHelper.cs (1)
10public static async Task<int> PerformRestoreAsync(string workspaceFilePath, ILogger logger)
Utilities\GeneratedCodeUtilities.cs (1)
22internal static async Task<bool> IsGeneratedCodeAsync(SyntaxTree syntaxTree, CancellationToken cancellationToken)
Utilities\ProcessRunner.cs (2)
29public Task<ProcessResult> Result { get; } 33public ProcessInfo(Process process, ProcessStartInfo startInfo, Task<ProcessResult> result)
Workspaces\MSBuildWorkspaceLoader.cs (1)
15public static async Task<Workspace?> LoadAsync(
dotnet-getdocument (1)
src\aspnetcore\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\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-sourcelink (7)
dotnet-sql-cache (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-suggest (4)
Program.cs (1)
14public static async Task<int> Main(string[] args)
SuggestionDispatcher.cs (2)
106public Task<int> InvokeAsync(string[] args) => RootCommand.Parse(args).InvokeAsync(Configuration); 127private Task<int> Get(ParseResult parseResult, CancellationToken cancellationToken)
SuggestionStore.cs (1)
45Task<string> readToEndTask = process.StandardOutput.ReadToEndAsync();
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) 176internal 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)
138internal 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)
115var xmlReader = await (Task<System.Xml.XmlReader>)methodInfo.Invoke(typeInstance, new object[] { MetadataUrl }); 220public async Task<MetadataDocumentSaver.SaveResult> SaveMetadataAsync(string directoryPath, CancellationToken cancellationToken) 225public async Task<MetadataDocumentSaver.SaveResult> SaveMetadataAsync(string directoryPath, MetadataFileNamingConvention fileNamingConvention, bool overwrite, CancellationToken cancellationToken) 280private 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 = "") 716public async Task<ProcessRunner.ProcessResult> RestoreAsync(ILogger logger, CancellationToken cancellationToken) 736public async Task<ProcessRunner.ProcessResult> BuildAsync(bool restore, ILogger logger, CancellationToken cancellationToken) 745public async Task<ProcessRunner.ProcessResult> BuildAsync(ILogger logger, CancellationToken cancellationToken) 755public async Task<IEnumerable<ProjectDependency>> ResolveProjectReferencesAsync(IEnumerable<ProjectDependency> excludeDependencies, ILogger logger, CancellationToken cancellationToken) 788private async Task<List<ProjectDependency>> ResolvePackageReferencesAsync(ILogger logger, CancellationToken cancellationToken) 866private async Task<List<ProjectDependency>> ResolveAssemblyReferencesAsync(ILogger logger, CancellationToken cancellationToken) 954public async Task<IEnumerable<KeyValuePair<string, string>>> ResolveProperyValuesAsync(IEnumerable<string> propertyNames, ILogger logger, CancellationToken cancellationToken) 993private 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-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-user-jwts (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-user-secrets (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
dotnet-watch (8)
Program.cs (3)
28public static async Task<int> Main(string[] args) 245internal async Task<int> RunAsync() 346private async Task<int> ListFilesAsync(ProcessRunner processRunner, CancellationToken cancellationToken)
UI\SpectreBuildParametersSelectionPrompt.cs (3)
23protected override Task<string> PromptForTargetFrameworkAsync(IReadOnlyList<string> targetFrameworks, CancellationToken cancellationToken) 36protected override Task<DeviceInfo> PromptForDeviceAsync(IReadOnlyList<DeviceInfo> devices, CancellationToken cancellationToken) 133public async Task<ConsoleKeyInfo?> ReadKeyAsync(bool intercept, CancellationToken cancellationToken)
Watch\DotNetWatcher.cs (2)
98var processTask = context.ProcessRunner.RunAsync(processSpec, context.Logger, launchResult: null, combinedCancellationSource.Token); 100Task<ChangedFile?> fileSetTask;
GenerateDocumentationAndConfigFiles (182)
Program.cs (4)
60public static Task<int> Main(string[] args) 263private static async Task<int> HandleAsync(CommandLineArgs args, CancellationToken cancellationToken) 841async Task<bool> checkHelpLinkAsync(string helpLink) 866async Task<bool> createGlobalConfigFilesAsync()
src\0bf6ba47805c8821\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\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\0bf6ba47805c8821\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\5f6f2f95b47c3dc6\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\7a47995420f988d7\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\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\ce787ef1f541c32a\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\ce8c1e82c1124a2b\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\f53a47129f87bc30\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\f53a47129f87bc30\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (2)
28public sealed override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 71async Task<Solution> ProcessLinkedDocumentMapAsync()
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
30public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 37public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 44public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 51public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 58public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 65public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 72public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 79public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 86public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
178public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 184public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 219public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
94public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 294private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\roslyn\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)
GetDocument.Insider (1)
src\aspnetcore\src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
138public void OnExecute(Func<Task<int>> invoke)
ILCompiler.ReadyToRun (16)
Compiler\DependencyAnalysis\ReadyToRun\ReadyToRunHeaderNode.cs (1)
100private readonly Task<(bool canSkipValidation, string[] reasons)> _shouldAddSkipTypeValidationFlag;
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (15)
21private ConcurrentDictionary<TypeDesc, Task<bool>> _firstStageValidationChecks = new ConcurrentDictionary<TypeDesc, Task<bool>>(); 23private ConcurrentQueue<Task<bool>> _tasksThatMustFinish = new ConcurrentQueue<Task<bool>>(); 48private async Task<bool> CanSkipValidationInstance(EcmaModule module) 64while (_tasksThatMustFinish.TryDequeue(out var taskToComplete)) 85public static async Task<(bool canSkipValidation, string[] reasonsWhyItFailed)> CanSkipValidation(EcmaModule module) 94private static Task<bool> ValidateType(TypeValidationChecker checker, EcmaType type) 96if (checker._firstStageValidationChecks.TryGetValue(type, out var result)) return result; 97Task<bool> skipValidatorForType = Task.Run(() => checker.ValidateTypeWorker(type)); 103private async Task<bool> ValidateTypeWorker(EcmaType type) 105Task<bool> ValidateTypeWorkerHelper(TypeDesc typeToCheckForSkipValidation) 610Task<bool> ValidateTypeHelper(TypeDesc typeDesc) 630Task<bool> ValidateTypeHelperInstantiatedType(InstantiatedType instantiatedType) 650async Task<bool> ValidateTypeHelperFunctionPointerType(FunctionPointerType functionPointerType)
ILLink.CodeFixProvider (15)
BaseAttributeCodeFixProvider.cs (1)
53private async Task<Document> AddAttributeAsync(
DynamicallyAccessedMembersCodeFixProvider.cs (1)
120private static async Task<Document> AddAttributeAsync(
MatchPartialSafetyModifierCodeFixProvider.cs (1)
96private static async Task<(Document, SyntaxNode)?> GetDeclarationToEditAsync(
RemoveInvalidUnsafeCodeFixProvider.cs (2)
96private static async Task<ImmutableArray<DocumentId>> GetPartsWithUnsafeModifierAsync( 125private static async Task<Solution> RemoveUnsafeModifierFromPartsAsync(
RequiresUnsafeCodeFixProvider.cs (5)
133private static async Task<Document> AddUnsafeModifierAsync( 166private static async Task<Document> WrapStatementsInUnsafeBlockAsync( 363private static async Task<Document> WrapSwitchSectionStatementInUnsafeBlockAsync( 387private static async Task<Document> WrapEmbeddedStatementInUnsafeBlockAsync( 413private static async Task<Document> ConvertExpressionBodyToUnsafeBlockAsync(
SynchronizeUnsafeContractCodeFixProvider.cs (1)
169private static async Task<Solution> AddUnsafeToBaseAsync(
UnsafeModifierCodeFixHelpers.cs (4)
92internal static Task<Document> AddUnsafeModifierAsync( 101internal static async Task<Document> AddModifierAsync( 119internal static async Task<Document> ReplaceUnsafeWithSafeAsync( 179internal static async Task<Document> RemoveUnsafeModifierAsync(
ILLink.RoslynAnalyzer (1)
CompilationExtensions.cs (1)
178=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
Infrastructure.Common (3)
ServiceUtilHelper.cs (2)
157public static async Task<X509Certificate2> GetServiceMacineCertFromServerAsync() 607public static async Task<byte[]> GetResourceFromServiceAsByteArrayAsync(string resource)
xunit\WcfTestCase.cs (1)
47public override async Task<RunSummary> RunAsync(
Infrastructure.Tests (14)
ExtractTestPartitions\ExtractTestPartitionsTests.cs (2)
280private async Task<ToolResult> RunTool(string assemblyPath, string outputFile) 285private async Task<ToolResult> RunToolRaw(params string[] args)
PowerShellScripts\BuildTestMatrixTests.cs (1)
574private async Task<CommandResult> RunScript(string artifactsDir, string outputFile)
PowerShellScripts\ExpandTestMatrixGitHubTests.cs (1)
618private async Task<CommandResult> RunScript(
PowerShellScripts\PowerShellCommand.cs (2)
55public async Task<CommandResult> ExecuteAsync(params string[] args) 80private async Task<CommandResult> ExecuteAsyncInternal(CancellationToken token, string[] args)
PowerShellScripts\SplitTestMatrixByDepsTests.cs (1)
247private async Task<CommandResult> RunScript(
PowerShellScripts\SplitTestProjectsTests.cs (1)
180private async Task<CommandResult> RunScript(
WorkflowScripts\AutoRerunTransientCiFailuresTests.cs (4)
1055private async Task<AnalyzeFailedJobsResult> AnalyzeSingleJobAsync(WorkflowJob job, string annotationsOrText, string jobLogText = "") 1067private Task<AnalyzeFailedJobsResult> AnalyzeJobsAsync( 1082private async Task<T> InvokeHarnessAsync<T>(string operation, object payload) 1135private Task<string> ReadRepoFileAsync(string relativePath)
WorkflowScripts\NodeCommand.cs (2)
49public async Task<CommandResult> ExecuteScriptAsync(string scriptPath, params string[] args) 74private async Task<CommandResult> ExecuteScriptAsyncInternal(string scriptPath, string[] args, CancellationToken token)
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)
Microsoft.Agents.AI.ProjectTemplates.Tests (3)
test\ProjectTemplates\Infrastructure\DotNetNewCommand.cs (1)
27public override Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
93public async Task<Project> CreateProjectAsync(string templateName, string projectName, string? startupProjectRelativePath, params string[] args)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
26public virtual async Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
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)
39public Task<bool> RunAsync(Func<int, Task<RetryResult>> actionAsync) 44public async Task<bool> RunAsync( 45Func<int, Task<RetryResult>> actionAsync,
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<RetryResult>> actionAsync); 15Task<bool> RunAsync( 16Func<int, Task<RetryResult>> actionAsync,
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.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() 288protected 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)
42protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new CertificateAuthenticationEvents()); 50protected override async Task<AuthenticateResult> HandleAuthenticateAsync() 107private async Task<CertificateAuthenticationFailedContext> HandleFailureAsync(Exception error) 118private async Task<AuthenticateResult> ValidateCertificateAsync(X509Certificate2 clientCertificate)
Microsoft.AspNetCore.Authentication.Cookies (11)
CookieAuthenticationHandler.cs (5)
34private Task<AuthenticateResult>? _readCookieTask; 81protected override Task<object> CreateEventsAsync() => Task.FromResult<object>(new CookieAuthenticationEvents()); 83private Task<AuthenticateResult> EnsureCookieTicket() 151private async Task<AuthenticateResult> ReadCookieTicket() 201protected 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.DeviceBoundSessions (3)
DeviceBoundSessionHandler.cs (2)
57protected override Task<AuthenticateResult> HandleAuthenticateAsync() 67public async Task<bool> HandleRequestAsync()
DeviceBoundSessionJwtValidator.cs (1)
30public async Task<DeviceBoundSessionJwtResult?> ValidateAsync(string jwt, string? publicKeyJwk)
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)
73var 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.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() 109protected virtual async Task<bool> HandleRemoteSignOutAsync() 317protected virtual async Task<bool> HandleSignOutCallbackAsync() 609private async Task<string> GetPushedAuthorizationRequestUri(HttpResponseMessage parResponseMessage) 634protected override async Task<HandleRequestResult> HandleRemoteAuthenticateAsync() 989protected virtual async Task<OpenIdConnectMessage> RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest) 1042protected virtual async Task<HandleRequestResult> GetUserInformationAsync( 1211private async Task<MessageReceivedContext> RunMessageReceivedEventAsync(OpenIdConnectMessage message, AuthenticationProperties? properties) 1235private async Task<TokenValidatedContext> RunTokenValidatedEventAsync(OpenIdConnectMessage authorizationResponse, OpenIdConnectMessage? tokenEndpointResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt, string? nonce) 1261private async Task<AuthorizationCodeReceivedContext> RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal? user, AuthenticationProperties properties, JwtSecurityToken? jwt) 1307private async Task<TokenResponseReceivedContext> RunTokenResponseReceivedEventAsync( 1336private async Task<UserInformationReceivedContext> RunUserInformationReceivedEventAsync(ClaimsPrincipal principal, AuthenticationProperties properties, OpenIdConnectMessage message, JsonDocument user) 1362private async Task<AuthenticationFailedContext> RunAuthenticationFailedEventAsync(OpenIdConnectMessage message, Exception exception) 1444private async Task<TokenValidationResult> ValidateTokenUsingHandlerAsync(string idToken, AuthenticationProperties properties, TokenValidationParameters validationParameters)
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( 184private 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) 270private async Task<RequestToken> ObtainRequestTokenAsync(string callBackUri, AuthenticationProperties properties) 293private async Task<AccessToken> ObtainAccessTokenAsync(RequestToken token, string verifier) 321private 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 (43)
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 (4)
99public static Task<AuthorizationPolicy?> CombineAsync(IAuthorizationPolicyProvider policyProvider, 114public static Task<AuthorizationPolicy?> CombineAsync(IAuthorizationPolicyProvider policyProvider, 140public static Task<AuthorizationPolicy?> CombineAsync(IAuthorizationPolicyProvider policyProvider, 178private 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.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) 212internal Task<bool> TryPauseAsync(IPersistentComponentStateStore store) 214List<Task<bool>>? pendingCallbackTasks = null; 235var result = TryExecuteCallback(registration.Callback, _logger); 259static Task<bool> TryExecuteCallback(Func<Task> callback, ILogger<ComponentStatePersistenceManager> logger) 279static async Task<bool> Awaited(Task task, ILogger<ComponentStatePersistenceManager> logger) 294static 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 (4)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
50private static Task<Document> GetTransformedDocumentAsync(
JSInteropCodeFixProvider.cs (1)
73private static async Task<Document> TryCatchWrapJSInteropCallAsync(Document document, SyntaxNode root, ExpressionStatementSyntax expressionStatement, CancellationToken cancellationToken)
JSInvokableCodeFixProvider.cs (1)
47private static async Task<Document> GetTransformedDocumentAsync(
StateHasChangedCodeFixProvider.cs (1)
60private static Task<Document> RemoveStateHasChangedCallAsync(Document document, SyntaxNode root, InvocationExpressionSyntax invocation, CancellationToken cancellationToken)
Microsoft.AspNetCore.Components.Authorization (17)
_generated\0\CascadingAuthenticationState_razor.g.cs (6)
32System.Threading.Tasks.Task<AuthenticationState> 38__builder.AddComponentParameter(1, nameof(global::Microsoft.AspNetCore.Components.CascadingValue<System.Threading.Tasks.Task<AuthenticationState>>. 46), global::Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<System.Threading.Tasks.Task<AuthenticationState>>( 55__builder.AddComponentParameter(2, nameof(global::Microsoft.AspNetCore.Components.CascadingValue<System.Threading.Tasks.Task<AuthenticationState>>. 78private Task<AuthenticationState>? _currentAuthenticationStateTask; 94private void OnAuthenticationStateChanged(Task<AuthenticationState> newAuthStateTask)
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)
46[CascadingParameter] private Task<AuthenticationState>? AuthenticationState { get; set; } 103private 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.Endpoints (23)
CacheView\CacheViewRenderState.cs (1)
24public Task<SerializedRenderFragment>? PendingStoreTask { get; set; }
CacheView\CacheViewService.cs (9)
79public async Task<CacheViewRenderState?> PrepareAsync(CacheView cacheView, HttpContext httpContext) 160var pending = state.PendingStoreTask; 191var pending = state.PendingStoreTask; 250private async Task ApplyDuplicateResolutionAsync(CacheViewRenderState state, string key, Task<SerializedRenderFragment?> resolution) 289var inflight = _store.GetOrCreateAsync( 344private async Task ObserveCacheStorePersistAsync(string key, Task<SerializedRenderFragment> pending) 360private static Dictionary<string, (CacheView Owner, Task<SerializedRenderFragment?> Task)> GetInFlightResolutions(HttpContext httpContext) 362if (httpContext.Items[_inFlightResolutionsItemKey] is not Dictionary<string, (CacheView Owner, Task<SerializedRenderFragment?> Task)> resolutions) 364resolutions = new Dictionary<string, (CacheView, Task<SerializedRenderFragment?>)>(StringComparer.Ordinal);
CacheView\MemoryCacheViewStore.cs (3)
15private readonly ConcurrentDictionary<string, Task<SerializedRenderFragment>> _pending = new(StringComparer.Ordinal); 40var pending = _pending.GetOrAdd(key, tcs.Task); 65_pending.TryRemove(new KeyValuePair<string, Task<SerializedRenderFragment>>(key, tcs.Task));
DependencyInjection\ServerAuthenticationStateProvider.cs (3)
13private Task<AuthenticationState>? _authenticationStateTask; 16public override Task<AuthenticationState> GetAuthenticationStateAsync() 21public void SetAuthenticationState(Task<AuthenticationState> authenticationStateTask)
RazorComponentEndpointInvoker.cs (1)
208private async Task<RequestValidationState> ValidateRequestAsync(HttpContext context)
Rendering\EndpointHtmlRenderer.cs (1)
107Task<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\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (2)
37internal async Task<ResourceAssetCollection> GetResourceCollection() 50private async Task<ResourceAssetCollection> LoadResourceCollection()
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
46public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.Forms (1)
EditContext.cs (1)
265public async Task<bool> ValidateAsync(CancellationToken cancellationToken = default)
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.QuickGrid.EntityFrameworkAdapter (2)
EntityFrameworkAsyncQueryExecutor.cs (2)
15public Task<int> CountAsync<T>(IQueryable<T> queryable) 18public Task<T[]> ToArrayAsync<T>(IQueryable<T> queryable)
Microsoft.AspNetCore.Components.SdkAnalyzers (1)
ComponentParametersShouldBePublicCodeFixProvider.cs (1)
50private static Task<Document> GetTransformedDocumentAsync(
Microsoft.AspNetCore.Components.Server (28)
CircuitDisconnectMiddleware.cs (1)
52private async Task<CircuitId?> GetCircuitIdAsync(HttpContext context)
Circuits\Circuit.cs (1)
37public Task<bool> RequestCircuitPauseAsync(CancellationToken cancellationToken = default)
Circuits\CircuitClientProxy.cs (1)
48public Task<T> InvokeCoreAsync<T>(string method, object[] args, CancellationToken cancellationToken = default)
Circuits\CircuitHost.cs (7)
488internal async Task<bool> ReceiveJSDataChunk(long streamId, long chunkId, byte[] chunk, string error) 511public async Task<int> SendDotNetStreamAsync(DotNetStreamReference dotNetStreamReference, long streamId, byte[] buffer) 531public async Task<DotNetStreamReference> TryClaimPendingStream(long streamId) 659internal async Task<TResult> HandleInboundActivityAsync<TResult>(Func<Task<TResult>> handler) 950internal Task<bool> RequestPauseAsync(CancellationToken cancellationToken) 1012internal async Task<bool> SendPersistedStateToClient(string rootComponents, string applicationState, CancellationToken cancellation)
Circuits\CircuitPersistenceManager.cs (3)
70internal async Task<(string rootComponents, string applicationState)> ToProtectedStateAsync(PersistedCircuitState state) 100public async Task<PersistedCircuitState> ResumeCircuitAsync(CircuitId circuitId, CancellationToken cancellation = default) 237Task<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)
173public Task<WebSocket> AcceptAsync(WebSocketAcceptContext context) 194private async Task<WebSocket> ReturnAwaited(Task result, WebSocketAcceptContext context)
src\aspnetcore\src\Components\Shared\src\ArrayBuilderMemoryStream.cs (1)
53public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
46public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.Testing (8)
Infrastructure\PlaywrightExtensions.cs (2)
82public static async Task<TracingSession> TraceAsync( 100public static async Task<TracedContext> NewTracedContextAsync(
Infrastructure\ResourceLock.cs (1)
52public static async Task<ResourceLock> CreateAsync(IPage page, Regex urlPattern)
Infrastructure\ServerFixture.cs (2)
114public Task<ServerInstance> StartServerAsync<TApp>(Action<ServerStartOptions>? configure = null) 129public async Task<ServerInstance> StartServerAsync(
Infrastructure\TestLockClient.cs (1)
41public static async Task<TestLockClient> CreateAsync(
Infrastructure\TracedContext.cs (1)
50public Task<IPage> NewPageAsync() => Context.NewPageAsync();
Infrastructure\TracingSession.cs (1)
48public static async Task<TracingSession> StartAsync(
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.WebAssembly (23)
_generated\2\JSImports.g.cs (4)
236private static partial global::System.Threading.Tasks.Task<string> GetInitialUpdateCore() 246global::System.Threading.Tasks.Task<string> __retVal; 906public static partial global::System.Threading.Tasks.Task<bool> LoadLazyAssembly(string assemblyToLoad) 917global::System.Threading.Tasks.Task<bool> __retVal;
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() 73private 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) 108public static partial Task<bool> LoadLazyAssembly(string assemblyToLoad);
src\aspnetcore\src\Components\Shared\src\ArrayBuilderMemoryStream.cs (1)
53public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\aspnetcore\src\Components\Shared\src\PullFromJSDataStream.cs (1)
76public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\aspnetcore\src\Components\Shared\src\ResourceCollectionProvider.cs (2)
37internal async Task<ResourceAssetCollection> GetResourceCollection() 50private async Task<ResourceAssetCollection> LoadResourceCollection()
src\aspnetcore\src\Shared\Components\PrerenderComponentApplicationStore.cs (1)
46public Task<IDictionary<string, byte[]>> GetPersistedStateAsync()
Microsoft.AspNetCore.Components.WebAssembly.Authentication (22)
Options\AuthenticationStateDeserializationOptions.cs (3)
15private static readonly Task<AuthenticationState> _defaultUnauthenticatedStateTask = 23public Func<AuthenticationStateData?, Task<AuthenticationState>> DeserializationCallback { get; set; } = DeserializeAuthenticationStateAsync; 25private static Task<AuthenticationState> DeserializeAuthenticationStateAsync(AuthenticationStateData? authenticationStateData)
Services\AuthorizationMessageHandler.cs (1)
48protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Services\DeserializedAuthenticationStateProvider.cs (3)
17private static readonly Task<AuthenticationState> _defaultUnauthenticatedTask = 20private readonly Task<AuthenticationState> _authenticationStateTask = _defaultUnauthenticatedTask; 39public override Task<AuthenticationState> GetAuthenticationStateAsync() => _authenticationStateTask;
Services\IRemoteAuthenticationService.cs (4)
21Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> SignInAsync(RemoteAuthenticationContext<TRemoteAuthenticationState> context); 29Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> CompleteSignInAsync( 37Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> SignOutAsync( 46Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> CompleteSignOutAsync(
Services\RemoteAuthenticationService.cs (11)
87public override async Task<AuthenticationState> GetAuthenticationStateAsync() => new AuthenticationState(await GetUser(useCache: true)); 90public virtual async Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> SignInAsync( 101public virtual async Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> CompleteSignInAsync( 112public virtual async Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> SignOutAsync( 123public virtual async Task<RemoteAuthenticationResult<TRemoteAuthenticationState>> CompleteSignOutAsync( 181private async Task<ClaimsPrincipal> GetUser(bool useCache = false) 198/// <returns>A <see cref="Task{ClaimsPrincipal}"/>that will return the current authenticated user when completes.</returns> 221var getUserTask = GetUser(); 227private void UpdateUser(Task<ClaimsPrincipal> task) 231static async Task<AuthenticationState> UpdateAuthenticationState(Task<ClaimsPrincipal> futureUser) => new AuthenticationState(await futureUser);
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) 447private async Task<IEnumerable<BrowserTab>> GetOpenedBrowserTabs()
Microsoft.AspNetCore.Components.WebView (4)
Services\WebViewJSRuntime.cs (1)
82protected override Task<Stream> ReadJSDataAsStreamAsync(IJSStreamReference jsStreamReference, long totalLength, CancellationToken cancellationToken = default)
src\aspnetcore\src\Components\Shared\src\ArrayBuilderMemoryStream.cs (1)
53public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\aspnetcore\src\Components\Shared\src\PullFromJSDataStream.cs (1)
76public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
WebViewManager.cs (1)
178public 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.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.Connections.Abstractions (1)
Features\IAuthenticationRefreshFeature.cs (1)
26Task<TimeSpan?> RefreshAuthenticationAsync(CancellationToken cancellationToken = default);
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 359var existingTask = _cacheableKeyRingTask; 473private IKeyRing? GetKeyRingFromCompletedTaskUnsynchronized(Task<CacheableKeyRing> task, DateTime utcNow)
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.Grpc.JsonTranscoding (14)
src\aspnetcore\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\aspnetcore\src\Grpc\JsonTranscoding\src\Shared\Server\DuplexStreamingServerMethodInvoker.cs (1)
94/// <returns>A <see cref="Task{TResponse}"/> that represents the asynchronous method.</returns>
src\aspnetcore\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.HeaderPropagation (1)
HeaderPropagationMessageHandler.cs (1)
41protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
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 (13)
Internal\HttpConnectionContext.cs (3)
145public Task<bool>? TransportTask { get; set; } 597async Task<bool> Func() 659internal async Task<bool> CancelPreviousPoll(HttpContext context)
Internal\HttpConnectionDispatcher.cs (4)
827private async Task<bool> EnsureConnectionStateAsync(HttpConnectionContext connection, HttpContext context, HttpTransportType transportType, HttpTransportType supportedTransports, ConnectionLogScope logScope, HttpConnectionDispatcherOptions options) 1174private async Task<bool> RejectIfUserChangedAsync(HttpConnectionContext connection, HttpContext context) 1213private async Task<HttpConnectionContext?> GetConnectionAsync(HttpContext context) 1240private 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\aspnetcore\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 (15)
HttpConnection.cs (8)
35private static readonly Task<string?> _noAccessToken = Task.FromResult<string?>(null); 56private Func<Task<string?>>? _accessTokenProvider; 57private readonly Func<Task<string?>>? _appAccessTokenProvider; 453private async Task<NegotiationResponse> NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken) 704internal Task<string?> GetAccessTokenAsync() 714internal Task<string?> GetRefreshRequestTokenAsync() 746private async Task<NegotiationResponse> GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken) 769async Task<TimeSpan?> IAuthenticationRefreshFeature.RefreshAuthenticationAsync(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.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( 1529static async Task<(object? FormValue, bool Successful)> TryReadFormAsync( 2487private static Task ExecuteTaskOfObject(Task<object> task, HttpContext httpContext, JsonTypeInfo<object> jsonTypeInfo) 2489static async Task ExecuteAwaited(Task<object> task, HttpContext httpContext, JsonTypeInfo<object> jsonTypeInfo) 2507private static Task ExecuteTaskOfTFast<T>(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2511static async Task ExecuteAwaited(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2524private static Task ExecuteTaskOfT<T>(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2528static async Task ExecuteAwaited(Task<T> task, HttpContext httpContext, JsonTypeInfo<T> jsonTypeInfo) 2541private static Task ExecuteTaskOfString(Task<string?> task, HttpContext httpContext) 2546static async Task ExecuteAwaited(Task<string> task, HttpContext httpContext) 2676private static async Task ExecuteTaskResult<T>(Task<T?> task, HttpContext httpContext) where T : IResult 2880private static void EnsureRequestTaskOfNotNull<T>(Task<T?> task) where T : IResult
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\aspnetcore\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.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)
22Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken);
Microsoft.AspNetCore.HttpLogging (3)
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)
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 (114)
_generated\0\GeneratedRouteBuilderExtensions.g.cs (40)
87var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.RegisterRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!); 105var task = handler(ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.RegisterRequest>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Http.HttpContext>(1)!, ic.GetArgument<global::System.IServiceProvider>(2)!); 132var task = handler(registration_local!, context_local, sp_local); 170var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.RegisterRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!); 207var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Authentication.BearerToken.AccessTokenResponse>, global::Microsoft.AspNetCore.Http.HttpResults.EmptyHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult>> (global::Microsoft.AspNetCore.Identity.Data.LoginRequest arg0, global::System.Boolean? arg1, global::System.Boolean? arg2, global::System.IServiceProvider arg3) => throw null!); 225var task = handler(ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.LoginRequest>(0)!, ic.GetArgument<global::System.Boolean?>(1)!, ic.GetArgument<global::System.Boolean?>(2)!, ic.GetArgument<global::System.IServiceProvider>(3)!); 285var task = handler(login_local!, useCookies_local, useSessionCookies_local, sp_local); 356var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Authentication.BearerToken.AccessTokenResponse>, global::Microsoft.AspNetCore.Http.HttpResults.EmptyHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.ProblemHttpResult>> (global::Microsoft.AspNetCore.Identity.Data.LoginRequest arg0, global::System.Boolean? arg1, global::System.Boolean? arg2, global::System.IServiceProvider arg3) => throw null!); 391var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Authentication.BearerToken.AccessTokenResponse>, global::Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.SignInHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult>> (global::Microsoft.AspNetCore.Identity.Data.RefreshRequest arg0, global::System.IServiceProvider arg1) => throw null!); 409var task = handler(ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.RefreshRequest>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!); 435var task = handler(refreshRequest_local!, sp_local); 472var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Authentication.BearerToken.AccessTokenResponse>, global::Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.SignInHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.ChallengeHttpResult>> (global::Microsoft.AspNetCore.Identity.Data.RefreshRequest arg0, global::System.IServiceProvider arg1) => throw null!); 508var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.ContentHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult>> (global::System.String arg0, global::System.String arg1, global::System.String? arg2, global::System.IServiceProvider arg3) => throw null!); 525var task = handler(ic.GetArgument<global::System.String>(0)!, ic.GetArgument<global::System.String>(1)!, ic.GetArgument<global::System.String?>(2)!, ic.GetArgument<global::System.IServiceProvider>(3)!); 566var task = handler(userId_local, code_local, changedEmail_local, sp_local); 618var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.ContentHttpResult, global::Microsoft.AspNetCore.Http.HttpResults.UnauthorizedHttpResult>> (global::System.String arg0, global::System.String arg1, global::System.String? arg2, global::System.IServiceProvider arg3) => throw null!); 654var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Ok> (global::Microsoft.AspNetCore.Identity.Data.ResendConfirmationEmailRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!); 672var task = handler(ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.ResendConfirmationEmailRequest>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Http.HttpContext>(1)!, ic.GetArgument<global::System.IServiceProvider>(2)!); 699var task = handler(resendRequest_local!, context_local, sp_local); 737var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Ok> (global::Microsoft.AspNetCore.Identity.Data.ResendConfirmationEmailRequest arg0, global::Microsoft.AspNetCore.Http.HttpContext arg1, global::System.IServiceProvider arg2) => throw null!); 772var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ForgotPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 790var task = handler(ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.ForgotPasswordRequest>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!); 816var task = handler(resetRequest_local!, sp_local); 853var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ForgotPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 888var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ResetPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 906var task = handler(ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.ResetPasswordRequest>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!); 932var task = handler(resetRequest_local!, sp_local); 969var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem>> (global::Microsoft.AspNetCore.Identity.Data.ResetPasswordRequest arg0, global::System.IServiceProvider arg1) => throw null!); 1005var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!); 1023var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest>(1)!, ic.GetArgument<global::System.IServiceProvider>(2)!); 1050var task = handler(claimsPrincipal_local, tfaRequest_local!, sp_local); 1088var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.TwoFactorResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.TwoFactorRequest arg1, global::System.IServiceProvider arg2) => throw null!); 1122var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!); 1139var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::System.IServiceProvider>(1)!); 1159var task = handler(claimsPrincipal_local, sp_local); 1190var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::System.IServiceProvider arg1) => throw null!); 1227var handler = Cast(del, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.InfoRequest arg1, global::Microsoft.AspNetCore.Http.HttpContext arg2, global::System.IServiceProvider arg3) => throw null!); 1245var task = handler(ic.GetArgument<global::System.Security.Claims.ClaimsPrincipal>(0)!, ic.GetArgument<global::Microsoft.AspNetCore.Identity.Data.InfoRequest>(1)!, ic.GetArgument<global::Microsoft.AspNetCore.Http.HttpContext>(2)!, ic.GetArgument<global::System.IServiceProvider>(3)!); 1273var task = handler(claimsPrincipal_local, infoRequest_local!, context_local, sp_local); 1312var castHandler = Cast(handler, global::System.Threading.Tasks.Task<global::Microsoft.AspNetCore.Http.HttpResults.Results<global::Microsoft.AspNetCore.Http.HttpResults.Ok<global::Microsoft.AspNetCore.Identity.Data.InfoResponse>, global::Microsoft.AspNetCore.Http.HttpResults.ValidationProblem, global::Microsoft.AspNetCore.Http.HttpResults.NotFound>> (global::System.Security.Claims.ClaimsPrincipal arg0, global::Microsoft.AspNetCore.Identity.Data.InfoRequest arg1, global::Microsoft.AspNetCore.Http.HttpContext arg2, global::System.IServiceProvider arg3) => throw null!);
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)
194protected 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) 371private async Task<PasskeyAssertionResult<TUser>> PerformAssertionCoreAsync(PasskeyAssertionContext context)
SecurityStampValidator.cs (1)
126protected virtual Task<TUser?> VerifySecurityStamp(ClaimsPrincipal? principal)
SignInManager.cs (42)
128public virtual async Task<ClaimsPrincipal> CreateUserPrincipalAsync(TUser user) => await ClaimsFactory.CreateAsync(user); 150public virtual async Task<bool> CanSignInAsync(TUser user) 192private async Task<(bool success, bool? isPersistent)> RefreshSignInCoreAsync(TUser user) 338public virtual async Task<TUser?> ValidateSecurityStampAsync(ClaimsPrincipal? principal) 361public virtual async Task<TUser?> ValidateTwoFactorSecurityStampAsync(ClaimsPrincipal? principal) 383public virtual async Task<bool> ValidateSecurityStampAsync(TUser? user, string? securityStamp) 398public virtual async Task<SignInResult> PasswordSignInAsync(TUser user, string password, 431public virtual async Task<SignInResult> PasswordSignInAsync(string userName, string password, 453public virtual async Task<SignInResult> CheckPasswordSignInAsync(TUser user, string password, bool lockoutOnFailure) 471private async Task<SignInResult> CheckPasswordSignInCoreAsync(TUser user, string password, bool lockoutOnFailure) 522public virtual async Task<string> MakePasskeyCreationOptionsAsync(PasskeyUserEntity userEntity) 537public virtual async Task<string> MakePasskeyRequestOptionsAsync(TUser? user) 558public virtual async Task<PasskeyAttestationResult> PerformPasskeyAttestationAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 602public virtual async Task<PasskeyAssertionResult<TUser>> PerformPasskeyAssertionAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 645public virtual async Task<SignInResult> PasskeySignInAsync([StringSyntax(StringSyntaxAttribute.Json)] string credentialJson) 662private async Task<SignInResult> PasskeySignInCoreAsync(string credentialJson) 709private async Task<PasskeyAuthenticationInfo?> RetrievePasskeyAuthenticationInfoAsync() 713async Task<PasskeyAuthenticationInfo?> RetrievePasskeyInfoCoreAsync() 746public virtual async Task<bool> IsTwoFactorClientRememberedAsync(TUser user) 804public virtual async Task<SignInResult> TwoFactorRecoveryCodeSignInAsync(string recoveryCode) 821private async Task<SignInResult> TwoFactorRecoveryCodeSignInCoreAsync(string recoveryCode) 839private async Task<SignInResult> DoTwoFactorSignInAsync(TUser user, TwoFactorAuthenticationInfo twoFactorInfo, bool isPersistent, bool rememberClient) 886public virtual async Task<SignInResult> TwoFactorAuthenticatorSignInAsync(string code, bool isPersistent, bool rememberClient) 903private async Task<SignInResult> TwoFactorAuthenticatorSignInCoreAsync(string code, bool isPersistent, bool rememberClient) 951public virtual async Task<SignInResult> TwoFactorSignInAsync(string provider, string code, bool isPersistent, bool rememberClient) 968private async Task<SignInResult> TwoFactorSignInCoreAsync(string provider, string code, bool isPersistent, bool rememberClient) 1010public virtual async Task<TUser?> GetTwoFactorAuthenticationUserAsync() 1029public virtual Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent) 1041public virtual async Task<SignInResult> ExternalLoginSignInAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1058private async Task<SignInResult> ExternalLoginSignInCoreAsync(string loginProvider, string providerKey, bool isPersistent, bool bypassTwoFactor) 1078public virtual async Task<IEnumerable<AuthenticationScheme>> GetExternalAuthenticationSchemesAsync() 1090public virtual async Task<ExternalLoginInfo?> GetExternalLoginInfoAsync(string? expectedXsrf = null) 1128public virtual async Task<IdentityResult> UpdateExternalAuthenticationTokensAsync(ExternalLoginInfo externalLogin) 1188internal async Task<ClaimsPrincipal> StoreRememberClient(TUser user) 1208public virtual async Task<bool> IsTwoFactorEnabledAsync(TUser user) 1222protected virtual async Task<SignInResult> SignInOrTwoFactorAsync(TUser user, bool isPersistent, string? loginProvider = null, bool bypassTwoFactor = false) 1262private async Task<TwoFactorAuthenticationInfo?> RetrieveTwoFactorInfoAsync() 1299protected virtual async Task<bool> IsLockedOut(TUser user) 1309protected virtual Task<SignInResult> LockedOut(TUser user) 1320protected virtual async Task<SignInResult?> PreSignInCheck(TUser user) 1352private async Task<IdentityResult> ResetLockoutWithResult(TUser user) 1369if (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) 646public virtual async Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken) 670public virtual async Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 690public 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) 791public virtual async Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user, CancellationToken cancellationToken) 815public virtual async Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId, CancellationToken cancellationToken) 835public virtual async Task<UserPasskeyInfo?> FindPasskeyAsync(TUser 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\aspnetcore\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.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.ApiExplorer (1)
ApiResponseTypeProvider.cs (1)
454(declaredReturnType.GetGenericTypeDefinition() == typeof(Task<>) || declaredReturnType.GetGenericTypeDefinition() == typeof(ValueTask<>)))
Microsoft.AspNetCore.Mvc.Core (57)
Authorization\AuthorizeFilter.cs (1)
119internal async Task<AuthorizationPolicy> GetEffectivePolicyAsync(AuthorizationFilterContext context)
ControllerBase.cs (9)
2529public virtual Task<bool> TryUpdateModelAsync<TModel>( 2548public virtual async Task<bool> TryUpdateModelAsync<TModel>( 2576public virtual Task<bool> TryUpdateModelAsync<TModel>( 2608public async Task<bool> TryUpdateModelAsync<TModel>( 2645public async Task<bool> TryUpdateModelAsync<TModel>( 2684public Task<bool> TryUpdateModelAsync<TModel>( 2718public Task<bool> TryUpdateModelAsync<TModel>( 2750public virtual async Task<bool> TryUpdateModelAsync( 2787public 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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\aspnetcore\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.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.NewtonsoftJson (7)
NewtonsoftJsonInputFormatter.cs (1)
94public override async Task<InputFormatterResult> ReadRequestBodyAsync(
NewtonsoftJsonPatchInputFormatter.cs (1)
61public override async Task<InputFormatterResult> ReadRequestBodyAsync(
src\aspnetcore\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.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.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.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.OpenApi (25)
Extensions\TypeExtensions.cs (1)
62(returnType.GetGenericTypeDefinition() == typeof(Task<>) || returnType.GetGenericTypeDefinition() == typeof(ValueTask<>)))
Services\IOpenApiDocumentProvider.cs (1)
27Task<OpenApiDocument> GetOpenApiDocumentAsync(CancellationToken cancellationToken = default);
Services\OpenApiDocumentService.cs (11)
62public async Task<OpenApiDocument> GetOpenApiDocumentAsync(IServiceProvider scopedServiceProvider, HttpRequest? httpRequest = null, CancellationToken cancellationToken = default) 247private async Task<OpenApiPaths> GetOpenApiPathsAsync( 272private async Task<Dictionary<HttpMethod, OpenApiOperation>> GetOperationsAsync( 325private async Task<OpenApiOperation> GetOperationAsync( 378private async Task<OpenApiResponses> GetResponsesAsync( 415private async Task<OpenApiResponse> GetResponseAsync( 576private async Task<List<IOpenApiParameter>?> GetParametersAsync( 658private async Task<OpenApiRequestBody?> GetRequestBodyAsync(OpenApiDocument document, ApiDescription description, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, CancellationToken cancellationToken) 676private async Task<OpenApiRequestBody> GetFormRequestBody( 839private async Task<OpenApiRequestBody> GetJsonRequestBody( 927public Task<OpenApiDocument> GetOpenApiDocumentAsync(CancellationToken cancellationToken = default)
Services\Schemas\OpenApiSchemaService.cs (2)
249internal async Task<OpenApiSchema> GetOrCreateUnresolvedSchemaAsync(OpenApiDocument? document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default) 265internal async Task<IOpenApiSchema> GetOrCreateSchemaAsync(OpenApiDocument document, Type type, IServiceProvider scopedServiceProvider, IOpenApiSchemaTransformer[] schemaTransformers, ApiParameterDescription? parameterDescription = null, CancellationToken cancellationToken = default)
src\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\aspnetcore\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)
90public 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.OutputCaching (10)
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)
165async Task<OutputCacheEntry?> ExecuteResponseAsync() 261internal async Task<bool> TryServeCachedResponseAsync(OutputCacheContext context, OutputCacheEntry? cacheEntry, IReadOnlyList<IOutputCachePolicy> policies) 331internal async Task<bool> TryServeFromCacheAsync(OutputCacheContext cacheContext, IReadOnlyList<IOutputCachePolicy> policies)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheOptions.cs (1)
32public Func<Task<IConnectionMultiplexer>>? ConnectionMultiplexerFactory { get; set; }
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.Utilities.Shared (18)
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Threading\SpecializedTasks.cs (17)
14public static readonly Task<bool> True = Task.FromResult(true); 15public static readonly Task<bool> False = Task.FromResult(false); 18public static Task<T?> AsNullable<T>(this Task<T> task) where T : class 22public static Task<T?> Default<T>() 26public static Task<T?> Null<T>() where T : class 30public static Task<IReadOnlyList<T>> EmptyReadOnlyList<T>() 34public static Task<IList<T>> EmptyList<T>() 38public static Task<ImmutableArray<T>> EmptyImmutableArray<T>() 42public static Task<IEnumerable<T>> EmptyEnumerable<T>() 46public static Task<T[]> EmptyArray<T>() 51public static readonly Task<T?> Default = Task.FromResult<T?>(default); 52public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>([]); 53public static readonly Task<T[]> EmptyArray = Task.FromResult<T[]>([]); 54public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 55public static readonly Task<IList<T>> EmptyList = Task.FromResult<IList<T>>([]); 56public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult<IReadOnlyList<T>>([]);
src\roslyn\src\Razor\src\Shared\Microsoft.AspNetCore.Razor.SharedUtilities\Threading\TaskExtensions.cs (1)
34public static TResult VerifyCompleted<TResult>(this Task<TResult> task)
Microsoft.AspNetCore.RequestDecompression (1)
src\aspnetcore\src\Shared\SizeLimitedStream.cs (1)
82public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingMiddleware.cs (2)
136internal async Task<bool> TryServeCachedResponseAsync(ResponseCachingContext context, IResponseCacheEntry? cacheEntry) 204internal async Task<bool> TryServeFromCacheAsync(ResponseCachingContext context)
Microsoft.AspNetCore.Routing (7)
EndpointRoutingMiddleware.cs (7)
31private Task<Matcher>? _initializationTask; 110var matcherTask = InitializeAsync(); 125static async Task AwaitMatcher(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task<Matcher> matcherTask) 279private Task<Matcher> InitializeAsync() 281var initializationTask = _initializationTask; 290private Task<Matcher> InitializeCoreAsync() 293var initializationTask = Interlocked.CompareExchange(ref _initializationTask, initialization.Task, null);
Microsoft.AspNetCore.Server.HttpSys (10)
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)
412public async Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken = default(CancellationToken))
RequestProcessing\RequestContext.cs (1)
89public Task<Stream> UpgradeAsync()
RequestProcessing\RequestContext.FeatureCollection.cs (4)
65private Task<X509Certificate2?>? _clientCertTask; 355Task<X509Certificate2?> ITlsConnectionFeature.GetClientCertificateAsync(CancellationToken cancellationToken) 374async Task<X509Certificate2?> GetCertificateAsync(CancellationToken cancellation) 586async Task<Stream> IHttpUpgradeFeature.UpgradeAsync()
RequestProcessing\RequestStream.cs (1)
178public override unsafe Task<int> ReadAsync(byte[] buffer, int offset, int size, CancellationToken cancellationToken)
RequestProcessing\RequestStreamAsyncResult.cs (1)
56internal Task<int> Task
Microsoft.AspNetCore.Server.IIS (12)
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)
724public abstract Task<bool> ProcessRequestAsync();
Core\IISHttpContext.FeatureCollection.cs (2)
340async Task<Stream> IHttpUpgradeFeature.UpgradeAsync() 381Task<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\aspnetcore\src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
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.Kestrel.Core (16)
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)
530private 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)
27private Task<X509Certificate2?>? _clientCertTask; 139public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken) 158private 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\aspnetcore\src\Shared\ServerInfrastructure\DuplexPipeStream.cs (1)
81public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken = default)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
Internal\QuicConnectionContext.FeatureCollection.cs (2)
13private Task<X509Certificate2?>? _clientCertTask; 36public Task<X509Certificate2?> GetClientCertificateAsync(CancellationToken cancellationToken)
Microsoft.AspNetCore.SignalR.Client.Core (114)
HubConnection.cs (17)
363public virtual IDisposable On(string methodName, Type[] parameterTypes, Func<object?[], object, Task<object?>> handler, object state) 436/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 437/// The <see cref="Task{TResult}.Result"/> property returns a <see cref="ChannelReader{T}"/> for the streamed hub method values. 442public virtual async Task<ChannelReader<object?>> StreamAsChannelCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 458/// A <see cref="Task{TResult}"/> that represents the asynchronous invoke. 459/// The <see cref="Task{TResult}.Result"/> property returns an <see cref="object"/> for the hub method return value. 464public virtual async Task<object?> InvokeCoreAsync(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken = default) 578public async Task<TimeSpan?> RefreshAuthenticationAsync(CancellationToken cancellationToken = default) 853private async Task<ChannelReader<object?>> StreamAsChannelCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1148private async Task<(ConnectionState, Activity?)> WaitForActiveConnectionWithActivityAsync(string sendingMethodName, string invokedMethodName, CancellationToken token) 1157var connectionStateTask = _state.WaitForActiveConnectionAsync(sendingMethodName, token); 1206private async Task<object?> InvokeCoreAsyncCore(string methodName, Type returnType, object?[] args, CancellationToken cancellationToken) 1214Task<object?> invocationTask; 1461private async Task<CloseMessage?> ProcessMessagesAsync(HubMessage message, ConnectionState connectionState, ChannelWriter<InvocationMessage> invocationMessageWriter) 1583if (handler.HasResult && task is Task<object?> resultTask) 2279public bool HasResult => _callback.Method.ReturnType == typeof(Task<object>); 2695public 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)
49public static InvocationRequest Invoke(CancellationToken cancellationToken, Type resultType, string invocationId, ILoggerFactory loggerFactory, HubConnection hubConnection, Activity? activity, out Task<object?> result) 183public Task<object?> Result => _completionSource.Task;
Microsoft.AspNetCore.SignalR.Core (38)
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)
603internal 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 (5)
167private async Task<bool> InvokeOnAuthenticationRefreshedAsync(HubConnectionContext connection) 363private async Task<bool> Invoke(HubMethodDescriptor descriptor, HubConnectionContext connection, 754private static Task<bool> IsHubMethodAuthorized( 774private static async Task<bool> IsHubMethodAuthorizedSlow(IServiceProvider provider, ClaimsPrincipal principal, IReadOnlyList<object> authorizationMetadata, HubInvocationContext resource) 791private 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\aspnetcore\src\Shared\ObjectMethodExecutor\ObjectMethodExecutor.cs (2)
386private static readonly MethodInfo _taskGetAwaiterMethodInfo = typeof(Task<>).GetMethod("GetAwaiter")!; 421if (currentType.IsGenericType && currentType.GetGenericTypeDefinition() == typeof(Task<>))
src\aspnetcore\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\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
18public Task<T> AddInvocation<T>(string connectionId, string invocationId, CancellationToken cancellationToken)
src\aspnetcore\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.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\aspnetcore\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\aspnetcore\src\SignalR\common\testassets\Tests.Utils\TaskExtensions.cs (2)
28public static async Task<T> OrThrowIfOtherFails<T>(this Task<T> task, Task otherTask)
src\aspnetcore\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\aspnetcore\src\SignalR\common\Shared\ClientResultsManager.cs (1)
18public Task<T> AddInvocation<T>(string connectionId, string invocationId, CancellationToken cancellationToken)
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.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)
213public 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.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.Watch.BrowserRefresh (2)
src\sdk\src\Dotnet.Watch\Web.Middleware\ResponseStreamWrapper.cs (1)
151public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\sdk\src\Dotnet.Watch\Web.Middleware\ScriptInjectingStream.cs (1)
303public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
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.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) 371public 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)
247public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 311static async Task<int> ReadBoundaryAsync(MultipartReaderStream stream, int length, CancellationToken cancellationToken)
MultipartSectionStreamExtensions.cs (1)
19public static Task<string> ReadAsStringAsync(this MultipartSection section)
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 (41)
BackEnd\Client\MSBuildClientPacketPump.cs (1)
209Task<int> readTask = localStream.ReadAsync(headerByte.AsMemory(), CancellationToken.None).AsTask();
BackEnd\Components\ProjectCache\Experimental\ProjectCachePluginBase.cs (1)
36public abstract Task<CacheResult> GetCacheResultAsync(
BackEnd\Components\ProjectCache\ProjectCachePluginBase.cs (1)
34public abstract Task<CacheResult> GetCacheResultAsync(
BackEnd\Components\ProjectCache\ProjectCacheService.cs (6)
51private readonly ConcurrentDictionary<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> _projectCachePlugins = new(ProjectCacheDescriptorEqualityComparer.Instance); 164private Task<ProjectCachePlugin> GetProjectCachePluginAsync( 174descriptor => new Lazy<Task<ProjectCachePlugin>>(() => CreateAndInitializePluginAsync(descriptor, projectGraph, buildRequestConfiguration, requestedTargets, cancellationToken))) 200private async Task<ProjectCachePlugin> CreateAndInitializePluginAsync( 891if (!_projectCachePlugins.TryGetValue(projectCacheDescriptor, out Lazy<Task<ProjectCachePlugin>>? pluginLazyTask)) 969foreach (KeyValuePair<ProjectCacheDescriptor, Lazy<Task<ProjectCachePlugin>>> kvp in _projectCachePlugins)
BackEnd\Components\RequestBuilder\IntrinsicTasks\CallTarget.cs (1)
87public Task<bool> ExecuteInternal()
BackEnd\Components\RequestBuilder\IntrinsicTasks\MSBuild.cs (3)
223public async Task<bool> ExecuteInternal() 401private async Task<bool> BuildProjectsInParallel(Dictionary<string, string> propertiesTable, string[] undefinePropertiesArray, List<string[]> targetLists, bool success, bool[] skipProjects) 513internal static async Task<bool> ExecuteTargets(
BackEnd\Components\RequestBuilder\IRequestBuilderCallback.cs (1)
29Task<BuildResult[]> BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets = false);
BackEnd\Components\RequestBuilder\ITargetBuilder.cs (1)
29Task<BuildResult> BuildTargets(ProjectLoggingContext projectLoggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name, TargetBuiltReason reason)[] targets, Lookup baseLookup, CancellationToken cancellationToken);
BackEnd\Components\RequestBuilder\ITargetBuilderCallback.cs (1)
35Task<ITargetResult[]> LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation referenceLocation);
BackEnd\Components\RequestBuilder\ITaskBuilder.cs (1)
54Task<WorkUnitResult> ExecuteTask(TargetLoggingContext targetLoggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild task, TaskExecutionMode mode, Lookup lookupForInference, Lookup lookupForExecution, CancellationToken cancellationToken);
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
335public async Task<BuildResult[]> BuildProjects(string[] projectFiles, PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets = false) 938private async Task<BuildResult[]> StartNewBuildRequests(FullyQualifiedBuildRequest[] requests) 1142private async Task<BuildResult> BuildProject()
BackEnd\Components\RequestBuilder\TargetBuilder.cs (5)
108public async Task<BuildResult> BuildTargets(ProjectLoggingContext loggingContext, BuildRequestEntry entry, IRequestBuilderCallback callback, (string name, TargetBuiltReason reason)[] targetNames, Lookup baseLookup, CancellationToken cancellationToken) 250async Task<ITargetResult[]> ITargetBuilderCallback.LegacyCallTarget(string[] targets, bool continueOnError, ElementLocation taskLocation) 329async Task<BuildResult[]> IRequestBuilderCallback.BuildProjects(string[] projectFiles, Microsoft.Build.Collections.PropertyDictionary<ProjectPropertyInstance>[] properties, string[] toolsVersions, string[] targets, bool waitForResults, bool skipNonexistentTargets) 666private async Task<bool> PushTargets(IList<TargetSpecification> targets, TargetEntry parentTargetEntry, Lookup baseLookup, bool addAsErrorTarget, bool stopProcessingOnCompletion, TargetBuiltReason buildReason) 769private async Task<bool> CompleteOutstandingActiveRequests(string targetName)
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
149public async Task<WorkUnitResult> ExecuteTask(TargetLoggingContext loggingContext, BuildRequestEntry requestEntry, ITargetBuilderCallback targetBuilderCallback, ProjectTargetInstanceChild taskInstance, TaskExecutionMode mode, Lookup inferLookup, Lookup executeLookup, CancellationToken cancellationToken) 673private async Task<WorkUnitResult> InitializeAndExecuteTask(TaskLoggingContext taskLoggingContext, ItemBucket bucket, TaskHostParameters taskIdentityParameters, TaskHost taskHost, TaskExecutionMode howToExecuteTask)
BackEnd\Components\RequestBuilder\TaskHost.cs (2)
969public async Task<BuildEngineResult> InternalBuildProjects(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false) 1142private async Task<BuildEngineResult> BuildProjectFilesInParallelAsync(string[] projectFileNames, string[] targetNames, IDictionary[] globalProperties, IList<String>[] undefineProperties, string[] toolsVersion, bool returnTargetOutputs, bool skipNonexistentTargets = false)
BackEnd\Components\Scheduler\IScheduler.cs (1)
83Task<int> RequestCores(int requestId, int requestedCores, bool waitForCores);
BackEnd\Components\Scheduler\Scheduler.cs (1)
635public Task<int> RequestCores(int requestId, int requestedCores, bool waitForCores)
Logging\BinaryLogger\Postprocessing\SubStream.cs (1)
70public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Logging\BinaryLogger\Postprocessing\TransparentReadStream.cs (1)
112public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\9f0d3f3da306d8cf\IEnumerableExtensions.cs (1)
552Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\9f0d3f3da306d8cf\ImmutableArrayExtensions.cs (5)
650public static async Task<bool> AnyAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync) 666public static async Task<bool> AnyAsync<T, TArg>(this ImmutableArray<T> array, Func<T, TArg, Task<bool>> predicateAsync, TArg arg) 682public static async ValueTask<T?> FirstOrDefaultAsync<T>(this ImmutableArray<T> array, Func<T, Task<bool>> predicateAsync)
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
684Task<int> readTask = localReadPipe.ReadAsync(headerByte.AsMemory(), CancellationToken.None).AsTask();
Utilities\AwaitExtensions.cs (1)
96internal static Task<int> ToTask(this WaitHandle[] handles, int timeout = Timeout.Infinite)
Microsoft.Build.Framework (2)
BackEnd\BufferedReadStream.cs (1)
130public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
BackEnd\CommunicationsUtilities.cs (1)
506var readTask = stream.ReadAsync(bytes, 0, bytes.Length);
Microsoft.Build.NuGetSdkResolver (2)
NuGetSdkResolver.cs (1)
208var restoreTask = Task.Run(() => RestoreRunnerEx.RunWithoutCommit(
RestoreRunnerEx.cs (1)
41public static Task<IReadOnlyList<RestoreResultPair>> RunWithoutCommit(LibraryIdentity libraryIdentity, ISettings settings, ILogger logger)
Microsoft.Build.Tasks.CodeAnalysis (10)
src\roslyn\src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
570var responseTask = BuildServerConnection.RunServerBuildRequestAsync(
src\roslyn\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\roslyn\src\Compilers\Shared\BuildServerConnection.cs (7)
99internal static async Task<bool> RunServerShutdownRequestAsync( 177internal static Task<BuildResponse> RunServerBuildRequestAsync( 191internal static async Task<BuildResponse> RunServerBuildRequestAsync( 214static Task<NamedPipeClientStream?> tryConnectToServerAsync( 291static async Task<BuildResponse> tryRunRequestAsync( 314var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 385internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
Microsoft.Build.Tasks.Core (4)
AssemblyDependency\Node\OutOfProcRarNode.cs (1)
73private async Task<RarNodeShutdownReason> RunNodeAsync(CancellationToken cancellationToken)
DownloadFile.cs (1)
90private async Task<bool> ExecuteAsync()
src\msbuild\src\Shared\NodePipeBase.cs (1)
156internal async Task<INodePacket> ReadPacketAsync(CancellationToken cancellationToken = default)
src\msbuild\src\Shared\NodePipeServer.cs (1)
81internal async Task<LinkStatus> WaitForConnectionAsync(CancellationToken cancellationToken)
Microsoft.CodeAnalysis (82)
DiagnosticAnalyzer\AnalyzerDriver.cs (7)
874public async Task<ImmutableArray<Diagnostic>> GetDiagnosticsAsync(Compilation compilation, CancellationToken cancellationToken) 1536var workerTasks = new Task<CompilationCompletedEvent?>[workerCount]; 1590private async Task<CompilationCompletedEvent?> ProcessCompilationEventsCoreAsync(AnalysisScope analysisScope, bool prePopulatedEventQueue, CancellationToken cancellationToken) 2043private static async Task<(AnalyzerActions actions, ImmutableHashSet<DiagnosticAnalyzer> unsuppressedAnalyzers)> GetAnalyzerActionsAsync( 2251private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, SemaphoreSlim>> CreateAnalyzerGateMapAsync( 2276private static async Task<ImmutableSegmentedDictionary<DiagnosticAnalyzer, GeneratedCodeAnalysisFlags>> CreateGeneratedCodeAnalysisFlagsMapAsync( 2385internal 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)
228public Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync() 237public async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(CancellationToken cancellationToken = default) 248public async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 258public async Task<AnalysisResult> GetAnalysisResultAsync(CancellationToken cancellationToken) 268public async Task<AnalysisResult> GetAnalysisResultAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 279public Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync() 287public async Task<ImmutableArray<Diagnostic>> GetAllDiagnosticsAsync(CancellationToken cancellationToken = default) 297async Task<ImmutableArray<Diagnostic>> getAllDiagnosticsWithoutStateTrackingAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 319public async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsAsync(CancellationToken cancellationToken) 330public async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 337private async Task<ImmutableArray<Diagnostic>> GetAnalyzerCompilationDiagnosticsCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 344private async Task<AnalysisResult> GetAnalysisResultCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 351private async Task<ImmutableArray<Diagnostic>> GetAnalyzerDiagnosticsCoreAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 358private static async Task<AnalyzerDriver> CreateAndInitializeDriverAsync( 390public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, CancellationToken cancellationToken) 406public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, TextSpan? filterSpan, CancellationToken cancellationToken) 422public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 440public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 454public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, CancellationToken cancellationToken) 469public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, CancellationToken cancellationToken) 483public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 500public Task<AnalysisResult> GetAnalysisResultAsync(SyntaxTree tree, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 515public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, CancellationToken cancellationToken) 530public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 547public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, CancellationToken cancellationToken) 564public async Task<AnalysisResult> GetAnalysisResultAsync(AdditionalText file, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 572private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SourceOrAdditionalFile file, ImmutableArray<DiagnosticAnalyzer> analyzers, TextSpan? filterSpan, CancellationToken cancellationToken) 579private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSyntaxDiagnosticsCoreAsync(SyntaxTree tree, ImmutableArray<DiagnosticAnalyzer> analyzers, TextSpan? filterSpan, CancellationToken cancellationToken) 593public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 608public async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 623public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, CancellationToken cancellationToken) 638public Task<AnalysisResult> GetAnalysisResultAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 646private async Task<AnalysisResult> GetAnalysisResultCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 653private async Task<ImmutableArray<Diagnostic>> GetAnalyzerSemanticDiagnosticsCoreAsync(SemanticModel model, TextSpan? filterSpan, ImmutableArray<DiagnosticAnalyzer> analyzers, CancellationToken cancellationToken) 832static async Task<(ImmutableDictionary<DiagnosticAnalyzer, AnalyzerActionCounts> analyzerActionCounts, bool hasAnyActionsRequiringCompilationEvents)> getAnalyzerActionCountsAsync( 1278public async Task<AnalyzerTelemetryInfo> GetAnalyzerTelemetryInfoAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken) 1298private async Task<AnalyzerActionCounts> GetAnalyzerActionCountsAsync(DiagnosticAnalyzer analyzer, CancellationToken cancellationToken)
DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
61private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 227if (CopyMap.TryGetValue(originalFilePath, out var copyTask)) 234var 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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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 (213)
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\0bf6ba47805c8821\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\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\0bf6ba47805c8821\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\5f6f2f95b47c3dc6\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\7a47995420f988d7\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\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\ce787ef1f541c32a\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\ce8c1e82c1124a2b\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\f53a47129f87bc30\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\f53a47129f87bc30\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (2)
28public sealed override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 71async Task<Solution> ProcessLinkedDocumentMapAsync()
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
30public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 37public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 44public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 51public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 58public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 65public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 72public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 79public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 86public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
178public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 184public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 219public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
94public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 294private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
4154/// <see cref="INamedTypeSymbol"/> for <see cref="System.Threading.Tasks.Task{TResult}"/>
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
Microsoft.CodeAnalysis.CodeStyle (88)
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
Microsoft.CodeAnalysis.CodeStyle.Fixes (227)
src\0bf6ba47805c8821\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\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\0bf6ba47805c8821\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\5f6f2f95b47c3dc6\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\7a47995420f988d7\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\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\ce787ef1f541c32a\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\ce8c1e82c1124a2b\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\f53a47129f87bc30\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\f53a47129f87bc30\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
52private async Task<TAnonymousObjectMemberDeclaratorSyntax?> GetMemberDeclaratorAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
57private static async Task<INamedTypeSymbol?> GetObsoleteAttributeAsync(Document document, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
57protected async Task<Document> AddParamTagAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
58private async Task<Document> RemoveDuplicateParamTagAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
43private async Task<Document> GetTransformedDocumentAsync(Document document, CancellationToken cancellationToken) 46private async Task<SyntaxNode> GetTransformedSyntaxRootAsync(Document document, CancellationToken cancellationToken) 55internal static async Task<SyntaxNode> GetTransformedSyntaxRootAsync(ISyntaxFacts syntaxFacts, AbstractFileHeaderHelper fileHeaderHelper, SyntaxTrivia newLineTrivia, Document document, string? fileHeaderTemplate, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
68private async Task<Document> FixOneAsync(CodeFixContext context, Diagnostic diagnostic, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
80public async Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (7)
65public static async Task<State?> GenerateAsync( 82private async Task<bool> TryInitializeAsync( 142private async Task<bool> TryInitializeDelegatedConstructorAsync(CancellationToken cancellationToken) 405public async Task<Document> GetChangedDocumentAsync( 421private async Task<Document?> GenerateThisOrBaseDelegatingConstructorAsync( 458private async Task<(ImmutableArray<ISymbol>, ImmutableArray<SyntaxNode>)> GenerateMembersAndAssignmentsAsync( 480private async Task<Document> GenerateMemberDelegatingConstructorAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
130public static async Task<
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\IGenerateConstructorService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
30protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\IGenerateDefaultConstructorsService.cs (1)
16Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
23protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
27public static async Task<State?> GenerateAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\IGenerateEnumMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
25protected abstract Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (1)
27public async Task<ImmutableArray<CodeAction>> GenerateConversionAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (1)
18public static async Task<State> GenerateConversionStateAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
23public async Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (2)
25public static async Task<State> GenerateDeconstructMethodStateAsync( 41private async Task<bool> TryInitializeMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28public async Task<ImmutableArray<CodeAction>> GenerateMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
25public static async Task<State> GenerateMethodStateAsync( 40private async Task<bool> TryInitializeMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
63protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
57protected async Task<bool> TryFinishInitializingStateAsync(TService service, SemanticDocument document, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateConversionService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConversionAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateDeconstructMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateParameterizedMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateMethodAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
123private async Task<ISet<INamedTypeSymbol>> GetDerivedAndImplementedTypesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
47protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (2)
32public async Task<ImmutableArray<CodeAction>> GenerateVariableAsync( 117private static async Task<bool> NameIsHighlyUnlikelyToWarrantSymbolAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
42protected override Task<Solution?> GetChangedSolutionAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\IGenerateVariableService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateVariableAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (3)
40public static async Task<ImplementAbstractClassData?> TryGetDataAsync( 75public static async Task<Document?> TryImplementAbstractClassAsync( 85public async Task<Document> ImplementAbstractClassAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\IImplementInterfaceService.cs (2)
25Task<Document> ImplementInterfaceAsync(Document document, ImplementTypeOptions options, SyntaxNode node, CancellationToken cancellationToken); 40Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
39private async Task<Document> ImplementDisposePatternAsync( 88private async Task<Document> AddFinalizerCommentAsync( 228private static async Task<IFieldSymbol> CreateDisposedValueFieldAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
56public Task<Document> ImplementInterfaceAsync(CancellationToken cancellationToken) 69private async Task<Document> ImplementInterfaceAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
17protected abstract Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (4)
103private static async Task<bool> HasReferenceAsDelegateInThisProjectAsync( 197private async Task<Solution> FixNodeAsync( 256private async Task<Solution> RenameThenAddAsyncTokenAsync( 287private async Task<Solution> FixRelatedSignaturesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (6)
49private async Task<Solution> FixNodeAsync( 71private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 94private async Task<Solution> RemoveAsyncTokenAsync( 117private static async Task<Solution> RemoveAwaitFromCallersAsync( 152private static async Task<Solution> RemoveAwaitFromCallersAsync( 168private static async Task<Solution> RemoveAwaitFromCallersAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
40private static async Task<Solution> FixAllInDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (2)
16public static async Task<NamingRule> GetApplicableNamingRuleAsync( 34public static async Task<ImmutableArray<NamingRule>> GetNamingRulesAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\NewLines\ConsecutiveStatementPlacement\ConsecutiveStatementPlacementCodeFixProvider.cs (2)
40private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 43public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
40private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 43private static async Task<Document> FixAllAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (2)
97private Task<Document> FixAsync( 106private Task<Document> FixAllAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
44private static Task<Document> RemoveUnnecessaryImportsAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
57private static async Task<Solution> UnsealDeclarationsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (5)
102private readonly Func<CancellationToken, Task<Solution>> _createChangedSolution; 104private ProjectOptionsChangeAction(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 110public static ProjectOptionsChangeAction Create(string title, Func<CancellationToken, Task<Solution>> createChangedSolution) 113protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken) 116protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (6)
71protected abstract Task<SyntaxNode> UpdatePropertyAsync( 102private async Task<Solution> ProcessResultAsync( 115private async Task<Solution> ProcessResultWorkerAsync( 312private static async Task<Solution> UpdateReferencesAsync( 391private async Task<(IFieldSymbol? fieldSymbol, IPropertySymbol? propertySymbol)> MapDiagnosticToCurrentSolutionAsync( 454private async Task<SyntaxNode> FormatAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\UseAutoPropertyFixAllProvider.cs (3)
30public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 37private async Task<Solution> FixAllAsync(FixAllContext fixAllContext, CancellationToken cancellationToken) 95private static async Task<Solution> GetUpdatedSolutionAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
55protected abstract Task<(SyntaxNode oldNode, SyntaxNode newNode)> GetReplacementNodesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
86protected async Task<TExpressionSyntax> CreateConditionalExpressionAsync( 154private static async Task<bool> MakeMultiLineAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (2)
28public sealed override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 71async Task<Solution> ProcessLinkedDocumentMapAsync()
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
30public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 37public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 44public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 51public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 58public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 65public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 72public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 79public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 86public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
178public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 184public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 219public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
94public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 294private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
18public static new async Task<SemanticDocument> CreateAsync(Document document, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp (3)
Compilation\CSharpCompilation.cs (1)
2306/// 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) 870protected override async Task<SyntaxNode> GetRootAsyncCore(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (60)
src\4f0789c9734b88bf\CSharpInitializeParameterService.cs (1)
109protected override Task<Solution> TryAddAssignmentForPrimaryConstructorAsync(Document document, IParameterSymbol parameter, ISymbol fieldOrProperty, CancellationToken cancellationToken)
src\50a3a051b0fef0d6\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
36public async Task<SyntaxNode> ReplaceAsync(
src\cef93d2425d77fca\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
50private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken) 79private static async Task<Document> InsertCloseParenthesisAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
94private static async Task<MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>> GetUnassignedParametersAsync(
src\roslyn\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\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
33public static async Task<CodeAction?> GetCodeActionAsync( 79private static async Task<Solution> ConvertToPositionalRecordAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
61private static async Task<(TypeSyntax declarationToFix, TypeSyntax fixedDeclaration)> TryGetOldAndNewReturnTypeAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
40protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
31protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
57protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
80protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
47protected override async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
22private static async Task<Document> GetChangedDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
26public static async Task<Document> MakeLocalFunctionStaticAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
63private static async Task<Document> FixCodeAsync(
src\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
42private static async Task<Document> UpdateDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
42private static async Task<Document> UpdateDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (2)
43private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 46public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
42private static async Task<Document> UpdateDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
45public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
110private static async Task<TypeSyntax?> TryGetDeclarationTypeToFixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
54private static async Task<Document> FixAllAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
54private static async Task<Document> FixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
56private static async Task<Document> FixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnneccessaryUnsafeModifier\CSharpRemoveUnnecessaryUnsafeModifierCodeFixProvider.cs (1)
39private static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryNullableWarningSuppressionsCodeFixProvider.cs (1)
40private static async Task<Document> FixSingleDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
64private static async Task<Document> ReplaceAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
80protected override async Task<SyntaxNode> UpdatePropertyAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
35public static async Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync<TParentExpression, TMatchNode>(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
105static async Task<Document> CreateTrackedDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
140static async Task<SeparatedSyntaxList<ArgumentSyntax>> GetArgumentsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionExpression.cs (1)
20private static Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
37protected override async Task<(SyntaxNode, SyntaxNode)> GetReplacementNodesAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
61private static async Task<Document> FixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
93private static async Task<Solution> UsePrimaryConstructorAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
59private static async Task<Solution> UseSystemThreadingLockAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
109public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
52protected override async Task<bool> TypesAreCompatibleAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
37public override async Task<Document> RemoveUnnecessaryImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
116public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree tree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1805if (name.Equals(nameof(Task<>.ConfigureAwait)) && 1811else if (name.Equals(nameof(Task<>.ContinueWith)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
33public static async Task<Solution> AddAssignmentForPrimaryConstructorAsync(
Microsoft.CodeAnalysis.CSharp.Features (278)
AddImport\CSharpAddImportFeatureService.cs (3)
353protected override async Task<Document> AddImportAsync( 365private static async Task<CompilationUnitSyntax> AddImportWorkerAsync( 401protected 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( 866public override async Task<ImmutableArray<ISymbol>> DetermineCascadedSymbolsFromDelegateInvokeAsync(
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.cs (1)
57protected 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)
33public override Task<CodeAction?> GetRefactoringAsync(RefactorAllContext fixAllContext) 38async Task<Solution> EnableNullableReferenceTypesInSolutionAsync( 55private sealed class FixAllCodeAction(Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 63private readonly Func<CodeActionPurpose, IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> _createChangedSolution = createChangedSolution; 65protected 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\AwaitCompletionProvider.cs (1)
53protected override async Task<TextChange?> GetReturnTypeChangeAsync(
Completion\CompletionProviders\CrefCompletionProvider.cs (2)
91protected override async Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync( 365protected 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)
43public static async Task<NameDeclarationInfo> GetDeclarationInfoAsync(Document document, int position, CancellationToken cancellationToken) 65private static async Task<NameDeclarationInfo> GetDeclarationInfoWorkerAsync(Document document, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
35public 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\ExtensionMemberImportCompletionProvider.cs (1)
49protected override Task<bool> ShouldProvideParenthesisCompletionAsync(
Completion\CompletionProviders\ImportCompletion\TypeImportCompletionProvider.cs (1)
60protected override async Task<bool> ShouldProvideParenthesisCompletionAsync(
Completion\CompletionProviders\NamedParameterCompletionProvider.cs (2)
117internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 262protected 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_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\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\PartialTypeCompletionProvider.cs (1)
78public override async Task<TextChange?> GetTextChangeAsync(
Completion\CompletionProviders\PropertySubPatternCompletionProvider.cs (1)
160internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
98private static async Task<ImmutableArray<CompletionItem>> GetSnippetsForDocumentAsync(
Completion\CompletionProviders\SpeculativeTCompletionProvider.cs (1)
62private 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(
Completion\CSharpCompletionService.cs (1)
71internal override async Task<bool> IsSpeculativeTypeParameterContextAsync(Document document, int position, CancellationToken cancellationToken)
ConvertAutoPropertyToFullProperty\CSharpConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (2)
36protected override async Task<string> GetFieldNameAsync(Document document, IPropertySymbol property, CancellationToken cancellationToken) 162protected 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?> RefactorAllAsync(
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,
Copilot\CSharpCopilotProposalAdjusterService.cs (1)
28protected override async Task<Document> AddMissingTokensIfAppropriateAsync(
Copilot\CSharpImplementNotImplementedExceptionFixProvider.cs (1)
164Func<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)
541public override async Task<(INamespaceSymbol, INamespaceOrTypeSymbol, Location)> GetOrGenerateEnclosingNamespaceSymbolAsync( 712internal override async Task<Solution> TryAddUsingsOrImportToDocumentAsync(
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
24protected 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_Update.cs (2)
23private static async Task<Solution> AddMultipleMembersAsync( 72static async Task<Solution> AddSingleMemberAsync(
InitializeParameter\CSharpInitializeMemberFromPrimaryConstructorParameterCodeRefactoringProvider.cs (1)
139static CodeAction CreateCodeAction(string title, Func<CancellationToken, Task<Solution>> createSolution)
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (1)
88protected override async Task<ExpressionStatementSyntax> CreateTupleDeconstructionAsync(
IntroduceVariable\CSharpIntroduceVariableService_IntroduceField.cs (1)
25protected override Task<Document> IntroduceFieldAsync(
LanguageServices\CSharpSymbolDisplayService.SymbolDescriptionBuilder.cs (6)
98protected override Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 264private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 292private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 304private async Task<ImmutableArray<SymbolDisplayPart>> GetInitializerSourcePartsAsync( 316private async Task<T?> GetFirstDeclarationAsync<T>(ISymbol symbol) where T : SyntaxNode 330private 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 (4)
30protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 41private static async Task<QuickInfoItem?> GetQuickinfoForPragmaWarningAsync( 82private static async Task<QuickInfoItem?> GetQuickInfoForSuppressMessageAttributeAsync( 125private static async Task<QuickInfoItem?> GetQuickInfoFromSupportedDiagnosticsOfProjectAnalyzersAsync(
QuickInfo\CSharpSemanticQuickInfoProvider.cs (2)
294protected override async Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoAsync( 307private static async Task<OnTheFlyDocsInfo?> GetOnTheFlyDocsInfoWorkerAsync(
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (1)
26protected 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\AbstractGenericNameSignatureHelpProvider.cs (1)
39protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken)
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( 59protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken) 108private 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\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) 54protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync( 109protected async Task<SignatureHelpItems?> GetItemsWorkerForDelegateOrFunctionPointerAsync( 155private 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( 52protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken) 101private async Task<SignatureHelpItems?> GetItemsWorkerForDelegateAsync(Document document, int position, BaseObjectCreationExpressionSyntax objectCreationExpression, 125private 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)
SignatureHelp\WithElementSignatureHelpProvider.cs (3)
29private async Task<WithElementSyntax?> TryGetWithElementAsync( 51protected override async Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken) 99private async Task<SignatureHelpState?> GetCurrentArgumentStateAsync(
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (1)
42protected override async Task<PropertyDeclarationSyntax> GenerateSnippetSyntaxAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\AbstractCSharpForLoopSnippetProvider.cs (1)
145protected override Task<Document> AddIndentationToDocumentAsync(Document document, ForStatementSyntax forStatement, CancellationToken cancellationToken)
Snippets\AbstractCSharpTypeSnippetProvider.cs (2)
47protected override async Task<TextChange?> GetAccessibilityModifiersChangeAsync(Document document, int position, CancellationToken cancellationToken) 98protected override async Task<Document> AddIndentationToDocumentAsync(Document document, TTypeDeclarationSyntax typeDeclaration, 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)
51protected 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\CSharpForEachLoopSnippetProvider.cs (1)
132protected 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\CSharpIntMainSnippetProvider.cs (1)
50protected override async Task<Document> AddIndentationToDocumentAsync(Document document, MethodDeclarationSyntax methodDeclaration, CancellationToken cancellationToken)
Snippets\CSharpLockSnippetProvider.cs (1)
41protected 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\CSharpUnsafeSnippetProvider.cs (2)
26protected override Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken) 35protected override Task<Document> AddIndentationToDocumentAsync(Document document, UnsafeStatementSyntax unsafeStatement, CancellationToken cancellationToken)
Snippets\CSharpUsingSnippetProvider.cs (1)
41protected 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\cef93d2425d77fca\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (2)
50private static async Task<Document> GetChangedDocumentAsync(Document document, int conditionalExpressionSyntaxStartPosition, CancellationToken cancellationToken) 79private static async Task<Document> InsertCloseParenthesisAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\AssignOutParameters\AbstractAssignOutParametersCodeFixProvider.cs (1)
94private static async Task<MultiDictionary<SyntaxNode, (SyntaxNode exprOrStatement, ImmutableArray<IParameterSymbol>)>> GetUnassignedParametersAsync(
src\roslyn\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\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (2)
33public static async Task<CodeAction?> GetCodeActionAsync( 79private static async Task<Solution> ConvertToPositionalRecordAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\FixReturnType\CSharpFixReturnTypeCodeFixProvider.cs (1)
61private static async Task<(TypeSyntax declarationToFix, TypeSyntax fixedDeclaration)> TryGetOldAndNewReturnTypeAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
40protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
31protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
57protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
80protected override Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
47protected override async Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (1)
22private static async Task<Document> GetChangedDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.cs (1)
75private static async Task<Dictionary<int, int>?> GetModifierOrderAsync(Document document, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\MakeLocalFunctionStatic\MakeLocalFunctionStaticCodeFixHelper.cs (1)
26public static async Task<Document> MakeLocalFunctionStaticAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\MakeRefStruct\MakeRefStructCodeFixProvider.cs (1)
63private static async Task<Document> FixCodeAsync(
src\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
42private static async Task<Document> UpdateDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
42private static async Task<Document> UpdateDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (2)
43private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 46public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (1)
42private static async Task<Document> UpdateDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (1)
45public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
110private static async Task<TypeSyntax?> TryGetDeclarationTypeToFixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveConfusingSuppression\CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
54private static async Task<Document> FixAllAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveInKeyword\RemoveInKeywordCodeFixProvider.cs (1)
54private static async Task<Document> FixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveNewModifier\RemoveNewModifierCodeFixProvider.cs (1)
56private static async Task<Document> FixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnneccessaryUnsafeModifier\CSharpRemoveUnnecessaryUnsafeModifierCodeFixProvider.cs (1)
39private static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryNullableWarningSuppressionsCodeFixProvider.cs (1)
40private static async Task<Document> FixSingleDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
64private static async Task<Document> ReplaceAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseAutoProperty\CSharpUseAutoPropertyCodeFixProvider.cs (1)
80protected override async Task<SyntaxNode> UpdatePropertyAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
35public static async Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync<TParentExpression, TMatchNode>(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderCodeFixProvider.cs (1)
105static async Task<Document> CreateTrackedDocumentAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
140static async Task<SeparatedSyntaxList<ArgumentSyntax>> GetArgumentsAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider_CollectionExpression.cs (1)
20private static Task<CollectionExpressionSyntax> CreateCollectionExpressionAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionInitializer\CSharpUseCollectionInitializerCodeFixProvider.cs (1)
37protected override async Task<(SyntaxNode, SyntaxNode)> GetReplacementNodesAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseExplicitTypeForConst\UseExplicitTypeForConstCodeFixProvider.cs (1)
61private static async Task<Document> FixAsync(
src\roslyn\src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
93private static async Task<Solution> UsePrimaryConstructorAsync(
src\roslyn\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\roslyn\src\Analyzers\CSharp\CodeFixes\UseSystemThreadingLock\CSharpUseSystemThreadingLockCodeFixProvider.cs (1)
59private static async Task<Solution> UseSystemThreadingLockAsync(
src\roslyn\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.NetAnalyzers (3)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.FixAllProvider.cs (1)
26protected override async Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
Microsoft.NetCore.Analyzers\InteropServices\CSharpDisableRuntimeMarshalling.Fixer.cs (1)
74private static async Task<Document> UseDisabledMarshallingEquivalentAsync(SyntaxNode node, Document document, CancellationToken ct)
Microsoft.NetCore.Analyzers\Usage\CSharpPreferGenericOverloads.Fixer.cs (1)
26protected override async Task<Document> ReplaceWithGenericCallAsync(Document document, IInvocationOperation invocation, CancellationToken cancellationToken)
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.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( 947public override async Task<ImmutableArray<Location>> ComputeImplicitReferenceConflictsAsync(
src\4f0789c9734b88bf\CSharpInitializeParameterService.cs (1)
109protected override Task<Solution> TryAddAssignmentForPrimaryConstructorAsync(Document document, IParameterSymbol parameter, ISymbol fieldOrProperty, CancellationToken cancellationToken)
src\50a3a051b0fef0d6\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
36public async Task<SyntaxNode> ReplaceAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
492public async Task<ISymbol?> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
109public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
52protected override async Task<bool> TypesAreCompatibleAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
37public override async Task<Document> RemoveUnnecessaryImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
116public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree tree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1805if (name.Equals(nameof(Task<>.ConfigureAwait)) && 1811else if (name.Equals(nameof(Task<>.ContinueWith)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
33public static async Task<Solution> AddAssignmentForPrimaryConstructorAsync(
Microsoft.CodeAnalysis.Extensions.Package (7)
Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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.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.HotReload (3)
Api\HotReloadMSBuildWorkspace.ProjectFileInfoProvider.cs (2)
22public Task<ImmutableArray<ProjectFileInfo>> LoadProjectFileInfosAsync(string projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken) 43public Task<ImmutableArray<string>> GetProjectOutputPathsAsync(string projectPath, CancellationToken cancellationToken)
Api\HotReloadService.cs (1)
195public async Task<Updates> GetUpdatesAsync(Solution solution, ImmutableDictionary<ProjectId, RunningProjectInfo> runningProjects, 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.Features (1286)
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (2)
44protected override async Task<Solution?> GetChangedSolutionAsync( 85private async Task<Solution> AddParametersAndInitializersToPrimaryConstructorAsync(
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.cs (2)
49private static async Task<AddConstructorParameterResult?> AddConstructorParametersFromMembersAsync( 153public 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( 99private 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\AbstractAddImportCodeRefactoringProvider.cs (1)
158async Task<Document> AddImportAndSimplifyAsync(
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); 65public async Task<ImmutableArray<AddImportFixData>> GetFixesAsync( 89private async Task<ImmutableArray<AddImportFixData>> GetFixesInCurrentProcessAsync( 133private async Task<ImmutableArray<Reference>> FindResultsAsync( 171private async Task<ImmutableArray<Reference>> FindResultsAsync( 491public async Task<ImmutableArray<(Diagnostic Diagnostic, ImmutableArray<AddImportFixData> Fixes)>> GetFixesForDiagnosticsAsync( 514public async Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsync( 538private async Task<ImmutableArray<AddImportFixData>> GetUniqueFixesAsyncInCurrentProcessAsync( 560foreach (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)
94internal Task<ImmutableArray<SymbolReference>> FindInAllSymbolsInStartingProjectAsync(bool exact, CancellationToken cancellationToken) 97internal Task<ImmutableArray<SymbolReference>> FindInSourceSymbolsInProjectAsync(ConcurrentDictionary<Project, AsyncLazy<IAssemblySymbol?>> projectToAssembly, Project project, bool exact, CancellationToken cancellationToken) 100internal Task<ImmutableArray<SymbolReference>> FindInMetadataSymbolsAsync(IAssemblySymbol assembly, Project assemblyProject, PortableExecutableReference metadataReference, bool exact, CancellationToken cancellationToken) 103private async Task<ImmutableArray<SymbolReference>> DoAsync(SearchScope searchScope, CancellationToken cancellationToken) 114using var _1 = ArrayBuilder<Task<ImmutableArray<SymbolReference>>>.GetInstance(out var tasks); 140foreach (var task in tasks) 175private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingTypesAsync( 260private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingNamespacesAsync( 287private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingFieldsAndPropertiesAsync( 351private async Task<ImmutableArray<SymbolReference>> GetReferencesForMatchingExtensionMembersAsync( 421private async Task<ImmutableArray<SymbolReference>> GetReferencesForCollectionInitializerMethodsAsync( 442private async Task<ImmutableArray<SymbolReference>> GetReferencesForQueryPatternsAsync( 466private async Task<ImmutableArray<SymbolReference>> GetReferencesForGetAwaiterAsync( 488private async Task<ImmutableArray<SymbolReference>> GetReferencesForGetEnumeratorAsync( 510private async Task<ImmutableArray<SymbolReference>> GetReferencesForGetAsyncEnumeratorAsync( 532private async Task<ImmutableArray<SymbolReference>> GetReferencesForDeconstructAsync( 554private 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(
CallHierarchy\AbstractCallHierarchyService.cs (13)
19public async Task<CallHierarchyItemDescriptor?> CreateItemAsync(ISymbol symbol, Project project, CancellationToken cancellationToken) 39public async Task<ImmutableArray<CallHierarchySearchResult>> SearchIncomingCallsAsync( 63public async Task<ImmutableArray<CallHierarchySearchResult>> SearchOutgoingCallsAsync( 92private static async Task<ImmutableArray<CallHierarchySearchDescriptor>> CreateSearchDescriptorsAsync( 169private async Task<ImmutableArray<CallHierarchySearchResult>> SearchCallersAsync( 179private async Task<ImmutableArray<CallHierarchySearchResult>> SearchCallsToOverridesAsync( 198private async Task<ImmutableArray<CallHierarchySearchResult>> SearchImplementationsAsync( 208private async Task<ImmutableArray<CallHierarchySearchResult>> SearchOverridesAsync( 218private async Task<ImmutableArray<CallHierarchySearchResult>> SearchOutgoingCallsAsync( 272private async Task<ImmutableArray<CallHierarchySearchResult>> CreateCallerResultsAsync( 305private async Task<ImmutableArray<CallHierarchySearchResult>> CreateSourceDeclarationResultsAsync( 341private async Task<ImmutableArray<IOperation>> GetOperationRootsAsync( 371protected virtual Task<SyntaxNode> GetOperationRootSyntaxAsync(SyntaxReference syntaxReference, CancellationToken cancellationToken)
CallHierarchy\CallHierarchyItemId.cs (1)
33public async Task<(ISymbol Symbol, Project Project)?> TryResolveAsync(Solution solution, CancellationToken cancellationToken)
CallHierarchy\ICallHierarchyService.cs (3)
14Task<CallHierarchyItemDescriptor?> CreateItemAsync(ISymbol symbol, Project project, CancellationToken cancellationToken); 16Task<ImmutableArray<CallHierarchySearchResult>> SearchIncomingCallsAsync( 22Task<ImmutableArray<CallHierarchySearchResult>> SearchOutgoingCallsAsync(
ChangeSignature\AbstractChangeSignatureService.cs (8)
41public abstract Task<(ISymbol? symbol, int selectedIndex)> GetInvocationSymbolAsync(Document document, int position, bool restrictToDeclarations, CancellationToken cancellationToken); 49public abstract Task<ImmutableArray<ISymbol>> DetermineCascadedSymbolsFromDelegateInvokeAsync( 94public async Task<ImmutableArray<ChangeSignatureCodeAction>> GetChangeSignatureCodeActionAsync(Document document, TextSpan span, CancellationToken cancellationToken) 103internal async Task<ChangeSignatureAnalyzedContext> GetChangeSignatureContextAsync( 190internal async Task<ChangeSignatureResult> ChangeSignatureWithContextAsync(ChangeSignatureAnalyzedContext context, ChangeSignatureOptionsResult? options, CancellationToken cancellationToken) 199async Task<ChangeSignatureResult> GetChangeSignatureResultAsync(ChangeSignatureAnalysisSucceededContext context, ChangeSignatureOptionsResult? options, CancellationToken cancellationToken) 225private static async Task<ImmutableArray<ReferencedSymbol>> FindChangeSignatureReferencesAsync( 246private async Task<(Solution updatedSolution, string? confirmationMessage)> CreateUpdatedSolutionAsync(
ChangeSignature\ChangeSignatureCodeAction.cs (1)
30protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
ChangeSignature\ChangeSignatureCodeActionOperation.cs (1)
30internal sealed override Task<bool> TryApplyAsync(
ClassifiedSpansAndHighlightSpanFactory.cs (4)
18public static async Task<ClassifiedSpansAndHighlightSpan> ClassifyAsync( 31private static async Task<ClassifiedSpansAndHighlightSpan> ClassifyAsync( 56private static async Task<ClassifiedSpansAndHighlightSpan> GetTaggedTextForDocumentRegionAsync( 68private static async Task<ImmutableArray<ClassifiedSpan>> GetClassifiedSpansAsync(
CodeFixes\Configuration\ConfigurationUpdater.cs (8)
107public static Task<Solution> ConfigureSeverityAsync( 126public static Task<Solution> ConfigureSeverityAsync( 157public static Task<Solution> BulkConfigureSeverityAsync( 172public static Task<Solution> BulkConfigureSeverityAsync( 180private static Task<Solution> BulkConfigureSeverityCoreAsync( 197public static Task<Solution> ConfigureCodeStyleOptionAsync( 209private static async Task<Solution> ConfigureCodeStyleOptionsAsync( 261private async Task<Solution> ConfigureAsync(CancellationToken cancellationToken)
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (2)
55public Task<ImmutableArray<CodeFix>> GetFixesAsync(TextDocument document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 58public Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\Configuration\ConfigureSeverity\ConfigureSeverityLevelCodeFixProvider.cs (2)
47public Task<ImmutableArray<CodeFix>> GetFixesAsync(TextDocument document, TextSpan span, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken) 50public Task<ImmutableArray<CodeFix>> GetFixesAsync(Project project, IEnumerable<Diagnostic> diagnostics, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\IFixMultipleOccurrencesService.cs (2)
19Task<Solution> GetFixAsync( 34Task<Solution> GetFixAsync(
CodeFixes\Service\CodeFixService.cs (11)
95public async Task<CodeFixCollection?> GetMostSevereFixAsync( 140var errorFixTask = GetFirstFixAsync(spanToErrorDiagnostics, cancellationToken); 141var otherFixTask = GetFirstFixAsync(spanToOtherDiagnostics, linkedToken); 151async Task<CodeFixCollection?> GetFirstFixAsync( 248private static async Task<ImmutableArray<DiagnosticData>> GetCopilotDiagnosticsAsync( 284public async Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync( 335public async Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync( 603async Task<bool> MatchesPriorityAsync(CodeFixProvider codeFixProvider) 656private static async Task<ImmutableArray<CodeFix>> GetCodeFixesAsync( 771private async Task<CodeFixCollection?> TryGetFixesOrConfigurationsAsync<TCodeFixProvider>( 778Func<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) 62public override async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 71public 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, CodeActionRequestPriority? priority, CancellationToken cancellationToken); 26Task<CodeFixCollection?> GetDocumentFixAllForIdInSpanAsync(Document document, TextSpan? textSpan, string diagnosticId, DiagnosticSeverity severity, CancellationToken cancellationToken); 27Task<Document> ApplyCodeFixesForSpecificDiagnosticIdAsync(Document document, TextSpan? textSpan, 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, CodeActionRequestPriority? priority, 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( 261private 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_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)
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(
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (2)
68protected sealed override Task<ImmutableArray<CodeActionOperation>> ComputeOperationsAsync( 82protected sealed override Task<Solution?> GetChangedSolutionAsync(
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (4)
25public async Task<Solution?> GetFixAllChangedSolutionAsync(IRefactorOrFixAllContext fixAllContext) 37public async Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync( 50private async Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync( 156private static async Task<CodeAction?> GetFixAllCodeActionAsync(IRefactorOrFixAllContext fixAllContext)
CodeFixesAndRefactorings\IFixAllGetFixesService.cs (2)
19Task<ImmutableArray<CodeActionOperation>> GetFixAllOperationsAsync(IRefactorOrFixAllContext fixAllContext, bool showPreviewChangesDialog); 24Task<Solution?> GetFixAllChangedSolutionAsync(IRefactorOrFixAllContext fixAllContext);
CodeLens\CodeLensReferencesService.cs (10)
43private static async Task<T?> FindAsync<T>(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, 44Func<CodeLensFindReferencesProgress, Task<T>> onResults, Func<CodeLensFindReferencesProgress, Task<T>> onCapped, 90public async Task<ReferenceCount?> GetReferenceCountAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, int maxSearchResults, CancellationToken cancellationToken) 102private static async Task<ReferenceLocationDescriptorAndDocument> GetDescriptorOfEnclosingSymbolAsync(Solution solution, Location location, CancellationToken cancellationToken) 198public async Task<ImmutableArray<ReferenceLocationDescriptorAndDocument>?> FindReferenceLocationsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 213public async Task<ImmutableArray<ReferenceLocationDescriptor>> MapReferenceLocationsAsync(Solution solution, ImmutableArray<ReferenceLocationDescriptorAndDocument> referenceLocations, ClassificationOptions classificationOptions, CancellationToken cancellationToken) 356private static async Task<ReferenceMethodDescriptor> TryGetMethodDescriptorAsync(Location commonLocation, Solution solution, CancellationToken cancellationToken) 370public Task<ImmutableArray<ReferenceMethodDescriptor>?> FindReferenceMethodsAsync(Solution solution, DocumentId documentId, SyntaxNode syntaxNode, CancellationToken cancellationToken) 386public 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)
217internal Task<SyntaxContext> GetSyntaxContextWithExistingSpeculativeModelAsync(Document document, CancellationToken cancellationToken)
Completion\CompletionProvider.cs (4)
57internal virtual async Task<bool> IsSyntacticTriggerCharacterAsync(Document document, int caretPosition, CompletionTrigger trigger, CompletionOptions options, CancellationToken cancellationToken) 63public virtual Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CancellationToken cancellationToken) 66internal virtual Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 77public virtual Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\CompletionService_GetCompletions.cs (5)
37public Task<CompletionList> GetCompletionsAsync( 61internal virtual async Task<CompletionList> GetCompletionsAsync( 161static async Task<ImmutableArray<CompletionProvider>> GetAugmentingProvidersAsync( 240private static async Task<ImmutableArray<CompletionContext>> ComputeNonEmptyCompletionContextsAsync( 340private static async Task<CompletionContext> GetContextAsync(
Completion\CompletionService.cs (5)
186public Task<CompletionDescription?> GetDescriptionAsync( 203internal virtual async Task<CompletionDescription?> GetDescriptionAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken = default) 231public virtual async Task<CompletionChange> GetChangeAsync( 374internal virtual Task<bool> IsSpeculativeTypeParameterContextAsync(Document document, int position, CancellationToken cancellationToken) 407public 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 (2)
60protected abstract Task<TextChange?> GetReturnTypeChangeAsync(Solution solution, SemanticModel semanticModel, SyntaxNode declaration, CancellationToken cancellationToken); 169public sealed override async Task<CompletionChange> GetChangeAsync(Document document, CompletionItem item, char? commitKey, CancellationToken cancellationToken)
Completion\Providers\AbstractCrefCompletionProvider.cs (2)
14internal override async Task<CompletionDescription> GetDescriptionWorkerAsync( 32protected abstract Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync(
Completion\Providers\AbstractDocCommentCompletionProvider.cs (2)
98protected abstract Task<IEnumerable<CompletionItem>?> GetItemsWorkerAsync(Document document, int position, CompletionTrigger trigger, CancellationToken cancellationToken); 286public 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)
86internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 89protected 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)
23protected abstract Task<bool> ShouldPreselectInferredTypesAsync(CompletionContext? completionContext, int position, CompletionOptions options, CancellationToken cancellationToken); 24protected abstract Task<bool> ShouldProvideAvailableSymbolsInCurrentContextAsync(CompletionContext? completionContext, TSyntaxContext context, int position, CompletionOptions options, CancellationToken cancellationToken); 33protected sealed override async Task<ImmutableArray<SymbolAndSelectionInfo>> GetSymbolsAsync( 223internal sealed override async Task<CompletionDescription> GetDescriptionWorkerAsync( 251async Task<CompletionDescription?> TryGetDescriptionAsync(DocumentId documentId) 287protected sealed override async Task<bool> IsSemanticTriggerCharacterAsync(Document document, int characterPosition, CancellationToken cancellationToken) 293protected 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( 328internal override Task<CompletionDescription> GetDescriptionWorkerAsync(Document document, CompletionItem item, CompletionOptions options, SymbolDescriptionOptions displayOptions, CancellationToken cancellationToken) 368private async Task<ImmutableArray<CompletionItem>> GetItemsAsync( 411protected virtual Task<bool> IsSemanticTriggerCharacterAsync(Document document, int characterPosition, CancellationToken cancellationToken) 439private async Task<ImmutableArray<(DocumentId documentId, TSyntaxContext syntaxContext, ImmutableArray<SymbolAndSelectionInfo> symbols)>> GetPerContextSymbolsAsync( 467protected async Task<ImmutableArray<SymbolAndSelectionInfo>> TryGetSymbolsForContextAsync( 498public 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( 179async Task<bool> ShouldCompleteWithFullyQualifyTypeNameAsync() 212private async Task<bool> IsInImportsDirectiveAsync(Document document, int position, CancellationToken cancellationToken) 228internal 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( 84private async Task<(ImmutableArray<TypeImportCompletionCacheEntry> results, bool isPartial)> GetCacheEntriesAsync( 179private async Task<TypeImportCompletionCacheEntry> GetUpToDateCacheForProjectAsync(Project project, ImportCompletionCommitBehavior? commitBehavior, CancellationToken cancellationToken)
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.cs (3)
54public static async Task<ImmutableArray<SerializableImportCompletionItem>> GetUnimportedExtensionMembersAsync( 93public static async Task<ImmutableArray<SerializableImportCompletionItem>> GetUnimportedExtensionMembersInCurrentProcessAsync( 233private static async Task<ExtensionMemberImportCompletionCacheEntry> GetUpToDateCacheEntryAsync(
Completion\Providers\ImportCompletionProvider\ExtensionMemberImportCompletionHelper.SymbolComputer.cs (4)
84public async Task<ImmutableArray<ISymbol>> GetExtensionMemberSymbolsAsync( 97var peReferenceMemberSymbolsTask = ProducerConsumer<ISymbol?>.RunParallelAsync( 104var projectMemberSymbolsTask = ProducerConsumer<ISymbol?>.RunParallelAsync( 229var cachedInfoTask = SymbolTreeInfo.TryGetCachedInfoForMetadataReferenceIgnoreChecksumAsync(peReference, cancellationToken);
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
156public 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)
139public static async Task<ImmutableArray<ISymbol>> GetSymbolsAsync(CompletionItem item, Document document, CancellationToken cancellationToken) 191public static async Task<CompletionDescription> GetDescriptionAsync( 198public static async Task<CompletionDescription> GetDescriptionForSymbolsAsync( 416public 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)
311private 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)
155async Task<(TInvocationExpressionSyntax? invocation, TArgumentSyntax? placeholderArgument)> TryFindInvocationAsync() 309private 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 (6)
24using Adjuster = Func<Document, Document, LineFormattingOptions?, CancellationToken, Task<Document>>; 84protected abstract Task<Document> AddMissingTokensIfAppropriateAsync( 113private async Task<ProposalAdjustmentResult> TryAdjustProposalInCurrentProcessAsync( 381private static async Task<Document> TryGetAddImportTextChangesAsync( 399private static async Task<Document> TryGetFormattingTextChangesAsync( 442private static async Task<TextSpan> GetSpanOfChangesAsync(Document oldDocument, Document newDocument, CancellationToken cancellationToken)
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\DiagnosticAnalyzerExtensions.cs (1)
45public static Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync(
Diagnostics\IDiagnosticAnalyzerService.cs (13)
31Task<ImmutableArray<DiagnosticData>> ForceRunCodeAnalysisDiagnosticsAsync( 41Task<bool> IsAnyDiagnosticIdDeprioritizedAsync( 66Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync( 78Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync( 89Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 97Task<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetAllDiagnosticIdsAsync( 101Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 105Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync( 112Task<ImmutableArray<string>> GetCompilationEndDiagnosticDescriptorIdsAsync( 125public static Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync( 142public static Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(this IDiagnosticAnalyzerService service, 155public static Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 159public static Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync(
Diagnostics\Service\DiagnosticAnalyzerService_CompilationWithAnalyzersPair.cs (2)
45private static async Task<CompilationWithAnalyzers?> GetOrCreateCompilationWithAnalyzers_OnlyCallInProcessAsync( 77static async Task<CompilationWithAnalyzers?> 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( 117async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> MergeProjectDiagnosticAnalyzerDiagnosticsAsync(
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (4)
27private async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeInProcessAsync( 39async Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeAsync() 102async Task<AnalysisResult> GetAnalysisResultAsync() 133async Task<ImmutableArray<Diagnostic>> GetPragmaSuppressionAnalyzerDiagnosticsAsync()
Diagnostics\Service\DiagnosticAnalyzerService_DeprioritizationCandidates.cs (2)
28private async Task<bool> IsDeprioritizedAnalyzerAsync( 44public async Task<bool> IsAnyDeprioritizedDiagnosticIdInProcessAsync(
Diagnostics\Service\DiagnosticAnalyzerService_ForceCodeAnalysisDiagnostics.cs (3)
31var documentDiagnosticsTask = GetDiagnosticsForIdsAsync(); 34var projectDiagnosticsTask = this.GetProjectDiagnosticsForIdsInProcessAsync( 41async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync()
Diagnostics\Service\DiagnosticAnalyzerService_GetDiagnosticsForSpan.cs (6)
25private static async Task<ImmutableDictionary<DiagnosticAnalyzer, ImmutableArray<DiagnosticData>>> ComputeDocumentDiagnosticsCoreInProcessAsync( 39public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanInProcessAsync( 186async Task<bool> MatchesPriorityAsync(DiagnosticAnalyzer analyzer) 220async Task<ImmutableArray<DiagnosticAnalyzer>> FilterAnalyzersAsync( 277private async Task<ImmutableArray<DiagnosticData>> ComputeDiagnosticsInProcessAsync( 325var computeTask = incrementalAnalysis
Diagnostics\Service\DiagnosticAnalyzerService_ProduceProjectDiagnostics.cs (6)
53private Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsInProcessAsync( 67private Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsInProcessAsync( 88private Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsInProcessAsync( 100private Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsInProcessAsync( 115private async Task<ImmutableArray<DiagnosticData>> ProduceProjectDiagnosticsInProcessAsync( 166async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResult>> GetOrComputeDiagnosticAnalysisResultsAsync(
Diagnostics\Service\DiagnosticAnalyzerService_RemoteOrLocalDispatcher.cs (9)
23public async Task<ImmutableArray<DiagnosticData>> ForceRunCodeAnalysisDiagnosticsAsync( 41public async Task<ImmutableArray<DiagnosticDescriptor>> GetDiagnosticDescriptorsAsync( 65public async Task<ImmutableArray<string>> GetCompilationEndDiagnosticDescriptorIdsAsync( 105public async Task<ImmutableDictionary<ProjectId, ImmutableHashSet<string>>> GetAllDiagnosticIdsAsync( 131public async Task<ImmutableDictionary<string, ImmutableArray<DiagnosticDescriptor>>> GetDiagnosticDescriptorsPerReferenceAsync( 154public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForIdsAsync( 175public async Task<ImmutableArray<DiagnosticData>> GetProjectDiagnosticsForIdsAsync( 196public async Task<bool> IsAnyDiagnosticIdDeprioritizedAsync( 214public async Task<ImmutableArray<DiagnosticData>> GetDiagnosticsForSpanAsync(
Diagnostics\Service\DiagnosticAnalyzerService.cs (4)
98public static Task<VersionStamp> GetDiagnosticVersionAsync(Project project, CancellationToken cancellationToken) 127public Task<DiagnosticAnalysisResultMap<DiagnosticAnalyzer, DiagnosticAnalysisResult>> AnalyzeProjectInProcessAsync( 131public async Task<ImmutableArray<DiagnosticAnalyzer>> GetDeprioritizedAnalyzersAsync(Project project) 144public async Task<ImmutableHashSet<string>> GetDeprioritizedDiagnosticIdsAsync(Project project)
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\DocumentAnalysisExecutor_Helpers.cs (1)
78public static async Task<ImmutableArray<Diagnostic>> ComputeDocumentDiagnosticAnalyzerDiagnosticsAsync(
DocumentationComments\CopilotDocumentationCommentGenerator.cs (1)
128public static async Task<ImmutableArray<DocumentationCommentEdit>> GenerateEditsAsync(
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( 205protected virtual Task<ImmutableArray<Location>> GetAdditionalReferencesAsync( 211private static async Task<ImmutableArray<DocumentHighlights>> CreateSpansAsync( 309private 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)
509public async Task<DocumentAnalysisResults> AnalyzeDocumentAsync( 2698private async Task<ImmutableArray<SemanticEditInfo>> AnalyzeSemanticsAsync(
EditAndContinue\CommittedSolution.cs (1)
151public async Task<(Document? Document, DocumentState State)> GetDocumentAndStateAsync(Document currentDocument, CancellationToken cancellationToken, bool reloadOutOfSyncDocument = false)
EditAndContinue\DebuggingSession.cs (1)
278internal Task<(Guid Mvid, Diagnostic? Error)> GetProjectModuleIdAsync(Project project, CancellationToken cancellationToken)
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (1)
105private async Task<ImmutableArray<ActiveStatementLineSpan>> GetLatestUnmappedActiveStatementSpansAsync(Document? oldDocument, Document? newDocument, ActiveStatementSpanProvider newActiveStatementSpanProvider, CancellationToken cancellationToken)
EditAndContinue\EditSession.cs (5)
122private async Task<Diagnostic?> GetUnsupportedChangesDiagnosticAsync(EmitDifferenceResult emitResult, CancellationToken cancellationToken) 155public async Task<string?> ReportModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray<DocumentAnalysisResults> documentAnalyses, ArrayBuilder<Diagnostic> diagnostics, CancellationToken cancellationToken) 227private async Task<EditAndContinueCapabilities> GetCapabilitiesAsync(CancellationToken cancellationToken) 240private async Task<ActiveStatementsMap> GetBaseActiveStatementsAsync(CancellationToken cancellationToken) 647private async Task<(ImmutableArray<DocumentAnalysisResults> results, Document? staleDocument)> 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)
88public 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)
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)
65protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 141private async Task<Solution> PullMembersUpAsync( 216private static async Task<INamedTypeSymbol> GetNewTypeSymbolAsync(Document document, SyntaxAnnotation typeAnnotation, CancellationToken cancellationToken) 225private 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( 280private static async Task<Solution> GetFormattedSolutionAsync(Solution unformattedSolution, IEnumerable<DocumentId> documentIds, CancellationToken cancellationToken) 310private async Task<Solution> GetSolutionWithOriginalTypeUpdatedAsync(
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
45protected 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\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 (5)
29public static Task<DefinitionItem> ToNonClassifiedDefinitionItemAsync( 36public static Task<DefinitionItem> ToNonClassifiedDefinitionItemAsync( 44private static async Task<DefinitionItem> ToNonClassifiedDefinitionItemAsync( 228private static async Task<ImmutableArray<DocumentSpan>> GetSourceLocationsAsync( 294public 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\IRemoteFindUsagesService.cs (1)
309public 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)
54protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.State.cs (2)
35public static async Task<State?> TryGenerateAsync( 51private 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( 116public 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)
53protected 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)
53protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 92private 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)
58internal abstract Task<Solution> TryAddUsingsOrImportToDocumentAsync( 65public abstract Task<(INamespaceSymbol, INamespaceOrTypeSymbol, Location)> GetOrGenerateEnclosingNamespaceSymbolAsync(INamedTypeSymbol namedTypeSymbol, string[] containers, Document selectedDocument, SyntaxNode selectedDocumentRoot, CancellationToken cancellationToken); 67public async Task<ImmutableArray<CodeAction>> GenerateTypeAsync( 274protected static async Task<bool> IsWithinTheImportingNamespaceAsync(Document document, int triggeringPosition, string includeUsingsOrImports, CancellationToken cancellationToken)
GenerateType\AbstractGenerateTypeService.Editor.cs (7)
87public async Task<ImmutableArray<CodeActionOperation>> GetOperationsAsync() 261private async Task<ImmutableArray<CodeActionOperation>> GetGenerateInNewFileOperationsAsync( 337private async Task<ImmutableArray<CodeActionOperation>> CreateAddDocumentAndUpdateUsingsOrImportsOperationsAsync( 386private async Task<ImmutableArray<CodeActionOperation>> GetGenerateIntoContainingNamespaceOperationsAsync(INamedTypeSymbol namedType) 403private async Task<ImmutableArray<CodeActionOperation>> GetGenerateIntoExistingDocumentAsync( 548private async Task<ImmutableArray<CodeActionOperation>> GetGenerateIntoTypeOperationsAsync(INamedTypeSymbol namedType) 583private 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)
132private async Task<ImmutableArray<InheritanceMarginItem>> GetInheritanceMarginItemsInProcessAsync( 164private async Task<ImmutableArray<InheritanceMarginItem>> GetGlobalImportsItemsAsync( 633private static async Task<ImmutableArray<ISymbol>> GetImplementingSymbolsForTypeMemberAsync( 691private static async Task<DefinitionItem?> ToSlimDefinitionItemAsync(
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\IInlineHintsService.cs (1)
15Task<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, ISymbol symbol, SymbolDescriptionOptions options) 24private static async Task<ImmutableArray<TaggedText>> GetDescriptionAsync(Document document, int position, ISymbol originalSymbol, SymbolDescriptionOptions options, CancellationToken cancellationToken)
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (2)
229async Task<Solution> InlineMethodAsync( 291async Task<SyntaxNode> GetChangedCallerAsync(
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)
154private async Task<(ImmutableArray<CodeAction> actions, ImmutableArray<CodeAction> actionsAllOccurrences)?> GetActionsAsync(Document document, 217private static async Task<(bool shouldDisplay, bool containsClassExpression)> ShouldExpressionDisplayCodeActionAsync( 257private async Task<Solution> IntroduceParameterAsync(Document originalDocument, TExpressionSyntax expression, 290protected 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) 85private async Task<string> GetNewParameterNameAsync(CancellationToken cancellationToken) 227private async Task<SyntaxNode> ModifyDocumentInvocationsTrampolineOverloadAndIntroduceParameterAsync(Compilation compilation, Document currentDocument, 352private async Task<ITypeSymbol> GetTypeOfExpressionAsync(CancellationToken cancellationToken) 396private async Task<SyntaxNode> ExtractMethodAsync(ImmutableArray<IParameterSymbol> validParameters, string newMethodIdentifier, SyntaxGenerator generator, CancellationToken cancellationToken) 428private async Task<SyntaxNode> GenerateNewMethodOverloadAsync(int insertionIndex, SyntaxGenerator generator, CancellationToken cancellationToken) 449private async Task<SyntaxNode> CreateMethodDeclarationAsync(SyntaxNode newStatement, ImmutableArray<IParameterSymbol>? validParameters, 489private async Task<SyntaxNode> ModifyDocumentInvocationsAndIntroduceParameterAsync(Compilation compilation, Document document, int insertionIndex, 674private 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 (1)
43public static async Task<State?> GenerateAsync(
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 (2)
152private async Task<Document> InvertIfDirectiveAsync( 397private 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); 372public async Task<ImmutableArray<SymbolDisplayPart>> BuildDescriptionAsync( 382public async Task<IDictionary<SymbolDescriptionGroups, ImmutableArray<TaggedText>>> BuildDescriptionSectionsAsync(ImmutableArray<ISymbol> symbolGroup) 655private async Task<ImmutableArray<SymbolDisplayPart>> GetFieldPartsAsync(IFieldSymbol symbol) 687private 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( 392private 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 (7)
46protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync( 170private static async Task<Solution> RefactorAndMoveAsync( 236private static async Task<Solution> RefactorReferencesAsync( 271private static async Task<SyntaxNode> FixReferencesSingleDocumentAsync( 364private static async Task<ImmutableArray<(ReferenceLocation location, bool isExtension)>> FindMemberReferencesAsync( 373using var _ = ArrayBuilder<Task<IEnumerable<ReferencedSymbol>>>.GetInstance(out var tasks); 399private static async Task<Solution> QualifyStaticMemberReferencesAsync(
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 (2)
180private static async Task<NavigateToSearchIndex?> GetFilterIndexAsync( 199private static Task<TopLevelSyntaxTreeIndex?> GetFullIndexAsync(
NavigateTo\AbstractNavigateToSearchService.NormalSearch.cs (1)
102async 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, ISourceLinkService? sourceLinkService, CancellationToken cancellationToken);
PdbSourceDocument\IPdbSourceDocumentLoaderService.cs (1)
15Task<SourceFileInfo?> LoadSourceDocumentAsync(string tempFilePath, SourceDocument sourceDocument, Encoding encoding, TelemetryMessage telemetry, bool useExtendedTimeout, ISourceLinkService? sourceLinkService, CancellationToken cancellationToken);
PdbSourceDocument\ISourceLinkService.cs (2)
14Task<SourceFilePathResult?> GetSourceFilePathAsync(string url, string relativePath, CancellationToken cancellationToken); 16Task<PdbFilePathResult?> GetPdbFilePathAsync(string dllPath, PEReader peReader, bool useDefaultSymbolServers, CancellationToken cancellationToken);
PdbSourceDocument\PdbFileLocatorService.cs (2)
28public async Task<DocumentDebugInfoReader?> GetDocumentDebugInfoReaderAsync(string dllPath, bool useDefaultSymbolServers, TelemetryMessage telemetry, ISourceLinkService? sourceLinkService, CancellationToken cancellationToken) 68var pdbResultTask = sourceLinkService.GetPdbFilePathAsync(dllPath, peReader, useDefaultSymbolServers, cancellationToken);
PdbSourceDocument\PdbSourceDocumentLoaderService.cs (3)
32public async Task<SourceFileInfo?> LoadSourceDocumentAsync(string tempFilePath, SourceDocument sourceDocument, Encoding encoding, TelemetryMessage telemetry, bool useExtendedTimeout, ISourceLinkService? sourceLinkService, CancellationToken cancellationToken) 119private async Task<SourceFileInfo?> TryGetSourceLinkFileAsync(SourceDocument sourceDocument, Encoding encoding, TelemetryMessage telemetry, bool useExtendedTimeout, ISourceLinkService? sourceLinkService, CancellationToken cancellationToken) 130var sourceFileTask = sourceLinkService.GetSourceFilePathAsync(sourceDocument.SourceLinkUrl, relativePath, cancellationToken);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
69public async Task<MetadataAsSourceFile?> GetGeneratedFileAsync(
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
22protected abstract Task<ImmutableArray<SyntaxNode>> GetSelectedNodesAsync(CodeRefactoringContext context);
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
40protected 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 (1)
29protected override async Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token)
QuickInfo\CommonQuickInfoProvider.cs (4)
14protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token); 16public override async Task<QuickInfoItem?> GetQuickInfoAsync(QuickInfoContext context) 32protected async Task<ImmutableArray<SyntaxToken>> GetTokensAsync(SyntaxTree tree, int position, System.Threading.CancellationToken cancellationToken) 54private async Task<QuickInfoItem?> GetQuickInfoAsync(
QuickInfo\CommonSemanticQuickInfoProvider.cs (5)
25protected override async Task<QuickInfoItem?> BuildQuickInfoAsync( 41private async Task<(TokenInformation tokenInformation, SupportedPlatformData? supportedPlatforms)> ComputeQuickInfoDataAsync( 58private async Task<(TokenInformation, SupportedPlatformData supportedPlatforms)> ComputeFromLinkedDocumentsAsync( 145protected static Task<QuickInfoItem> CreateContentAsync( 178protected 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)
34protected abstract Task<SignatureHelpItems?> GetItemsWorkerAsync(Document document, int position, SignatureHelpTriggerInfo triggerInfo, MemberDisplayOptions options, CancellationToken cancellationToken); 240public async Task<SignatureHelpItems?> GetItemsAsync( 303private static async Task<ImmutableArray<Document>> FindActiveRelatedDocumentsAsync(int position, Document document, CancellationToken cancellationToken)
SignatureHelp\CommonSignatureHelpUtilities.cs (2)
103internal static async Task<TSyntax?> TryGetSyntaxAsync<TSyntax>( 163public 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 (1)
39protected sealed override async Task<TextChange> GenerateSnippetTextChangeAsync(Document document, int position, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (1)
57protected 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)
22protected 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); 72public async Task<SnippetChange> GetSnippetChangeAsync(Document document, int position, CancellationToken cancellationToken) 142private static async Task<Document> CleanupDocumentAsync( 170private async Task<Document> GetDocumentWithSnippetAndTriviaAsync(Document snippetDocument, int position, ISyntaxFacts syntaxFacts, CancellationToken cancellationToken) 191private static async Task<Document> GetDocumentWithSnippetAsync(Document document, ImmutableArray<TextChange> snippets, CancellationToken cancellationToken) 201private async Task<Document> AddFormatAnnotationAsync(Document document, int position, CancellationToken cancellationToken) 211private async Task<SyntaxNode> AnnotateNodesToReformatAsync( 236private async Task<Document> AddIndentationToDocumentAsync(Document document, CancellationToken cancellationToken) 247protected virtual Task<Document> AddIndentationToDocumentAsync(Document document, TSnippetSyntax snippet, CancellationToken cancellationToken)
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (4)
28protected abstract Task<TextChange?> GetAccessibilityModifiersChangeAsync(Document document, int position, CancellationToken cancellationToken); 30protected sealed override async Task<ImmutableArray<TextChange>> GenerateSnippetTextChangesAsync( 58protected static async Task<bool> AreAccessibilityModifiersRequiredAsync(Document document, CancellationToken cancellationToken) 65private async Task<TTypeDeclarationSyntax> GenerateTypeDeclarationAsync(
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)
22protected abstract CodeAction CreateCodeAction(Func<CancellationToken, Task<Document>> createChangedDocument, string ifKeywordText); 24protected abstract Task<SyntaxNode> GetChangedRootAsync( 59private 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\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
52private async Task<TAnonymousObjectMemberDeclaratorSyntax?> GetMemberDeclaratorAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\AddObsoleteAttribute\AbstractAddObsoleteAttributeCodeFixProvider.cs (1)
57private static async Task<INamedTypeSymbol?> GetObsoleteAttributeAsync(Document document, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractAddDocCommentNodesCodeFixProvider.cs (1)
57protected async Task<Document> AddParamTagAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (1)
58private async Task<Document> RemoveDuplicateParamTagAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\FileHeaders\AbstractFileHeaderCodeFixProvider.cs (3)
43private async Task<Document> GetTransformedDocumentAsync(Document document, CancellationToken cancellationToken) 46private async Task<SyntaxNode> GetTransformedSyntaxRootAsync(Document document, CancellationToken cancellationToken) 55internal static async Task<SyntaxNode> GetTransformedSyntaxRootAsync(ISyntaxFacts syntaxFacts, AbstractFileHeaderHelper fileHeaderHelper, SyntaxTrivia newLineTrivia, Document document, string? fileHeaderTemplate, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\Formatting\FormattingCodeFixProvider.cs (1)
68private async Task<Document> FixOneAsync(CodeFixContext context, Diagnostic diagnostic, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (1)
80public async Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (7)
65public static async Task<State?> GenerateAsync( 82private async Task<bool> TryInitializeAsync( 142private async Task<bool> TryInitializeDelegatedConstructorAsync(CancellationToken cancellationToken) 405public async Task<Document> GetChangedDocumentAsync( 421private async Task<Document?> GenerateThisOrBaseDelegatingConstructorAsync( 458private async Task<(ImmutableArray<ISymbol>, ImmutableArray<SyntaxNode>)> GenerateMembersAndAssignmentsAsync( 480private async Task<Document> GenerateMemberDelegatingConstructorAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\GenerateConstructorHelpers.cs (1)
130public static async Task<
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateConstructor\IGenerateConstructorService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConstructorAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\GenerateDefaultConstructorsCodeAction.cs (1)
30protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\IGenerateDefaultConstructorsService.cs (1)
16Task<ImmutableArray<CodeAction>> GenerateDefaultConstructorsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
23protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
25public async Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (1)
27public static async Task<State?> GenerateAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateEnumMember\IGenerateEnumMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateEnumMemberAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (1)
25protected abstract Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (1)
27public async Task<ImmutableArray<CodeAction>> GenerateConversionAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (1)
18public static async Task<State> GenerateConversionStateAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.cs (1)
23public async Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateDeconstructMethodService.State.cs (2)
25public static async Task<State> GenerateDeconstructMethodStateAsync( 41private async Task<bool> TryInitializeMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (1)
28public async Task<ImmutableArray<CodeAction>> GenerateMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
25public static async Task<State> GenerateMethodStateAsync( 40private async Task<bool> TryInitializeMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
63protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
57protected async Task<bool> TryFinishInitializingStateAsync(TService service, SemanticDocument document, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateConversionService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateConversionAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateDeconstructMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateDeconstructMethodAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\IGenerateParameterizedMemberService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateMethodAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\TypeParameterSubstitution.cs (1)
123private async Task<ISet<INamedTypeSymbol>> GetDerivedAndImplementedTypesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
47protected override async Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (2)
32public async Task<ImmutableArray<CodeAction>> GenerateVariableAsync( 117private static async Task<bool> NameIsHighlyUnlikelyToWarrantSymbolAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.GenerateParameterCodeAction.cs (1)
42protected override Task<Solution?> GetChangedSolutionAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\GenerateVariable\IGenerateVariableService.cs (1)
15Task<ImmutableArray<CodeAction>> GenerateVariableAsync(Document document, SyntaxNode node, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (3)
40public static async Task<ImplementAbstractClassData?> TryGetDataAsync( 75public static async Task<Document?> TryImplementAbstractClassAsync( 85public async Task<Document> ImplementAbstractClassAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\IImplementInterfaceService.cs (2)
25Task<Document> ImplementInterfaceAsync(Document document, ImplementTypeOptions options, SyntaxNode node, CancellationToken cancellationToken); 40Task<ImmutableArray<CodeAction>> GetCodeActionsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator_DisposePattern.cs (3)
39private async Task<Document> ImplementDisposePatternAsync( 88private async Task<Document> AddFinalizerCommentAsync( 228private static async Task<IFieldSymbol> CreateDisposedValueFieldAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\ImplementInterface\ImplementInterfaceGenerator.cs (2)
56public Task<Document> ImplementInterfaceAsync(CancellationToken cancellationToken) 69private async Task<Document> ImplementInterfaceAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\Iterator\AbstractIteratorCodeFixProvider.cs (1)
17protected abstract Task<CodeAction?> GetCodeFixAsync(SyntaxNode root, SyntaxNode node, Document document, Diagnostic diagnostics, CancellationToken cancellationToken);
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodAsynchronous\AbstractMakeMethodAsynchronousCodeFixProvider.cs (4)
103private static async Task<bool> HasReferenceAsDelegateInThisProjectAsync( 197private async Task<Solution> FixNodeAsync( 256private async Task<Solution> RenameThenAddAsyncTokenAsync( 287private async Task<Solution> FixRelatedSignaturesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\MakeMethodSynchronous\AbstractMakeMethodSynchronousCodeFixProvider.cs (6)
49private async Task<Solution> FixNodeAsync( 71private async Task<Solution> RenameThenRemoveAsyncTokenAsync(Document document, SyntaxNode node, IMethodSymbol methodSymbol, CancellationToken cancellationToken) 94private async Task<Solution> RemoveAsyncTokenAsync( 117private static async Task<Solution> RemoveAwaitFromCallersAsync( 152private static async Task<Solution> RemoveAwaitFromCallersAsync( 168private static async Task<Solution> RemoveAwaitFromCallersAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
40private static async Task<Solution> FixAllInDocumentAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\Naming\NamingExtensions.cs (2)
16public static async Task<NamingRule> GetApplicableNamingRuleAsync( 34public static async Task<ImmutableArray<NamingRule>> GetNamingRulesAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\NewLines\ConsecutiveStatementPlacement\ConsecutiveStatementPlacementCodeFixProvider.cs (2)
40private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 43public static async Task<Document> FixAllAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
40private static Task<Document> UpdateDocumentAsync(Document document, Diagnostic diagnostic, CancellationToken cancellationToken) 43private static async Task<Document> FixAllAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\PopulateSwitch\AbstractPopulateSwitchCodeFixProvider.cs (2)
97private Task<Document> FixAsync( 106private Task<Document> FixAllAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsCodeFixProvider.cs (1)
44private static Task<Document> RemoveUnnecessaryImportsAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\UnsealClass\AbstractUnsealClassCodeFixProvider.cs (1)
57private static async Task<Solution> UnsealDeclarationsAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UpgradeProject\AbstractUpgradeProjectCodeFixProvider.cs (3)
126private ProjectOptionsChangeAction(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 131public static ProjectOptionsChangeAction Create(string title, Func<IProgress<CodeAnalysisProgress>, CancellationToken, Task<Solution>> createChangedSolution) 134protected override async Task<IEnumerable<CodeActionOperation>> ComputePreviewOperationsAsync(CancellationToken cancellationToken)
src\roslyn\src\Analyzers\Core\CodeFixes\UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (6)
71protected abstract Task<SyntaxNode> UpdatePropertyAsync( 102private async Task<Solution> ProcessResultAsync( 115private async Task<Solution> ProcessResultWorkerAsync( 312private static async Task<Solution> UpdateReferencesAsync( 391private async Task<(IFieldSymbol? fieldSymbol, IPropertySymbol? propertySymbol)> MapDiagnosticToCurrentSolutionAsync( 454private async Task<SyntaxNode> FormatAsync(
src\roslyn\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\roslyn\src\Analyzers\Core\CodeFixes\UseCollectionInitializer\AbstractUseCollectionInitializerCodeFixProvider.cs (1)
55protected abstract Task<(SyntaxNode oldNode, SyntaxNode newNode)> GetReplacementNodesAsync(
src\roslyn\src\Analyzers\Core\CodeFixes\UseConditionalExpression\AbstractUseConditionalExpressionCodeFixProvider.cs (2)
86protected async Task<TExpressionSyntax> CreateConditionalExpressionAsync( 154private 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 (3)
24public static async Task<DefinitionItem?> GetDefinitionAsync(Solution solution, StackFrameCompilationUnit compilationUnit, StackFrameSymbolPart symbolPart, CancellationToken cancellationToken) 91Task<DefinitionItem> GetDefinitionAsync(IMethodSymbol method) 107private 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)
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);
TypeHierarchy\AbstractTypeHierarchyService.cs (1)
19public async Task<ImmutableArray<INamedTypeSymbol>> GetDerivedTypesAndImplementationsAsync(
TypeHierarchy\ITypeHierarchyService.cs (1)
16Task<ImmutableArray<INamedTypeSymbol>> GetDerivedTypesAndImplementationsAsync(
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(
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.ExternalAccess (49)
AspNetCore\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)
Copilot\Analyzer\CopilotUtilities.cs (1)
30public static async Task<SyntaxNode?> GetContainingMethodDeclarationAsync(Document document, int position, bool useFullSpan, CancellationToken cancellationToken)
Copilot\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);
Copilot\CodeMapper\ICSharpCopilotMapCodeService.cs (1)
15Task<ImmutableArray<TextChange>?> MapCodeAsync(
Copilot\GenerateDocumentation\IExternalCSharpCopilotGenerateDocumentationService.cs (1)
13Task<(Dictionary<string, string>? responseDictionary, bool isQuotaExceeded)> GetDocumentationCommentAsync(CopilotDocumentationCommentProposalWrapper proposal, CancellationToken cancellationToken);
Copilot\GenerateImplementation\IExternalCSharpCopilotGenerateImplementationService.cs (1)
15Task<ImmutableDictionary<SyntaxNode, ImplementationDetailsWrapper>> ImplementNotImplementedExceptionsAsync(
Copilot\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(
Copilot\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(
Copilot\Internal\CodeMapper\CopilotCSharpMapCodeService.cs (1)
30public Task<ImmutableArray<TextChange>?> MapCodeAsync(Document document, ImmutableArray<string> contents, ImmutableArray<(Document, TextSpan)> focusLocations, CancellationToken cancellationToken)
Copilot\Internal\SemanticSearch\CopilotSemanticSearchQueryExecutor.cs (1)
77public async Task<CopilotSemanticSearchQueryResults> ExecuteAsync(string query, int resultCountLimit, CancellationToken cancellationToken)
Copilot\Internal\SemanticSearch\CopilotSemanticSearchQueryService.cs (1)
82public async Task<ExecuteQueryResult> ExecuteQueryAsync(Solution solution, CompiledQueryId queryId, ISemanticSearchResultsObserver observer, QueryExecutionOptions options, TraceSource traceSource, CancellationToken cancellationToken)
Copilot\OnTheFlyDocs\IExternalCSharpOnTheFlyDocsService.cs (2)
12Task<string> GetOnTheFlyDocsPromptAsync(CopilotOnTheFlyDocsInfoWrapper onTheFlyDocsInfo, CancellationToken cancellationToken); 13Task<(string responseString, bool isQuotaExceeded)> GetOnTheFlyDocsResponseAsync(string prompt, CancellationToken cancellationToken);
Copilot\SemanticSearch\ICopilotSemanticSearchQueryExecutor.cs (1)
13Task<CopilotSemanticSearchQueryResults> ExecuteAsync(string query, int resultCountLimit, CancellationToken cancellationToken);
Copilot\SemanticSearch\ICopilotSemanticSearchQueryService.cs (1)
25Task<ExecuteQueryResult> ExecuteQueryAsync(
Microsoft.CodeAnalysis.NetAnalyzers (52)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDirectlyAwaitATask.Fixer.cs (2)
51private static async Task<Document> GetFixAsync(Document document, SyntaxNode expression, bool argument, CancellationToken cancellationToken) 85protected override async Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\EnumsShouldHaveZeroValue.Fixer.cs (3)
96private static async Task<Document> GetUpdatedDocumentForRuleNameRenameAsync(Document document, IFieldSymbol field, CancellationToken cancellationToken) 102private static async Task<Document> ApplyRuleNameMultipleZeroAsync(Document document, INamedTypeSymbol enumType, CancellationToken cancellationToken) 145private static async Task<Document> ApplyRuleNameNoZeroValueAsync(Document document, INamedTypeSymbol enumType, CancellationToken cancellationToken)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\InterfaceMethodsShouldBeCallableByChildTypes.Fixer.cs (3)
121private static async Task<Document> MakeProtectedAsync(Document document, ISymbol symbolToChange, bool checkSetter, CancellationToken cancellationToken) 158private static async Task<Document> ChangeToPublicInterfaceImplementationAsync(Document document, ISymbol symbolToChange, CancellationToken cancellationToken) 209private static async Task<Document> MakeContainingTypeSealedAsync(Document document, IMethodSymbol methodSymbol, CancellationToken cancellationToken)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideMethodsOnComparableTypes.Fixer.cs (1)
34private static async Task<INamedTypeSymbol?> GetTypeToFixAsync(Document document, TextSpan span, CancellationToken cancellationToken)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ParameterNamesShouldMatchBaseDeclaration.Fixer.cs (1)
58private static async Task<Document> GetUpdatedDocumentForParameterRenameAsync(Document document, ISymbol parameter, string newName, CancellationToken cancellationToken)
Microsoft.CodeQuality.Analyzers\QualityGuidelines\MarkMembersAsStatic.Fixer.cs (3)
59private async Task<Solution> MakeStaticAsync(Document document, SyntaxNode root, SyntaxNode node, CancellationToken cancellationToken) 109private async Task<(Solution newSolution, bool allReferencesFixed)> UpdateReferencesAsync(ISymbol symbol, Solution solution, CancellationToken cancellationToken) 256private static async Task<Document> AddWarningAnnotationAsync(Document document, ISymbol symbolFromEarlierSnapshot, CancellationToken cancellationToken)
Microsoft.CodeQuality.Analyzers\QualityGuidelines\SealMethodsThatSatisfyPrivateInterfaces.Fixer.cs (2)
110protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 137protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken)
Microsoft.NetCore.Analyzers\ImmutableCollections\DoNotCallToImmutableCollectionOnAnImmutableCollectionValue.Fixer.cs (1)
63private static Task<Document> RemoveRedundantCallAsync(Document document, SyntaxNode root, SyntaxNode invocationNode, IInvocationOperation invocationOperation)
Microsoft.NetCore.Analyzers\Performance\PreferHashDataOverComputeHash.Fixer.cs (3)
70protected override Task<Document> GetChangedDocumentAsync(CancellationToken cancellationToken) 95protected override async Task<Solution?> GetChangedSolutionAsync(CancellationToken cancellationToken) 230public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
Microsoft.NetCore.Analyzers\Performance\PreferReadOnlySpanOverSpan.Fixer.cs (1)
98private static async Task<Document> ChangeParameterTypeAsync(
Microsoft.NetCore.Analyzers\Performance\RecommendCaseInsensitiveStringComparison.Fixer.cs (4)
111Task<Document> createChangedDocument(CancellationToken _) => FixInvocationAsync(generator, doc, root, 128Task<Document> createChangedDocument(CancellationToken _) => FixBinaryAsync(generator, doc, root, binaryOperation, stringComparisonType, caseChangingApproachValue!); 141private Task<Document> FixInvocationAsync(SyntaxGenerator generator, Document doc, SyntaxNode root, IInvocationOperation mainInvocation, 185private Task<Document> FixBinaryAsync(SyntaxGenerator generator, Document doc, SyntaxNode root, IBinaryOperation binaryOperation,
Microsoft.NetCore.Analyzers\Performance\UseSearchValues.Fixer.cs (1)
70private Task<Document> ConvertAllToSearchValuesAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
Microsoft.NetCore.Analyzers\Runtime\AvoidConstArrays.Fixer.cs (1)
53private static Task<Document> ExtractConstArraysAsync(Document document, ImmutableArray<Diagnostic> diagnostics, CancellationToken cancellationToken)
Microsoft.NetCore.Analyzers\Runtime\DoNotUseEnumerableMethodsOnIndexableCollectionsInsteadUseTheCollectionDirectly.Fixer.cs (1)
84private Task<Document> UseCollectionDirectlyAsync(Document document, SyntaxNode root, SyntaxNode invocationNode, SyntaxNode collectionSyntax, string methodName)
Microsoft.NetCore.Analyzers\Runtime\MarkAllNonSerializableFields.Fixer.cs (2)
55private static async Task<Document> AddNonSerializedAttributeAsync(Document document, SyntaxNode fieldNode, CancellationToken cancellationToken) 68private static async Task<Document> AddSerializableAttributeToTypeAsync(Document document, ITypeSymbol type, CancellationToken cancellationToken)
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstring.Fixer.cs (1)
58async Task<Document> CreateChangedDocument(CancellationToken token)
Microsoft.NetCore.Analyzers\Runtime\PreferConstCharOverConstUnitString.Fixer.cs (1)
94private static async Task<(SyntaxNode Target, char CharValue, string? LocalName)?> TryGetFixAsync(
Microsoft.NetCore.Analyzers\Runtime\SealInternalTypes.Fixer.cs (1)
30async Task<Solution> SealClassDeclarationsAsync(CancellationToken token)
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequested.Fixer.cs (1)
41Func<CancellationToken, Task<Document>> createChangedDocument;
Microsoft.NetCore.Analyzers\Runtime\UseExceptionThrowHelpersFixer.cs (1)
132protected override async Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
Microsoft.NetCore.Analyzers\Runtime\UseOrdinalStringComparison.Fixer.cs (1)
39private async Task<bool> CanFixAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)
Microsoft.NetCore.Analyzers\Usage\PreferGenericOverloads.Fixer.cs (1)
54protected abstract Task<Document> ReplaceWithGenericCallAsync(Document document, IInvocationOperation invocation, CancellationToken cancellationToken);
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
32internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (6)
187public static Task<CodeAnalysisMetricData> ComputeAsync(Compilation compilation, CancellationToken cancellationToken) 200public static Task<CodeAnalysisMetricData> ComputeAsync(CodeMetricsAnalysisContext context) 227public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, Compilation compilation, CancellationToken cancellationToken) 245public static Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 264static async Task<CodeAnalysisMetricData> ComputeAsync(ISymbol symbol, CodeMetricsAnalysisContext context) 324internal static async Task<ImmutableArray<CodeAnalysisMetricData>> ComputeAsync(IEnumerable<ISymbol> children, CodeMetricsAnalysisContext context)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
32internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
31internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\Compiler\WellKnownTypeProvider.cs (3)
250/// Determines if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its type 253/// <param name="typeSymbol">Type potentially representing a <see cref="System.Threading.Tasks.Task{TResult}"/>.</param> 255/// <returns>True if <paramref name="typeSymbol"/> is a <see cref="System.Threading.Tasks.Task{TResult}"/> with its
src\sdk\src\Microsoft.CodeAnalysis.NetAnalyzers\src\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowOperationVisitor.cs (1)
4151/// <see cref="INamedTypeSymbol"/> for <see cref="System.Threading.Tasks.Task{TResult}"/>
SyntaxEditorFixAllProvider.cs (3)
148public static Task<Document> ApplyFixesAsync( 163private static async Task<Document> ApplyFixesAsync<TState>( 211protected override async Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics)
Microsoft.CodeAnalysis.ResxSourceGenerator (98)
src\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
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) 455internal new Task<T> EvaluateAsync(object globals = null, CancellationToken cancellationToken = default(CancellationToken)) 469public new Task<ScriptState<T>> RunAsync(object globals, CancellationToken cancellationToken) 487public new Task<ScriptState<T>> RunAsync(object globals = null, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 530public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, CancellationToken cancellationToken) 547public new Task<ScriptState<T>> RunFromAsync(ScriptState previousState, Func<Exception, bool> catchException = null, CancellationToken cancellationToken = default(CancellationToken)) 575private async Task<ScriptState<T>> RunSubmissionsAsync(
ScriptBuilder.cs (3)
78internal Func<object[], Task<T>> CreateExecutor<T>(ScriptCompiler compiler, Compilation compilation, bool emitDebugInformation, CancellationToken cancellationToken) 122private Func<object[], Task<T>> Build<T>( 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.VisualBasic (1)
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
105Public Overrides Function GetRootAsync(Optional cancellationToken As CancellationToken = Nothing) As Task(Of VisualBasicSyntaxNode)
Microsoft.CodeAnalysis.Workspaces (866)
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_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\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 async Task<Solution?> GetChangedSolutionAsync(IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken)
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 async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(object options, CancellationToken cancellationToken) 74protected virtual Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(object options, IProgress<CodeAnalysisProgress> progress, CancellationToken cancellationToken) 77protected override async Task<IEnumerable<CodeActionOperation>> ComputeOperationsAsync(CancellationToken cancellationToken)
CodeActions\Operations\ApplyChangesOperation.cs (1)
43internal sealed override async Task<bool> TryApplyAsync(Workspace workspace, Solution originalSolution, IProgress<CodeAnalysisProgress> progressTracker, CancellationToken cancellationToken)
CodeActions\Operations\CodeActionOperation.cs (1)
34internal virtual async 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 async 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)
57protected abstract Task<Document?> FixAllAsync(FixAllContext fixAllContext, Document document, ImmutableArray<Diagnostic> diagnostics); 62public sealed override Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 66private 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?> IRefactorOrFixAllProvider.GetCodeActionAsync(IRefactorOrFixAllContext 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 async Task<IEnumerable<Diagnostic>> GetAllDiagnosticsAsync(Project project, CancellationToken cancellationToken) 59public override async Task<IEnumerable<Diagnostic>> GetDocumentDiagnosticsAsync(Document document, CancellationToken cancellationToken) 69public override async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project project, CancellationToken cancellationToken)
CodeFixes\FixAllOccurrences\NoOpFixAllProvider.cs (1)
25public override async 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\IRefactorOrFixAllProvider.cs (1)
18Task<CodeAction?> GetCodeActionAsync(IRefactorOrFixAllContext fixAllContext);
CodeRefactorings\FixAllOccurences\DocumentBasedRefactorAllProvider.cs (3)
59protected abstract Task<Document?> RefactorAllAsync( 65public sealed override Task<CodeAction?> GetRefactoringAsync(RefactorAllContext refactorAllContext) 69private Task<Solution?> RefactorAllContextsHelperAsync(RefactorAllContext originalRefactorAllContext, ImmutableArray<RefactorAllContext> refactorAllContexts)
CodeRefactorings\FixAllOccurences\RefactorAllContext.cs (1)
99public Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetRefactorAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\FixAllOccurences\RefactorAllProvider.cs (7)
38public abstract Task<CodeAction?> GetRefactoringAsync(RefactorAllContext refactorAllContext); 41Task<CodeAction?> IRefactorOrFixAllProvider.GetCodeActionAsync(IRefactorOrFixAllContext fixAllContext) 55public static RefactorAllProvider Create(Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync) 74Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync, 81Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync, 98Func<RefactorAllContext, Document, Optional<ImmutableArray<TextSpan>>, Task<Document?>> refactorAllAsync, 104protected override Task<Document?> RefactorAllAsync(RefactorAllContext context, Document document, Optional<ImmutableArray<TextSpan>> refactorAllSpans)
CodeRefactorings\FixAllOccurences\RefactorAllState.cs (1)
89internal async Task<ImmutableDictionary<Document, Optional<ImmutableArray<TextSpan>>>> GetRefactorAllSpansAsync(CancellationToken cancellationToken)
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (3)
36protected Task<Document> RefactorAsync( 47protected Task<Document> RefactorAllAsync( 64internal static async Task<Document> RefactorAllWithEditorAsync(
Diagnostics\DiagnosticData.cs (1)
156public async Task<Diagnostic> ToDiagnosticAsync(Project project, CancellationToken cancellationToken)
Diagnostics\DocumentDiagnosticAnalyzer.cs (2)
19public virtual async Task<ImmutableArray<Diagnostic>> AnalyzeSyntaxAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken) 22public virtual async Task<ImmutableArray<Diagnostic>> AnalyzeSemanticsAsync(TextDocument textDocument, SyntaxTree? tree, CancellationToken cancellationToken)
Diagnostics\Extensions.cs (5)
28public static async Task<ImmutableArray<Diagnostic>> ToDiagnosticsAsync(this IEnumerable<DiagnosticData> diagnostics, Project project, CancellationToken cancellationToken) 105public static async Task<ImmutableDictionary<DiagnosticAnalyzer, DiagnosticAnalysisResultBuilder>> ToResultBuilderMapAsync( 352public static async Task<Checksum> GetDiagnosticChecksumAsync(this Project? project, CancellationToken cancellationToken) 365static async Task<Checksum> ComputeDiagnosticChecksumAsync(Project project, CancellationToken cancellationToken) 412public 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( 278private async Task<ISymbol> EditDeclarationAsync( 318public Task<ISymbol> EditOneDeclarationAsync( 344public Task<ISymbol> EditOneDeclarationAsync( 360private async Task<ISymbol> EditOneDeclarationAsync( 393public async Task<ISymbol> EditOneDeclarationAsync( 426public Task<ISymbol> EditOneDeclarationAsync( 450public async Task<ISymbol> EditAllDeclarationsAsync( 508public 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( 144private static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsAsync( 172static async Task<ImmutableArray<(Project project, bool hasInternalsAccess)>> ComputeDependentProjectsWorkerAsync( 316private static async Task<bool> HasReferenceToAsync( 334private static async Task<bool> HasReferenceToAssemblyAsync(Project project, string assemblyName, CancellationToken cancellationToken)
FindSymbols\FindReferences\DependentTypeFinder_DerivedClasses.cs (1)
15private static async Task<ImmutableArray<INamedTypeSymbol>> FindDerivedClassesInCurrentProcessAsync(
FindSymbols\FindReferences\DependentTypeFinder_DerivedInterfaces.cs (1)
15private static async 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\DependentTypeFinder.cs (2)
61private static async Task<ImmutableArray<INamedTypeSymbol>> DescendInheritanceTreeAsync( 399private static async Task<ISet<ProjectId>> GetProjectsThatCouldReferenceTypeAsync(
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (4)
27public abstract Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 707protected virtual async Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 713public sealed override Task<ImmutableArray<string>> DetermineGlobalAliasesAsync( 763protected static async Task<ImmutableArray<string>> GetAllMatchingGlobalAliasNamesAsync(
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
47protected 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_FindReferencesInDocuments.cs (2)
162static async Task<ImmutableArray<(SymbolGroup group, ISymbol symbol, ReferenceLocation location)>> ConvertLocationsAsync( 230async Task<bool> ComputeInheritanceRelationshipAsync(
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( 141public static async Task<MetadataUnifyingSymbolHashSet> DetermineInitialSearchSymbolsAsync( 158private static async Task<MetadataUnifyingSymbolHashSet> DetermineInitialUpSymbolsAsync( 205async Task<ISymbol?> TryMapAndAddLinkedSymbolsAsync(ISymbol symbol)
FindSymbols\ReferenceLocationExtensions.cs (1)
16public static async Task<Dictionary<ISymbol, List<Location>>> FindReferencingSymbolsAsync(
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\Shared\AbstractSyntaxIndex.cs (2)
79private static async Task<TIndex?> GetIndexWorkerAsync( 114private static async Task<TIndex> CreateIndexAsync(
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\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\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\SymbolTree\SymbolTreeInfo.cs (5)
118public Task<ImmutableArray<ISymbol>> FindAsync( 129public async Task<ImmutableArray<ISymbol>> FindAsync( 142private Task<ImmutableArray<ISymbol>> FindCoreAsync( 167private async Task<ImmutableArray<ISymbol>> FuzzyFindAsync( 213private async Task<ImmutableArray<ISymbol>> FindAsync(
FindSymbols\SyntaxTree\SyntaxTreeIndex_Persistence.cs (1)
19public static Task<SyntaxTreeIndex?> LoadAsync(
FindSymbols\TopLevelSyntaxTree\NavigateToSearchIndex_Persistence.cs (1)
15public static Task<NavigateToSearchIndex?> 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(
Log\WorkspaceStructureLogger.cs (4)
33public async Task<XDocument> BuildWorkspaceStructureAsync( 109protected virtual Task<IEnumerable<XElement>> CreateAdditionalProjectElementsAsync(Project project, CancellationToken cancellationToken) 112private static async Task<XElement> BuildProjectElementAsync(Project project, CancellationToken cancellationToken) 295internal static async Task<IEnumerable<XElement>> CreateElementsForDocumentCollectionAsync(IEnumerable<TextDocument> documents, string elementName, CancellationToken cancellationToken)
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 async Task<IEnumerable<ISymbol>> GetRecommendedSymbolsAtPositionAsync( 45public static async Task<ImmutableArray<ISymbol>> GetRecommendedSymbolsAtPositionAsync(
Remote\IRemoteHostClientProvider.cs (1)
19Task<RemoteHostClient?> TryGetRemoteHostClientAsync(CancellationToken cancellationToken);
Remote\IRemoteKeepAliveService.cs (5)
72private static async Task<RemoteKeepAliveSession> StartSessionAsync( 260public static Task<RemoteKeepAliveSession> CreateAsync(Solution solution, CancellationToken cancellationToken) 264public static Task<RemoteKeepAliveSession> CreateAsync(Solution solution, ProjectId? projectId, CancellationToken cancellationToken) 268public static Task<RemoteKeepAliveSession> CreateAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 272public 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( 656private async Task<ISymbol> GetRenamedSymbolInCurrentSolutionAsync(MutableConflictResolution conflictResolution) 681private async Task<(ImmutableHashSet<DocumentId> documentIds, ImmutableArray<string> possibleNameConflicts)> FindDocumentsAndPossibleNameConflictsAsync() 756private 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)
118internal static async Task<SymbolicRenameLocations?> TryRehydrateAsync( 183public async Task<ConflictResolution> RehydrateAsync(Solution oldSolution, CancellationToken cancellationToken) 244public 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 (4)
49public async Task<SymbolicRenameLocations?> ToSymbolicLocationsAsync(ISymbol symbol, CancellationToken cancellationToken) 72public static async Task<LightweightRenameLocations> FindRenameLocationsAsync( 76public static async Task<LightweightRenameLocations> FindRenameLocationsAsync( 125public Task<ConflictResolution> ResolveConflictsAsync(ISymbol symbol, string replacementText, CancellationToken cancellationToken)
Rename\Renamer.cs (8)
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) 145internal static Task<LightweightRenameLocations> FindRenameLocationsAsync( 153internal static async Task<ConflictResolution> RenameSymbolAsync( 195private 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)
248public static async Task<ISymbol?> TryGetPropertyFromAccessorOrAnOverrideAsync( 337public static async Task<ISymbol?> TryGetRenamableSymbolAsync( 368public static async Task<ISymbol> FindDefinitionSymbolAsync(
Rename\SymbolicRenameLocations.cs (4)
57public static async Task<SymbolicRenameLocations> FindLocationsInCurrentProcessAsync( 61public static async Task<SymbolicRenameLocations> FindLocationsInCurrentProcessAsync( 121private static async Task<ImmutableArray<SearchResult>> GetOverloadsAsync( 132private static async Task<SearchResult> AddLocationsReferenceSymbolsAsync(
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (6)
31private static async Task<bool> ShouldIncludeSymbolAsync( 136private static async Task<bool> IsPropertyAccessorOrAnOverrideAsync( 161public static async Task<ImmutableArray<RenameLocation>> GetRenamableDefinitionLocationsAsync( 251internal static async Task<IEnumerable<RenameLocation>> GetRenamableReferenceLocationsAsync( 340static async Task<CandidateReason> GetCandidateReasonForOverloadResolutionFailureAsync( 358internal static async Task<(ImmutableArray<RenameLocation> strings, ImmutableArray<RenameLocation> comments)> GetRenamableLocationsInStringsAndCommentsAsync(
Serialization\SerializableSourceText.cs (1)
234public 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\0bf6ba47805c8821\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\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\0bf6ba47805c8821\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\5f6f2f95b47c3dc6\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\7a47995420f988d7\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\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\ce787ef1f541c32a\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\ce8c1e82c1124a2b\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\f53a47129f87bc30\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\f53a47129f87bc30\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\roslyn\src\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerPathResolver.cs (3)
61private ConcurrentDictionary<string, Task<string>> CopyMap { get; } = new(AnalyzerAssemblyLoader.OriginalPathComparer); 227if (CopyMap.TryGetValue(originalFilePath, out var copyTask)) 234var task = CopyMap.GetOrAdd(originalFilePath, tcs.Task);
src\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (1)
133Task<ISymbol?> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken);
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (2)
28public sealed override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 71async Task<Solution> ProcessLinkedDocumentMapAsync()
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
30public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 37public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 44public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 51public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 58public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 65public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 72public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 79public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 86public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
178public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 184public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 219public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
94public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (1)
269public Task<ISymbol?> GetInterceptorSymbolAsync(Document document, int position, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 294private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\SemanticDocument.cs (1)
18public static new async Task<SemanticDocument> CreateAsync(Document document, CancellationToken cancellationToken)
TaskList\ITaskListService.cs (1)
18Task<ImmutableArray<TaskListItem>> GetTaskListItemsAsync(Document document, ImmutableArray<TaskListItemDescriptor> descriptors, CancellationToken cancellationToken);
TemporaryStorage\TemporaryStorageService.cs (3)
109async Task<ITemporaryStorageTextHandle> ITemporaryStorageServiceInternal.WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 138public async Task<TemporaryStorageTextHandle> WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 277public async Task<SourceText> ReadFromTemporaryStorageAsync(CancellationToken cancellationToken)
TemporaryStorage\TrivialTemporaryStorageService.cs (2)
35public async Task<ITemporaryStorageTextHandle> WriteToTemporaryStorageAsync(SourceText text, CancellationToken cancellationToken) 77public async 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\DocumentExcerptHelper.cs (1)
26public static async Task<ExcerptResult?> TryExcerptAsync(Document document, TextSpan span, ExcerptMode mode, ClassificationOptions classificationOptions, CancellationToken cancellationToken)
Workspace\Host\DocumentService\IDocumentExcerptService.cs (1)
23Task<ExcerptResult?> TryExcerptAsync(Document document, TextSpan span, ExcerptMode mode, ClassificationOptions classificationOptions, CancellationToken cancellationToken);
Workspace\Host\DocumentService\IRazorSourceGeneratedDocumentExcerptService.cs (1)
14Task<ExcerptResult?> TryExcerptAsync(SourceGeneratedDocument document, TextSpan span, ExcerptMode mode, ClassificationOptions classificationOptions, CancellationToken cancellationToken);
Workspace\Host\DocumentService\IRazorSourceGeneratedDocumentSpanMappingService.cs (2)
14Task<ImmutableArray<MappedTextChange>> GetMappedTextChangesAsync(SourceGeneratedDocument oldDocument, SourceGeneratedDocument newDocument, CancellationToken cancellationToken); 16Task<ImmutableArray<MappedSpanResult>> MapSpansAsync(SourceGeneratedDocument document, ImmutableArray<TextSpan> spans, CancellationToken cancellationToken);
Workspace\Host\DocumentService\ISourceGeneratedDocumentExcerptService.cs (1)
16Task<ExcerptResult?> TryExcerptAsync(SourceGeneratedDocument 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 async Task<bool> ChecksumMatchesAsync(string name, Checksum checksum, CancellationToken cancellationToken) 26public async Task<bool> ChecksumMatchesAsync(Project project, string name, Checksum checksum, CancellationToken cancellationToken) 29public async Task<bool> ChecksumMatchesAsync(Document document, string name, Checksum checksum, CancellationToken cancellationToken) 32public async Task<bool> ChecksumMatchesAsync(ProjectKey project, string name, Checksum checksum, CancellationToken cancellationToken) 35public async Task<bool> ChecksumMatchesAsync(DocumentKey document, string name, Checksum checksum, CancellationToken cancellationToken) 38public async Task<Stream?> ReadStreamAsync(Document document, string name, CancellationToken cancellationToken) 41public async Task<Stream?> ReadStreamAsync(Project project, string name, CancellationToken cancellationToken) 44public async Task<Stream?> ReadStreamAsync(string name, CancellationToken cancellationToken) 47public async Task<Stream?> ReadStreamAsync(string name, Checksum? checksum, CancellationToken cancellationToken) 50public async Task<Stream?> ReadStreamAsync(Project project, string name, Checksum? checksum, CancellationToken cancellationToken) 53public async Task<Stream?> ReadStreamAsync(Document document, string name, Checksum? checksum, CancellationToken cancellationToken) 56public async Task<Stream?> ReadStreamAsync(ProjectKey project, string name, Checksum? checksum, CancellationToken cancellationToken) 59public async Task<Stream?> ReadStreamAsync(DocumentKey document, string name, Checksum? checksum, CancellationToken cancellationToken) 62public async Task<bool> WriteStreamAsync(Document document, string name, Stream stream, CancellationToken cancellationToken) 65public async Task<bool> WriteStreamAsync(Project project, string name, Stream stream, CancellationToken cancellationToken) 68public async Task<bool> WriteStreamAsync(string name, Stream stream, CancellationToken cancellationToken) 71public async Task<bool> WriteStreamAsync(string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 74public async Task<bool> WriteStreamAsync(Project project, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 77public async Task<bool> WriteStreamAsync(Document document, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 80public async Task<bool> WriteStreamAsync(ProjectKey projectKey, string name, Stream stream, Checksum? checksum, CancellationToken cancellationToken) 83public async Task<bool> WriteStreamAsync(DocumentKey documentKey, string name, Stream stream, Checksum? checksum, 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 async Task<Stream> ReadStreamAsync(CancellationToken cancellationToken = default) 95public async 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)
499public override async Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken)
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
248var isFullyLoadedTask = workspaceStatusService.IsFullyLoadedAsync(CancellationToken.None);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
106public async Task<ProjectSystemProject> CreateAndAddToWorkspaceAsync(string projectSystemName, string language, ProjectSystemProjectCreationInfo creationInfo, ProjectSystemHostInfo hostInfo, CancellationToken cancellationToken = default)
Workspace\Solution\AnalyzerConfigDocumentState.cs (1)
82public Task<AnalyzerConfig> GetAnalyzerConfigAsync(CancellationToken cancellationToken)
Workspace\Solution\ConstantTextAndVersionSource.cs (1)
30public async 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 async 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_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\DocumentState.cs (2)
127private static async Task<TreeAndVersion> FullyParseTreeAsync( 190private static async Task<TreeAndVersion> IncrementallyParseTreeAsync(
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( 468private Task<bool> ContainsSymbolsAsync( 478private Task<bool> ContainsDeclarationAsync( 488private async Task<bool> ContainsAsync(Func<Document, Task<bool>> predicateAsync) 525public Task<Compilation?> GetCompilationAsync(CancellationToken cancellationToken = default) 532internal Task<bool> HasSuccessfullyLoadedAsync(CancellationToken cancellationToken) 556public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken = default) 562public Task<VersionStamp> GetDependentVersionAsync(CancellationToken cancellationToken = default) 569public Task<VersionStamp> GetDependentSemanticVersionAsync(CancellationToken cancellationToken = default) 576public Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\ProjectState_Checksum.cs (2)
21public Task<ProjectStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 38private async Task<ProjectStateChecksums> ComputeChecksumsAsync(CancellationToken cancellationToken)
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) 600public Task<VersionStamp> GetLatestDocumentVersionAsync(CancellationToken cancellationToken) 603public async Task<VersionStamp> GetSemanticVersionAsync(CancellationToken cancellationToken = default)
Workspace\Solution\Solution.cs (2)
1540internal Task<Solution> WithFrozenPartialCompilationsAsync(CancellationToken cancellationToken) 1604internal async Task<Solution> WithMergedLinkedFileChangesAsync(
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)
114public async Task<bool> HasSourceGeneratorsAsync(ProjectId projectId, CancellationToken cancellationToken) 120public async Task<SourceGeneratorPresence> GetProjectGeneratorPresenceAsync(ProjectId projectId, CancellationToken cancellationToken) 144static async Task<SourceGeneratorPresence> ComputeHasSourceGeneratorsAsync(
Workspace\Solution\SolutionCompilationState.cs (7)
1192public Task<VersionStamp> GetDependentVersionAsync(ProjectId projectId, CancellationToken cancellationToken) 1195public Task<VersionStamp> GetDependentSemanticVersionAsync(ProjectId projectId, CancellationToken cancellationToken) 1214private Task<Compilation?> GetCompilationAsync(ProjectId projectId, CancellationToken cancellationToken) 1227public Task<Compilation?> GetCompilationAsync(ProjectState project, CancellationToken cancellationToken) 1237public Task<bool> HasSuccessfullyLoadedAsync(ProjectState project, CancellationToken cancellationToken) 1297private async Task<MetadataReference?> GetMetadataReferenceAsync( 1342public Task<MetadataReference?> GetMetadataReferenceAsync(
Workspace\Solution\SolutionCompilationState.GeneratorDriverInitializationCache.cs (1)
33public async Task<GeneratorDriver> CreateAndRunGeneratorDriverAsync(
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_Generators.cs (4)
29private async Task<(Compilation compilationWithGeneratedFiles, CompilationTrackerGeneratorInfo nextGeneratorInfo)> AddExistingOrComputeNewGeneratorInfoAsync( 95private async Task<bool> HasRequiredGeneratorsAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken) 101private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments)?> TryComputeNewGeneratorInfoInRemoteProcessAsync( 271private async Task<(Compilation compilationWithGeneratedFiles, TextDocumentStates<SourceGeneratedDocumentState> generatedDocuments, GeneratorDriver? generatorDriver)> ComputeNewGeneratorInfoInCurrentProcessAsync(
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (15)
216public async 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) 679public Task<bool> HasSuccessfullyLoadedAsync( 687private async Task<bool> HasSuccessfullyLoadedSlowAsync( 929public Task<MetadataReference?> GetOrBuildSkeletonReferenceAsync(SolutionCompilationState compilationState, MetadataReferenceProperties properties, CancellationToken cancellationToken) 1030public Task<VersionStamp> GetDependentVersionAsync( 1047private async Task<VersionStamp> ComputeDependentVersionAsync( 1069public Task<VersionStamp> GetDependentSemanticVersionAsync( 1086private async Task<VersionStamp> ComputeDependentSemanticVersionAsync(
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_Actions.cs (11)
31public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 85public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 120public override async 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 async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 265public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 288public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 319public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken) 339public override async Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken)
Workspace\Solution\SolutionCompilationState.TranslationAction.cs (1)
34public abstract 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\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_Checksum.cs (2)
21public Task<DocumentStateChecksums> GetStateChecksumsAsync(CancellationToken cancellationToken) 30private async Task<DocumentStateChecksums> ComputeChecksumsAsync(CancellationToken cancellationToken)
Workspace\Solution\TextDocumentState.cs (1)
193internal async Task<string?> GetFailedToLoadExceptionMessageAsync(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 async Task<TextAndVersion> LoadTextAndVersionAsync(LoadTextOptions options, CancellationToken cancellationToken) 226public override async 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)
585protected internal async Task<T> ScheduleTask<T>(Func<T> func, string? taskName = "Workspace.Task")
Microsoft.CodeAnalysis.Workspaces.MSBuild (45)
MSBuild\BuildHostProcessManager.cs (5)
60public async Task<RemoteBuildHost> GetBuildHostWithFallbackAsync(string projectFilePath, CancellationToken cancellationToken) 70public async Task<(RemoteBuildHost buildHost, BuildHostProcessKind actualKind)> GetBuildHostWithFallbackAsync(BuildHostProcessKind buildHostKind, string projectOrSolutionFilePath, CancellationToken cancellationToken) 96public Task<RemoteBuildHost> GetBuildHostAsync(BuildHostProcessKind buildHostKind, CancellationToken cancellationToken) 101public async Task<RemoteBuildHost> GetBuildHostAsync(BuildHostProcessKind buildHostKind, string? projectOrSolutionFilePath, string? dotnetPath, CancellationToken cancellationToken) 116async Task<BuildHostProcess> NoLock_GetBuildHostAsync(BuildHostProcessKind buildHostKind, string? projectOrSolutionFilePath, string? dotnetPath, CancellationToken cancellationToken)
MSBuild\BuildHostProjectFileInfoProvider.cs (2)
22public async Task<ImmutableArray<ProjectFileInfo>> LoadProjectFileInfosAsync(string projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken) 86public async Task<ImmutableArray<string>> GetProjectOutputPathsAsync(string projectPath, CancellationToken cancellationToken)
MSBuild\FileBasedProgramsProjectLoader.cs (1)
21public static async Task<RemoteProjectFile> LoadFileBasedAppProjectAsync(
MSBuild\IProjectFileInfoProvider.cs (2)
13Task<ImmutableArray<ProjectFileInfo>> LoadProjectFileInfosAsync(string projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken); 14Task<ImmutableArray<string>> GetProjectOutputPathsAsync(string projectPath, CancellationToken cancellationToken);
MSBuild\MSBuildProjectLoader.cs (4)
158public async Task<SolutionInfo> LoadSolutionInfoAsync( 217public Task<ImmutableArray<ProjectInfo>> LoadProjectInfoAsync( 249private async Task<ImmutableArray<ProjectInfo>> LoadInfoAsync( 289internal Task<ImmutableArray<ProjectInfo>> LoadInfosAsync(
MSBuild\MSBuildProjectLoader.Worker_ResolveReferences.cs (4)
187private async Task<ResolvedReferences> ResolveReferencesAsync(ProjectId id, ProjectFileInfo projectFileInfo, IEnumerable<MetadataReference> resolvedMetadataReferences, CancellationToken cancellationToken) 267private async Task<bool> TryLoadAndAddReferenceAsync(ProjectId id, string projectReferencePath, ImmutableArray<string> aliases, ResolvedReferencesBuilder builder, CancellationToken cancellationToken) 340private async Task<bool> VerifyUnloadableProjectOutputExistsAsync(string projectPath, ResolvedReferencesBuilder builder, CancellationToken cancellationToken) 346private async Task<bool> VerifyProjectOutputExistsAsync(string projectPath, ResolvedReferencesBuilder builder, CancellationToken cancellationToken)
MSBuild\MSBuildProjectLoader.Worker.cs (3)
96public async Task<ImmutableArray<ProjectInfo>> LoadAsync(CancellationToken cancellationToken) 133private async Task<ImmutableArray<ProjectInfo>> LoadProjectInfosFromPathAsync( 188private async Task<ProjectInfo> CreateProjectInfoAsync(ProjectFileInfo projectFileInfo, ProjectId projectId, bool addDiscriminator, CancellationToken cancellationToken)
MSBuild\MSBuildWorkspace.cs (4)
184public Task<Solution> OpenSolutionAsync( 200public async Task<Solution> OpenSolutionAsync( 226public Task<Project> OpenProjectAsync( 247public async Task<Project> OpenProjectAsync(
MSBuild\ProjectLoadProgressExtensions.cs (2)
15public async Task<TResult> DoOperationAndReportProgressAsync<TResult>(ProjectLoadOperation operation, string? projectPath, string? targetFramework, Func<Task<TResult>> doFunc)
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 (6)
32public Task<MSBuildLocation?> FindBestMSBuildAsync(string projectOrSolutionFilePath, CancellationToken cancellationToken) 41public Task<bool> HasUsableMSBuildAsync(string projectOrSolutionFilePath, CancellationToken cancellationToken) 48public async Task<RemoteProjectFile> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 61public async Task<RemoteProjectFile> LoadProjectAsync(string projectFilePath, string? physicalFilePath, string projectContent, string languageName, IDictionary<string, string>? globalProperties, CancellationToken cancellationToken) 68public async Task<RemoteProjectInstance> LoadProjectInstanceAsync(string projectFilePath, string projectContent, IDictionary<string, string>? additionalGlobalProperties, CancellationToken cancellationToken) 75public Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken)
Rpc\RemoteProjectFile.cs (2)
24public async Task<ImmutableArray<DiagnosticLogItem>> GetDiagnosticLogItemsAsync(CancellationToken cancellationToken) 30public async Task<ImmutableArray<ProjectFileInfo>> GetProjectFileInfosAsync(CancellationToken cancellationToken)
Rpc\RemoteProjectInstance.cs (4)
24public async Task<ImmutableArray<DiagnosticLogItem>> GetDiagnosticLogItemsAsync(CancellationToken cancellationToken) 30public async Task<ImmutableArray<ImmutableArray<string>>> GetItemMetadataValuesAsync(string itemType, string[] metadataNames, CancellationToken cancellationToken) 36public Task<string> GetPropertyValueAsync(string propertyName, CancellationToken cancellationToken) 39public Task<string> ExpandStringAsync(string value, CancellationToken cancellationToken)
Rpc\RpcClient.cs (3)
128public async Task<T?> InvokeNullableAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : class 134public async Task<T> InvokeAsync<T>(int targetObject, string methodName, List<object?> parameters, CancellationToken cancellationToken) where T : notnull 141private async Task<object?> InvokeCoreAsync(int targetObject, string methodName, List<object?> parameters, Type? expectedReturnType, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (16)
AbstractBuildHost.cs (3)
137public Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 162private async Task<int> LoadProjectFileCoreAsync(string projectFilePath, string languageName, CancellationToken cancellationToken) 215public Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken)
Build\ProjectBuildManager.cs (6)
120public async Task<(MSB.Evaluation.Project? project, DiagnosticLog log)> LoadProjectAsync( 241public async Task<string?> TryGetOutputFilePathAsync( 263public async Task<MSB.Execution.ProjectInstance[]> BuildProjectInstancesAsync( 309private Task<MSB.Execution.ProjectInstance> BuildProjectInstanceAsync( 318private async Task<MSB.Execution.ProjectInstance> BuildProjectInstanceAsync( 365private async Task<MSB.Execution.BuildResult> BuildAsync(MSB.Execution.BuildRequestData requestData, DiagnosticLog log, CancellationToken cancellationToken)
MSBuild\ProjectFile\ProjectFile.cs (1)
45public async Task<ProjectFileInfo[]> GetProjectFileInfosAsync(CancellationToken cancellationToken)
Program.cs (1)
15internal static async Task<int> Main(string[] args)
Rpc\RpcMethodInvoker.cs (1)
46public static async Task<object?> GetTaskResultAsync(Task task, MethodInfo calledMethod)
src\roslyn\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)
Microsoft.CodeAnalysis.Workspaces.MSBuild.Contracts (4)
IBuildHost.cs (2)
40Task<int> LoadProjectFileAsync(string projectFilePath, string languageName, CancellationToken cancellationToken); 59Task<string?> TryGetProjectOutputPathAsync(string projectFilePath, CancellationToken cancellationToken);
IProjectFile.cs (1)
17Task<ProjectFileInfo[]> GetProjectFileInfosAsync(CancellationToken cancellationToken);
TextReaderExtensions.cs (1)
17public static async Task<string?> TryReadLineOrReturnNullIfCancelledAsync(this TextReader streamReader, 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.Deployment.DotNet.Releases (11)
Product.cs (5)
145public Task<ReadOnlyCollection<ProductRelease>> GetReleasesAsync() => 181public async Task<ReadOnlyCollection<ProductRelease>> GetReleasesAsync(string path, bool downloadLatest) 196public async Task<ReadOnlyCollection<ProductRelease>> GetReleasesAsync(Uri address) 224public static async Task<ReadOnlyCollection<ProductRelease>> GetReleasesAsync(string path) 231private static async Task<ReadOnlyCollection<ProductRelease>> GetReleasesAsync(Stream stream, Product product)
ProductCollection.cs (5)
44public static async Task<ProductCollection> GetAsync() 54public static async Task<ProductCollection> GetAsync(string releasesIndexUri) 74public static async Task<ProductCollection> GetAsync(Uri releasesIndexUrl) 99public static async Task<ProductCollection> GetFromFileAsync(string path, bool downloadLatest) 108private static async Task<ProductCollection> GetAsync(Stream stream)
Utils.cs (1)
28internal static async Task<bool> IsLatestFileAsync(string fileName, Uri address)
Microsoft.Diagnostics.NETCore.Client (59)
DiagnosticsClient\DiagnosticsClient.cs (7)
115public Task<EventPipeSession> StartEventPipeSessionAsync(IEnumerable<EventPipeProvider> providers, bool requestRundown, 132public Task<EventPipeSession> StartEventPipeSessionAsync(EventPipeProvider provider, bool requestRundown, 147public Task<EventPipeSession> StartEventPipeSessionAsync(EventPipeSessionConfiguration configuration, CancellationToken token) 325internal async Task<Dictionary<string, string>> GetProcessEnvironmentAsync(CancellationToken token) 557internal async Task<ProcessInfo> GetProcessInfoAsync(CancellationToken token) 585private async Task<ProcessInfo> TryGetProcessInfo2Async(CancellationToken token) 599private async Task<ProcessInfo> TryGetProcessInfo3Async(CancellationToken token)
DiagnosticsClient\DiagnosticsClientConnector.cs (1)
54public static async Task<DiagnosticsClientConnector> FromDiagnosticPort(string diagnosticPort, CancellationToken ct)
DiagnosticsClient\EventPipeSession.cs (1)
49internal static async Task<EventPipeSession> StartAsync(IpcEndpoint endpoint, EventPipeSessionConfiguration config, CancellationToken cancellationToken)
DiagnosticsIpc\IpcAdvertise.cs (1)
42public static async Task<IpcAdvertise> ParseAsync(Stream stream, CancellationToken token)
DiagnosticsIpc\IpcClient.cs (3)
61public static async Task<IpcMessage> SendMessageAsync(IpcEndpoint endpoint, IpcMessage message, CancellationToken cancellationToken) 74public static async Task<IpcResponse> SendMessageGetContinuationAsync(IpcEndpoint endpoint, IpcMessage message, CancellationToken cancellationToken) 110private static Task<IpcMessage> ReadAsync(Stream stream, CancellationToken cancellationToken)
DiagnosticsIpc\IpcHeader.cs (1)
67public static async Task<IpcHeader> ParseAsync(Stream stream, CancellationToken cancellationToken)
DiagnosticsIpc\IpcMessage.cs (1)
123public static async Task<IpcMessage> ParseAsync(Stream stream, CancellationToken cancellationToken)
DiagnosticsIpc\IpcServerTransport.cs (3)
62public abstract Task<Stream> AcceptAsync(CancellationToken token); 123public override async Task<Stream> AcceptAsync(CancellationToken token) 195public override async Task<Stream> AcceptAsync(CancellationToken token)
DiagnosticsIpc\IpcSocket.cs (1)
27public async Task<Socket> AcceptAsync(CancellationToken token)
DiagnosticsIpc\IpcTransport.cs (5)
38public abstract Task<Stream> ConnectAsync(CancellationToken token); 100public static async Task<Stream> ConnectAsync(IpcEndpointConfig config, CancellationToken token) 160public override Task<Stream> ConnectAsync(CancellationToken token) 210public override async Task<Stream> ConnectAsync(CancellationToken token) 282public override async Task<Stream> ConnectAsync(CancellationToken token)
DiagnosticsIpc\IpcWebSocketServerTransport.cs (1)
21public override async Task<Stream> AcceptAsync(CancellationToken token)
DiagnosticsIpc\ProcessEnvironment.cs (1)
35public async Task<Dictionary<string, string>> ReadEnvironmentAsync(Stream continuation, CancellationToken token = default(CancellationToken))
DiagnosticsServerRouter\DiagnosticsServerRouterFactory.cs (21)
61public virtual Task<Router> CreateRouterAsync(CancellationToken token) 214protected abstract Task<IpcEndpointInfo> AcceptAsyncImpl(CancellationToken token); 220public async Task<Stream> AcceptNetStreamAsync(CancellationToken token) 328protected override Task<IpcEndpointInfo> AcceptAsyncImpl(CancellationToken token) => _tcpServer.AcceptAsync(token); 386protected override Task<IpcEndpointInfo> AcceptAsyncImpl(CancellationToken token) => _webSocketServer.AcceptAsync(token); 436public virtual async Task<Stream> ConnectTcpStreamAsync(CancellationToken token) 441public virtual async Task<Stream> ConnectTcpStreamAsync(CancellationToken token, bool retry) 454private async Task<Stream> ConnectTcpStreamAsyncInternal(CancellationToken token, bool retry) 575public async Task<Stream> AcceptIpcStreamAsync(CancellationToken token) 635public async Task<Stream> ConnectIpcStreamAsync(CancellationToken token) 783public override async Task<Router> CreateRouterAsync(CancellationToken token) 795using Task<Stream> netServerStreamTask = _netServerRouterFactory.AcceptNetStreamAsync(cancelRouter.Token); 798using Task<Stream> ipcServerStreamTask = _ipcServerRouterFactory.AcceptIpcStreamAsync(cancelRouter.Token); 977public override async Task<Router> CreateRouterAsync(CancellationToken token) 992using Task<Stream> tcpClientStreamTask = _tcpClientRouterFactory.ConnectTcpStreamAsync(cancelRouter.Token); 1111public override async Task<Router> CreateRouterAsync(CancellationToken token) 1126using Task<Stream> ipcClientStreamTask = _ipcClientRouterFactory.ConnectIpcStreamAsync(cancelRouter.Token); 1251public override async Task<Router> CreateRouterAsync(CancellationToken token) 1271using Task<Stream> ipcClientStreamTask = _ipcClientRouterFactory.ConnectIpcStreamAsync(cancelRouter.Token); 1347private async Task<int> InitFrontendReadBackendWrite(Stream ipcClientStream, Stream tcpClientStream, CancellationToken token) 1352using Task<int> readTask = ipcClientStream.ReadAsync(buffer, 0, buffer.Length, cancelReadConnect.Token);
DiagnosticsServerRouter\DiagnosticsServerRouterRunner.cs (6)
24public static async Task<int> runIpcClientTcpServerRouter(CancellationToken token, string ipcClient, string tcpServer, int runtimeTimeoutMs, NetServerRouterFactory.CreateInstanceDelegate tcpServerRouterFactory, ILogger logger, ICallbacks callbacks) 29public static async Task<int> runIpcServerTcpServerRouter(CancellationToken token, string ipcServer, string tcpServer, int runtimeTimeoutMs, NetServerRouterFactory.CreateInstanceDelegate tcpServerRouterFactory, ILogger logger, ICallbacks callbacks) 34public static async Task<int> runIpcServerTcpClientRouter(CancellationToken token, string ipcServer, string tcpClient, int runtimeTimeoutMs, TcpClientRouterFactory.CreateInstanceDelegate tcpClientRouterFactory, ILogger logger, ICallbacks callbacks) 39public static async Task<int> runIpcClientTcpClientRouter(CancellationToken token, string ipcClient, string tcpClient, int runtimeTimeoutMs, TcpClientRouterFactory.CreateInstanceDelegate tcpClientRouterFactory, ILogger logger, ICallbacks callbacks) 58private static async Task<int> runRouter(CancellationToken token, DiagnosticsServerRouterFactory routerFactory, ICallbacks callbacks) 73Task<Router> routerTask = null;
HandleableCollection.cs (2)
165public Task<T> HandleAsync(CancellationToken token) => HandleAsync(DefaultHandler, token); 174public async Task<T> HandleAsync(Handler handler, CancellationToken token)
ReversedServer\ReversedDiagnosticsServer.cs (2)
200public Task<IpcEndpointInfo> AcceptAsync(CancellationToken token) 337internal Task<Stream> ConnectAsync(Guid runtimeInstanceCookie, CancellationToken token)
StreamExtensions.cs (1)
12public static async Task<byte[]> ReadBytesAsync(this Stream stream, int length, CancellationToken cancellationToken)
WebSocketServer\IWebSocketServer.cs (1)
14public Task<Stream> AcceptConnection(CancellationToken cancellationToken);
Microsoft.DotNet.Arcade.Sdk (2)
src\DownloadFile.cs (2)
110private async Tasks.Task<bool> DownloadFromUriAsync(string uri) { 172private async Tasks.Task<bool> DownloadWithRetriesAsync(HttpClient httpClient, string uri)
Microsoft.DotNet.Cli.Telemetry (2)
Implementation\HttpTelemetryUploadTransport.cs (1)
44public async Task<TelemetryUploadResult> TryUploadAsync(byte[] payload, CancellationToken cancellationToken)
Implementation\ITelemetryUploadTransport.cs (1)
17Task<TelemetryUploadResult> TryUploadAsync(byte[] payload, CancellationToken cancellationToken);
Microsoft.DotNet.Cli.Utils (9)
ExponentialRetry.cs (6)
33public static async Task<T> ExecuteAsyncWithRetry<T>(Func<Task<T>> action, 61public static async Task<T> ExecuteWithRetry<T>(Func<T> action, 67Func<Task<T>> asyncAction = () => Task.FromResult(action()); 71public static async Task<T> ExecuteWithRetryOnFailure<T>(Func<Task<T>> action,
Extensions\LockFileFormatExtensions.cs (2)
11public static async Task<LockFile> ReadWithLock(this LockFileFormat subject, string path) 25var lockFile = FileAccessRetrier.RetryOnFileAccessFailure(() => subject.Read(path), LocalizableStrings.CouldNotAccessAssetsFile);
FileAccessRetrier.cs (1)
8public static async Task<T> RetryOnFileAccessFailure<T>(
Microsoft.DotNet.HotReload.Utils.Generator (8)
BaselineProject.cs (3)
22public static async Task<BaselineProject> Make (Config config, EnC.EditAndContinueCapabilities capabilities, CancellationToken ct = default) { 27static async Task<(HotReloadService, Solution, ProjectId)> PrepareMSBuildProject (Config config, EnC.EditAndContinueCapabilities capabilities, CancellationToken ct = default) 59public async Task<BaselineArtifacts> PrepareBaseline (CancellationToken ct = default) {
DeltaProject.cs (1)
58public async Task<DeltaProject> BuildDelta (Delta delta, bool ignoreUnchanged = false,
Runner.cs (1)
53private async Task<BaselineArtifacts> SetupBaseline (EnC.EditAndContinueCapabilities capabilities, CancellationToken ct = default) {
Util\FSWGen.cs (3)
60var completion = _channel!.Reader.Completion.ContinueWith((t) => WhenAnyResult.Completion); 62var readOne = _channel!.Reader.ReadAsync(cancellationToken).AsTask(); 63Task<WhenAnyResult> t = await Task.WhenAny(completion, readOne.ContinueWith((t) => WhenAnyResult.Read)).ConfigureAwait(false);
Microsoft.DotNet.HotReload.Utils.Generator.Frontend (1)
Frontend.cs (1)
22static async Task<int> RunWithExitStatus(Microsoft.DotNet.HotReload.Utils.Generator.Config config)
Microsoft.DotNet.HotReload.Utils.Generator.Tasks (1)
HotReloadDeltaGeneratorComputeScriptOutputs.cs (1)
130public static async Task<Script.Json.Script?> Parse(string scriptPath, CancellationToken ct = default)
Microsoft.DotNet.HotReload.Watch (49)
Build\ProjectBuildManager.cs (2)
34public async Task<ImmutableArray<BuildResult<T>>> BuildAsync<T>( 60var buildTasks = new List<Task<BuildResult?>>(buildRequests.Length);
FileWatcher\FileWatcher.cs (2)
170public async Task<ChangedFile?> WaitForFileChangeAsync(IReadOnlyDictionary<string, FileItem> fileSet, Action? startedWatching, CancellationToken cancellationToken) 180public async Task<ChangedPath?> WaitForFileChangeAsync(Predicate<ChangedPath> acceptChange, Action? startedWatching, CancellationToken cancellationToken)
HotReload\HotReloadDotNetWatcher.cs (6)
340async Task<ImmutableArray<ChangedFile>> CaptureChangedFilesSnapshot(IReadOnlyList<string> rebuiltProjects) 528private async Task<bool> RestartPrompt(IEnumerable<string> projectNames, IRuntimeProcessLauncher? runtimeProcessLauncher, CancellationToken cancellationToken) 983internal async Task<BuildProjectsResult> BuildProjectsAsync( 1128async Task<bool> BuildAsync(BuildAction action, string? targetFramework, DeviceInfo? device = null) 1197private async Task<DeviceInfo?> TrySelectDeviceAsync( 1252private async Task<bool> BuildFileOrProjectOrSolutionAsync(string path, string? targetFramework, DeviceInfo? device, BuildAction action, CancellationToken cancellationToken)
HotReload\ManagedCodeWorkspace.cs (1)
85public async Task<Solution> UpdateProjectGraphAsync(ProjectGraph projectGraph, CancellationToken cancellationToken)
HotReload\ProjectUpdatesBuilder.cs (1)
224Func<IEnumerable<string>, CancellationToken, Task<bool>> restartPrompt,
HotReload\RunningProjectsManager.cs (3)
51public async Task<RunningProject?> TrackRunningProjectAsync( 103var processTask = processRunner.RunAsync(processSpec, clientLogger, launchResult, processTerminationSource.Token); 317var staticAssetApplyTaskProducers = new List<Task<Task>>();
Process\ProcessRunner.cs (1)
42public virtual async Task<int> RunAsync(ProcessSpec processSpec, ILogger logger, ProcessLaunchResult? launchResult, CancellationToken processTerminationToken)
Process\RunningProcess.cs (2)
8Task<int> task, 20public Task<int> Task => task;
src\sdk\src\Dotnet.Watch\AspireService\Helpers\HttpContextExtensions.cs (1)
45public static async Task<ProjectLaunchRequest?> GetProjectLaunchInformationAsync(this HttpContext context, CancellationToken cancelToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\DefaultHotReloadClient.cs (12)
22private Task<ImmutableArray<string>>? _capabilitiesTask; 45async Task<ImmutableArray<string>> ConnectAsync() 138private Task<ImmutableArray<string>> GetCapabilitiesTask() 161public override Task<ImmutableArray<string>> GetUpdateCapabilitiesAsync(CancellationToken cancellationToken) 167public async override Task<Task<bool>> ApplyManagedCodeUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken) 187var updateCompletionTask = QueueUpdateBatchRequest(request, applyOperationCancellationToken); 191async Task<bool> CompleteApplyOperationAsync() 213public override async Task<Task<bool>> ApplyStaticAssetUpdatesAsync(ImmutableArray<HotReloadStaticAssetUpdate> updates, CancellationToken processExitedCancellationToken, CancellationToken cancellationToken) 241async Task<bool> CompleteApplyOperationAsync() 248private Task<bool> QueueUpdateBatchRequest<TRequest>(TRequest request, CancellationToken applyOperationCancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClient.cs (7)
69public abstract Task<ImmutableArray<string>> GetUpdateCapabilitiesAsync(CancellationToken cancellationToken); 76public abstract Task<Task<bool>> ApplyManagedCodeUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken); 83public abstract Task<Task<bool>> ApplyStaticAssetUpdatesAsync(ImmutableArray<HotReloadStaticAssetUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken); 111protected async Task<IReadOnlyList<HotReloadManagedCodeUpdate>> FilterApplicableUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken cancellationToken) 141protected Task<bool> QueueUpdateBatch(Func<int, ValueTask<bool>> sendAndReceive, CancellationToken applyOperationCancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\HotReloadClients.cs (2)
133public async Task<Task> ApplyManagedCodeUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken) 175public async Task<Task> ApplyStaticAssetUpdatesAsync(IEnumerable<StaticWebAsset> assets, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\Web\WebAssemblyHotReloadClient.cs (5)
93public override Task<ImmutableArray<string>> GetUpdateCapabilitiesAsync(CancellationToken cancellationToken) 96public override async Task<Task<bool>> ApplyManagedCodeUpdatesAsync(ImmutableArray<HotReloadManagedCodeUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken) 153public override Task<Task<bool>> ApplyStaticAssetUpdatesAsync(ImmutableArray<HotReloadStaticAssetUpdate> updates, CancellationToken applyOperationCancellationToken, CancellationToken cancellationToken)
src\sdk\src\Dotnet.Watch\HotReloadClient\WebSocketClientTransport.cs (1)
54public static async Task<WebSocketClientTransport> CreateAsync(WebSocketConfig config, ILogger logger, CancellationToken cancellationToken)
UI\BuildParametersSelectionPrompt.cs (2)
44protected abstract Task<string> PromptForTargetFrameworkAsync(IReadOnlyList<string> targetFrameworks, CancellationToken cancellationToken); 46protected abstract Task<DeviceInfo> PromptForDeviceAsync(IReadOnlyList<DeviceInfo> devices, CancellationToken cancellationToken);
UI\ConsoleInputReader.cs (1)
12public async Task<ConsoleKeyInfo> GetKeyAsync(string prompt, Func<ConsoleKeyInfo, bool> validateInput, CancellationToken cancellationToken)
Microsoft.Extensions.AI (51)
ChatCompletion\AnonymousDelegatingChatClient.cs (5)
21private readonly Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, Task<ChatResponse>>? _getResponseFunc; 77Func<IEnumerable<ChatMessage>, ChatOptions?, IChatClient, CancellationToken, Task<ChatResponse>>? getResponseFunc, 88public override Task<ChatResponse> GetResponseAsync( 97async Task<ChatResponse> GetResponseViaSharedAsync( 187static async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAsyncViaGetResponseAsync(Task<ChatResponse> task)
ChatCompletion\CachingChatClient.cs (4)
46public override Task<ChatResponse> GetResponseAsync( 56private async Task<ChatResponse> GetCachedResponseAsync( 160protected abstract Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken); 170protected 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)
35public static Task<ChatResponse<T>> GetResponseAsync<T>( 55public static Task<ChatResponse<T>> GetResponseAsync<T>( 74public static Task<ChatResponse<T>> GetResponseAsync<T>( 94public static Task<ChatResponse<T>> GetResponseAsync<T>( 115public static Task<ChatResponse<T>> GetResponseAsync<T>( 137public static async Task<ChatResponse<T>> GetResponseAsync<T>(
ChatCompletion\ConfigureOptionsChatClient.cs (1)
37public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\DistributedCachingChatClient.cs (2)
72protected override async Task<ChatResponse?> ReadCacheAsync(string key, CancellationToken cancellationToken) 86protected override async Task<IReadOnlyList<ChatResponseUpdate>?> ReadCacheStreamingAsync(string key, CancellationToken cancellationToken)
ChatCompletion\FunctionInvokingChatClient.cs (5)
267public override async Task<ChatResponse> GetResponseAsync( 1118private async Task<(bool ShouldTerminate, int NewConsecutiveErrorCount, IList<ChatMessage> MessagesAdded)> ProcessFunctionCallsAsync( 1247private async Task<FunctionInvocationResult> ProcessFunctionCallAsync( 1389private async Task<object?> InstrumentedInvokeFunctionAsync(FunctionInvocationContext context, CancellationToken cancellationToken) 1916private async Task<(IList<ChatMessage>? FunctionResultContentMessages, bool ShouldTerminate, int ConsecutiveErrorCount)> InvokeApprovedFunctionApprovalResponsesAsync(
ChatCompletion\ImageGeneratingChatClient.cs (3)
71public override async Task<ChatResponse> GetResponseAsync( 371public async Task<string> GenerateImageAsync( 423public async Task<string> EditImageAsync(
ChatCompletion\LoggingChatClient.cs (1)
54public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\OpenTelemetryChatClient.cs (1)
148public override async Task<ChatResponse> GetResponseAsync(
ChatCompletion\OpenTelemetryImageGenerator.cs (1)
113public async override Task<ImageGenerationResponse> GenerateAsync(
ChatCompletion\ReducingChatClient.cs (1)
32public override async Task<ChatResponse> GetResponseAsync(
ChatReduction\MessageCountingChatReducer.cs (1)
40public Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken)
ChatReduction\SummarizingChatReducer.cs (1)
74public async Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken)
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)
105public override async Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(IEnumerable<TInput> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
Image\ConfigureOptionsImageGenerator.cs (1)
39public override async Task<ImageGenerationResponse> GenerateAsync(
Image\LoggingImageGenerator.cs (1)
58public override async Task<ImageGenerationResponse> GenerateAsync(
SpeechToText\ConfigureOptionsSpeechToTextClient.cs (1)
41public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\LoggingSpeechToTextClient.cs (1)
58public override async Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\OpenTelemetrySpeechToTextClient.cs (1)
115public override async Task<SpeechToTextResponse> GetTextAsync(Stream audioSpeechStream, SpeechToTextOptions? options = null, CancellationToken cancellationToken = default)
ToolReduction\EmbeddingToolReductionStrategy.cs (1)
152public async Task<IEnumerable<AITool>> SelectToolsForRequestAsync(
ToolReduction\ToolReducingChatClient.cs (2)
41public override async Task<ChatResponse> GetResponseAsync( 60private async Task<ChatOptions?> ApplyReductionAsync(
Microsoft.Extensions.AI.Abstractions (31)
ChatCompletion\ChatClientExtensions.cs (2)
91public static Task<ChatResponse> GetResponseAsync( 111public static Task<ChatResponse> GetResponseAsync(
ChatCompletion\ChatResponseExtensions.cs (2)
164public static Task<ChatResponse> ToChatResponseAsync( 171static async Task<ChatResponse> ToChatResponseAsync(
ChatCompletion\DelegatingChatClient.cs (1)
43public virtual Task<ChatResponse> GetResponseAsync(
ChatCompletion\IChatClient.cs (1)
42Task<ChatResponse> GetResponseAsync(
ChatReduction\IChatReducer.cs (1)
19Task<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)
102public static async Task<ReadOnlyMemory<TEmbeddingElement>> GenerateVectorAsync<TInput, TEmbeddingElement>( 130public static async Task<TEmbedding> GenerateAsync<TInput, TEmbedding>( 175public static async Task<(TInput Value, TEmbedding Embedding)[]> GenerateAndZipAsync<TInput, TEmbedding>(
Embeddings\IEmbeddingGenerator{TInput,TEmbedding}.cs (1)
38Task<GeneratedEmbeddings<TEmbedding>> GenerateAsync(
Functions\AIFunctionFactory.cs (5)
766if (t == typeof(Task<>) || t == typeof(ValueTask<>) || t == typeof(IAsyncEnumerable<>)) 897/// Gets a delegate for handling the result value of a method, converting it into the <see cref="Task{FunctionResult}"/> to return from the invocation. 961if (returnType.GetGenericTypeDefinition() == typeof(Task<>)) 1078private 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)
44public virtual Task<ImageGenerationResponse> GenerateAsync(
Image\IImageGenerator.cs (1)
26Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? options = null, CancellationToken cancellationToken = default);
Image\ImageGeneratorExtensions.cs (4)
96public static Task<ImageGenerationResponse> GenerateImagesAsync( 118public static Task<ImageGenerationResponse> EditImagesAsync( 142public static Task<ImageGenerationResponse> EditImageAsync( 169public static Task<ImageGenerationResponse> EditImageAsync(
SpeechToText\DelegatingSpeechToTextClient.cs (1)
45public virtual Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\ISpeechToTextClient.cs (1)
37Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextClientExtensions.cs (1)
41public static Task<SpeechToTextResponse> GetTextAsync(
SpeechToText\SpeechToTextResponseUpdateExtensions.cs (2)
43public static Task<SpeechToTextResponse> ToSpeechToTextResponseAsync( 50static async Task<SpeechToTextResponse> ToResponseAsync(
ToolReduction\IToolReductionStrategy.cs (1)
38Task<IEnumerable<AITool>> SelectToolsForRequestAsync(
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.Evaluation (7)
Utilities\TaskExtensions.cs (6)
16this IEnumerable<Func<CancellationToken, Task<T>>> functions, 20IEnumerable<Task<T>> concurrentTasks = functions.Select(f => f(cancellationToken)); 43this IEnumerable<Task<T>> concurrentTasks, 49foreach (Task<T> task in concurrentTasks) 65var remaining = new HashSet<Task<T>>(concurrentTasks); 71var task = await Task.WhenAny(remaining).ConfigureAwait(false);
Utilities\TimingHelper.cs (1)
83Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Evaluation.Console (8)
Commands\CleanCacheCommand.cs (1)
22internal async Task<int> InvokeAsync(
Commands\CleanResultsCommand.cs (1)
22internal async Task<int> InvokeAsync(
Commands\ReportCommand.cs (1)
27internal async Task<int> InvokeAsync(
Program.cs (1)
26private static async Task<int> Main(string[] args)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
83Func<Task<TResult>> operation)
Telemetry\TelemetryExtensions.cs (1)
113Func<Task<TResult>> operation,
Telemetry\TelemetryHelper.cs (1)
142internal async Task<bool> FlushAsync(CancellationToken cancellationToken = default)
Utilities\LoggerExtensions.cs (1)
84Func<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)
83Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Evaluation.Quality (1)
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
83Func<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)
45public static async Task<CacheEntry> ReadAsync(
Storage\DiskBasedResponseCache.cs (1)
70public async Task<byte[]?> GetAsync(string key, CancellationToken cancellationToken = default)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (2)
Storage\AzureStorageResponseCache.CacheEntry.cs (1)
50public static async Task<CacheEntry> ReadAsync(
Storage\AzureStorageResponseCache.cs (1)
61public 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)
50public async Task<ChatResponse> GetResponseAsync(
src\Libraries\Microsoft.Extensions.AI.Evaluation\Utilities\TimingHelper.cs (1)
83Func<Task<TResult>> operation)
Microsoft.Extensions.AI.Integration.Tests (24)
CallCountingChatClient.cs (1)
19public override Task<ChatResponse> GetResponseAsync(
CallCountingEmbeddingGenerator.cs (1)
20public override Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(
ChatClientIntegrationTests.cs (2)
1392public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default) 1728public Task<IEnumerable<AITool>> SelectToolsForRequestAsync(
ImageGeneratingChatClientIntegrationTests.cs (2)
70protected async Task<ChatResponse> GetResponseAsync(bool useStreaming, IEnumerable<ChatMessage> messages, ChatOptions? options = null, IChatClient? chatClient = null) 413public Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? 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)
70public 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(
ToolReductionTests.cs (6)
531public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync( 573public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync( 600public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) 626public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) 646public Func<IEnumerable<ChatMessage>, ChatOptions?, CancellationToken, Task<ChatResponse>>? GetResponseAsyncCallback { get; set; } 649public Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default) =>
VerbatimHttpHandler.cs (1)
44protected 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 (16)
OpenAIAssistantsChatClient.cs (1)
71public Task<ChatResponse> GetResponseAsync(
OpenAIChatClient.cs (5)
33private static readonly Func<ChatClient, IEnumerable<OpenAI.Chat.ChatMessage>, ChatCompletionOptions, RequestOptions, Task<ClientResult<ChatCompletion>>>? 35(Func<ChatClient, IEnumerable<OpenAI.Chat.ChatMessage>, ChatCompletionOptions, RequestOptions, Task<ClientResult<ChatCompletion>>>?) 41typeof(Func<ChatClient, IEnumerable<OpenAI.Chat.ChatMessage>, ChatCompletionOptions, RequestOptions, Task<ClientResult<ChatCompletion>>>)); 85public async Task<ChatResponse> GetResponseAsync( 96var task = _completeChatAsync is not null ?
OpenAIEmbeddingGenerator.cs (5)
24private static readonly Func<EmbeddingClient, IEnumerable<string>, OpenAI.Embeddings.EmbeddingGenerationOptions, RequestOptions, Task<ClientResult<OpenAIEmbeddingCollection>>>? 26(Func<EmbeddingClient, IEnumerable<string>, OpenAI.Embeddings.EmbeddingGenerationOptions, RequestOptions, Task<ClientResult<OpenAIEmbeddingCollection>>>?) 32typeof(Func<EmbeddingClient, IEnumerable<string>, OpenAI.Embeddings.EmbeddingGenerationOptions, RequestOptions, Task<ClientResult<OpenAIEmbeddingCollection>>>)); 64public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default) 68var t = _generateEmbeddingsAsync is not null ?
OpenAIImageGenerator.cs (1)
47public async Task<ImageGenerationResponse> GenerateAsync(ImageGenerationRequest request, ImageGenerationOptions? options = null, CancellationToken cancellationToken = default)
OpenAIResponsesChatClient.cs (3)
90public async Task<ChatResponse> GetResponseAsync( 103var getTask = _responseClient.GetResponseAsync(token.ResponseId, include: null, stream: null, startingAfter: null, includeObfuscation: null, cancellationToken.ToRequestOptions(streaming: false)); 114var createTask = _responseClient.CreateResponseAsync((BinaryContent)openAIOptions, cancellationToken.ToRequestOptions(streaming: false));
OpenAISpeechToTextClient.cs (1)
58public async Task<SpeechToTextResponse> GetTextAsync(
Microsoft.Extensions.AI.OpenAI.Tests (1)
ThrowUserAgentExceptionHandler.cs (1)
13protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) =>
Microsoft.Extensions.AI.Templates.Tests (3)
test\ProjectTemplates\Infrastructure\DotNetNewCommand.cs (1)
27public override Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
93public async Task<Project> CreateProjectAsync(string templateName, string projectName, string? startupProjectRelativePath, params string[] args)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
26public virtual async Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
Microsoft.Extensions.AI.Tests (31)
ChatCompletion\DistributedCachingChatClientTest.cs (6)
150var result1 = outer.GetResponseAsync("some input"); 151var result2 = outer.GetResponseAsync("some input"); 162var result3 = outer.GetResponseAsync("some input"); 225var result1 = outer.GetResponseAsync([input]); 535var result1Assertion = ToListAsync(result1); 765private static async Task<List<T>> ToListAsync<T>(IAsyncEnumerable<T> values)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (4)
1208private static Task<List<ChatMessage>> InvokeAndAssertAsync( 1225private static async Task<List<ChatMessage>> InvokeAndAssertMultiRoundAsync( 1296private static Task<List<ChatMessage>> InvokeAndAssertStreamingAsync( 1313private static async Task<List<ChatMessage>> InvokeAndAssertStreamingMultiRoundAsync(
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
1316async Task InvokeAsync(Func<Task<List<ChatMessage>>> work) 2187private static async Task<List<ChatMessage>> InvokeAndAssertAsync( 2257private static async Task<List<ChatMessage>> InvokeAndAssertStreamingAsync(
ChatCompletion\ReducingChatClientTests.cs (1)
173public Task<IEnumerable<ChatMessage>> ReduceAsync(IEnumerable<ChatMessage> messages, CancellationToken cancellationToken)
Embeddings\DistributedCachingEmbeddingGeneratorTest.cs (3)
156var result1 = outer.GenerateAsync("abc"); 157var result2 = outer.GenerateAsync("abc"); 229var 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 (4)
214func = AIFunctionFactory.Create(Task<string> (string a) => Task.FromResult(a + " " + a)); 1269static async Task<string> FetchDataAsync() 1427typeof(Task<int>), 1440Delegate testDelegate = dynamicMethod.CreateDelegate(typeof(Func<int, Task<int>>));
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.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)
31Task<byte[]?> pendingLegacy = _backendCache!.GetAsync(key, token); 63static async Task<BufferChunk> AwaitedLegacyAsync(Task<byte[]?> pending, DefaultHybridCache @this) 69static async Task<BufferChunk> AwaitedBuffersAsync(ValueTask<bool> pending, RecyclableArrayBufferWriter<byte> writer) 135internal 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) 122public Task<CacheItem<T>> Task 129static Task<CacheItem<T>> InvalidAsync() => System.Threading.Tasks.Task.FromException<CacheItem<T>>( 138Task<CacheItem<T>> task = Task; 150Task<T> result = ImmutableTypeCache<T>.IsImmutable ? (_sharedUnwrap ??= AwaitedAsync(log, Task)) : AwaitedAsync(log, Task); 153static 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)) 169if (!_tagInvalidationTimes.TryGetValue(tag, out Task<long>? pending)) 193static async ValueTask<bool> AwaitedAsync(Task<long> pending, long timestamp) => timestamp <= await pending.ConfigureAwait(false); 200internal void DebugInvalidateTag(string tag, Task<long> pending) 235if (!_tagInvalidationTimes.TryGetValue(tag, out Task<long>? pending)) 243Task<long> timestampTask = Task.FromResult<long>(timestamp);
Microsoft.Extensions.Caching.Hybrid.Tests (31)
L2Tests.cs (1)
224Task<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)
165public Task<byte[]?> GetAsync(string key, CancellationToken token = default) 186private static async Task<T> ThrowAsync<T>(bool yield) 200private static Task<T>? ThrowIfBrokenAsync<T>(BreakType breakType) 247private 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.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.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.DataIngestion (4)
Chunkers\SemanticSimilarityChunker.cs (1)
59private async Task<List<(IngestionDocumentElement element, float distance)>> CalculateDistancesAsync(IngestionDocument documents, CancellationToken cancellationToken)
IngestionPipeline.cs (1)
173private async Task<IngestionDocument> IngestAsync(IngestionDocument document, Activity? parentActivity, CancellationToken cancellationToken)
Processors\ImageAlternativeTextEnricher.cs (1)
36public override async Task<IngestionDocument> ProcessAsync(IngestionDocument document, CancellationToken cancellationToken = default)
Writers\VectorStoreWriter.cs (1)
164private async Task<IReadOnlyList<object>> GetPreExistingChunksIdsAsync(IngestionDocument document, CancellationToken cancellationToken)
Microsoft.Extensions.DataIngestion.Abstractions (4)
IngestionDocumentProcessor.cs (1)
20public abstract Task<IngestionDocument> ProcessAsync(IngestionDocument document, CancellationToken cancellationToken = default);
IngestionDocumentReader.cs (3)
25public Task<IngestionDocument> ReadAsync(FileInfo source, CancellationToken cancellationToken = default) 40public virtual async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default) 57public abstract Task<IngestionDocument> ReadAsync(Stream source, string identifier, string mediaType, CancellationToken cancellationToken = default);
Microsoft.Extensions.DataIngestion.Markdig (3)
MarkdownReader.cs (3)
17public override async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default) 32public override async Task<IngestionDocument> ReadAsync(Stream source, string identifier, string mediaType, CancellationToken cancellationToken = default) 41private static async Task<string> ReadToEndAsync(Stream source, CancellationToken cancellationToken)
Microsoft.Extensions.DataIngestion.MarkItDown (6)
MarkItDownMcpReader.cs (3)
36public override async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default) 55public override async Task<IngestionDocument> ReadAsync(Stream source, string identifier, string mediaType, CancellationToken cancellationToken = default) 68private async Task<string> ConvertToMarkdownAsync(DataContent dataContent, CancellationToken cancellationToken)
MarkItDownReader.cs (2)
34public override async Task<IngestionDocument> ReadAsync(FileInfo source, string identifier, string? mediaType = null, CancellationToken cancellationToken = default) 97public override async Task<IngestionDocument> ReadAsync(Stream source, string identifier, string mediaType, CancellationToken cancellationToken = default)
src\Libraries\Microsoft.Extensions.DataIngestion.Markdig\MarkdownParser.cs (1)
35internal static System.Threading.Tasks.Task<string> ReadToEndAsync(this System.IO.StreamReader reader, System.Threading.CancellationToken cancellationToken)
Microsoft.Extensions.DataIngestion.Tests (11)
Readers\DocumentReaderConformanceTests.cs (2)
153protected static async Task<HttpResponseMessage> DownloadAsync(Uri uri) 179protected static async Task<FileInfo> DownloadToFileAsync(Uri uri)
Readers\MarkdownReaderTests.cs (1)
203private async Task<IngestionDocument> ReadAsync(string content)
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)
Utils\TestEmbeddingGenerator.cs (1)
23public Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<T> values, EmbeddingGenerationOptions? options = null, CancellationToken cancellationToken = default)
Utils\TestReader.cs (3)
13public TestReader(Func<Stream, string, string, CancellationToken, Task<IngestionDocument>> readAsyncCallback) 18public Func<Stream, string, string, CancellationToken, Task<IngestionDocument>> ReadAsyncCallback { get; } 20public override Task<IngestionDocument> ReadAsync(Stream source, string identifier, string mediaType, CancellationToken cancellationToken = default)
Microsoft.Extensions.DependencyInjection (1)
ServiceLookup\StackGuard.cs (1)
57Task<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.EntityFrameworkCore (4)
DbContextHealthCheck.cs (2)
11private static readonly Func<TContext, CancellationToken, Task<bool>> DefaultTestQuery = (dbContext, cancellationToken) => 28public async Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
DbContextHealthCheckOptions.cs (1)
10public Func<TContext, CancellationToken, Task<bool>>? CustomTestQuery { get; set; }
DependencyInjection\EntityFrameworkCoreHealthChecksBuilderExtensions.cs (1)
57Func<TContext, CancellationToken, Task<bool>>? customTestQuery = default)
Microsoft.Extensions.Diagnostics.HealthChecks.ResourceUtilization (5)
ResourceUtilizationHealthCheck.cs (3)
32public static Task<HealthCheckResult> EvaluateHealthStatusAsync(double cpuUsedPercentage, double memoryUsedPercentage, ResourceUtilizationHealthCheckOptions options) 157/// <returns>A <see cref="Task{HealthCheckResult}"/> that completes when the health check has finished, yielding the status of the component being checked.</returns> 158public Task<HealthCheckResult> CheckHealthAsync(HealthCheckContext context, CancellationToken cancellationToken = default)
ResourceUtilizationHealthCheck.Obsolete.cs (2)
28/// <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> ObsoleteCheckHealthAsync(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.Diagnostics.Testing.Tests (11)
Logging\FakeLogCollectorTests.LogEnumeration.cs (4)
36var awaitSequenceTask = AwaitSequence( 94var abSequenceTask = AwaitSequence( 103var abcSequenceTask = AwaitSequence( 160private static async Task<(bool wasCancelled, int index)> AwaitSequence(
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.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 (1)
Latency\Internal\HttpLatencyTelemetryHandler.cs (1)
45protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (51)
Benchmarks\HugeHttpCLientLoggingBenchmark.cs (16)
45public async Task<HttpResponseMessage> Huge_No_Log_HeadersRead() 55public async Task<HttpResponseMessage> Huge_No_Log_ContentRead() 65public async Task<HttpResponseMessage> Huge_Log_All_HeadersRead() 75public async Task<HttpResponseMessage> Huge_Log_All_ContentRead() 85public async Task<HttpResponseMessage> Huge_Log_Request_HeadersRead() 95public async Task<HttpResponseMessage> Huge_Log_Request_ContentRead() 105public async Task<HttpResponseMessage> Huge_Log_Response_HeadersRead() 115public async Task<HttpResponseMessage> Huge_Log_Response_ContentRead() 125public async Task<HttpResponseMessage> Huge_No_Log_HeadersRead_ChunkedEncoding() 135public async Task<HttpResponseMessage> Huge_No_Log_ContentRead_ChunkedEncoding() 145public async Task<HttpResponseMessage> Huge_Log_All_HeadersRead_ChunkedEncoding() 155public async Task<HttpResponseMessage> Huge_Log_All_ContentRead_ChunkedEncoding() 165public async Task<HttpResponseMessage> Huge_Log_Request_HeadersRead_ChunkedEncoding() 175public async Task<HttpResponseMessage> Huge_Log_Request_ContentRead_ChunkedEncoding() 185public async Task<HttpResponseMessage> Huge_Log_Response_HeadersRead_ChunkedEncoding() 195public async Task<HttpResponseMessage> Huge_Log_Response_ContentRead_ChunkedEncoding()
Benchmarks\MediumHttpClientLoggingBenchmark.cs (16)
45public async Task<HttpResponseMessage> Medium_No_Log_HeadersRead() 55public async Task<HttpResponseMessage> Medium_No_Log_ContentRead() 65public async Task<HttpResponseMessage> Medium_Log_All_HeadersRead() 75public async Task<HttpResponseMessage> Medium_Log_All_ContentRead() 85public async Task<HttpResponseMessage> Medium_Log_Request_HeadersRead() 95public async Task<HttpResponseMessage> Medium_Log_Request_ContentRead() 105public async Task<HttpResponseMessage> Medium_Log_Response_HeadersRead() 115public async Task<HttpResponseMessage> Medium_Log_Response_ContentRead() 125public async Task<HttpResponseMessage> Medium_No_Log_HeadersRead_ChunkedEncoding() 135public async Task<HttpResponseMessage> Medium_No_Log_ContentRead_ChunkedEncoding() 145public async Task<HttpResponseMessage> Medium_Log_All_HeadersRead_ChunkedEncoding() 155public async Task<HttpResponseMessage> Medium_Log_All_ContentRead_ChunkedEncoding() 165public async Task<HttpResponseMessage> Medium_Log_Request_HeadersRead_ChunkedEncoding() 175public async Task<HttpResponseMessage> Medium_Log_Request_ContentRead_ChunkedEncoding() 185public async Task<HttpResponseMessage> Medium_Log_Response_HeadersRead_ChunkedEncoding() 195public async Task<HttpResponseMessage> Medium_Log_Response_ContentRead_ChunkedEncoding()
Benchmarks\SmallHttpClientLoggingBenchmark.cs (16)
45public async Task<HttpResponseMessage> Small_No_Log_HeadersRead() 55public async Task<HttpResponseMessage> Small_No_Log_ContentRead() 65public async Task<HttpResponseMessage> Small_Log_All_HeadersRead() 75public async Task<HttpResponseMessage> Small_Log_All_ContentRead() 85public async Task<HttpResponseMessage> Small_Log_Request_HeadersRead() 95public async Task<HttpResponseMessage> Small_Log_Request_ContentRead() 105public async Task<HttpResponseMessage> Small_Log_Response_HeadersRead() 115public async Task<HttpResponseMessage> Small_Log_Response_ContentRead() 125public async Task<HttpResponseMessage> Small_No_Log_HeadersRead_ChunkedEncoding() 135public async Task<HttpResponseMessage> Small_No_Log_ContentRead_ChunkedEncoding() 145public async Task<HttpResponseMessage> Small_Log_All_HeadersRead_ChunkedEncoding() 155public async Task<HttpResponseMessage> Small_Log_All_ContentRead_ChunkedEncoding() 165public async Task<HttpResponseMessage> Small_Log_Request_HeadersRead_ChunkedEncoding() 175public async Task<HttpResponseMessage> Small_Log_Request_ContentRead_ChunkedEncoding() 185public async Task<HttpResponseMessage> Small_Log_Response_HeadersRead_ChunkedEncoding() 195public async Task<HttpResponseMessage> Small_Log_Response_ContentRead_ChunkedEncoding()
NoRemoteCallHandler.cs (1)
35protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
NoRemoteCallNotSeekableHandler.cs (1)
38protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
NotSeekableStream.cs (1)
32public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => _innerStream.ReadAsync(buffer, offset, count, cancellationToken);
Microsoft.Extensions.Http.Diagnostics.Tests (13)
Latency\Internal\HttpLatencyTelemetryHandlerTest.cs (1)
66mockHandler.Protected().Setup<Task<HttpResponseMessage>>(
Logging\AcceptanceTests.cs (1)
195private static async Task<string> SendRequest(HttpClient httpClient, HttpRequestMessage httpRequestMessage)
Logging\HttpClientLoggingExtensionsTest.cs (2)
499protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 509protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
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.Resilience (2)
Resilience\ResilienceHandler.cs (2)
50protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 180private 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)
456public virtual Task<TUser?> GetUserAsync(ClaimsPrincipal principal) 471public virtual Task<string> GenerateConcurrencyStampAsync(TUser user) 485public virtual async Task<IdentityResult> CreateAsync(TUser user) 502private async Task<IdentityResult> CreateCoreAsync(TUser user) 529public virtual async Task<IdentityResult> UpdateAsync(TUser user) 555public virtual async Task<IdentityResult> DeleteAsync(TUser user) 583public virtual Task<TUser?> FindByIdAsync(string userId) 596public virtual async Task<TUser?> FindByNameAsync(string userName) 635public virtual async Task<IdentityResult> CreateAsync(TUser user, string password) 709public virtual async Task<string?> GetUserNameAsync(TUser user) 722public virtual async Task<IdentityResult> SetUserNameAsync(TUser user, string? userName) 746public virtual async Task<string> GetUserIdAsync(TUser user) 761public virtual async Task<bool> CheckPasswordAsync(TUser user, string password) 783private async Task<(PasswordVerificationResult? result, bool userMissing)> CheckPasswordCoreAsync(TUser user, string password) 812public virtual Task<bool> HasPasswordAsync(TUser user) 831public virtual async Task<IdentityResult> AddPasswordAsync(TUser user, string password) 847private async Task<IdentityResult> AddPasswordCoreAsync(TUser user, string password) 878public virtual async Task<IdentityResult> ChangePasswordAsync(TUser user, string currentPassword, string newPassword) 894private async Task<IdentityResult> ChangePasswordCoreAsync(TUser user, string currentPassword, string newPassword) 921public virtual async Task<IdentityResult> RemovePasswordAsync(TUser user) 950protected virtual async Task<PasswordVerificationResult> VerifyPasswordAsync(IUserPasswordStore<TUser> store, TUser user, string password) 967public virtual async Task<string> GetSecurityStampAsync(TUser user) 992public virtual async Task<IdentityResult> UpdateSecurityStampAsync(TUser user) 1018public virtual Task<string> GeneratePasswordResetTokenAsync(TUser user) 1035public virtual async Task<IdentityResult> ResetPasswordAsync(TUser user, string token, string newPassword) 1067public virtual Task<TUser?> FindByLoginAsync(string loginProvider, string providerKey) 1087public virtual async Task<IdentityResult> RemoveLoginAsync(TUser user, string loginProvider, string providerKey) 1118public virtual async Task<IdentityResult> AddLoginAsync(TUser user, UserLoginInfo login) 1134private async Task<IdentityResult> AddLoginCoreAsync(TUser user, UserLoginInfo login) 1158public virtual async Task<IList<UserLoginInfo>> GetLoginsAsync(TUser user) 1175public virtual Task<IdentityResult> AddClaimAsync(TUser user, Claim claim) 1189public virtual async Task<IdentityResult> AddClaimsAsync(TUser user, IEnumerable<Claim> claims) 1219public virtual async Task<IdentityResult> ReplaceClaimAsync(TUser user, Claim claim, Claim newClaim) 1249public virtual Task<IdentityResult> RemoveClaimAsync(TUser user, Claim claim) 1263public virtual async Task<IdentityResult> RemoveClaimsAsync(TUser user, IEnumerable<Claim> claims) 1288/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <see cref="Claim"/>s. 1290public virtual async Task<IList<Claim>> GetClaimsAsync(TUser user) 1307public virtual async Task<IdentityResult> AddToRoleAsync(TUser user, string role) 1323private async Task<IdentityResult> AddToRoleCoreAsync(TUser user, string role) 1347public virtual async Task<IdentityResult> AddToRolesAsync(TUser user, IEnumerable<string> roles) 1363private async Task<IdentityResult> AddToRolesCoreAsync(TUser user, IEnumerable<string> roles) 1391public virtual async Task<IdentityResult> RemoveFromRoleAsync(TUser user, string role) 1438public virtual async Task<IdentityResult> RemoveFromRolesAsync(TUser user, IEnumerable<string> roles) 1454private async Task<IdentityResult> RemoveFromRolesCoreAsync(TUser user, IEnumerable<string> roles) 1478public virtual async Task<IList<string>> GetRolesAsync(TUser user) 1495public virtual async Task<bool> IsInRoleAsync(TUser user, string role) 1508public virtual async Task<string?> GetEmailAsync(TUser user) 1525public virtual async Task<IdentityResult> SetEmailAsync(TUser user, string? email) 1555public virtual async Task<TUser?> FindByEmailAsync(string email) 1607public virtual Task<string> GenerateEmailConfirmationTokenAsync(TUser user) 1622public virtual async Task<IdentityResult> ConfirmEmailAsync(TUser user, string token) 1638private async Task<IdentityResult> ConfirmEmailCoreAsync(TUser user, string token) 1661public virtual async Task<bool> IsEmailConfirmedAsync(TUser user) 1677public virtual Task<string> GenerateChangeEmailTokenAsync(TUser user, string newEmail) 1693public virtual async Task<IdentityResult> ChangeEmailAsync(TUser user, string newEmail, string token) 1707private async Task<IdentityResult> ChangeEmailCoreAsync(TUser user, string newEmail, string token, long startTimestamp) 1729public virtual async Task<string?> GetPhoneNumberAsync(TUser user) 1746public virtual async Task<IdentityResult> SetPhoneNumberAsync(TUser user, string? phoneNumber) 1778public virtual async Task<IdentityResult> ChangePhoneNumberAsync(TUser user, string phoneNumber, string token) 1794private async Task<IdentityResult> ChangePhoneNumberCoreAsync(TUser user, string phoneNumber, string token) 1819public virtual Task<bool> IsPhoneNumberConfirmedAsync(TUser user) 1835public virtual Task<string> GenerateChangePhoneNumberTokenAsync(TUser user, string phoneNumber) 1851public virtual Task<bool> VerifyChangePhoneNumberTokenAsync(TUser user, string token, string phoneNumber) 1872public virtual async Task<bool> VerifyUserTokenAsync(TUser user, string tokenProvider, string purpose, string token) 1911public virtual Task<string> GenerateUserTokenAsync(TUser user, string tokenProvider, string purpose) 1955public virtual async Task<IList<string>> GetValidTwoFactorProvidersAsync(TUser user) 1980public virtual async Task<bool> VerifyTwoFactorTokenAsync(TUser user, string tokenProvider, string token) 2017public virtual Task<string> GenerateTwoFactorTokenAsync(TUser user, string tokenProvider) 2047public virtual async Task<bool> GetTwoFactorEnabledAsync(TUser user) 2064public virtual async Task<IdentityResult> SetTwoFactorEnabledAsync(TUser user, bool enabled) 2093public virtual async Task<bool> IsLockedOutAsync(TUser user) 2115public virtual async Task<IdentityResult> SetLockoutEnabledAsync(TUser user, bool enabled) 2141public virtual async Task<bool> GetLockoutEnabledAsync(TUser user) 2155/// A <see cref="Task{TResult}"/> that represents the lookup, a <see cref="DateTimeOffset"/> containing the last time a user's lockout expired, if any. 2157public virtual async Task<DateTimeOffset?> GetLockoutEndDateAsync(TUser user) 2171public virtual async Task<IdentityResult> SetLockoutEndDateAsync(TUser user, DateTimeOffset? lockoutEnd) 2187private async Task<IdentityResult> SetLockoutEndDateCoreAsync(TUser user, DateTimeOffset? lockoutEnd) 2209public virtual async Task<IdentityResult> AccessFailedAsync(TUser user) 2242public virtual async Task<IdentityResult> ResetAccessFailedCountAsync(TUser user) 2258private async Task<IdentityResult> ResetAccessFailedCountCoreAsync(TUser user) 2278public virtual async Task<int> GetAccessFailedCountAsync(TUser user) 2291/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/>s who 2294public virtual Task<IList<TUser>> GetUsersForClaimAsync(Claim claim) 2307/// A <see cref="Task{TResult}"/> that represents the result of the asynchronous query, a list of <typeparamref name="TUser"/>s who 2310public virtual Task<IList<TUser>> GetUsersInRoleAsync(string roleName) 2326public virtual Task<string?> GetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 2345public virtual async Task<IdentityResult> SetAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName, string? tokenValue) 2374public virtual async Task<IdentityResult> RemoveAuthenticationTokenAsync(TUser user, string loginProvider, string tokenName) 2400public virtual Task<string?> GetAuthenticatorKeyAsync(TUser user) 2413public virtual async Task<IdentityResult> ResetAuthenticatorKeyAsync(TUser user) 2445public virtual async Task<IEnumerable<string>?> GenerateNewTwoFactorRecoveryCodesAsync(TUser user, int number) 2574public virtual async Task<IdentityResult> RedeemTwoFactorRecoveryCodeAsync(TUser user, string code) 2590private async Task<IdentityResult> RedeemTwoFactorRecoveryCodeCoreAsync(TUser user, string code) 2609public virtual Task<int> CountRecoveryCodesAsync(TUser user) 2624public virtual async Task<IdentityResult> AddOrUpdatePasskeyAsync(TUser user, UserPasskeyInfo passkey) 2640private async Task<IdentityResult> AddOrUpdatePasskeyCoreAsync(TUser user, UserPasskeyInfo passkey) 2658public virtual Task<IList<UserPasskeyInfo>> GetPasskeysAsync(TUser user) 2675public virtual Task<UserPasskeyInfo?> GetPasskeyAsync(TUser user, byte[] credentialId) 2692public virtual Task<TUser?> FindByPasskeyIdAsync(byte[] credentialId) 2710public virtual async Task<IdentityResult> RemovePasskeyAsync(TUser user, byte[] credentialId) 2726private async Task<IdentityResult> RemovePasskeyCoreAsync(TUser user, byte[] credentialId) 2812public virtual async Task<byte[]> CreateSecurityTokenAsync(TUser user) 2833protected virtual Task<IdentityResult> UpdatePasswordHash(TUser user, string newPassword, bool validatePassword) 2836private async Task<IdentityResult> UpdatePasswordHash(IUserPasswordStore<TUser> passwordStore, 2918protected async Task<IdentityResult> ValidateUserAsync(TUser user) 2958protected async Task<IdentityResult> ValidatePasswordAsync(TUser user, string? password) 2992protected virtual async Task<IdentityResult> UpdateUserAsync(TUser user) 3006private 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 (31)
AsyncValidateOptions.cs (18)
22public AsyncValidateOptions(string? name, Func<TOptions, CancellationToken, Task<bool>> validation, string failureMessage) 39public Func<TOptions, CancellationToken, Task<bool>> Validation { get; } 53public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 85public AsyncValidateOptions(string? name, TDep dependency, Func<TOptions, TDep, CancellationToken, Task<bool>> validation, string failureMessage) 108public Func<TOptions, TDep, CancellationToken, Task<bool>> Validation { get; } 116public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 148public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> validation, string failureMessage) 177public Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> Validation { get; } 185public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 219public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation, string failureMessage) 254public Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> Validation { get; } 262public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 298public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation, string failureMessage) 339public Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> Validation { get; } 347public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 385public AsyncValidateOptions(string? name, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5, Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> validation, string failureMessage) 432public Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> Validation { get; } 440public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default)
IAsyncValidateOptions.cs (1)
22Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default);
OptionsBuilder.cs (12)
581public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, CancellationToken, Task<bool>> validation) 590public virtual OptionsBuilder<TOptions> Validate(Func<TOptions, CancellationToken, Task<bool>> validation, string failureMessage) 604public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, CancellationToken, Task<bool>> validation) where TDep : notnull 614public virtual OptionsBuilder<TOptions> Validate<TDep>(Func<TOptions, TDep, CancellationToken, Task<bool>> validation, string failureMessage) where TDep : notnull 630public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> validation) 643public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2>(Func<TOptions, TDep1, TDep2, CancellationToken, Task<bool>> validation, string failureMessage) 666public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation) 681public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3>(Func<TOptions, TDep1, TDep2, TDep3, CancellationToken, Task<bool>> validation, string failureMessage) 707public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation) 724public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, CancellationToken, Task<bool>> validation, string failureMessage) 753public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4, TDep5>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> validation) 772public virtual OptionsBuilder<TOptions> Validate<TDep1, TDep2, TDep3, TDep4, TDep5>(Func<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5, CancellationToken, Task<bool>> validation, string failureMessage)
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.Options.DataAnnotations (2)
DataAnnotationValidateOptions.Async.cs (2)
43public async Task<ValidateOptionsResult> ValidateAsync(string? name, TOptions options, CancellationToken cancellationToken = default) 83private static async Task<(bool success, List<string>? errors)> TryValidateOptionsAsync(
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.Gen.BuildMetadata.Unit.Tests (11)
GeneratorTests.cs (1)
79private static async Task<(IReadOnlyList<Diagnostic> diagnostics, IReadOnlyList<GeneratedSourceResult> sources)> 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.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)
748private 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\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<SolutionEditor, DocumentId, CancellationToken, Task> solutionBasedFix, CancellationToken ct) 166public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
src\runtime\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)
208private static async Task<SyntaxNode> ConvertMethodDeclarationToLibraryImport( 292private 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\runtime\src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
106private static async Task<Solution> ApplyActionAndEnableUnsafe(Solution solution, DocumentId documentId, Func<SolutionEditor, DocumentId, CancellationToken, Task> solutionBasedFix, CancellationToken ct) 166public override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext)
src\runtime\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.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.McpServer.ProjectTemplates.Tests (3)
test\ProjectTemplates\Infrastructure\DotNetNewCommand.cs (1)
27public override Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
test\ProjectTemplates\Infrastructure\TemplateExecutionTestClassFixtureBase.cs (1)
93public async Task<Project> CreateProjectAsync(string templateName, string projectName, string? startupProjectRelativePath, params string[] args)
test\ProjectTemplates\Infrastructure\TestCommand.cs (1)
26public virtual async Task<TestCommandResult> ExecuteAsync(ITestOutputHelper outputHelper)
Microsoft.ML.AutoML (6)
API\BinaryClassificationExperiment.cs (1)
448public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
API\MulticlassClassificationExperiment.cs (1)
426public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
API\RegressionExperiment.cs (1)
380public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
AutoMLExperiment\AutoMLExperiment.cs (1)
214public async Task<TrialResult> RunAsync(CancellationToken ct = default)
AutoMLExperiment\Runner\ITrialRunner.cs (1)
19Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct);
AutoMLExperiment\Runner\SweepablePipelineRunner.cs (1)
94public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
Microsoft.ML.AutoML.Tests (1)
AutoMLExperimentTests.cs (1)
445public async Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
Microsoft.ML.Core (8)
Utilities\ResourceManagerUtils.cs (7)
108public async Task<ResourceDownloadResults> EnsureResourceAsync(IHostEnvironment env, IChannel ch, string relativeUrl, string fileName, string dir, int timeout) 125private async Task<string> DownloadFromUrlWithRetryAsync(IHostEnvironment env, IChannel ch, string url, string fileName, 155private async Task<string> DownloadFromUrlAsync(IHostEnvironment env, IChannel ch, string url, string fileName, int timeout, string filePath) 160var t = Task.Run(() => DownloadResource(env, ch, client, new Uri(url), filePath, fileName, downloadCancel.Token)); 163var timeoutTask = Task.Delay(timeout).ContinueWith(task => default(Exception), TaskScheduler.Default); 165var completedTask = await Task.WhenAny(t, timeoutTask); 249private async Task<Exception> DownloadResource(IHostEnvironment env, IChannel ch, HttpClient httpClient, Uri uri, string path, string fileName, CancellationToken ct)
Utilities\TaskExtensions.cs (1)
14public static TResult CompletedResult<TResult>(this Task<TResult> task)
Microsoft.ML.Core.Tests (1)
UnitTests\TestResourceDownload.cs (1)
117var t = ResourceManagerUtils.Instance.EnsureResourceAsync(env, ch, "text/Sswe/sentiment.emd", fileName, saveToDir, 1 * 60 * 1000);
Microsoft.ML.Data (2)
Commands\CrossValidationCommand.cs (2)
455public Task<FoldResult>[] GetCrossValidationTasks() 457var tasks = new Task<FoldResult>[_numFolds];
Microsoft.ML.Fairlearn (1)
Reductions\GridSearchTrialRunner.cs (1)
50public Task<TrialResult> RunAsync(TrialSettings settings, CancellationToken ct)
Microsoft.ML.GenAI.Core (1)
CausalLMPipelineChatClient.cs (1)
36public virtual Task<ChatResponse> GetResponseAsync(IEnumerable<ChatMessage> messages, ChatOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.LLaMA (4)
Llama3CausalLMChatClient.cs (1)
27public override Task<ChatResponse> GetResponseAsync(
LlamaCausalLMAgent.cs (1)
40public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
LlamaChatCompletionService.cs (1)
33public async Task<IReadOnlyList<ChatMessageContent>> GetChatMessageContentsAsync(ChatHistory chatHistory, PromptExecutionSettings? executionSettings = null, Kernel? kernel = null, CancellationToken cancellationToken = default)
LlamaTextCompletionService.cs (1)
61public Task<IReadOnlyList<TextContent>> GetTextContentsAsync(string prompt, PromptExecutionSettings? executionSettings = null, Kernel? kernel = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
44public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Phi (4)
Phi3\Phi3CausalLMAgent.cs (1)
38public Task<IMessage> GenerateReplyAsync(IEnumerable<IMessage> messages, GenerateReplyOptions? options = null, CancellationToken cancellationToken = default)
Phi3\Phi3CausalLMChatClient.cs (1)
32public override Task<ChatResponse> GetResponseAsync(
Phi3\Phi3CausalLMChatCompletionService.cs (1)
32public async Task<IReadOnlyList<ChatMessageContent>> GetChatMessageContentsAsync(
Phi3\Phi3CausalLMTextGenerationService.cs (1)
31public Task<IReadOnlyList<TextContent>> GetTextContentsAsync(string prompt, PromptExecutionSettings? executionSettings = null, Kernel? kernel = null, CancellationToken cancellationToken = default)
Microsoft.ML.GenAI.Samples (4)
Mistral_7B_Instruct_d6ecd510-9f9e-44e3-9f0f-c98eaf8ef8ed.generated.cs (2)
23public Task<string> GetWeatherWrapper(string arguments) 43ReturnType = typeof(Task<string>),
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\e4e90a0f3c9b109a\LearningRateSchedulingCifarResnetTransferLearning.cs (1)
287public static async Task<bool> Download(string url, string destDir, string destFileName)
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\ResnetV2101TransferLearningEarlyStopping.cs (1)
243public static async Task<bool> Download(string url, string destDir, string destFileName)
docs\samples\Microsoft.ML.Samples\Dynamic\Trainers\MulticlassClassification\ImageClassification\ResnetV2101TransferLearningTrainTestSplit.cs (1)
264public static async Task<bool> Download(string url, string destDir, string destFileName)
Microsoft.ML.SamplesUtils (1)
SamplesDatasetUtils.cs (1)
191private static async Task<string> Download(string baseGitPath, string dataFile)
Microsoft.ML.Sweeper (3)
AsyncSweeper.cs (3)
50Task<ParameterSetWithId> ProposeAsync(); 111public Task<ParameterSetWithId> ProposeAsync() 276public async Task<ParameterSetWithId> ProposeAsync()
Microsoft.ML.Sweeper.Tests (11)
TestSweeper.cs (11)
148var task = sweeper.ProposeAsync(); 170var task = gridSweeper.ProposeAsync(); 203var tasks = new List<Task<ParameterSetWithId>>(); 207var task = sweeper.ProposeAsync(); 221foreach (var task in tasks) 257var task = sweeper.ProposeAsync(); 268var tasks = new Task<ParameterSetWithId>[sweeps]; 275var task = sweeper.ProposeAsync(); 286var task = sweeper.ProposeAsync(); 331var r = Task.Run(() => Parallel.For(0, sweeps, options, async (int i) => 333var task = sweeper.ProposeAsync();
Microsoft.ML.TensorFlow (1)
TensorflowUtils.cs (1)
215var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(env, ch, url, fileName, dir, timeout);
Microsoft.ML.TestFramework (1)
TestCommandBase.cs (1)
999var t = new Task<int>[2];
Microsoft.ML.Tokenizers (10)
Model\BertTokenizer.cs (2)
692public static async Task<BertTokenizer> CreateAsync( 717public static async Task<BertTokenizer> CreateAsync(
Model\BPETokenizer.cs (1)
262public static async Task<BpeTokenizer> CreateAsync(
Model\TiktokenTokenizer.cs (3)
1393public static async Task<TiktokenTokenizer> CreateAsync( 1425public static async Task<TiktokenTokenizer> CreateAsync( 1490public 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.netcoreapp.cs (1)
26public static Task<Stream> GetStreamAsync(HttpClient client, string url, CancellationToken cancellationToken = default) =>
Microsoft.ML.Tokenizers.Tests (1)
src\Microsoft.ML.Tokenizers\Utils\Helpers.netcoreapp.cs (1)
26public static Task<Stream> GetStreamAsync(HttpClient client, string url, CancellationToken cancellationToken = default) =>
Microsoft.ML.TorchSharp (3)
AutoFormerV2\ObjectDetectionTrainer.cs (1)
271var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout);
Roberta\QATrainer.cs (1)
255var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, ModelUrl, destFileName, destDir, timeout);
TorchSharpBaseTrainer.cs (1)
181var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(Parent.Host, ch, modelUrl, destFileName, destDir, timeout);
Microsoft.ML.Transforms (1)
Text\WordEmbeddingsExtractor.cs (1)
634var ensureModel = ResourceManagerUtils.Instance.EnsureResourceAsync(env, ch, url, modelFileName, dir, Timeout);
Microsoft.NET.Build.Containers (66)
AmazonECRMessageHandler.cs (1)
20protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
AuthHandshakeMessageHandler.cs (5)
171private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> GetAuthenticationAsync(string registry, string scheme, AuthInfo? bearerAuthInfo, CancellationToken cancellationToken) 455private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryOAuthPostAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken) 511private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> TryTokenGetAsync(DockerCredentials privateRepoCreds, AuthInfo bearerAuthInfo, Uri realmUri, CancellationToken cancellationToken) 547private static async Task<DockerCredentials> GetLoginCredentials(string registry) 572protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
FallbackToHttpMessageHandler.cs (1)
30protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
LocalDaemons\ArchiveFileRegistry.cs (1)
69public Task<bool> IsAvailableAsync(CancellationToken cancellationToken) => Task.FromResult(true);
LocalDaemons\ContainerRuntime.cs (5)
60Func<string, string, CancellationToken, Task<bool>> tryRunCommand, 105public async Task<bool> IsAvailableAsync(CancellationToken cancellationToken) 170Task<bool> podmanAvailable = ProbeAsync(podmanRuntime, cancellationToken); 171Task<bool> dockerAvailable = ProbeAsync(dockerRuntime, cancellationToken); 191private async Task<bool> ProbeAsync(IContainerRuntime runtime, CancellationToken cancellationToken)
LocalDaemons\ContainerRuntimeOperations.cs (8)
19private readonly Func<string, string, CancellationToken, Task<bool>> _tryRunCommand; 24Func<string, string, CancellationToken, Task<bool>> tryRunCommand) 30public Task<bool> ProbeCommandAsync(string command, string arguments, CancellationToken cancellationToken) 61Task<ProcessTextOutput> loadTask = Process.RunAndCaptureTextAsync(loadInfo, processCancellation.Token); 137internal static async Task<bool> TryRunCommandAsync(string command, string arguments, CancellationToken cancellationToken) 172internal static async Task<(int ExitCode, string StandardError)> RunProcessAsync( 185private static async Task<(int ExitCode, string StandardError)> RunProcessAsync( 202private static async Task<(int ExitCode, string StandardError)> RunProcessAsync(
LocalDaemons\ContainerRuntimes.cs (3)
25public async Task<bool> ProbeAsync(CancellationToken cancellationToken) 32public virtual async Task<bool> IsAvailableAsync(CancellationToken cancellationToken) 79public override Task<bool> IsAvailableAsync(CancellationToken cancellationToken)
LocalDaemons\DockerCli.cs (4)
140public async Task<bool> IsAvailableAsync(CancellationToken cancellationToken) 583var podmanCommand = TryRunVersionCommandAsync(PodmanCommand, cancellationToken); 584var dockerCommand = TryRunVersionCommandAsync(DockerCommand, cancellationToken); 658private async Task<bool> TryRunVersionCommandAsync(string command, CancellationToken cancellationToken)
LocalDaemons\IContainerRuntime.cs (2)
29Task<bool> ProbeAsync(CancellationToken cancellationToken); 35Task<bool> IsAvailableAsync(CancellationToken cancellationToken);
LocalDaemons\ILocalRegistry.cs (1)
27public Task<bool> IsAvailableAsync(CancellationToken cancellationToken);
Registry\DefaultBlobOperations.cs (5)
30public async Task<bool> ExistsAsync(string repositoryName, string digest, CancellationToken cancellationToken) 43public async Task<JsonNode> GetJsonAsync(string repositoryName, string digest, CancellationToken cancellationToken) 54public async Task<Stream> GetStreamAsync(string repositoryName, string digest, CancellationToken cancellationToken) 62private async Task<HttpResponseMessage> GetAsync(string repositoryName, string digest, CancellationToken cancellationToken) 75private async Task<T> LogAndThrowContainerHttpException<T>(HttpResponseMessage response, CancellationToken cancellationToken)
Registry\DefaultBlobUploadOperations.cs (6)
43public async Task<HttpResponseMessage> GetStatusAsync(Uri uploadUri, CancellationToken cancellationToken) 48public async Task<StartUploadInformation> StartAsync(string repositoryName, CancellationToken cancellationToken) 66public async Task<bool> TryMountAsync(string destinationRepository, string sourceRepository, string digest, CancellationToken cancellationToken) 73public async Task<FinalizeUploadInformation> UploadAtomicallyAsync(Uri uploadUri, Stream content, CancellationToken cancellationToken) 85public async Task<NextChunkUploadInformation> UploadChunkAsync(Uri uploadUri, HttpContent content, CancellationToken cancellationToken) 105private async Task<Uri> PatchAsync(Uri uploadUri, HttpContent content, CancellationToken cancellationToken)
Registry\DefaultManifestOperations.cs (2)
27public async Task<HttpResponseMessage> GetAsync(string repositoryName, string reference, CancellationToken cancellationToken) 55private async Task<T> LogAndThrowContainerHttpException<T>(HttpResponseMessage response, CancellationToken cancellationToken)
Registry\IBlobOperations.cs (3)
18public Task<bool> ExistsAsync(string repositoryName, string digest, CancellationToken cancellationToken); 20public Task<JsonNode> GetJsonAsync(string repositoryName, string digest, CancellationToken cancellationToken); 22public Task<Stream> GetStreamAsync(string repositoryName, string digest, CancellationToken cancellationToken);
Registry\IBlobUploadOperations.cs (5)
22public Task<HttpResponseMessage> GetStatusAsync(Uri uploadUri, CancellationToken cancellationToken); 24public Task<StartUploadInformation> StartAsync(string repositoryName, CancellationToken cancellationToken); 26public Task<bool> TryMountAsync(string destinationRepository, string sourceRepository, string digest, CancellationToken cancellationToken); 35public Task<FinalizeUploadInformation> UploadAtomicallyAsync(Uri uploadUri, Stream content, CancellationToken cancellationToken); 43public Task<NextChunkUploadInformation> UploadChunkAsync(Uri uploadUri, HttpContent content, CancellationToken cancellationToken);
Registry\IManifestOperations.cs (1)
14public Task<HttpResponseMessage> GetAsync(string repositoryName, string reference, CancellationToken cancellationToken);
Registry\Registry.cs (10)
191public async Task<ImageBuilder> GetImageManifestAsync(string repositoryName, string reference, string runtimeIdentifier, IManifestPicker manifestPicker, CancellationToken cancellationToken) 226async Task<ManifestV2> ReadManifest() 239internal async Task<ManifestListV2?> GetManifestListAsync(string repositoryName, string reference, CancellationToken cancellationToken) 251private async Task<ImageBuilder> ReadSingleImageAsync(string repositoryName, ManifestV2 manifest, string manifestMediaType, CancellationToken cancellationToken) 327private async Task<ImageBuilder> PickBestImageFromManifestListAsync( 354private async Task<ImageBuilder> PickBestImageFromImageIndexAsync( 381private async Task<ImageBuilder> ReadImageFromManifest( 410public async Task<string> DownloadBlobAsync(string repository, Descriptor descriptor, CancellationToken cancellationToken) 492internal async Task<FinalizeUploadInformation> UploadBlobChunkedAsync(Stream contents, StartUploadInformation startUploadInformation, CancellationToken cancellationToken) 531private Task<FinalizeUploadInformation> UploadBlobContentsAsync(Stream contents, StartUploadInformation startUploadInformation, CancellationToken cancellationToken)
Tasks\CreateImageIndex.cs (1)
45internal async Task<bool> ExecuteAsync(CancellationToken cancellationToken)
Tasks\CreateNewImage.cs (2)
37internal async Task<bool> ExecuteAsync(CancellationToken cancellationToken) 81private async Task<bool> ExecuteAsyncCore(ILogger logger, ILoggerFactory msbuildLoggerFactory, CancellationToken cancellationToken)
Microsoft.NET.Sdk.Publish.Tasks (36)
Kudu\KuduZipDeploy.cs (2)
29public async Task<bool> DeployAsync(string? zipFileFullPath) 43private async Task<bool> PostZipAsync(string? zipFilePath)
Tasks\Http\DefaultHttpClient.cs (3)
20public Task<HttpResponseMessage> PostAsync(Uri uri, StreamContent content) 26public Task<HttpResponseMessage> GetAsync(Uri uri, CancellationToken cancellationToken) 32public Task<HttpResponseMessage> PutAsync(Uri uri, StreamContent content, CancellationToken cancellationToken)
Tasks\Http\HttpClientExtensions.cs (6)
37public static async Task<IHttpResponse?> PostRequestAsync( 92public static async Task<IHttpResponse?> PutRequestAsync( 148public static async Task<IHttpResponse?> GetRequestAsync( 188public static async Task<T?> RetryGetRequestAsync<T>( 237public static async Task<string> GetTextResponseAsync(this IHttpResponse response, CancellationToken cancellationToken) 262public static async Task<T?> GetJsonResponseAsync<T>(this IHttpResponse response, CancellationToken cancellation)
Tasks\Http\HttpResponseMessageForStatusCode.cs (1)
14public Task<Stream?> GetResponseBodyAsync()
Tasks\Http\HttpResponseMessageWrapper.cs (4)
12private readonly Lazy<Task<Stream>?> _responseBodyTask; 17_responseBodyTask = new Lazy<Task<Stream>?>(GetResponseStream); 26public async Task<Stream?> GetResponseBodyAsync() 46private Task<Stream>? GetResponseStream()
Tasks\Http\IHttpClient.cs (3)
25Task<HttpResponseMessage> PostAsync(Uri uri, StreamContent content); 33Task<HttpResponseMessage> GetAsync(Uri uri, CancellationToken cancellationToken); 42Task<HttpResponseMessage> PutAsync(Uri uri, StreamContent content, CancellationToken cancellationToken);
Tasks\Http\IHttpResponse.cs (1)
21Task<Stream?> GetResponseBodyAsync();
Tasks\Kudu\KuduDeploy.cs (1)
139Task<bool> zipTask = zipDeploy.DeployAsync(zipFileFullPath);
Tasks\OneDeploy\CreatePackageFile.cs (1)
52var packageFileTask = _filePackager.CreatePackageAsync(ContentToPackage, packageFilePath, CancellationToken.None);
Tasks\OneDeploy\IDeploymentStatusService.cs (1)
22Task<T?> PollDeploymentAsync(IHttpClient httpClient, string? url, string? user, string? password, string userAgent, CancellationToken cancellation);
Tasks\OneDeploy\IFilePackager.cs (1)
23Task<bool> CreatePackageAsync(string sourcePath, string destinationPath, CancellationToken cancellation);
Tasks\OneDeploy\OneDeploy.cs (5)
50var deployTask = OneDeployAsync(FileToPublishPath, Username, Password, PublishUrl, UserAgentVersion, WebJobName, WebJobType); 56public async Task<bool> OneDeployAsync( 75internal async Task<bool> OneDeployAsync( 179private Task<IHttpResponse?> DeployAsync( 211private async Task<IHttpResponse?> DefaultDeployAsync(
Tasks\OneDeploy\OneDeploy.WebJob.cs (1)
28private async Task<IHttpResponse?> DeployWebJobAsync(
Tasks\OneDeploy\OneDeployStatusService.cs (1)
19public async Task<DeploymentResponse?> PollDeploymentAsync(
Tasks\OneDeploy\ZipFilePackager.cs (1)
17public Task<bool> CreatePackageAsync(string sourcePath, string destinationPath, CancellationToken cancellation)
Tasks\ZipDeploy\ZipDeploy.cs (2)
47Task<bool> t = ZipDeployAsync(ZipToPublishPath, user, password, PublishUrl, SiteName, UserAgentVersion, client, true); 53public async Task<bool> ZipDeployAsync(string? zipToPublishPath, string? userName, string? password, string? publishUrl, string? siteName, string? userAgentVersion, IHttpClient client, bool logMessages)
Tasks\ZipDeploy\ZipDeploymentStatus.cs (2)
32public async Task<DeploymentResponse?> PollDeploymentStatusAsync(string deploymentUrl, string? userName, string? password) 74private async Task<T?> InvokeGetRequestWithRetryAsync<T>(string url, string? userName, string? password, int retryCount, TimeSpan retryDelay, CancellationTokenSource cts)
Microsoft.NET.Sdk.Razor.Tasks (9)
DotnetToolTask.cs (1)
164var responseTask = ServerConnection.RunOnServer(PipeName, arguments, serverPaths, _razorServerCts.Token, debug: DebugTool);
src\sdk\src\RazorSdk\Tool\Client.cs (1)
40public static async Task<Client> ConnectAsync(string pipeName, TimeSpan? timeout, CancellationToken cancellationToken)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerConnection.cs (5)
91public static Task<ServerResponse> RunOnServer( 115private static async Task<ServerResponse> RunOnServerCore( 139Task<Client> pipeTask = null; 221private static async Task<ServerResponse> TryProcessRequest( 247var responseTask = ServerResponse.ReadAsync(client.Stream, serverCts.Token);
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerRequest.cs (1)
123public static async Task<ServerRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken)
src\sdk\src\RazorSdk\Tool\ServerProtocol\ServerResponse.cs (1)
89public static async Task<ServerResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
Microsoft.Svcutil.NamedPipeMetadataImporter (1)
NamedPipeMetadataImporter.cs (1)
30public async Task<XmlReader> GetMetadatadataAsync(Uri uri)
Microsoft.TemplateEngine.Abstractions (21)
Components\IBindSymbolSource.cs (1)
34Task<string?> GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindName, CancellationToken cancellationToken);
Components\ISdkInfoProvider.cs (2)
16Task<string> GetCurrentVersionAsync(CancellationToken cancellationToken); 23Task<IEnumerable<string>> GetInstalledVersionsAsync(CancellationToken cancellationToken);
Components\IWorkloadsInfoProvider.cs (1)
16Task<IEnumerable<WorkloadInfo>> GetInstalledWorkloadsAsync(CancellationToken token);
Constraints\ITemplateConstraintFactory.cs (1)
20Task<ITemplateConstraint> CreateTemplateConstraintAsync(IEngineEnvironmentSettings environmentSettings, CancellationToken cancellationToken);
IGenerator.cs (6)
25Task<ICreationResult> CreateAsync( 41Task<ICreationEffects> GetCreationEffectsAsync( 78Task<IReadOnlyList<IScanTemplateInfo>> GetTemplatesFromMountPointAsync(IMountPoint source, CancellationToken cancellationToken); 88Task<ITemplate?> LoadTemplateAsync(IEngineEnvironmentSettings settings, ITemplateLocator config, string? baselineName = null, CancellationToken cancellationToken = default); 123Task<ICreationResult> CreateAsync( 140Task<ICreationEffects> GetCreationEffectsAsync(
Installer\IInstaller.cs (5)
25Task<bool> CanInstallAsync(InstallRequest installationRequest, CancellationToken cancellationToken); 34Task<IReadOnlyList<CheckUpdateResult>> GetLatestVersionAsync(IEnumerable<IManagedTemplatePackage> templatePackages, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken); 43Task<InstallResult> InstallAsync(InstallRequest installRequest, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken); 52Task<UninstallResult> UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken); 61Task<UpdateResult> UpdateAsync(UpdateRequest updateRequest, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken);
TemplatePackage\IManagedTemplatePackageProvider.cs (4)
23Task<IReadOnlyList<CheckUpdateResult>> GetLatestVersionsAsync(IEnumerable<IManagedTemplatePackage> templatePackages, CancellationToken cancellationToken); 31Task<IReadOnlyList<UpdateResult>> UpdateAsync(IEnumerable<UpdateRequest> updateRequests, CancellationToken cancellationToken); 39Task<IReadOnlyList<UninstallResult>> UninstallAsync(IEnumerable<IManagedTemplatePackage> templatePackages, CancellationToken cancellationToken); 49Task<IReadOnlyList<InstallResult>> InstallAsync(IEnumerable<InstallRequest> installRequests, CancellationToken cancellationToken);
TemplatePackage\ITemplatePackageProvider.cs (1)
26Task<IReadOnlyList<ITemplatePackage>> GetAllTemplatePackagesAsync(CancellationToken cancellationToken);
Microsoft.TemplateEngine.Cli (68)
CliTemplateInfo.cs (2)
140internal async Task<IManagedTemplatePackage?> GetManagedTemplatePackageAsync( 154internal Task<ITemplatePackage> GetTemplatePackageAsync(
Commands\alias\AliasAddCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(
Commands\alias\AliasCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(
Commands\alias\AliasShowCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(
Commands\BaseCommand.cs (2)
155protected abstract Task<NewCommandStatus> ExecuteAsync(TArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken); 239public override async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
Commands\create\InstantiateCommand.cs (7)
33internal static Task<NewCommandStatus> ExecuteAsync( 43internal static async Task<IEnumerable<TemplateGroup>> GetTemplateGroupsAsync( 132async Task<string> GetTemplatePackagesList(TemplateGroup templateGroup) 149protected override async Task<NewCommandStatus> ExecuteAsync( 163private static async Task<NewCommandStatus> ExecuteIntAsync( 239private static async Task<NewCommandStatus> HandleTemplateInstantiationAsync( 325async Task<string> GetTemplatePackage(CliTemplateInfo template)
Commands\create\InstantiateCommand.TabCompletion.cs (3)
145Task<IEnumerable<CliTemplateInfo>> constraintEvaluationTask = templateGroup.GetAllowedTemplatesAsync(constraintManager, cancellationTokenSource.Token); 172List<(TemplateGroup TemplateGroup, Task<IEnumerable<CliTemplateInfo>> Task)> tasksToWait = new(); 204foreach ((TemplateGroup TemplateGroup, Task<IEnumerable<CliTemplateInfo>> Task) task in tasksToWait)
Commands\create\TemplateCommand.cs (6)
145internal static async Task<IReadOnlyList<TemplateConstraintResult>> ValidateConstraintsAsync(TemplateConstraintManager constraintManager, ITemplateInfo template, CancellationToken cancellationToken) 162internal async Task<NewCommandStatus> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) 174Task<IReadOnlyList<TemplateConstraintResult>> constraintsEvaluation = ValidateConstraintsAsync(constraintManager, args.Template, args.IsForceFlagSpecified ? cancellationTokenSource.Token : cancellationToken); 189Task<NewCommandStatus> instantiateTask = invoker.InvokeTemplateAsync(args, cancellationToken); 190Task<(string Id, string Version, string Provider)> builtInPackageCheck = packageCoordinator.ValidateBuiltInPackageAvailabilityAsync(args.Template, cancellationToken); 191Task<CheckUpdateResult?> checkForUpdateTask = packageCoordinator.CheckUpdateForTemplate(args, cancellationToken);
Commands\details\DetailsCommand.cs (1)
15protected override async Task<NewCommandStatus> ExecuteAsync(
Commands\Extensions.cs (1)
52internal static async Task<IEnumerable<CliTemplateInfo>> GetAllowedTemplatesAsync(this TemplateGroup templateGroup, TemplateConstraintManager constraintManager, CancellationToken cancellationToken)
Commands\install\BaseInstallCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(
Commands\install\InstallCommand.cs (1)
14protected override async Task<NewCommandStatus> ExecuteAsync(
Commands\install\LegacyInstallCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(InstallCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken)
Commands\list\BaseListCommand.cs (1)
29protected override Task<NewCommandStatus> ExecuteAsync(
Commands\list\LegacyListCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(ListCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken)
Commands\list\ListCommand.cs (1)
14protected override async Task<NewCommandStatus> ExecuteAsync(
Commands\NewCommand.cs (1)
55protected override Task<NewCommandStatus> ExecuteAsync(
Commands\search\BaseSearchCommand.cs (1)
23protected override Task<NewCommandStatus> ExecuteAsync(
Commands\search\LegacySearchCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(SearchCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken)
Commands\search\SearchCommand.cs (1)
14protected override async Task<NewCommandStatus> ExecuteAsync(
Commands\uninstall\BaseUninstallCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(
Commands\uninstall\LegacyUninstallCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(UninstallCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken)
Commands\uninstall\UninstallCommand.cs (1)
14protected override async Task<NewCommandStatus> ExecuteAsync(
Commands\update\BaseUpdateCommand.cs (1)
22protected override Task<NewCommandStatus> ExecuteAsync(
Commands\update\LegacyUpdateApplyCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(UpdateCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken)
Commands\update\LegacyUpdateCheckCommand.cs (1)
14protected override Task<NewCommandStatus> ExecuteAsync(UpdateCommandArgs args, IEngineEnvironmentSettings environmentSettings, TemplatePackageManager templatePackageManager, ParseResult parseResult, CancellationToken cancellationToken)
Commands\update\UpdateCommand.cs (1)
14protected override async Task<NewCommandStatus> ExecuteAsync(
NuGet\NugetApiManager.cs (2)
31public async Task<NugetPackageMetadata?> GetPackageMetadataAsync( 86private async Task<IPackageSearchMetadata?> GetAdditionalPackageMetadata(
TemplateGroup.cs (2)
198internal async Task<IReadOnlyList<IManagedTemplatePackage>> GetManagedTemplatePackagesAsync( 213internal async Task<IReadOnlyList<ITemplatePackage>> GetTemplatePackagesAsync(
TemplateInvoker.cs (2)
40internal async Task<NewCommandStatus> InvokeTemplateAsync(TemplateCommandArgs templateArgs, CancellationToken cancellationToken) 130private async Task<NewCommandStatus> CreateTemplateAsync(TemplateCommandArgs templateArgs, CancellationToken cancellationToken)
TemplateListCoordinator.cs (3)
43internal async Task<NewCommandStatus> DisplayTemplateGroupListAsync( 147internal async Task<NewCommandStatus> DisplayCommandDescriptionAsync( 241private async Task<IEnumerable<ITemplateInfo>> GetCuratedListAsync(CancellationToken cancellationToken)
TemplatePackageCoordinator.cs (11)
53internal async Task<CheckUpdateResult?> CheckUpdateForTemplate(TemplateCommandArgs args, CancellationToken cancellationToken = default) 83internal async Task<(string Id, string Version, string Provider)> ValidateBuiltInPackageAvailabilityAsync( 178internal async Task<NewCommandStatus> EnterInstallFlowAsync(InstallCommandArgs args, CancellationToken cancellationToken) 282internal async Task<NewCommandStatus> EnterUpdateFlowAsync(UpdateCommandArgs commandArgs, CancellationToken cancellationToken) 356internal async Task<NewCommandStatus> EnterUninstallFlowAsync(UninstallCommandArgs args, CancellationToken cancellationToken) 396internal async Task<NewCommandStatus> DisplayTemplatePackageMetadata( 609private async Task<bool> ValidateInstallationRequestsAsync(InstallCommandArgs args, List<InstallRequest> installRequests, CancellationToken cancellationToken) 655private async Task<(NewCommandStatus, Dictionary<IManagedTemplatePackageProvider, List<IManagedTemplatePackage>>)> DetermineSourcesToUninstallAsync(UninstallCommandArgs commandArgs, CancellationToken cancellationToken) 782private async Task<IEnumerable<ITemplatePackage>> GetTemplatePackagesByShortNameAsync(string sourceIdentifier, CancellationToken cancellationToken) 804private async Task<bool> IsTemplateShortNameAsync(string sourceIdentifier, CancellationToken cancellationToken) 914private async Task<NugetPackageMetadata?> GetPackageMetadataFromMultipleFeedsAsync(
TemplateResolution\BaseTemplateResolver.cs (2)
17internal abstract Task<TemplateResolutionResult> ResolveTemplatesAsync(T args, string? defaultLanguage, CancellationToken cancellationToken); 39protected async Task<IEnumerable<TemplateGroup>> GetTemplateGroupsAsync(CancellationToken cancellationToken)
TemplateResolution\ListTemplateResolver.cs (1)
32internal override async Task<TemplateResolutionResult> ResolveTemplatesAsync(ListCommandArgs args, string? defaultLanguage, CancellationToken cancellationToken)
TemplateSearch\CliTemplateSearchCoordinator.cs (3)
34internal static async Task<NewCommandStatus> SearchForTemplateMatchesAsync( 111internal static async Task<(NugetPackageMetadata?, IReadOnlyList<ITemplateInfo>)> SearchForPackageDetailsAsync( 132internal static async Task<IReadOnlyList<ITemplateInfo>> SearchForPackageTemplatesAsync(
Microsoft.TemplateEngine.Edge (73)
BuiltInManagedProvider\GlobalSettings.cs (3)
36public async Task<IDisposable> LockAsync(CancellationToken token) 65public async Task<IReadOnlyList<TemplatePackageData>> GetInstalledTemplatePackagesAsync(CancellationToken cancellationToken) 203private async Task<bool> TryWaitForLock()
BuiltInManagedProvider\GlobalSettingsTemplatePackageProvider.cs (10)
54public async Task<IReadOnlyList<ITemplatePackage>> GetAllTemplatePackagesAsync(CancellationToken cancellationToken) 80public async Task<IReadOnlyList<CheckUpdateResult>> GetLatestVersionsAsync(IEnumerable<IManagedTemplatePackage> packages, CancellationToken cancellationToken) 84var tasks = new List<Task<IReadOnlyList<CheckUpdateResult>>>(); 92foreach (var task in tasks) 104public async Task<IReadOnlyList<InstallResult>> InstallAsync(IEnumerable<InstallRequest> installRequests, CancellationToken cancellationToken) 159public async Task<IReadOnlyList<UninstallResult>> UninstallAsync(IEnumerable<IManagedTemplatePackage> packages, CancellationToken cancellationToken) 186public async Task<IReadOnlyList<UpdateResult>> UpdateAsync(IEnumerable<UpdateRequest> updateRequests, CancellationToken cancellationToken) 232private async Task<UpdateResult> UpdateAsync(List<TemplatePackageData> packages, UpdateRequest updateRequest, CancellationToken cancellationToken) 258private async Task<(InstallerErrorCode, string)> EnsureInstallPrerequisites(List<TemplatePackageData> packagesInSettings, string identifier, string? version, IInstaller installer, CancellationToken cancellationToken, bool update = false, bool forceUpdate = false) 305private async Task<InstallResult> InstallAsync(List<TemplatePackageData> packages, InstallRequest installRequest, IInstaller installer, CancellationToken cancellationToken)
BuiltInManagedProvider\IGlobalSettings.cs (2)
22Task<IReadOnlyList<TemplatePackageData>> GetInstalledTemplatePackagesAsync(CancellationToken cancellationToken); 34Task<IDisposable> LockAsync(CancellationToken token);
Components\EnvironmentVariablesBindSource.cs (1)
25Task<string?> IBindSymbolSource.GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindName, CancellationToken cancellationToken)
Components\HostParametersBindSource.cs (1)
25Task<string?> IBindSymbolSource.GetBoundValueAsync(IEngineEnvironmentSettings settings, string bindName, CancellationToken cancellationToken)
Constraints\HostConstraint.cs (1)
17Task<ITemplateConstraint> ITemplateConstraintFactory.CreateTemplateConstraintAsync(IEngineEnvironmentSettings environmentSettings, CancellationToken cancellationToken)
Constraints\OSConstraint.cs (1)
23Task<ITemplateConstraint> ITemplateConstraintFactory.CreateTemplateConstraintAsync(IEngineEnvironmentSettings environmentSettings, CancellationToken cancellationToken)
Constraints\SdkVersionConstraintFactory.cs (3)
17async Task<ITemplateConstraint> ITemplateConstraintFactory.CreateTemplateConstraintAsync(IEngineEnvironmentSettings environmentSettings, CancellationToken cancellationToken) 45internal static async Task<SdkVersionConstraint> CreateAsync(IEngineEnvironmentSettings environmentSettings, ITemplateConstraintFactory factory, CancellationToken cancellationToken) 91Task<(NuGetVersionSpecification CurrentSdkVersion, IEnumerable<NuGetVersionSpecification> InstalledVersions, Func<IReadOnlyList<string>, IReadOnlyList<string>, string> RemedySuggestionFactory)>
Constraints\WorkloadConstraintFactory.cs (3)
20async Task<ITemplateConstraint> ITemplateConstraintFactory.CreateTemplateConstraintAsync(IEngineEnvironmentSettings environmentSettings, CancellationToken cancellationToken) 47internal static async Task<WorkloadConstraint> CreateAsync(IEngineEnvironmentSettings environmentSettings, ITemplateConstraintFactory factory, CancellationToken cancellationToken) 85private static async Task<(IReadOnlyList<WorkloadInfo> Workloads, Func<IReadOnlyList<string>, string> RemedySuggestionFactory)> ExtractWorkloadInfoAsync(IEnumerable<IWorkloadsInfoProvider> workloadsInfoProviders, ILogger logger, CancellationToken token)
Installers\Folder\FolderInstaller.cs (5)
22public Task<bool> CanInstallAsync(InstallRequest installationRequest, CancellationToken cancellationToken) 40public Task<IReadOnlyList<CheckUpdateResult>> GetLatestVersionAsync(IEnumerable<IManagedTemplatePackage> packages, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken) 47public Task<InstallResult> InstallAsync(InstallRequest installRequest, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken) 86public Task<UninstallResult> UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken) 93public Task<UpdateResult> UpdateAsync(UpdateRequest updateRequest, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken)
Installers\NuGet\IDownloader.cs (1)
10Task<NuGetPackageInfo> DownloadPackageAsync(string downloadPath, string identifier, string? version = null, IEnumerable<string>? additionalSources = null, bool force = false, bool includePrerelease = false, CancellationToken cancellationToken = default);
Installers\NuGet\IUpdateChecker.cs (1)
10Task<(string LatestVersion, bool IsLatestVersion, NugetPackageMetadata PackageMetadata)> GetLatestVersionAsync(string identifier, string? version = null, string? additionalNuGetSource = null, CancellationToken cancellationToken = default);
Installers\NuGet\NugetApiPackageManager.cs (8)
49public async Task<NuGetPackageInfo> DownloadPackageAsync(string downloadPath, string identifier, string? version = null, IEnumerable<string>? additionalSources = null, bool force = false, bool includePrerelease = false, CancellationToken cancellationToken = default) 197public async Task<(string LatestVersion, bool IsLatestVersion, NugetPackageMetadata PackageMetadata)> GetLatestVersionAsync(string identifier, string? version = null, string? additionalSource = null, CancellationToken cancellationToken = default) 247private async Task<(PackageSource, NugetPackageMetadata)> GetLatestVersionInternalAsync( 311private async Task<(PackageSource, NugetPackageMetadata)> GetPackageMetadataAsync( 327List<Task<(PackageSource Source, IEnumerable<NugetPackageMetadata>? FoundPackages)>> tasks = 331Task<(PackageSource Source, IEnumerable<NugetPackageMetadata>? FoundPackages)> finishedTask = 364private async Task<(PackageSource Source, IEnumerable<NugetPackageMetadata>? FoundPackages)> GetPackageMetadataAsync( 423private async Task<(string Owners, bool Verified)> GetPackageAdditionalMetadata(
Installers\NuGet\NuGetInstaller.cs (5)
63public Task<bool> CanInstallAsync(InstallRequest installationRequest, CancellationToken cancellationToken) 108public async Task<IReadOnlyList<CheckUpdateResult>> GetLatestVersionAsync( 197public async Task<InstallResult> InstallAsync(InstallRequest installRequest, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken) 336public Task<UninstallResult> UninstallAsync(IManagedTemplatePackage templatePackage, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken) 361public async Task<UpdateResult> UpdateAsync(UpdateRequest updateRequest, IManagedTemplatePackageProvider provider, CancellationToken cancellationToken)
Settings\AsyncMutex.cs (1)
39public static Task<AsyncMutex> WaitAsync(string mutexName, CancellationToken token)
Settings\Scanner.cs (3)
74public Task<ScanResult> ScanAsync(string mountPointUri, CancellationToken cancellationToken) 91public Task<ScanResult> ScanAsync( 228private async Task<ScanResult> ScanMountPointForTemplatesAsync(
Settings\TemplatePackageManager.cs (12)
24private Dictionary<ITemplatePackageProvider, Task<IReadOnlyList<ITemplatePackage>>>? _cachedSources; 74public async Task<IReadOnlyList<IManagedTemplatePackage>> GetManagedTemplatePackagesAsync(bool force, CancellationToken cancellationToken) 89public async Task<IReadOnlyList<ITemplatePackage>> GetTemplatePackagesAsync(bool force, CancellationToken cancellationToken) 102foreach (KeyValuePair<ITemplatePackageProvider, Task<IReadOnlyList<ITemplatePackage>>> source in _cachedSources.OrderBy((p) => (p.Key.Factory as IPrioritizedComponent)?.Priority ?? 0)) 154public async Task<IReadOnlyList<ITemplateInfo>> GetTemplatesAsync(CancellationToken cancellationToken) 172public async Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(Func<ITemplateMatchInfo, bool> matchFilter, IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, CancellationToken cancellationToken) 195public async Task<ITemplatePackage> GetTemplatePackageAsync(ITemplateInfo template, CancellationToken cancellationToken) 208public async Task<IEnumerable<ITemplateInfo>> GetTemplatesAsync(ITemplatePackage templatePackage, CancellationToken cancellationToken) 223public async Task<(IManagedTemplatePackage? Package, IEnumerable<ITemplateInfo>? Templates)> GetManagedTemplatePackageAsync(string packageIdentifier, string? packageVersion = null, CancellationToken cancellationToken = default) 254_cachedSources = new Dictionary<ITemplatePackageProvider, Task<IReadOnlyList<ITemplatePackage>>>(); 273private async Task<TemplateCache> UpdateTemplateCacheAsync(bool needsRebuild, CancellationToken cancellationToken) 277Task<IReadOnlyList<ITemplatePackage>> getTemplatePackagesTask = GetTemplatePackagesAsync(needsRebuild, cancellationToken);
Template\TemplateCreator.cs (3)
39public Task<ITemplateCreationResult> InstantiateAsync( 76public async Task<ITemplateCreationResult> InstantiateAsync( 242internal Task<ITemplate?> LoadTemplateAsync(ITemplateInfo info, string? baselineName, CancellationToken cancellationToken)
TemplateConstraintManager.cs (9)
17private readonly Dictionary<string, Task<ITemplateConstraint>> _templateConstrains = new Dictionary<string, Task<ITemplateConstraint>>(); 40public async Task<IReadOnlyList<ITemplateConstraint>> GetConstraintsAsync(IEnumerable<ITemplateInfo>? templates = null, CancellationToken cancellationToken = default) 43IEnumerable<(string Type, Task<ITemplateConstraint> Task)> constraintsToInitialize; 91public async Task<TemplateConstraintResult> EvaluateConstraintAsync(string type, string? args, CancellationToken cancellationToken) 94if (!_templateConstrains.TryGetValue(type, out Task<ITemplateConstraint> task)) 146public async Task<IReadOnlyList<(ITemplateInfo Template, IReadOnlyList<TemplateConstraintResult> Result)>> EvaluateConstraintsAsync(IEnumerable<ITemplateInfo> templates, CancellationToken cancellationToken) 154if (!_templateConstrains.TryGetValue(constraintType, out Task<ITemplateConstraint> task)) 188if (!_templateConstrains.TryGetValue(constraint.Type, out Task<ITemplateConstraint> task))
Microsoft.TemplateEngine.IDE (17)
Bootstrapper.cs (17)
102public Task<IReadOnlyList<ITemplateInfo>> GetTemplatesAsync(CancellationToken cancellationToken) 116public Task<IReadOnlyList<ITemplateMatchInfo>> GetTemplatesAsync(IEnumerable<Func<ITemplateInfo, MatchInfo?>> filters, bool exactMatchesOnly = true, CancellationToken cancellationToken = default) 144public Task<ITemplateCreationResult> CreateAsync( 177public Task<ITemplateCreationResult> CreateAsync( 209public Task<ITemplateCreationResult> GetCreationEffectsAsync( 236public Task<IReadOnlyList<ITemplatePackage>> GetTemplatePackagesAsync(CancellationToken cancellationToken = default) 247public Task<IReadOnlyList<IManagedTemplatePackage>> GetManagedTemplatePackagesAsync(CancellationToken cancellationToken = default) 264public Task<IReadOnlyList<InstallResult>> InstallTemplatePackagesAsync(IEnumerable<InstallRequest> installRequests, InstallationScope scope = InstallationScope.Global, CancellationToken cancellationToken = default) 294public async Task<IReadOnlyList<CheckUpdateResult>> GetLatestVersionsAsync(IEnumerable<IManagedTemplatePackage> managedPackages, CancellationToken cancellationToken = default) 316public async Task<IReadOnlyList<UpdateResult>> UpdateTemplatePackagesAsync(IEnumerable<UpdateRequest> updateRequests, CancellationToken cancellationToken = default) 338public async Task<IReadOnlyList<UninstallResult>> UninstallTemplatePackagesAsync(IEnumerable<IManagedTemplatePackage> managedPackages, CancellationToken cancellationToken = default) 365public async Task<IReadOnlyCollection<Edge.Template.IFilteredTemplateInfo>> ListTemplates(bool exactMatchesOnly, params Func<ITemplateInfo, Edge.Template.MatchInfo?>[] filters) 408Task<IReadOnlyList<InstallResult>> t = InstallTemplatePackagesAsync(installRequests); 434var task = GetManagedTemplatePackagesAsync(); 444Task<IReadOnlyList<UninstallResult>> uninstallTask = UninstallTemplatePackagesAsync(packagesToUninstall); 452public async Task<ICreationResult?> CreateAsync(ITemplateInfo info, string name, string outputPath, IReadOnlyDictionary<string, string?> parameters, bool skipUpdateCheck, string baselineName) 459public async Task<ICreationEffects?> GetCreationEffectsAsync(ITemplateInfo info, string name, string outputPath, IReadOnlyDictionary<string, string?> parameters, string baselineName)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (19)
BindSymbolEvaluator.cs (5)
67IReadOnlyList<(BindSymbol Symbol, Task<string?> Task)> tasksToRun = bindSymbols 84private void ProcessEvaluationResults(IVariableCollection variableCollection, IReadOnlyList<(BindSymbol Symbol, Task<string?> Task)> completedTasks) 86foreach ((BindSymbol currentSymbol, Task<string?> currentTask) in completedTasks) 140private async Task<string?> GetBoundValueAsync(string configuredBinding, CancellationToken cancellationToken) 230private async Task<IEnumerable<(IBindSymbolSource Source, string Value)>> RunEvaluationTasks(IEnumerable<IBindSymbolSource> sourcesToSearch, string binding, CancellationToken cancellationToken)
RunnableProjectGenerator.cs (8)
30async Task<IReadOnlyList<IScanTemplateInfo>> IGenerator.GetTemplatesFromMountPointAsync(IMountPoint source, CancellationToken cancellationToken) 36async Task<ITemplate?> IGenerator.LoadTemplateAsync(IEngineEnvironmentSettings settings, ITemplateLocator templateLocator, string? baselineName, CancellationToken cancellationToken) 113async Task<ICreationEffects> IGenerator.GetCreationEffectsAsync( 171Task<ICreationResult> IGenerator.CreateAsync( 200Task<ICreationResult> IGenerator.CreateAsync( 211Task<ICreationEffects> IGenerator.GetCreationEffectsAsync( 296internal static async Task<ICreationResult> CreateAsync( 333internal async Task<IReadOnlyList<ScannedTemplateInfo>> GetTemplatesFromMountPointInternalAsync(IMountPoint source, CancellationToken cancellationToken)
Validation\ITemplateValidatorFactory.cs (1)
30Task<ITemplateValidator> CreateValidatorAsync(IEngineEnvironmentSettings engineEnvironmentSettings, CancellationToken cancellationToken);
Validation\MandatoryLocalizationValidationFactory.cs (1)
17public Task<ITemplateValidator> CreateValidatorAsync(IEngineEnvironmentSettings engineEnvironmentSettings, CancellationToken cancellationToken) => Task.FromResult((ITemplateValidator)new MandatoryLocalizationValidation(this));
Validation\MandatoryValidationFactory.cs (1)
17public Task<ITemplateValidator> CreateValidatorAsync(IEngineEnvironmentSettings engineEnvironmentSettings, CancellationToken cancellationToken) => Task.FromResult((ITemplateValidator)new MandatoryValidation(this));
Validation\ValidationManager.cs (3)
35private async Task<IEnumerable<ITemplateValidator>> InitializeValidatorsAsync(IEngineEnvironmentSettings settings, ValidationScope scope, CancellationToken cancellationToken) 47IEnumerable<Task<ITemplateValidator>> tasks = factories 56List<Task<ITemplateValidator>> validatorsToCreate = new();
Microsoft.TemplateEngine.Utils (3)
AsyncLazy.cs (2)
12public class AsyncLazy<T> : Lazy<Task<T>> 28public AsyncLazy(Func<Task<T>> taskFactory)
DefaultTemplatePackageProvider.cs (1)
42public Task<IReadOnlyList<ITemplatePackage>> GetAllTemplatePackagesAsync(CancellationToken cancellationToken)
Microsoft.TemplateSearch.Common (4)
Abstractions\ITemplateSearchProvider.cs (1)
25Task<IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)>> SearchForTemplatePackagesAsync(
Providers\NuGetMetadataSearchProvider.cs (2)
62public async Task<IReadOnlyList<(ITemplatePackageInfo PackageInfo, IReadOnlyList<ITemplateInfo> MatchedTemplates)>> SearchForTemplatePackagesAsync( 89internal async Task<string> GetSearchFileAsync(CancellationToken cancellationToken)
TemplateSearchCoordinator.cs (1)
39public async Task<IReadOnlyList<SearchResult>> SearchAsync(
Microsoft.TestPlatform.CommunicationUtilities (4)
Interfaces\ICommunicationManager.cs (2)
90Task<Message?> ReceiveMessageAsync(CancellationToken cancellationToken); 101Task<string?> ReceiveRawMessageAsync(CancellationToken cancellationToken);
SocketCommunicationManager.cs (2)
304public async Task<Message?> ReceiveMessageAsync(CancellationToken cancellationToken) 334public async Task<string?> ReceiveRawMessageAsync(CancellationToken cancellationToken)
Microsoft.TestPlatform.CrossPlatEngine (12)
AttachmentsProcessing\TestRunAttachmentsProcessingManager.cs (5)
50public Task<Collection<AttachmentSet>> ProcessTestRunAttachmentsAsync(string? runSettingsXml, IRequestData requestData, IEnumerable<AttachmentSet> attachments, IEnumerable<InvokedDataCollector>? invokedDataCollector, CancellationToken cancellationToken) 55private async Task<Collection<AttachmentSet>> InternalProcessTestRunAttachmentsAsync(string? runSettingsXml, IRequestData requestData, IEnumerable<AttachmentSet> attachments, IEnumerable<InvokedDataCollector>? invokedDataCollector, ITestRunAttachmentsProcessingEventsHandler? eventHandler, CancellationToken cancellationToken) 70Task<Collection<AttachmentSet>> task = Task.Run(async () => await ProcessAttachmentsAsync(runSettingsXml, localAttachments, invokedDataCollector, eventHandler, cancellationToken)); 72var completedTask = await Task.WhenAny(task, cancelAttachmentProcessingCompletionSource.Task).ConfigureAwait(false); 106private async Task<Collection<AttachmentSet>> ProcessAttachmentsAsync(string? runSettingsXml, Collection<AttachmentSet> attachments, IEnumerable<InvokedDataCollector>? invokedDataCollector, ITestRunAttachmentsProcessingEventsHandler? eventsHandler, CancellationToken cancellationToken)
Client\MTP\MtpProxyDiscoveryManager.cs (1)
116var discoverTask = connection.InvokeAsync(
Client\MTP\MtpProxyExecutionManager.cs (1)
398var runTask = connection.InvokeAsync(MtpConstants.RunTestsMethod, runParameters, _cancellationTokenSource.Token);
Client\MTP\MtpServerConnection.cs (5)
114var acceptTask = _listener.AcceptTcpClientAsync(); 129public async Task<object?> InvokeAsync(string method, object? parameters, CancellationToken cancellationToken) 321private static async Task<int> ReadHeadersAsync(Stream stream, CancellationToken cancellationToken) 344private static async Task<string?> ReadAsciiLineAsync(Stream stream, CancellationToken cancellationToken) 370private static async Task<byte[]> ReadExactlyAsync(Stream stream, int count, CancellationToken cancellationToken)
Microsoft.TestPlatform.Extensions.BlameDataCollector (1)
ProcDumpDumper.cs (1)
180var procDumpExit = Task.Run(() => _procDumpProcess.WaitForExit(_timeout));
Microsoft.TestPlatform.TestHostRuntimeProvider (3)
Hosting\DefaultTestHostManager.cs (1)
162public Task<bool> LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken)
Hosting\DotnetTestHostManager.cs (1)
225public Task<bool> LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken)
Hosting\MtpTestRuntimeProvider.cs (1)
91Task<bool> ITestRuntimeProvider.LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken) => throw new NotSupportedException(NotSupportedMessage);
Microsoft.TestPlatform.Utilities (3)
CodeCoverageDataAttachmentsHandler.cs (3)
47public async Task<ICollection<AttachmentSet>> ProcessAttachmentSetsAsync(XmlElement configurationElement, ICollection<AttachmentSet>? attachments, IProgress<int> progressReporter, IMessageLogger? logger, CancellationToken cancellationToken) 95private static async Task<IList<string>?> MergeCodeCoverageFilesAsync(IList<string> files, IProgress<int> progressReporter, CancellationToken cancellationToken) 123private static async Task<IList<string>?> MergeCodeCoverageFilesAsync(IList<string> files, CancellationToken cancellationToken)
Microsoft.TestPlatform.VsTestConsole.TranslationLayer (4)
Interfaces\ITranslationLayerRequestSenderAsync.cs (1)
27Task<int> InitializeCommunicationAsync(int clientConnectionTimeout);
VsTestConsoleRequestSender.cs (3)
123public async Task<int> InitializeCommunicationAsync(int clientConnectionTimeout) 518private async Task<bool> HandShakeWithVsTestConsoleAsync() 1028private async Task<Message> TryReceiveMessageAsync()
Microsoft.TestUtilities (2)
XUnit\SkippedFactTestCase.cs (1)
26public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
XUnit\SkippedTheoryTestCase.cs (1)
33public override async Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink,
Microsoft.VisualStudio.TestPlatform.Common (1)
Interfaces\Engine\ITestRunAttachmentsProcessingManager.cs (1)
38Task<Collection<AttachmentSet>> ProcessTestRunAttachmentsAsync(string? runSettingsXml, IRequestData requestData, IEnumerable<AttachmentSet> attachments, IEnumerable<InvokedDataCollector>? invokedDataCollector, CancellationToken cancellationToken);
Microsoft.VisualStudio.TestPlatform.ObjectModel (2)
DataCollector\IDataCollectorAttachmentProcessor.cs (1)
50Task<ICollection<AttachmentSet>> ProcessAttachmentSetsAsync(XmlElement configurationElement, ICollection<AttachmentSet> attachments, IProgress<int> progressReporter, IMessageLogger logger, CancellationToken cancellationToken);
Host\ITestRunTimeProvider.cs (1)
74Task<bool> LaunchTestHostAsync(TestProcessStartInfo testHostStartInfo, CancellationToken cancellationToken);
MSBuild (1)
src\msbuild\src\Shared\NodeEndpointOutOfProcBase.cs (1)
684Task<int> readTask = localReadPipe.ReadAsync(headerByte.AsMemory(), CancellationToken.None).AsTask();
MSBuild.Coordinator (1)
CoordinatorServer.cs (1)
130private async Task<NamedPipeServerStream?> WaitForClientAsync(CancellationToken token)
mscorlib (1)
src\runtime\src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
1161[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
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)
netstandard (1)
netstandard.cs (1)
2118[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
NuGet.Build.Tasks (2)
BuildTasksUtility.cs (1)
118public static async Task<List<RestoreSummary>> RestoreAsync(
RestoreTask.cs (1)
179private async Task<bool> ExecuteAsync(Common.ILogger log)
NuGet.Build.Tasks.Console (3)
MSBuildStaticGraphRestore.cs (1)
106public async Task<bool> RestoreAsync(string entryProjectFilePath, IDictionary<string, string> globalProperties, IReadOnlyDictionary<string, string> options)
Program.cs (2)
42public static async Task<int> Main(string[] args) 64internal static async Task<int> MainInternal(string[] args, IEnvironmentVariableReader environmentVariableReader)
NuGet.CommandLine.XPlat (86)
Commands\Package\Download\PackageDownloadCommand.cs (1)
21public static void Register(Command packageCommand, Option<bool> interactiveOption, Func<PackageDownloadArgs, CancellationToken, Task<int>> action)
Commands\Package\Download\PackageDownloadRunner.cs (4)
33public static async Task<int> RunAsync(PackageDownloadArgs args, CancellationToken token) 51public static async Task<int> RunAsync(PackageDownloadArgs args, ILoggerWithColor logger, IReadOnlyList<PackageSource> packageSources, ISettings settings, CancellationToken token) 182internal static async Task<(NuGetVersion?, SourceRepository?)> ResolvePackageDownloadVersion( 293private static async Task<bool> DownloadPackageAsync(
Commands\Package\Update\IPackageUpdateIO.cs (5)
37Task<RestoreResult> PreviewUpdatePackageReferenceAsync( 78Task<NuGetVersion?> GetLatestVersionAsync( 90Task<IReadOnlyList<IReadOnlyDictionary<string, IReadOnlyList<PackageVulnerabilityInfo>>>> 105Task<NuGetVersion?> GetNonVulnerableAsync( 119Task<LockFile> GetProjectAssetsFileAsync(DependencyGraphSpec dgSpec, string projectPath, ILogger logger, CancellationToken cancellationToken);
Commands\Package\Update\PackageUpdateCommand.cs (1)
23internal static void Register(Command packageCommand, Option<bool> interactiveOption, Func<PackageUpdateArgs, CancellationToken, Task<int>> action)
Commands\Package\Update\PackageUpdateCommandRunner.cs (8)
29internal static Task<int> Run(PackageUpdateArgs args, IVirtualProjectBuilder? virtualProjectBuilder, CancellationToken cancellationToken) 49internal static async Task<int> Run(PackageUpdateArgs args, ILoggerWithColor logger, IPackageUpdateIO packageUpdateIO, CancellationToken cancellationToken) 127private static async Task<(List<PackageUpdateResult> vulnerablePackages, HashSet<string> packagesScanned)> SelectVulnerablePackagesToUpdateAsync( 245private static async Task<(int? exitCode, Dictionary<string, List<PackageUpdateResult>> projectPackageUpdates, int totalPackagesScanned)> 350private static async Task<(int? exitCode, int totalPackagesScanned)> ProcessProjectsInParallelAsync( 353Func<string, CancellationToken, Task<(List<PackageUpdateResult>? packagesToUpdate, HashSet<string> scannedPackages, int? errorExitCode)>> processProject, 391internal static async Task<(List<PackageUpdateResult>?, HashSet<string> scannedPackages)> SelectSpecificPackagesToUpdateAsync( 550internal static async Task<(List<PackageUpdateResult>? packagesToUpdate, HashSet<string> scannedPackages)> SelectAllPackagesWithUpdatesAsync(
Commands\Package\Update\PackageUpdateIO.cs (13)
131public async Task<IPackageUpdateIO.RestoreResult> PreviewUpdatePackageReferenceAsync( 224public async Task<NuGetVersion?> GetLatestVersionAsync( 232var lookups = new Task<NuGetVersion?>[sources.Count]; 243foreach (var task in lookups) 258public async Task<IReadOnlyList<IReadOnlyDictionary<string, IReadOnlyList<PackageVulnerabilityInfo>>>> GetKnownVulnerabilitiesAsync(ILogger logger, CancellationToken cancellationToken) 266var tasks = new List<Task<GetVulnerabilityInfoResult?>>(auditSources.Count); 283foreach (var task in tasks) 302public async Task<NuGetVersion?> GetNonVulnerableAsync( 311var lookups = new Task<NuGetVersion?>[sources.Count]; 322foreach (var task in lookups) 371private async Task<NuGetVersion?>? FindLowestNonVulnerablePackageVersionAsync( 427private async Task<NuGetVersion?> FindHighestPackageVersionAsync( 458public async Task<LockFile> GetProjectAssetsFileAsync(
Commands\PackageReferenceCommands\AddPackageReferenceCommandRunner.cs (3)
31public async Task<int> ExecuteCommand(PackageReferenceArgs packageReferenceArgs, MSBuildAPIUtility msBuild) 313public static async Task<NuGetVersion> GetLatestVersionAsync(PackageSpec originalPackageSpec, string packageId, ILogger logger, bool prerelease) 404private static async Task<RestoreResultPair> PreviewAddPackageReferenceAsync(PackageReferenceArgs packageReferenceArgs,
Commands\PackageReferenceCommands\IPackageReferenceCommandRunner.cs (1)
12Task<int> ExecuteCommand(PackageReferenceArgs packageRefArgs, MSBuildAPIUtility msBuild);
Commands\PackageReferenceCommands\ListPackage\IListPackageCommandRunner.cs (1)
14Task<int> ExecuteCommandAsync(ListPackageArgs packageRefArgs);
Commands\PackageReferenceCommands\ListPackage\ListPackageCommandRunner.cs (9)
45public async Task<int> ExecuteCommandAsync(ListPackageArgs listPackageArgs) 54internal async Task<(int, ListPackageReportModel)> GetReportDataAsync(ListPackageArgs listPackageArgs) 272private static async Task<List<IReadOnlyDictionary<string, IReadOnlyList<PackageVulnerabilityInfo>>>> GetVulnerabilityData( 295private static async Task<bool> TryAddSourceVulnerabilityInfo( 424internal async Task<Dictionary<string, List<IPackageSearchMetadata>>> GetPackageMetadataAsync( 472Func<TItem, CancellationToken, Task<TResult>> taskFactory, 478var tasks = new Task<TResult>[taskCount]; 673private async Task<KeyValuePair<string, List<IPackageSearchMetadata>>> GetPackageMetadataAsync( 698private async Task<IEnumerable<IPackageSearchMetadata>> GetPackageMetadataAsync(
Commands\PackageReferenceCommands\RemovePackageReferenceCommandRunner.cs (1)
16public Task<int> ExecuteCommand(PackageReferenceArgs packageReferenceArgs, MSBuildAPIUtility msBuild)
Commands\PackageSearch\PackageSearchCommand.cs (2)
25public static void Register(Command rootCommand, Func<ILoggerWithColor> getLogger, Func<PackageSearchArgs, string, CancellationToken, Task<int>> setupSettingsAndRunSearchAsync) 147public static async Task<int> SetupSettingsAndRunSearchAsync(PackageSearchArgs packageSearchArgs, string configFile, CancellationToken cancellationToken)
Commands\PackageSearch\PackageSearchRunner.cs (7)
29public static async Task<int> RunAsync( 77Func<PackageSource, Task<IEnumerable<IPackageSearchMetadata>>> searchPackageSourceAsync = 82Dictionary<Task<IEnumerable<IPackageSearchMetadata>>, PackageSource> searchRequests = new(); 86Task<IEnumerable<IPackageSearchMetadata>> searchTask = searchPackageSourceAsync(packageSource); 93Task<IEnumerable<IPackageSearchMetadata>> completedTask = await Task.WhenAny(searchRequests.Keys); 148private static Task<IEnumerable<IPackageSearchMetadata>> SearchAsync( 180private static Task<IEnumerable<IPackageSearchMetadata>> GetPackageAsync(
Commands\Signing\TrustedSignersCommand.cs (2)
186private static async Task<int> ExecuteCommand(TrustCommand action, 234Task<int> trustedSignTask = runner.ExecuteCommandAsync(trustedSignersArgs);
Commands\Why\WhyCommand.cs (1)
51internal static void Register(Command rootCommand, Lazy<IAnsiConsole> console, Func<WhyCommandArgs, Task<int>> action)
Commands\Why\WhyCommandRunner.cs (1)
32public Task<int> ExecuteCommand(WhyCommandArgs whyCommandArgs)
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
Utility\AddPackageCommandUtility.cs (5)
31public static async Task<NuGetVersion> GetLatestVersionFromSourcesAsync(IList<PackageSource> sources, ILogger logger, string packageId, bool prerelease, CancellationToken cancellationToken) 34var tasks = new List<Task<NuGetVersion>>(); 42var finishedTask = await Task.WhenAny(tasks); 50foreach (var t in tasks) 71public static async Task<NuGetVersion> GetLatestVersionFromSourceAsync(PackageSource source, ILogger logger, string packageId, bool prerelease, CancellationToken cancellationToken)
NuGet.Commands (134)
RestoreCommand\CompatibilityChecker.cs (1)
39internal async Task<CompatibilityCheckResult> CheckAsync(
RestoreCommand\DependencyGraphResolver.cs (3)
112public async Task<ValueTuple<bool, List<RestoreTargetGraph>, RuntimeGraph>> ResolveAsync( 313private static async Task<(bool Success, RestoreTargetGraph RestoreTargetGraph)> CreateRestoreTargetGraphAsync( 908private async Task<Dictionary<LibraryDependencyIndex, ResolvedDependencyGraphItem>> ResolveDependencyGraphItemsAsync(
RestoreCommand\DependencyGraphResolver.DependencyGraphItem.cs (3)
25/// Gets or initializes a <see cref="Task{TResult}" /> that returns a <see cref="GraphItem{TItem}" /> containing a <see cref="RemoteResolveResult" /> that represents the resolved graph item after looking it up in the configured feeds. 27public required Task<GraphItem<RemoteResolveResult>> FindLibraryTask { get; init; } 82public async Task<GraphItem<RemoteResolveResult>> GetGraphItemAsync(
RestoreCommand\Diagnostics\UnresolvedMessages.cs (5)
51var messageTasks = new List<Task<RestoreLogMessage>>(); 76internal static async Task<RestoreLogMessage> GetMessageAsync(string targetGraphName, 253internal static async Task<List<KeyValuePair<PackageSource, ImmutableArray<NuGetVersion>>>> GetSourceInfosForIdAsync( 267foreach (var task in tasks) 281internal static async Task<KeyValuePair<PackageSource, ImmutableArray<NuGetVersion>>> GetSourceInfoForIdAsync(
RestoreCommand\IVulnerabilityInformationProvider.cs (1)
17Task<GetVulnerabilityInfoResult?> GetVulnerabilityInformationAsync(CancellationToken cancellationToken);
RestoreCommand\ProjectRestoreCommand.cs (15)
45public async Task<Tuple<bool, List<RestoreTargetGraph>, RuntimeGraph>> TryRestoreAsync(LibraryRange projectRange, 58var frameworkTasks = new List<Task<RestoreTargetGraph>>(); 112var runtimeTasks = new List<Task<RestoreTargetGraph[]>>(); 217internal static async Task<DownloadDependencyResolutionResult[]> DownloadDependenciesAsync(PackageSpec packageSpec, RemoteWalkContext context, TelemetryActivity telemetryActivity, string telemetryPrefix, CancellationToken cancellationToken) 221List<Task<DownloadDependencyResolutionResult>> downloadDependencyResolutionTasks = new(capacity: packageSpec.TargetFrameworks.Count); 225Task<DownloadDependencyResolutionResult> task = ResolveDownloadDependenciesAsync(context, targetFrameworkInformation, cancellationToken); 236async Task<DownloadDependencyResolutionResult> ResolveDownloadDependenciesAsync(RemoteWalkContext context, TargetFrameworkInformation targetFrameworkInformation, CancellationToken token) 243List<Task<Tuple<LibraryRange, RemoteMatch>>> packageDownloadTasks = new(capacity: targetFrameworkInformation.DownloadDependencies.Length); 256private Task<RestoreTargetGraph> WalkDependenciesAsync(LibraryRange projectRange, 273private async Task<RestoreTargetGraph> WalkDependenciesAsync(LibraryRange projectRange, 302internal async Task<bool> ResolutionSucceeded(IEnumerable<RestoreTargetGraph> graphs, IList<DownloadDependencyResolutionResult> downloadDependencyResults, RemoteWalkContext context, CancellationToken token) 346public async Task<bool> InstallPackagesAsync( 396private async Task<bool> InstallPackageAsync(RemoteMatch installItem, NuGetv3LocalRepository userPackageFolder, PackageExtractionContext packageExtractionContext, CancellationToken token) 457private Task<RestoreTargetGraph[]> WalkRuntimeDependenciesAsync(LibraryRange projectRange, 465var resultGraphs = new List<Task<RestoreTargetGraph>>();
RestoreCommand\RequestFactory\DependencyGraphFileRequestProvider.cs (2)
23public virtual Task<IReadOnlyList<RestoreSummaryRequest>> CreateRequests( 33public virtual Task<bool> Supports(string path)
RestoreCommand\RequestFactory\DependencyGraphSpecRequestProvider.cs (1)
52public Task<IReadOnlyList<RestoreSummaryRequest>> CreateRequests(
RestoreCommand\RequestFactory\IPreLoadedRestoreRequestProvider.cs (1)
19Task<IReadOnlyList<RestoreSummaryRequest>> CreateRequests(RestoreArgs restoreContext);
RestoreCommand\RequestFactory\IRestoreRequestProvider.cs (2)
16Task<bool> Supports(string path); 24Task<IReadOnlyList<RestoreSummaryRequest>> CreateRequests(
RestoreCommand\RestoreCommand.cs (14)
205public Task<RestoreResult> ExecuteAsync() 210public async Task<RestoreResult> ExecuteAsync(CancellationToken token) 591private async Task<(RestoreResult, bool, CacheFile)> EvaluateNoOpAsync(TelemetryActivity telemetry, CacheFile cacheFile, Stopwatch restoreTime) 727private async Task<EvaluateLockFileResult> 749private async Task<(bool, List<RestoreTargetGraph>)> GenerateRestoreGraphsAsync(TelemetryActivity telemetry, RemoteWalkContext contextForProject, bool success, CancellationToken token) 796private async Task<(bool, IEnumerable<MSBuildOutputFile>, string, string, LockFile, List<RestoreTargetGraph>, PackagesLockFile, string, CacheFile)> ProcessRestoreResultAsync(TelemetryActivity telemetry, 952private async Task<bool> PerformAuditAsync(List<RestoreTargetGraph> graphs, TelemetryActivity telemetry, CancellationToken token) 1573private async Task<(bool success, bool isLockFileValid, PackagesLockFile packagesLockFile)> EvaluatePackagesLockFileAsync( 1827private async Task<bool> ValidateRestoreGraphsAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1850private static async Task<bool> ValidateCyclesAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1868private async Task<bool> ValidateConflictsAsync(IEnumerable<RestoreTargetGraph> graphs, ILogger logger) 1969private static async Task<IList<CompatibilityCheckResult>> VerifyCompatibilityAsync( 2017private async Task<(bool, List<RestoreTargetGraph>)> ExecuteLegacyRestoreAsync( 2202private async Task<(bool, List<RestoreTargetGraph>)> ExecuteRestoreAsync(
RestoreCommand\RestoreRunner.cs (22)
26public static async Task<IReadOnlyList<RestoreSummary>> RunAsync(RestoreArgs restoreContext, CancellationToken token) 38public static async Task<IReadOnlyList<RestoreSummary>> RunAsync(RestoreArgs restoreContext) 47private static async Task<IReadOnlyList<RestoreSummary>> RunAsync( 70var restoreTasks = new List<Task<RestoreSummary>>(maxTasks); 85var task = Task.Run(() => ExecuteAndCommitAsync(request, restoreArgs.ProgressReporter, token), token); 103public static Task<IReadOnlyList<RestoreResultPair>> RunWithoutCommit( 113public static async Task<IReadOnlyList<RestoreResultPair>> RunWithoutCommitAsync( 136var restoreTasks = new List<Task<RestoreResultPair>>(maxTasks); 151var task = Task.Run(() => ExecuteAsync(request, CancellationToken.None)); 169public static async Task<IReadOnlyList<RestoreSummaryRequest>> GetRequests(RestoreArgs restoreContext) 241private static async Task<RestoreSummary> ExecuteAndCommitAsync(RestoreSummaryRequest summaryRequest, IRestoreProgressReporter progressReporter, CancellationToken token) 248private static async Task<RestoreResultPair> ExecuteAsync(RestoreSummaryRequest summaryRequest, CancellationToken token) 268public static Task<RestoreSummary> CommitAsync(RestoreResultPair restoreResult, CancellationToken token) => CommitAsync(restoreResult, progressReporter: null, token); 270private static async Task<RestoreSummary> CommitAsync(RestoreResultPair restoreResult, IRestoreProgressReporter progressReporter, CancellationToken token) 339private static async Task<RestoreSummary> CompleteTaskAsync(List<Task<RestoreSummary>> restoreTasks) 341var doneTask = await Task.WhenAny(restoreTasks); 346private static async Task<RestoreResultPair> 347CompleteTaskAsync(List<Task<RestoreResultPair>> restoreTasks) 349var doneTask = await Task.WhenAny(restoreTasks); 354private static async Task<IReadOnlyList<RestoreSummaryRequest>> CreatePreLoadedRequests( 368private static async Task<IReadOnlyList<RestoreSummaryRequest>> CreateRequests(
RestoreCommand\SourceRepositoryDependencyProvider.cs (11)
187/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryIdentity" /> 199public async Task<LibraryIdentity> FindLibraryAsync( 254private async Task<LibraryIdentity> FindLibraryCoreAsync( 340/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryDependencyInfo" /> 352public Task<LibraryDependencyInfo> GetDependenciesAsync( 391private async Task<LibraryDependencyInfo> GetDependenciesCoreAsync( 464/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="IPackageDownloader" /> 474public async Task<IPackageDownloader> GetPackageDownloaderAsync( 650/// The task result (<see cref="Task{TResult}.Result" />) returns an 652public async Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 661internal async Task<IEnumerable<NuGetVersion>> GetAllVersionsInternalAsync(
RestoreCommand\Utility\AuditUtility.cs (3)
189public async Task<bool> CheckPackageVulnerabilitiesAsync(CancellationToken cancellationToken) 443private async Task<List<IReadOnlyDictionary<string, IReadOnlyList<PackageVulnerabilityInfo>>>?> GetAllVulnerabilityDataAsync(CancellationToken cancellationToken) 445var results = new Task<GetVulnerabilityInfoResult?>[_vulnerabilityInfoProviders.Count];
RestoreCommand\VulnerabilityInformationProvider.cs (2)
30public async Task<GetVulnerabilityInfoResult?> GetVulnerabilityInformationAsync(CancellationToken cancellationToken) 63private async Task<GetVulnerabilityInfoResult?> GetVulnerabilityInfoAsync(CancellationToken cancellationToken)
SignCommand\CertificateProvider.cs (2)
52public static async Task<X509Certificate2Collection> GetCertificatesAsync(CertificateSourceOptions options) 125Task<X509Certificate2> LoadCertificateFromFileAsync(CertificateSourceOptions options)
SignCommand\ISignCommandRunner.cs (1)
12Task<int> ExecuteCommandAsync(SignArgs signArgs);
SignCommand\SignCommandRunner.cs (3)
25public async Task<int> ExecuteCommandAsync(SignArgs signArgs) 87public async Task<int> ExecuteCommandAsync( 181private static async Task<X509Certificate2> GetCertificateAsync(SignArgs signArgs)
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
src\nuget-client\build\Shared\TaskResultCache.cs (13)
23private readonly ConcurrentDictionary<TKey, Task<TValue>> _cache; 65/// Gets the cached async operation associated with the specified key, or runs the operation asynchronously and returns <see cref="Task{TValue}" /> that the caller can await. 71/// <returns>A <see cref="Task{TResult}" /> for the specified asynchronous operation from the cache if found, otherwise the scheduled asynchronous operation to await.</returns> 72public Task<TValue> GetOrAddAsync<TState>(TKey key, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 78/// Gets the cached async operation associated with the specified key, or runs the operation asynchronously and returns <see cref="Task{TValue}" /> that the caller can await, and optionally refreshes the cache. 85/// <returns>A <see cref="Task{TResult}" /> for the specified asynchronous operation from the cache if found, otherwise the scheduled asynchronous operation to await.</returns> 86public Task<TValue> GetOrAddAsync<TState>(TKey key, bool refresh, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 88if (!refresh && _cache.TryGetValue(key, out Task<TValue>? value)) 125public Task<TValue> GetValueAsync(TKey key) 127if (TryGetValue(key, out Task<TValue>? value)) 136public bool TryGetValue(TKey key, [NotNullWhen(true)] out Task<TValue>? value)
TrustedSignersCommand\ITrustedSignersCommandRunner.cs (1)
12Task<int> ExecuteCommandAsync(TrustedSignersArgs trustedSignersArgs);
TrustedSignersCommand\TrustedSignerActionsProvider.cs (1)
267private async Task<CertificateItem[]> GetCertificateItemsFromServiceIndexAsync(string serviceIndex, CancellationToken token)
TrustedSignersCommand\TrustedSignersCommandRunner.cs (1)
38public async Task<int> ExecuteCommandAsync(TrustedSignersArgs trustedSignersArgs)
Utility\CommandRunnerUtility.cs (2)
74public static async Task<PackageUpdateResource> GetPackageUpdateResource(IPackageSourceProvider sourceProvider, PackageSource packageSource, CancellationToken cancellationToken) 103public static async Task<SymbolPackageUpdateResourceV3> GetSymbolPackageUpdateResource(IPackageSourceProvider sourceProvider, string source, CancellationToken cancellationToken)
VerifyCommand\IVerifyCommandRunner.cs (1)
12Task<int> ExecuteCommandAsync(VerifyArgs verifyArgs);
VerifyCommand\VerifyCommandRunner.cs (2)
30public async Task<int> ExecuteCommandAsync(VerifyArgs verifyArgs) 112private async Task<int> VerifySignatureForPackageAsync(string packagePath, ILogger logger, PackageSignatureVerifier verifier, SignedPackageVerifierSettings verifierSettings)
NuGet.Common (37)
AsyncEnumerable\AggregateEnumeratorAsync.cs (1)
55public async Task<bool> MoveNextAsync()
AsyncEnumerable\IEnumeratorAsync.cs (1)
32Task<bool> MoveNextAsync();
AsyncLazy.cs (7)
18private readonly Lazy<Task<T>> _inner; 20public AsyncLazy(Func<Task<T>> valueFactory) 22_inner = new Lazy<Task<T>>(valueFactory); 25public AsyncLazy(Lazy<Task<T>> inner) 32public static implicit operator Lazy<Task<T>>(AsyncLazy<T> outer) => outer._inner; // implicit conversion 40public static AsyncLazy<T> New<T>(Func<Task<T>> asyncValueFactory) => new AsyncLazy<T>(asyncValueFactory); 44public static AsyncLazy<T> New<T>(Lazy<Task<T>> inner) => new AsyncLazy<T>(inner);
ConcurrencyUtilities.cs (2)
49public async static Task<T> ExecuteWithFileLockedAsync<T>(string filePath, 50Func<CancellationToken, Task<T>> action,
PathUtil\FileUtility.cs (2)
257public static async Task<T> SafeReadAsync<T>(string filePath, Func<FileStream, string, Task<T>> read)
Preprocessor.cs (3)
24/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" />.</returns> 31public static async Task<string> ProcessAsync( 32Func<Task<Stream>> streamTaskFactory,
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
NuGet.Configuration (2)
Credential\ICredentialService.cs (2)
25/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="ICredentials" />.</returns> 29Task<ICredentials?> GetCredentialsAsync(
NuGet.Credentials (7)
CredentialService.cs (1)
75public async Task<ICredentials?> GetCredentialsAsync(
DefaultCredentialServiceUtility.cs (1)
80private static async Task<IEnumerable<ICredentialProvider>> GetCredentialProvidersAsync(ILogger logger)
DefaultNetworkCredentialsCredentialProvider.cs (1)
41public Task<CredentialResponse> GetAsync(
ICredentialProvider.cs (1)
35Task<CredentialResponse> GetAsync(
PluginCredentialProvider.cs (1)
91public Task<CredentialResponse> GetAsync(
SecurePluginCredentialProvider.cs (1)
85public async Task<CredentialResponse> GetAsync(Uri uri, IWebProxy proxy, CredentialRequestType type, string message, bool isRetry, bool nonInteractive, CancellationToken cancellationToken)
SecurePluginCredentialProviderBuilder.cs (1)
43public async Task<IEnumerable<ICredentialProvider>> BuildAllAsync()
NuGet.DependencyResolver.Core (71)
Providers\IRemoteDependencyProvider.cs (7)
52/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryIdentity" /> 64Task<LibraryIdentity> FindLibraryAsync( 80/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryDependencyInfo" /> 92Task<LibraryDependencyInfo> GetDependenciesAsync( 107/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="IPackageDownloader" /> 117Task<IPackageDownloader> GetPackageDownloaderAsync( 123Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync(
Providers\LocalDependencyProvider.cs (7)
67/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryIdentity" /> 73public Task<LibraryIdentity> FindLibraryAsync( 109/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="LibraryDependencyInfo" /> 115public Task<LibraryDependencyInfo> GetDependenciesAsync( 150/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="IPackageDownloader" /> 153public Task<IPackageDownloader> GetPackageDownloaderAsync( 162public Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync(
Remote\RemoteDependencyWalker.cs (6)
30public async Task<GraphNode<RemoteResolveResult>> WalkAsync(LibraryRange library, NuGetFramework framework, string runtimeIdentifier, RuntimeGraph runtimeGraph, bool recursive) 170var newGraphItemTask = ResolverUtility.FindLibraryCachedAsync( 582private async Task<GraphNode<RemoteResolveResult>> AddTransitiveCentralPackageVersionNodesAsync( 721/// A <see cref="Task{TResult}"/> that represents the retrieval of the necessary <see cref="GraphItem{TItem}"/> to complete construction of the <see cref="GraphNode{TItem}"/>. 723public readonly Task<GraphItem<RemoteResolveResult>> GraphItemTask; 740public GraphNodeCreationData(Task<GraphItem<RemoteResolveResult>> graphItemTask, HashSet<LibraryDependency> runtimeDependencies, LibraryRange libraryRange, GraphEdge<RemoteResolveResult> outerEdge)
Remote\RemoteWalkContext.cs (2)
102public async Task<HashSet<RemoteMatch>> GetUnresolvedRemoteMatchesAsync() 108if (!FindLibraryEntryCache.TryGetValue(key, out Task<GraphItem<RemoteResolveResult>>? task))
ResolverUtility.cs (15)
20public static Task<GraphItem<RemoteResolveResult>> FindLibraryCachedAsync( 36public static async Task<GraphItem<RemoteResolveResult>> FindLibraryEntryAsync( 111private static async Task<GraphItem<RemoteResolveResult>> CreateGraphItemAsync( 156internal static Task<RemoteMatch?> FindLibraryMatchAsync( 182internal static async Task<RemoteMatch?> FindLibraryMatchAsync( 273public static Task<Tuple<LibraryRange, RemoteMatch>> FindPackageLibraryMatchCachedAsync( 284private static async Task<Tuple<LibraryRange, RemoteMatch>> ResolvePackageLibraryMatchAsync(LibraryRange libraryRange, RemoteWalkContext remoteWalkContext, CancellationToken cancellationToken) 301private static async Task<RemoteMatch?> FindPackageLibraryMatchAsync(LibraryRange libraryRange, NuGetFramework framework, IEnumerable<IRemoteDependencyProvider> remoteProviders, IEnumerable<IRemoteDependencyProvider> localProviders, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) 379public static Task<RemoteMatch?> FindProjectMatchAsync( 388internal static Task<RemoteMatch?> FindProjectMatchAsync( 431public static async Task<RemoteMatch?> FindLibraryByVersionAsync( 493private static async Task<RemoteMatch?> FindLibraryFromSourcesAsync( 501var tasks = new List<Task<RemoteMatch?>>(); 512var task = await Task.WhenAny(tasks); 535static async Task<RemoteMatch?> FindLibraryFromProviderAsync(IRemoteDependencyProvider provider, LibraryRange libraryRange,
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
src\nuget-client\build\Shared\TaskResultCache.cs (13)
23private readonly ConcurrentDictionary<TKey, Task<TValue>> _cache; 65/// Gets the cached async operation associated with the specified key, or runs the operation asynchronously and returns <see cref="Task{TValue}" /> that the caller can await. 71/// <returns>A <see cref="Task{TResult}" /> for the specified asynchronous operation from the cache if found, otherwise the scheduled asynchronous operation to await.</returns> 72public Task<TValue> GetOrAddAsync<TState>(TKey key, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 78/// Gets the cached async operation associated with the specified key, or runs the operation asynchronously and returns <see cref="Task{TValue}" /> that the caller can await, and optionally refreshes the cache. 85/// <returns>A <see cref="Task{TResult}" /> for the specified asynchronous operation from the cache if found, otherwise the scheduled asynchronous operation to await.</returns> 86public Task<TValue> GetOrAddAsync<TState>(TKey key, bool refresh, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 88if (!refresh && _cache.TryGetValue(key, out Task<TValue>? value)) 125public Task<TValue> GetValueAsync(TKey key) 127if (TryGetValue(key, out Task<TValue>? value)) 136public bool TryGetValue(TKey key, [NotNullWhen(true)] out Task<TValue>? value)
NuGet.PackageManagement (201)
Audit\AuditChecker.cs (6)
41public async Task<AuditCheckResult> CheckPackageVulnerabilitiesAsync(IEnumerable<PackageRestoreData> packages, Dictionary<string, RestoreAuditProperties> restoreAuditProperties, CancellationToken cancellationToken) 141internal static async Task<(int, GetVulnerabilityInfoResult?)> GetAllVulnerabilityDataAsync( 149List<Task<GetVulnerabilityInfoResult?>> results; 168Task<GetVulnerabilityInfoResult?> getVulnerabilityInfoResult = GetVulnerabilityInfoAsync(source, sourceCacheContext, logger); 182Task<GetVulnerabilityInfoResult?> resultTask = results[i]; 218static async Task<GetVulnerabilityInfoResult?> GetVulnerabilityInfoAsync(SourceRepository source, SourceCacheContext cacheContext, ILogger logger)
BuildIntegration\DependencyGraphRestoreUtility.cs (7)
33public static Task<IReadOnlyList<RestoreSummary>> RestoreAsync( 64public static async Task<IReadOnlyList<RestoreSummary>> RestoreAsync( 113internal static async Task<RestoreResultPair> PreviewRestoreAsync( 163internal static async Task<IEnumerable<RestoreResultPair>> PreviewRestoreProjectsAsync( 225public static async Task<PackageSpec> GetProjectSpec(IDependencyGraphProject project, DependencyGraphCacheContext context) 235public static async Task<DependencyGraphSpec> GetSolutionRestoreSpec( 243public static async Task<(DependencyGraphSpec dgSpec, IReadOnlyList<IAssetsLogMessage> additionalMessages)> GetSolutionRestoreSpecAndAdditionalMessages(
FileModifiers\IPackageFileTransformer.cs (2)
34Func<Task<Stream>> streamTaskFactory, 57Func<Task<Stream>> streamTaskFactory,
FileModifiers\Preprocessor.cs (4)
34Func<Task<Stream>> streamTaskFactory, 74Func<Task<Stream>> streamTaskFactory, 99internal static Task<string> ProcessAsync( 100Func<Task<Stream>> streamTaskFactory,
FileModifiers\XdtTransformer.cs (3)
40Func<Task<Stream>> streamTaskFactory, 78Func<Task<Stream>> streamTaskFactory, 100Func<Task<Stream>> streamTaskFactory,
FileModifiers\XmlTransformer.cs (5)
56Func<Task<Stream>> streamTaskFactory, 100Func<Task<Stream>> streamTaskFactory, 151private static async Task<XElement> GetXmlAsync( 176private static async Task<XElement> GetXmlAsync( 177Func<Task<Stream>> streamTaskFactory,
IDE\IPackageRestoreManager.cs (3)
47Task<IEnumerable<PackageRestoreData>> GetPackagesInSolutionAsync(string solutionDirectory, CancellationToken token); 79Task<PackageRestoreResult> RestoreMissingPackagesInSolutionAsync(string solutionDirectory, 100Task<PackageRestoreResult> RestoreMissingPackagesAsync(string solutionDirectory,
IDE\ISolutionManager.cs (5)
56Task<bool> IsSolutionAvailableAsync(); 60Task<IEnumerable<NuGetProject>> GetNuGetProjectsAsync(); 69Task<string> GetNuGetProjectSafeNameAsync(NuGetProject nuGetProject); 82Task<NuGetProject> GetNuGetProjectAsync(string nuGetProjectSafeName); 100Task<bool> DoesNuGetSupportsAnyProjectAsync();
IDE\PackageRestoreManager.cs (12)
105public async Task<IEnumerable<PackageRestoreData>> GetPackagesInSolutionAsync(string solutionDirectory, CancellationToken token) 144private async Task<Dictionary<PackageReference, List<string>>> GetPackagesReferencesDictionaryAsync(CancellationToken token) 184private async Task<Dictionary<string, RestoreAuditProperties>> GetRestoreAuditProperties() 223async Task<HashSet<string>> GetSuppressionsAsync(MSBuildNuGetProject msbuildProject) 245public virtual async Task<PackageRestoreResult> RestoreMissingPackagesInSolutionAsync( 285public async virtual Task<PackageRestoreResult> RestoreMissingPackagesAsync(string solutionDirectory, 347public static async Task<PackageRestoreResult> RestoreMissingPackagesAsync( 419private static async Task<AuditCheckResult> RunNuGetAudit(PackageRestoreContext packageRestoreContext, List<SourceRepository> sourceRepositories, IReadOnlyList<SourceRepository> auditSources) 444private static async Task<IEnumerable<AttemptedPackage>> ThrottledPackageRestoreAsync( 451var tasks = new List<Task<List<AttemptedPackage>>>(); 469private static async Task<List<AttemptedPackage>> PackageRestoreRunnerAsync( 517private static async Task<AttemptedPackage> RestorePackageAsync(
IDependencyGraphProject.cs (2)
28Task<IReadOnlyList<PackageSpec>> GetPackageSpecsAsync(DependencyGraphCacheContext context); 34Task<(IReadOnlyList<PackageSpec> dgSpecs, IReadOnlyList<IAssetsLogMessage> additionalMessages)> GetPackageSpecsAndAdditionalMessagesAsync(DependencyGraphCacheContext context);
NuGetPackageManager.cs (46)
485public Task<IEnumerable<NuGetProjectAction>> PreviewInstallPackageAsync( 502public async Task<IEnumerable<NuGetProjectAction>> PreviewInstallPackageAsync( 560public Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesAsync( 579public Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesAsync( 599public Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesAsync( 619public Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesAsync( 639private async Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesAsync( 680var tasks = new List<Task<IEnumerable<NuGetProjectAction>>>(maxTasks); 793private async Task<List<PackageIdentity>> GetPackagesToUpdateInProjectAsync( 812private async Task<IEnumerable<T>> CompleteTaskAsync<T>( 813List<Task<IEnumerable<T>>> updateTasks) 815var doneTask = await Task.WhenAny(updateTasks); 823private async Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesForBuildIntegratedAsync( 998private async Task<IEnumerable<NuGetProjectAction>> PreviewUpdatePackagesForClassicAsync( 1345public async Task<IEnumerable<PackageDependencyInfo>> GetInstalledPackagesDependencyInfo(NuGetProject nuGetProject, CancellationToken token, bool includeUnresolved = false) 1363public async Task<IEnumerable<PackageIdentity>> GetInstalledPackagesInDependencyOrder(NuGetProject nuGetProject, 1550public async Task<IEnumerable<NuGetProjectAction>> PreviewInstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, 1576public async Task<IEnumerable<ResolvedAction>> PreviewProjectsInstallPackageAsync( 1587public async Task<IEnumerable<ResolvedAction>> PreviewProjectsInstallPackageAsync( 1609public async Task<IEnumerable<ResolvedAction>> PreviewProjectsInstallPackageAsync( 1714public async Task<IEnumerable<NuGetProjectAction>> PreviewInstallPackageAsync( 1726public async Task<IEnumerable<NuGetProjectAction>> PreviewInstallPackageAsync( 2047private static async Task<SourceRepository> GetSourceRepository(PackageIdentity packageIdentity, 2060var results = new Queue<KeyValuePair<SourceRepository, Task<bool>>>(); 2068var task = Task.Run(() => metadataResource.Exists(packageIdentity, sourceCacheContext, logger, tokenSource.Token), tokenSource.Token); 2069results.Enqueue(new KeyValuePair<SourceRepository, Task<bool>>(sourceRepository, task)); 2124public async Task<IEnumerable<NuGetProjectAction>> PreviewProjectsUninstallPackageAsync( 2217private async Task<IEnumerable<NuGetProjectAction>> PreviewBuildIntegratedNuGetProjectsUninstallPackageInternalAsync( 2267public async Task<IEnumerable<NuGetProjectAction>> PreviewUninstallPackageAsync(NuGetProject nuGetProject, string packageId, 2308public async Task<IEnumerable<NuGetProjectAction>> PreviewUninstallPackageAsync(NuGetProject nuGetProject, PackageIdentity packageIdentity, 2343private async Task<IEnumerable<NuGetProjectAction>> PreviewUninstallPackageInternalAsync(NuGetProject nuGetProject, Packaging.PackageReference packageReference, 2393private async Task<IEnumerable<PackageDependencyInfo>> GetDependencyInfoFromPackagesFolderAsync(IEnumerable<PackageIdentity> packageIdentities, 2827public async Task<BuildIntegratedProjectAction> PreviewBuildIntegratedProjectActionsAsync( 2874internal async Task<IEnumerable<ResolvedAction>> PreviewBuildIntegratedProjectsActionsAsync( 3611public async Task<bool> RestorePackageAsync( 3646public Task<bool> CopySatelliteFilesAsync(PackageIdentity packageIdentity, INuGetProjectContext nuGetProjectContext, CancellationToken token) 3699public static async Task<bool> PackageExistsInAnotherNuGetProject(NuGetProject nuGetProject, PackageIdentity packageIdentity, ISolutionManager solutionManager, CancellationToken token, bool excludeIntegrated = false) 3740private async Task<bool> DeletePackageAsync(PackageIdentity packageIdentity, INuGetProjectContext nuGetProjectContext, CancellationToken token) 3767public static Task<ResolvedPackage> GetLatestVersionAsync( 3784public static Task<ResolvedPackage> GetLatestVersionAsync( 3808public static async Task<ResolvedPackage> GetLatestVersionAsync( 3826public static async Task<ResolvedPackage> GetLatestVersionAsync( 3834var tasks = new List<Task<ResolvedPackage>>(); 3848public static async Task<ResolvedPackage> GetLatestVersionAsync( 3856var tasks = new List<Task<ResolvedPackage>>(); 3872private static async Task<ResolvedPackage> GetLatestVersionCoreAsync(
PackageDownloader.cs (10)
37/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="DownloadResourceResult" /> 49public static async Task<DownloadResourceResult> GetDownloadResourceResultAsync( 77var failedTasks = new List<Task<DownloadResourceResult>>(); 78var tasksLookup = new Dictionary<Task<DownloadResourceResult>, SourceRepository>(); 126var tasks = new List<Task<DownloadResourceResult>>(); 141var task = GetDownloadResourceResultAsync( 155var completedTask = await Task.WhenAny(tasks); 212foreach (var task in failedTasks) 251/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="DownloadResourceResult" /> 263public static async Task<DownloadResourceResult> GetDownloadResourceResultAsync(
PackagePreFetcher.cs (2)
25public static async Task<Dictionary<PackageIdentity, PackagePreFetcherResult>> GetPackagesAsync( 132var task = Task.Run(async () => await PackageDownloader.GetDownloadResourceResultAsync(
PackagePreFetcherResult.cs (3)
19private readonly Task<DownloadResourceResult> _downloadTask; 55Task<DownloadResourceResult> downloadTask, 131public async Task<DownloadResourceResult> GetResultAsync()
Projects\BuildIntegratedNuGetProject.cs (8)
43public abstract Task<string> GetAssetsFilePathAsync(); 45public abstract Task<string> GetCacheFilePathAsync(); 51public abstract Task<string> GetAssetsFilePathOrNullAsync(); 60public abstract Task<IReadOnlyList<PackageSpec>> GetPackageSpecsAsync(DependencyGraphCacheContext context); 62public abstract Task<(IReadOnlyList<PackageSpec> dgSpecs, IReadOnlyList<IAssetsLogMessage> additionalMessages)> GetPackageSpecsAndAdditionalMessagesAsync(DependencyGraphCacheContext context); 64public abstract Task<bool> InstallPackageAsync( 71public override sealed Task<bool> InstallPackageAsync( 80public abstract Task<bool> UninstallPackageAsync(
Projects\DefaultProjectServices.cs (4)
46public Task<IEnumerable<LibraryDependency>> GetPackageReferencesAsync( 53public Task<IEnumerable<ProjectRestoreReference>> GetProjectReferencesAsync( 60public Task<IReadOnlyList<(string id, string[] metadata)>> GetItemsAsync(string itemTypeName, params string[] metadataNames) 94public Task<bool> ExecutePackageInitScriptAsync(
Projects\FolderNuGetProject.cs (10)
88/// The task result (<see cref="Task{TResult}.Result" />) returns an 90public override Task<IEnumerable<PackageReference>> GetInstalledPackagesAsync(CancellationToken token) 103/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 113public override Task<bool> InstallPackageAsync( 236/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 238public override Task<bool> UninstallPackageAsync( 377/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 385public async Task<bool> CopySatelliteFilesAsync( 560/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 566public async Task<bool> DeletePackage(PackageIdentity packageIdentity,
Projects\IMSBuildProjectSystem.cs (1)
36Task<bool> ReferenceExistsAsync(string name);
Projects\IProjectScriptHostService.cs (1)
43Task<bool> ExecutePackageInitScriptAsync(
Projects\IProjectSystemReferencesReader.cs (3)
30Task<IEnumerable<LibraryDependency>> GetPackageReferencesAsync( 40Task<IEnumerable<ProjectRestoreReference>> GetProjectReferencesAsync( 50Task<IReadOnlyList<(string id, string[] metadata)>> GetItemsAsync(string itemTypeName, params string[] metadataNames);
Projects\MSBuildNuGetProject.cs (5)
115public override Task<IEnumerable<PackageReference>> GetInstalledPackagesAsync(CancellationToken token) 142public override async Task<bool> InstallPackageAsync( 417public override async Task<bool> UninstallPackageAsync(PackageIdentity packageIdentity, INuGetProjectContext nuGetProjectContext, CancellationToken token) 640public async Task<IReadOnlyList<PackageSpec>> GetPackageSpecsAsync(DependencyGraphCacheContext context) 646public async Task<(IReadOnlyList<PackageSpec> dgSpecs, IReadOnlyList<IAssetsLogMessage> additionalMessages)> GetPackageSpecsAndAdditionalMessagesAsync(DependencyGraphCacheContext context)
Projects\NuGetProject.cs (3)
42public abstract Task<bool> InstallPackageAsync( 52public abstract Task<bool> UninstallPackageAsync(PackageIdentity packageIdentity, INuGetProjectContext nuGetProjectContext, CancellationToken token); 58public abstract Task<IEnumerable<PackageReference>> GetInstalledPackagesAsync(CancellationToken token);
Projects\PackagesConfigNuGetProject.cs (4)
83public override async Task<bool> InstallPackageAsync( 186public override Task<bool> UninstallPackageAsync(PackageIdentity packageIdentity, INuGetProjectContext nuGetProjectContext, CancellationToken token) 239public override Task<IEnumerable<PackageReference>> GetInstalledPackagesAsync(CancellationToken token) 350private static async Task<bool> CheckDevelopmentDependencyAsync(
Projects\ProjectJsonNuGetProject.cs (12)
104public override Task<string> GetAssetsFilePathAsync() 109public override Task<string> GetAssetsFilePathOrNullAsync() 138public override async Task<IEnumerable<PackageReference>> GetInstalledPackagesAsync(CancellationToken token) 160protected virtual Task<string> GetMSBuildProjectExtensionsPathAsync() 166public override async Task<IReadOnlyList<PackageSpec>> GetPackageSpecsAsync(DependencyGraphCacheContext context) 172public override async Task<(IReadOnlyList<PackageSpec> dgSpecs, IReadOnlyList<IAssetsLogMessage> additionalMessages)> GetPackageSpecsAndAdditionalMessagesAsync(DependencyGraphCacheContext context) 261public async override Task<bool> InstallPackageAsync( 284public async Task<bool> RemoveDependencyAsync(string packageId, 299public override async Task<bool> UninstallPackageAsync(PackageIdentity packageIdentity, INuGetProjectContext nuGetProjectContext, CancellationToken token) 328private async Task<JObject> GetJsonAsync() 385public override Task<string> GetCacheFilePathAsync() 390public override Task<bool> UninstallPackageAsync(string packageId, BuildIntegratedInstallationContext installationContext, CancellationToken token)
Resolution\ResolverGather.cs (11)
30private readonly List<Task<GatherResult>> _workerTasks; 45_workerTasks = new List<Task<GatherResult>>(_maxDegreeOfParallelism); 76public static async Task<HashSet<SourcePackageDependencyInfo>> GatherAsync( 85private async Task<HashSet<SourcePackageDependencyInfo>> GatherAsync(CancellationToken token) 359foreach (var task in currentTasks) 381var task = Task.Run(async () => await GatherPackageAsync(request, token)); 389private async Task<GatherResult> GatherPackageAsync(GatherRequest request, CancellationToken token) 486private async Task<List<SourcePackageDependencyInfo>> GatherPackageFromSourceAsync( 603var depResources = new Dictionary<SourceRepository, Task<DependencyInfoResource>>(); 608var task = Task.Run(async () => await source.GetResourceAsync<DependencyInfoResource>(token)); 647var resource = depResources[source];
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
Utility\BuildIntegratedProjectUtility.cs (2)
27public static async Task<IReadOnlyList<PackageIdentity>> GetOrderedProjectPackageDependencies( 43public static async Task<LockFile> GetLockFileOrNull(BuildIntegratedNuGetProject buildIntegratedProject)
Utility\FileSystemUtility.cs (3)
344/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 350public static async Task<bool> ContentEqualsAsync(string path, Func<Task<Stream>> streamTaskFactory)
Utility\MSBuildNuGetProjectSystemUtility.cs (2)
105Func<Task<Stream>> streamTaskFactory, 385Func<Task<Stream>> streamFactory,
Utility\PackageGraphAnalysisUtilities.cs (1)
32public static async Task<IEnumerable<PackageDependencyInfo>> GetDependencyInfoForPackageIdentitiesAsync(IEnumerable<PackageIdentity> packageIdentities,
NuGet.Packaging (131)
Core\IAsyncPackageCoreReader.cs (18)
25/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="PackageIdentity" />.</returns> 28Task<PackageIdentity> GetIdentityAsync(CancellationToken cancellationToken); 35/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="NuGetVersion" />.</returns> 38Task<NuGetVersion?> GetMinClientVersionAsync(CancellationToken cancellationToken); 45/// The task result (<see cref="Task{TResult}.Result" />) returns an 49Task<IReadOnlyList<PackageType>> GetPackageTypesAsync(CancellationToken cancellationToken); 57/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Stream" />.</returns> 60Task<Stream> GetStreamAsync(string path, CancellationToken cancellationToken); 67/// The task result (<see cref="Task{TResult}.Result" />) returns an 71Task<IEnumerable<string>> GetFilesAsync(CancellationToken cancellationToken); 79/// The task result (<see cref="Task{TResult}.Result" />) returns an 83Task<IEnumerable<string>> GetFilesAsync(string folder, CancellationToken cancellationToken); 90/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Stream" />.</returns> 93Task<Stream> GetNuspecAsync(CancellationToken cancellationToken); 100/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" /> 104Task<string> GetNuspecFileAsync(CancellationToken cancellationToken); 115/// The task result (<see cref="Task{TResult}.Result" />) returns am 119Task<IEnumerable<string>> CopyFilesAsync(
Definitions\IAsyncPackageContentReader.cs (14)
20/// The task result (<see cref="Task{TResult}.Result" />) returns an 24Task<IEnumerable<FrameworkSpecificGroup>> GetFrameworkItemsAsync(CancellationToken cancellationToken); 31/// The task result (<see cref="Task{TResult}.Result" />) returns an 35Task<IEnumerable<FrameworkSpecificGroup>> GetBuildItemsAsync(CancellationToken cancellationToken); 42/// The task result (<see cref="Task{TResult}.Result" />) returns an 46Task<IEnumerable<FrameworkSpecificGroup>> GetToolItemsAsync(CancellationToken cancellationToken); 57/// The task result (<see cref="Task{TResult}.Result" />) returns an 61Task<IEnumerable<FrameworkSpecificGroup>> GetContentItemsAsync(CancellationToken cancellationToken); 69/// The task result (<see cref="Task{TResult}.Result" />) returns an 73Task<IEnumerable<FrameworkSpecificGroup>> GetLibItemsAsync(CancellationToken cancellationToken); 80/// The task result (<see cref="Task{TResult}.Result" />) returns an 84Task<IEnumerable<FrameworkSpecificGroup>> GetReferenceItemsAsync(CancellationToken cancellationToken); 91/// The task result (<see cref="Task{TResult}.Result" />) returns an 95Task<IEnumerable<PackageDependencyGroup>> GetPackageDependenciesAsync(CancellationToken cancellationToken);
Definitions\IPackageDownloader.cs (6)
39/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 46Task<bool> CopyNupkgFileToAsync(string destinationFilePath, CancellationToken cancellationToken); 54/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" /> 61Task<string> GetPackageHashAsync(string hashAlgorithm, CancellationToken cancellationToken); 67/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 73void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync);
PackageArchiveReader.cs (5)
175/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" />.</returns> 180public override async Task<string> CopyNupkgAsync( 383public override async Task<PrimarySignature?> GetPrimarySignatureAsync(CancellationToken token) 404public override Task<bool> IsSignedAsync(CancellationToken token) 486public override Task<byte[]> GetArchiveHashAsync(HashAlgorithmName hashAlgorithmName, CancellationToken token)
PackageExtraction\PackageHelper.cs (4)
87private static async Task<SatellitePackageInfo> GetSatellitePackageInfoAsync( 131public static async Task<Tuple<string?, IEnumerable<string>>> GetSatelliteFilesAsync( 162public static async Task<IEnumerable<ZipFilePair>> GetInstalledPackageFilesAsync( 182public static async Task<Tuple<string?, IEnumerable<ZipFilePair>>> GetInstalledSatelliteFilesAsync(
PackageExtractor.cs (7)
34public static async Task<IEnumerable<string>> ExtractPackageAsync( 165public static async Task<IEnumerable<string>> ExtractPackageAsync( 270public static async Task<IEnumerable<string>> ExtractPackageAsync( 377public static async Task<bool> InstallFromSourceAsync( 655public static async Task<bool> InstallFromSourceAsync( 945public static async Task<IEnumerable<string>> CopySatelliteFilesAsync( 982private static async Task<IEnumerable<string>> CopySatelliteFilesAsync(
PackageFolderReader.cs (3)
232public override Task<PrimarySignature?> GetPrimarySignatureAsync(CancellationToken token) 237public override Task<bool> IsSignedAsync(CancellationToken token) 247public override Task<byte[]> GetArchiveHashAsync(HashAlgorithmName hashAlgorithm, CancellationToken token)
PackageReaderBase.cs (25)
128public virtual Task<PackageIdentity> GetIdentityAsync(CancellationToken cancellationToken) 133public virtual Task<NuGetVersion?> GetMinClientVersionAsync(CancellationToken cancellationToken) 138public virtual Task<IReadOnlyList<PackageType>> GetPackageTypesAsync(CancellationToken cancellationToken) 143public virtual Task<Stream> GetStreamAsync(string path, CancellationToken cancellationToken) 148public virtual Task<IEnumerable<string>> GetFilesAsync(CancellationToken cancellationToken) 153public virtual Task<IEnumerable<string>> GetFilesAsync(string folder, CancellationToken cancellationToken) 158public virtual Task<Stream> GetNuspecAsync(CancellationToken cancellationToken) 163public virtual Task<string> GetNuspecFileAsync(CancellationToken cancellationToken) 168public virtual Task<IEnumerable<string>> CopyFilesAsync( 322public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetFrameworkItemsAsync(CancellationToken cancellationToken) 327public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetBuildItemsAsync(CancellationToken cancellationToken) 332public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetToolItemsAsync(CancellationToken cancellationToken) 337public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetContentItemsAsync(CancellationToken cancellationToken) 342public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetLibItemsAsync(CancellationToken cancellationToken) 347public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetReferenceItemsAsync(CancellationToken cancellationToken) 352public virtual Task<IEnumerable<PackageDependencyGroup>> GetPackageDependenciesAsync(CancellationToken cancellationToken) 390public virtual Task<IEnumerable<NuGetFramework>> GetSupportedFrameworksAsync(CancellationToken cancellationToken) 400public virtual Task<bool> IsServiceableAsync(CancellationToken cancellationToken) 410public virtual Task<IEnumerable<FrameworkSpecificGroup>> GetItemsAsync(string folderName, CancellationToken cancellationToken) 420public virtual Task<bool> GetDevelopmentDependencyAsync(CancellationToken cancellationToken) 588public virtual Task<NuspecReader> GetNuspecReaderAsync(CancellationToken cancellationToken) 593public virtual Task<string> CopyNupkgAsync(string nupkgFilePath, CancellationToken cancellationToken) 598public abstract Task<PrimarySignature?> GetPrimarySignatureAsync(CancellationToken token); 600public abstract Task<bool> IsSignedAsync(CancellationToken token); 604public abstract Task<byte[]> GetArchiveHashAsync(HashAlgorithmName hashAlgorithm, CancellationToken token);
PackageReaderExtensions.cs (2)
16public static async Task<IEnumerable<string>> GetPackageFilesAsync( 26public static async Task<IEnumerable<string>> GetSatelliteFilesAsync(
Signing\Archive\SignedPackageArchiveUtility.cs (2)
238public static async Task<bool> RemoveRepositorySignaturesAsync( 294private static async Task<bool> RemoveRepositoryCountersignaturesAsync(
Signing\Authoring\ISignatureProvider.cs (2)
23Task<PrimarySignature> CreatePrimarySignatureAsync(SignPackageRequest request, SignatureContent signatureContent, ILogger logger, CancellationToken token); 33Task<PrimarySignature> CreateRepositoryCountersignatureAsync(RepositorySignPackageRequest request, PrimarySignature primarySignature, ILogger logger, CancellationToken token);
Signing\Authoring\ITimestampProvider.cs (1)
13Task<PrimarySignature> TimestampSignatureAsync(PrimarySignature primarySignature, TimestampRequest request, ILogger logger, CancellationToken token);
Signing\Authoring\X509SignatureProvider.cs (4)
32public Task<PrimarySignature> CreatePrimarySignatureAsync(SignPackageRequest request, SignatureContent signatureContent, ILogger logger, CancellationToken token) 64public Task<PrimarySignature> CreateRepositoryCountersignatureAsync(RepositorySignPackageRequest request, PrimarySignature primarySignature, ILogger logger, CancellationToken token) 188private Task<PrimarySignature> TimestampPrimarySignatureAsync(SignPackageRequest request, ILogger logger, PrimarySignature signature, CancellationToken token) 203private Task<PrimarySignature> TimestampRepositoryCountersignatureAsync(SignPackageRequest request, ILogger logger, PrimarySignature primarySignature, CancellationToken token)
Signing\Package\ISignedPackageReader.cs (3)
20Task<PrimarySignature?> GetPrimarySignatureAsync(CancellationToken token); 26Task<bool> IsSignedAsync(CancellationToken token); 31Task<byte[]> GetArchiveHashAsync(HashAlgorithmName hashAlgorithm, CancellationToken token);
Signing\Package\ISignedPackageWriter.cs (2)
35/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 39Task<bool> IsZip64Async(CancellationToken token);
Signing\Package\SignedPackageArchive.cs (1)
86public Task<bool> IsZip64Async(CancellationToken token)
Signing\Timestamp\IRfc3161TimestampRequest.cs (1)
11Task<IRfc3161TimestampToken> SubmitRequestAsync(Uri timestampUri, TimeSpan timeout);
Signing\Timestamp\Rfc3161TimestampProvider.cs (2)
47public async Task<PrimarySignature> TimestampSignatureAsync(PrimarySignature primarySignature, TimestampRequest request, ILogger logger, CancellationToken token) 67internal async Task<SignedCms> GetTimestampAsync(TimestampRequest request, ILogger logger, CancellationToken token)
Signing\Timestamp\Rfc3161TimestampRequestNetstandard21Wrapper.cs (1)
37public async Task<IRfc3161TimestampToken> SubmitRequestAsync(Uri timestampUri, TimeSpan timeout)
Signing\Verification\AllowListVerificationProvider.cs (1)
30public Task<PackageVerificationResult> GetTrustResultAsync(ISignedPackageReader package, PrimarySignature signature, SignedPackageVerifierSettings settings, CancellationToken token)
Signing\Verification\IntegrityVerificationProvider.cs (2)
16public Task<PackageVerificationResult> GetTrustResultAsync(ISignedPackageReader package, PrimarySignature signature, SignedPackageVerifierSettings settings, CancellationToken token) 21private async Task<PackageVerificationResult> VerifyPackageIntegrityAsync(ISignedPackageReader package, PrimarySignature signature, SignedPackageVerifierSettings settings)
Signing\Verification\IPackageSignatureVerifier.cs (1)
23Task<VerifySignaturesResult> VerifySignaturesAsync(ISignedPackageReader package, SignedPackageVerifierSettings settings, CancellationToken token, Guid telemetryOperationId);
Signing\Verification\ISignatureVerificationProvider.cs (1)
17Task<PackageVerificationResult> GetTrustResultAsync(ISignedPackageReader package, PrimarySignature signature, SignedPackageVerifierSettings settings, CancellationToken token);
Signing\Verification\PackageSignatureVerifier.cs (1)
23public async Task<VerifySignaturesResult> VerifySignaturesAsync(ISignedPackageReader package, SignedPackageVerifierSettings settings, CancellationToken token, Guid parentId = default(Guid))
Signing\Verification\SignatureTrustAndValidityVerificationProvider.cs (1)
26public Task<PackageVerificationResult> GetTrustResultAsync(
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
NuGet.Protocol (502)
DependencyInfo\RegistrationUtility.cs (7)
35public async static Task<IEnumerable<JObject?>> LoadRanges( 69IList<Task<JObject?>> rangeTasks = new List<Task<JObject?>>(); 116internal async static Task<IReadOnlyList<RegistrationPage?>> LoadRangesAsItemsAsync( 147IList<Task<RegistrationPage?>> rangeTasks = new List<Task<RegistrationPage?>>(); 184private static async Task<T?> DeserializeStreamAsync<T>(Stream? stream, CancellationToken token)
DependencyInfo\ResolverMetadataClient.cs (4)
28public static async Task<IEnumerable<RemoteSourceDependencyInfo>> GetDependencies( 54private static async Task<HashSet<RemoteSourceDependencyInfo>> GetDependenciesFromJObjectsAsync( 91private static async Task<HashSet<RemoteSourceDependencyInfo>> GetDependenciesFromItemsAsync( 219public static async Task<RegistrationInfo?> GetRegistrationInfo(
Events\ProtocolDiagnosticsStream.cs (1)
66public override async Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
HttpSource\HttpHandlerResourceV3Provider.cs (1)
43public override Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
HttpSource\HttpRetryHandler.cs (2)
41public Task<HttpResponseMessage> SendAsync( 57public async Task<HttpResponseMessage> SendAsync(
HttpSource\HttpSource.cs (21)
21private readonly Func<Task<HttpHandlerResource>> _messageHandlerFactory; 40Func<Task<HttpHandlerResource>> messageHandlerFactory, 67public virtual async Task<T> GetAsync<T>( 69Func<HttpSourceResult, Task<T>> processAsync, 130Func<Task<ThrottledResponse>> throttledResponseFactory = () => GetThrottledResponse( 209public Task<T> ProcessStreamAsync<T>( 211Func<Stream?, Task<T>> processAsync, 218internal async Task<T> ProcessHttpStreamAsync<T>( 220Func<HttpResponseMessage?, Task<T>> processAsync, 246public async Task<T> ProcessStreamAsync<T>( 248Func<Stream?, Task<T>> processAsync, 273public Task<T> ProcessResponseAsync<T>( 275Func<HttpResponseMessage, Task<T>> processAsync, 282public async Task<T> ProcessResponseAsync<T>( 284Func<HttpResponseMessage, Task<T>> processAsync, 292Task<ThrottledResponse> throttledResponseFactory() => GetThrottledResponse( 309public async Task<JObject?> GetJObjectAsync(HttpSourceRequest request, ILogger log, CancellationToken token) 326private async Task<ThrottledResponse> GetThrottledResponse( 371private async Task<HttpClient> GetHttpClientAsync() 394private async Task<HttpClient> CreateHttpClientAsync() 453Func<Task<HttpHandlerResource>> factory = async () =>
HttpSource\HttpSourceAuthenticationHandler.cs (3)
68protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 165private async Task<ICredentials?> AcquireCredentialsAsync( 259private async Task<ICredentials?> PromptForCredentialsAsync(
HttpSource\HttpSourceResourceProvider.cs (1)
51public override Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
HttpSource\IHttpRetryHandler.cs (2)
13Task<HttpResponseMessage> SendAsync( 18Task<HttpResponseMessage> SendAsync(
HttpSource\ProxyAuthenticationHandler.cs (3)
57protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, 148private async Task<bool> AcquireCredentialsAsync(Uri requestUri, Guid cacheVersion, IWebProxy proxy, ICredentialService credentialService, ILogger log, CancellationToken cancellationToken) 199private static async Task<NetworkCredential?> PromptForProxyCredentialsAsync(Uri proxyAddress, IWebProxy proxy, ICredentialService credentialService, ILogger log, CancellationToken cancellationToken)
HttpSource\ServerWarningLogHandler.cs (1)
19protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
ILegacyFeedCapabilityResource.cs (2)
12Task<bool> SupportsIsAbsoluteLatestVersionAsync(ILogger log, CancellationToken token); 13Task<bool> SupportsSearchAsync(ILogger log, CancellationToken token);
INuGetResourceProvider.cs (1)
33Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token);
LegacyFeed\AutoCompleteResourceV2Feed.cs (3)
47public override async Task<IEnumerable<string>> IdStartsWith( 61public override async Task<IEnumerable<NuGetVersion>> VersionStartsWith( 83private async Task<IEnumerable<string>> GetResults(
LegacyFeed\AutoCompleteResourceV2FeedProvider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LegacyFeed\DependencyInfoResourceV2Feed.cs (2)
35public override async Task<SourcePackageDependencyInfo?> ResolvePackage( 63public override async Task<IEnumerable<SourcePackageDependencyInfo>> ResolvePackages(
LegacyFeed\DependencyInfoResourceV2FeedProvider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LegacyFeed\DownloadResourceV2Feed.cs (1)
38public override async Task<DownloadResourceResult> GetDownloadResourceResultAsync(
LegacyFeed\DownloadResourceV2FeedProvider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LegacyFeed\IV2FeedParser.cs (2)
13Task<V2FeedPage> GetPackagesPageAsync( 21Task<V2FeedPage> GetSearchPageAsync(
LegacyFeed\LegacyFeedCapabilityResourceV2Feed.cs (7)
22private static readonly ConcurrentDictionary<string, Task<Capabilities>> CachedCapabilities 23= new ConcurrentDictionary<string, Task<Capabilities>>(); 39public override async Task<bool> SupportsIsAbsoluteLatestVersionAsync(ILogger log, CancellationToken token) 46public override async Task<bool> SupportsSearchAsync(ILogger log, CancellationToken token) 53private async Task<Capabilities> GetCachedCapabilitiesAsync(ILogger log, CancellationToken token) 55var task = CachedCapabilities.GetOrAdd( 62private async Task<Capabilities> GetCapabilitiesAsync(string metadataUri, ILogger log, CancellationToken token)
LegacyFeed\MetadataResourceV2Feed.cs (6)
33public override async Task<IEnumerable<KeyValuePair<string, NuGetVersion?>>> GetLatestVersions(IEnumerable<string> packageIds, bool includePrerelease, bool includeUnlisted, 38var tasks = new Stack<KeyValuePair<string, Task<IEnumerable<NuGetVersion>>>>(); 43var task = new KeyValuePair<string, Task<IEnumerable<NuGetVersion>>>(id, GetVersions(id, includePrerelease, includeUnlisted, sourceCacheContext, log, token)); 68public override async Task<IEnumerable<NuGetVersion>> GetVersions(string packageId, bool includePrerelease, bool includeUnlisted, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 84public override async Task<bool> Exists(PackageIdentity identity, bool includeUnlisted, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 100public override async Task<bool> Exists(string packageId, bool includePrerelease, bool includeUnlisted, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token)
LegacyFeed\MetadataResourceV2FeedProvider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LegacyFeed\ODataServiceDocumentResourceV2Provider.cs (1)
33public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LegacyFeed\ODataServiceDocumentUtils.cs (1)
16public static async Task<ODataServiceDocumentResourceV2> CreateODataServiceDocumentResourceV2(
LegacyFeed\PackageMetadataResourceV2Feed.cs (2)
40public override async Task<IEnumerable<IPackageSearchMetadata>> GetMetadataAsync( 56public override async Task<IPackageSearchMetadata?> GetMetadataAsync(
LegacyFeed\PackageMetadataResourceV2FeedProvider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LegacyFeed\PackageSearchResourceV2Feed.cs (1)
36public override async Task<IEnumerable<IPackageSearchMetadata>> SearchAsync(
LegacyFeed\PackageSearchResourceV2FeedProvider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source,
LegacyFeed\V2FeedListResource.cs (2)
30public async override Task<IEnumerableAsync<IPackageSearchMetadata>> ListAsync( 184public async Task<bool> MoveNextAsync()
LegacyFeed\V2FeedListResourceProvider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source,
LegacyFeed\V2FeedParser.cs (12)
108public async Task<V2FeedPackageInfo?> GetPackage( 147public async Task<IReadOnlyList<V2FeedPackageInfo>> FindPackagesByIdAsync( 187public Task<IReadOnlyList<V2FeedPackageInfo>> FindPackagesByIdAsync(string id, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 192public async Task<V2FeedPage> GetPackagesPageAsync( 218public async Task<V2FeedPage> GetSearchPageAsync( 244public async Task<IReadOnlyList<V2FeedPackageInfo>> Search( 266public async Task<DownloadResourceResult> DownloadFromUrl( 284public async Task<DownloadResourceResult> DownloadFromIdentity( 425public async Task<V2FeedPage> QueryV2FeedAsync( 448Task<XDocument?>? docRequest = LoadXmlAsync(uri, cacheKey, ignoreNotFounds, sourceCacheContext, log, token); 518internal async Task<XDocument?> LoadXmlAsync( 638internal static async Task<XDocument> LoadXmlAsync(Stream stream, CancellationToken token)
LegacyFeed\V2FeedUtilities.cs (1)
29private static async Task<IEnumerable<VersionInfo>> GetVersions(
LocalPackageArchiveDownloader.cs (7)
22private Func<Exception, Task<bool>> _handleExceptionAsync; 150/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 157public async Task<bool> CopyNupkgFileToAsync(string destinationFilePath, CancellationToken cancellationToken) 221/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" /> 228public Task<string> GetPackageHashAsync(string hashAlgorithm, CancellationToken cancellationToken) 253/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 259public void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync)
LocalRepositories\FindLocalPackagesResourcePackagesConfigProvider.cs (1)
22public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\FindLocalPackagesResourceUnzippedProvider.cs (1)
24public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\FindLocalPackagesResourceV2Provider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\FindLocalPackagesResourceV3Provider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalAutoCompleteResource.cs (4)
30public override Task<IEnumerable<string>> IdStartsWith( 43public override Task<IEnumerable<NuGetVersion>> VersionStartsWith( 59private async Task<IEnumerable<string>> GetPackageIdsFromLocalPackageRepository( 90protected async Task<IEnumerable<NuGetVersion>> GetPackageVersionsFromLocalPackageRepository(
LocalRepositories\LocalAutoCompleteResourceProvider.cs (1)
19public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalDependencyInfoResource.cs (2)
46public override Task<SourcePackageDependencyInfo?> ResolvePackage( 93public override Task<IEnumerable<SourcePackageDependencyInfo>> ResolvePackages(
LocalRepositories\LocalDependencyInfoResourceProvider.cs (1)
19public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalDownloadResource.cs (1)
33public override Task<DownloadResourceResult> GetDownloadResourceResultAsync(
LocalRepositories\LocalDownloadResourceProvider.cs (1)
19public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalMetadataResource.cs (6)
32public override async Task<IEnumerable<KeyValuePair<string, NuGetVersion?>>> GetLatestVersions( 42var tasks = new Stack<KeyValuePair<string, Task<IEnumerable<NuGetVersion>>>>(); 47var task = new KeyValuePair<string, Task<IEnumerable<NuGetVersion>>>(id, GetVersions(id, includePrerelease, includeUnlisted, sourceCacheContext, log, token)); 73public override Task<IEnumerable<NuGetVersion>> GetVersions( 104public override Task<bool> Exists( 116public override Task<bool> Exists(
LocalRepositories\LocalMetadataResourceProvider.cs (1)
19public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalPackageListResource.cs (2)
25public override Task<IEnumerableAsync<IPackageSearchMetadata>> ListAsync(string searchTerm, bool prerelease, bool allVersions, bool includeDelisted, ILogger logger, 113public async Task<bool> MoveNextAsync()
LocalRepositories\LocalPackageListResourceProvider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source,
LocalRepositories\LocalPackageMetadataResource.cs (2)
30public override Task<IEnumerable<IPackageSearchMetadata>> GetMetadataAsync( 50public override Task<IPackageSearchMetadata?> GetMetadataAsync(
LocalRepositories\LocalPackageMetadataResourceProvider.cs (1)
19public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalPackageSearchResource.cs (1)
35public async override Task<IEnumerable<IPackageSearchMetadata>> SearchAsync(
LocalRepositories\LocalPackageSearchResourceProvider.cs (1)
19public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalV2FindPackageByIdResource.cs (10)
64/// The task result (<see cref="Task{TResult}.Result" />) returns an 72public override Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 123/// The task result (<see cref="Task{TResult}.Result" />) returns an 133public override async Task<bool> CopyNupkgToStreamAsync( 205/// The task result (<see cref="Task{TResult}.Result" />) returns an 214public override Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 285/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 291public override Task<IPackageDownloader?> GetPackageDownloaderAsync( 347/// The task result (<see cref="Task{TResult}.Result" />) returns an 356public override Task<bool> DoesPackageExistAsync(
LocalRepositories\LocalV2FindPackageByIdResourceProvider.cs (1)
24public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
LocalRepositories\LocalV3FindPackageByIdResource.cs (10)
100/// The task result (<see cref="Task{TResult}.Result" />) returns an 108public override Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 157/// The task result (<see cref="Task{TResult}.Result" />) returns an 167public override async Task<bool> CopyNupkgToStreamAsync( 251/// The task result (<see cref="Task{TResult}.Result" />) returns an 260public override Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 325/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 331public override Task<IPackageDownloader?> GetPackageDownloaderAsync( 389/// The task result (<see cref="Task{TResult}.Result" />) returns an 398public override Task<bool> DoesPackageExistAsync(
LocalRepositories\LocalV3FindPackageByIdResourceProvider.cs (1)
22public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Model\IPackageSearchMetadata.cs (2)
50Task<PackageDeprecationMetadata?> GetDeprecationMetadataAsync(); 55Task<IEnumerable<VersionInfo>> GetVersionsAsync();
Model\LocalPackageSearchMetadata.cs (2)
110public Task<IEnumerable<VersionInfo>> GetVersionsAsync() => TaskResult.EmptyEnumerable<VersionInfo>(); 137public Task<PackageDeprecationMetadata?> GetDeprecationMetadataAsync() => TaskResult.Null<PackageDeprecationMetadata>();
Model\PackageSearchMetadata.cs (2)
301public Task<IEnumerable<VersionInfo>> GetVersionsAsync() => Task.FromResult<IEnumerable<VersionInfo>>(ParsedVersions ?? Enumerable.Empty<VersionInfo>()); 315public Task<PackageDeprecationMetadata?> GetDeprecationMetadataAsync() => Task.FromResult(DeprecationMetadata);
Model\PackageSearchMetadataBuilder.cs (3)
54public async Task<IEnumerable<VersionInfo>> GetVersionsAsync() => await (LazyVersionsFactory ?? LazyEmptyVersionInfo); 57public async Task<PackageDeprecationMetadata?> GetDeprecationMetadataAsync() => await (LazyDeprecationFactory ?? LazyNullDeprecationMetadata); 169public static IPackageSearchMetadata WithVersions(this IPackageSearchMetadata metadata, Func<Task<IEnumerable<VersionInfo>>> asyncValueFactory)
Model\PackageSearchMetadataV2Feed.cs (2)
140public Task<IEnumerable<VersionInfo>> GetVersionsAsync() => TaskResult.EmptyEnumerable<VersionInfo>(); 149public Task<PackageDeprecationMetadata?> GetDeprecationMetadataAsync() => TaskResult.Null<PackageDeprecationMetadata>();
Plugins\Connection.cs (2)
267/// The task result (<see cref="Task{TResult}.Result" />) returns a <typeparamref name="TInbound" /> 272public Task<TInbound?> SendRequestAndReceiveResponseAsync<TOutbound, TInbound>(
Plugins\IConnection.cs (2)
68/// The task result (<see cref="Task{TResult}.Result" />) returns a <typeparamref name="TInbound" /> 73Task<TInbound?> SendRequestAndReceiveResponseAsync<TOutbound, TInbound>(
Plugins\IMessageDispatcher.cs (2)
81/// The task result (<see cref="Task{TResult}.Result" />) returns a <typeparamref name="TInbound" /> 83Task<TInbound?> DispatchRequestAsync<TOutbound, TInbound>(
Plugins\IPluginDiscoverer.cs (2)
21/// The task result (<see cref="Task{TResult}.Result" />) returns an 25Task<IEnumerable<PluginDiscoveryResult>> DiscoverAsync(CancellationToken cancellationToken);
Plugins\IPluginFactory.cs (2)
25/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Plugin" /> 39Task<IPlugin> GetOrCreateAsync(
Plugins\IPluginManager.cs (3)
22Task<IEnumerable<PluginCreationResult>> CreatePluginsAsync( 31Task<IEnumerable<PluginDiscoveryResult>> FindAvailablePluginsAsync(CancellationToken cancellationToken); 40Task<Tuple<bool, PluginCreationResult?>> TryGetSourceAgnosticPluginAsync(PluginDiscoveryResult pluginDiscoveryResult, OperationClaim requestedOperationClaim, CancellationToken cancellationToken);
Plugins\MessageDispatcher.cs (3)
276/// The task result (<see cref="Task{TResult}.Result" />) returns a <typeparamref name="TInbound" /> 280public Task<TInbound?> DispatchRequestAsync<TOutbound, TInbound>( 458private async Task<TIncoming?> DispatchWithNewContextAsync<TOutgoing, TIncoming>(
Plugins\OutboundRequestContext`1.cs (1)
36public Task<TResult?> CompletionTask => _taskCompletionSource.Task;
Plugins\PluginDiscoverer.cs (2)
72/// The task result (<see cref="Task{TResult}.Result" />) returns a 76public async Task<IEnumerable<PluginDiscoveryResult>> DiscoverAsync(CancellationToken cancellationToken)
Plugins\PluginFactory.cs (9)
26private readonly ConcurrentDictionary<string, Lazy<Task<IPlugin>>> _plugins; 63_plugins = new ConcurrentDictionary<string, Lazy<Task<IPlugin>>>(); 107/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Plugin" /> 123public virtual async Task<IPlugin> GetOrCreateAsync( 159(path) => new Lazy<Task<IPlugin>>( 168private async Task<IPlugin> CreatePluginAsync( 316/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Plugin" /> 325public static async Task<IPlugin> CreateFromCurrentProcessAsync( 392if (_plugins.TryRemove(plugin.FilePath, out Lazy<Task<IPlugin>>? lazyTask))
Plugins\PluginManager.cs (9)
57private ConcurrentDictionary<PluginRequestKey, Lazy<Task<IReadOnlyList<OperationClaim>>>> _pluginOperationClaims; 119public async Task<IEnumerable<PluginDiscoveryResult>> FindAvailablePluginsAsync(CancellationToken cancellationToken) 131public async Task<IEnumerable<PluginCreationResult>> CreatePluginsAsync( 179public Task<Tuple<bool, PluginCreationResult?>> TryGetSourceAgnosticPluginAsync(PluginDiscoveryResult pluginDiscoveryResult, OperationClaim requestedOperationClaim, CancellationToken cancellationToken) 209private async Task<Tuple<bool, PluginCreationResult?>> TryCreatePluginAsync( 248key => new Lazy<Task<IReadOnlyList<OperationClaim>>>(() => 297private async Task<Lazy<IPluginMulticlientUtilities>> PerformOneTimePluginInitializationAsync(IPlugin plugin, CancellationToken cancellationToken) 349_pluginOperationClaims = new ConcurrentDictionary<PluginRequestKey, Lazy<Task<IReadOnlyList<OperationClaim>>>>(); 354private static async Task<IReadOnlyList<OperationClaim>> GetPluginOperationClaimsAsync(
Plugins\PluginPackageDownloader.cs (7)
18private Func<Exception, Task<bool>> _handleExceptionAsync; 135/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 142public async Task<bool> CopyNupkgFileToAsync(string destinationFilePath, CancellationToken cancellationToken) 176/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" /> 183public async Task<string> GetPackageHashAsync(string hashAlgorithm, CancellationToken cancellationToken) 217/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 223public void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync)
Plugins\PluginPackageReader.cs (52)
26private readonly ConcurrentDictionary<string, Lazy<Task<FileStreamCreator?>>> _fileStreams; 71_fileStreams = new ConcurrentDictionary<string, Lazy<Task<FileStreamCreator?>>>(StringComparer.OrdinalIgnoreCase); 92/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Stream" />.</returns> 97public override async Task<Stream> GetStreamAsync(string path, CancellationToken cancellationToken) 108p => new Lazy<Task<FileStreamCreator?>>( 136/// The task result (<see cref="Task{TResult}.Result" />) returns an 140public override async Task<IEnumerable<string>> GetFilesAsync(CancellationToken cancellationToken) 185/// The task result (<see cref="Task{TResult}.Result" />) returns an 190public override async Task<IEnumerable<string>> GetFilesAsync( 233/// The task result (<see cref="Task{TResult}.Result" />) returns an 242public override async Task<IEnumerable<string>> CopyFilesAsync( 333/// The task result (<see cref="Task{TResult}.Result" />) returns an 337public override async Task<PackageIdentity> GetIdentityAsync(CancellationToken cancellationToken) 361/// The task result (<see cref="Task{TResult}.Result" />) returns an 365public override async Task<NuGetVersion?> GetMinClientVersionAsync(CancellationToken cancellationToken) 389/// The task result (<see cref="Task{TResult}.Result" />) returns an 393public override async Task<IReadOnlyList<PackageType>> GetPackageTypesAsync( 418/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="Stream" />.</returns> 421public override async Task<Stream> GetNuspecAsync(CancellationToken cancellationToken) 445/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" />.</returns> 448public override async Task<string> GetNuspecFileAsync(CancellationToken cancellationToken) 467/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="NuspecReader" />.</returns> 470public override async Task<NuspecReader> GetNuspecReaderAsync(CancellationToken cancellationToken) 511public override async Task<IEnumerable<NuGetFramework>> GetSupportedFrameworksAsync( 546/// The task result (<see cref="Task{TResult}.Result" />) returns an 550public override async Task<IEnumerable<FrameworkSpecificGroup>> GetFrameworkItemsAsync( 575/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" />.</returns> 578public override async Task<bool> IsServiceableAsync(CancellationToken cancellationToken) 602/// The task result (<see cref="Task{TResult}.Result" />) returns an 606public override async Task<IEnumerable<FrameworkSpecificGroup>> GetBuildItemsAsync( 656/// The task result (<see cref="Task{TResult}.Result" />) returns an 660public override Task<IEnumerable<FrameworkSpecificGroup>> GetToolItemsAsync( 683/// The task result (<see cref="Task{TResult}.Result" />) returns an 687public override Task<IEnumerable<FrameworkSpecificGroup>> GetContentItemsAsync( 712/// The task result (<see cref="Task{TResult}.Result" />) returns an 717public override Task<IEnumerable<FrameworkSpecificGroup>> GetItemsAsync( 746/// The task result (<see cref="Task{TResult}.Result" />) returns an 750public override async Task<IEnumerable<PackageDependencyGroup>> GetPackageDependenciesAsync( 775/// The task result (<see cref="Task{TResult}.Result" />) returns an 779public override Task<IEnumerable<FrameworkSpecificGroup>> GetLibItemsAsync(CancellationToken cancellationToken) 801/// The task result (<see cref="Task{TResult}.Result" />) returns an 805public override async Task<IEnumerable<FrameworkSpecificGroup>> GetReferenceItemsAsync(CancellationToken cancellationToken) 891/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" />.</returns> 894public override async Task<bool> GetDevelopmentDependencyAsync(CancellationToken cancellationToken) 909/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" />.</returns> 914public override async Task<string> CopyNupkgAsync( 989private async Task<IEnumerable<FrameworkSpecificGroup>> GetFileGroupsAsync( 1018private async Task<FileStreamCreator?> GetStreamInternalAsync( 1065private async Task<IEnumerable<string>> GetFilesInternalAsync(CancellationToken cancellationToken) 1123public override Task<PrimarySignature?> GetPrimarySignatureAsync(CancellationToken token) 1128public override Task<bool> IsSignedAsync(CancellationToken token) 1138public override Task<byte[]> GetArchiveHashAsync(HashAlgorithmName hashAlgorithm, CancellationToken token)
Plugins\RequestHandlers\GetCredentialsRequestHandler.cs (3)
203private async Task<ICredentials?> GetCredentialAsync( 218private async Task<ICredentials?> GetPackageSourceCredential( 260private async Task<ICredentials?> GetProxyCredentialAsync(
Plugins\RequestHandlers\SymmetricHandshake.cs (2)
113/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="SemanticVersion" /> 117public async Task<SemanticVersion?> HandshakeAsync(CancellationToken cancellationToken)
Providers\AutoCompleteResourceV3Provider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\DependencyInfoResourceV3Provider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\DownloadResourcePluginProvider.cs (2)
33/// The task result (<see cref="Task{TResult}.Result" />) returns a Tuple&lt;bool, INuGetResource&gt;</returns> 37public override async Task<Tuple<bool, INuGetResource?>> TryCreate(
Providers\DownloadResourceV3Provider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\FeedTypeResourceProvider.cs (1)
28public override Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\MetadataResourceV3Provider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\OwnerDetailsUriResourceV3Provider.cs (1)
24public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\PackageDetailsUriResourceV3Provider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\PackageMetadataResourceV3Provider.cs (1)
27public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\PackageSearchResourceV3Provider.cs (1)
18public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\PackageUpdateResourceV2Provider.cs (1)
20public async override Task<Tuple<bool, INuGetResource?>> TryCreate(
Providers\PackageUpdateResourceV3Provider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(
Providers\PluginResourceProvider.cs (2)
37/// The task result (<see cref="Task{TResult}.Result" />) returns a Tuple&lt;bool, INuGetResource&gt;</returns> 41public override async Task<Tuple<bool, INuGetResource?>> TryCreate(
Providers\RawSearchResourceV3Provider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\ReadmeUriTemplateResourceProvider.cs (1)
23public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\RegistrationResourceV3Provider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\ReportAbuseResourceV3Provider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\RepositorySignatureResourceProvider.cs (2)
31public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token) 48private async Task<RepositorySignatureResource?> GetRepositorySignatureResourceAsync(
Providers\ServiceIndexResourceV3Provider.cs (5)
52public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token) 117private async Task<ServiceIndexResourceV3?> GetServiceIndexResourceV3( 195private async Task<ServiceIndexResourceV3> ConsumeServiceIndexStreamAsync(Stream stream, DateTime utcNow, PackageSource source, CancellationToken token) 211private static async Task<ServiceIndexResourceV3> ConsumeServiceIndexStreamStjAsync(Stream stream, DateTime utcNow, PackageSource source, CancellationToken token) 246private static async Task<ServiceIndexResourceV3> ConsumeServiceIndexStreamNsjAsync(Stream stream, DateTime utcNow, PackageSource source, CancellationToken token)
Providers\SymbolPackageUpdateResourceV3Provider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
Providers\V3FeedListResourceProvider.cs (1)
22public override async Task<Tuple<bool, INuGetResource?>> TryCreate(
Providers\VulnerabilityInfoResourceV3Provider.cs (1)
23public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token)
RemotePackageArchiveDownloader.cs (7)
23private Func<Exception, Task<bool>> _handleExceptionAsync; 150/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 157public async Task<bool> CopyNupkgFileToAsync(string destinationFilePath, CancellationToken cancellationToken) 216/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="string" /> 223public Task<string> GetPackageHashAsync(string hashAlgorithm, CancellationToken cancellationToken) 247/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="bool" /> 253public void SetExceptionHandler(Func<Exception, Task<bool>> handleExceptionAsync)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResource.cs (12)
101/// The task result (<see cref="Task{TResult}.Result" />) returns an 109public override async Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 159/// The task result (<see cref="Task{TResult}.Result" />) returns an 168public override async Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 239/// The task result (<see cref="Task{TResult}.Result" />) returns an 249public override async Task<bool> CopyNupkgToStreamAsync( 324/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 330public override async Task<IPackageDownloader?> GetPackageDownloaderAsync( 371/// The task result (<see cref="Task{TResult}.Result" />) returns an 380public override async Task<bool> DoesPackageExistAsync( 486private async Task<HashSet<NuGetVersion>?> FindPackagesByIdAsync( 581private static async Task<HashSet<NuGetVersion>> ConsumeFlatContainerIndexAsync(Stream stream, string id, string baseUri, CancellationToken token)
RemoteRepositories\HttpFileSystemBasedFindPackageByIdResourceProvider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository sourceRepository, CancellationToken token)
RemoteRepositories\PluginFindPackageByIdResource.cs (12)
84/// The task result (<see cref="Task{TResult}.Result" />) returns an 87public override Task<bool> CopyNupkgToStreamAsync( 106/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 112public override Task<IPackageDownloader?> GetPackageDownloaderAsync( 162/// The task result (<see cref="Task{TResult}.Result" />) returns an 170public override async Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 227/// The task result (<see cref="Task{TResult}.Result" />) returns an 236public override async Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 322/// The task result (<see cref="Task{TResult}.Result" />) returns an 331public override async Task<bool> DoesPackageExistAsync( 378private async Task<SortedDictionary<NuGetVersion, PackageInfo>> EnsurePackagesAsync( 405private async Task<SortedDictionary<NuGetVersion, PackageInfo>> FindPackagesByIdAsync(
RemoteRepositories\PluginFindPackageByIdResourceProvider.cs (2)
33/// The task result (<see cref="Task{TResult}.Result" />) returns a Tuple&lt;bool, INuGetResource&gt;</returns> 37public override async Task<Tuple<bool, INuGetResource?>> TryCreate(
RemoteRepositories\RemoteV2FindPackageByIdResource.cs (13)
87/// The task result (<see cref="Task{TResult}.Result" />) returns an 95public override async Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 145/// The task result (<see cref="Task{TResult}.Result" />) returns an 154public override async Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 223/// The task result (<see cref="Task{TResult}.Result" />) returns an 233public override async Task<bool> CopyNupkgToStreamAsync( 304/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 310public override async Task<IPackageDownloader?> GetPackageDownloaderAsync( 370/// The task result (<see cref="Task{TResult}.Result" />) returns an 379public override async Task<bool> DoesPackageExistAsync( 426private async Task<PackageInfo?> GetPackageInfoAsync( 437private async Task<IEnumerable<PackageInfo>> EnsurePackagesAsync( 452private async Task<List<PackageInfo>> FindPackagesByIdAsyncCore(
RemoteRepositories\RemoteV2FindPackageByIdResourceProvider.cs (1)
21public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository sourceRepository, CancellationToken token)
RemoteRepositories\RemoteV3FindPackageByIdResource.cs (13)
78/// The task result (<see cref="Task{TResult}.Result" />) returns an 86public override async Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 136/// The task result (<see cref="Task{TResult}.Result" />) returns an 145public override async Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 213/// The task result (<see cref="Task{TResult}.Result" />) returns an 223public override async Task<bool> CopyNupkgToStreamAsync( 294/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 300public override async Task<IPackageDownloader?> GetPackageDownloaderAsync( 360/// The task result (<see cref="Task{TResult}.Result" />) returns an 369public override async Task<bool> DoesPackageExistAsync( 416private async Task<RemoteSourceDependencyInfo?> GetPackageInfoAsync( 427private Task<IEnumerable<RemoteSourceDependencyInfo>> EnsurePackagesAsync( 440private async Task<IEnumerable<RemoteSourceDependencyInfo>> FindPackagesByIdAsyncCore(
RemoteRepositories\RemoteV3FindPackageByIdResourceProvider.cs (1)
20public override async Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository sourceRepository, CancellationToken token)
ResourceProvider.cs (1)
89public abstract Task<Tuple<bool, INuGetResource?>> TryCreate(SourceRepository source, CancellationToken token);
Resources\AutoCompleteResource.cs (2)
13public abstract Task<IEnumerable<string>> IdStartsWith( 19public abstract Task<IEnumerable<NuGetVersion>> VersionStartsWith(
Resources\AutoCompleteResourceV3.cs (6)
43public override async Task<IEnumerable<string>> IdStartsWith( 63private async Task<IEnumerable<string>> IdStartsWithStjAsync( 92private async Task<IEnumerable<string>> IdStartsWithNsjAsync( 148public override async Task<IEnumerable<NuGetVersion>> VersionStartsWith( 172private async Task<IEnumerable<NuGetVersion>> VersionStartsWithFromItemsAsync( 194private async Task<IEnumerable<NuGetVersion>> VersionStartsWithFromJObjectsAsync(
Resources\DependencyInfoResource.cs (3)
30public abstract Task<SourcePackageDependencyInfo?> ResolvePackage(PackageIdentity package, 44public abstract Task<IEnumerable<SourcePackageDependencyInfo>> ResolvePackages(string packageId, 57public virtual Task<IEnumerable<RemoteSourceDependencyInfo>> ResolvePackages(string packageId,
Resources\DependencyInfoResourceV3.cs (3)
70public override async Task<SourcePackageDependencyInfo?> ResolvePackage(PackageIdentity package, NuGetFramework projectFramework, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token) 108public override async Task<IEnumerable<SourcePackageDependencyInfo>> ResolvePackages(string packageId, NuGetFramework projectFramework, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token) 145public override Task<IEnumerable<RemoteSourceDependencyInfo>> ResolvePackages(string packageId, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token)
Resources\DownloadResource.cs (1)
23public abstract Task<DownloadResourceResult> GetDownloadResourceResultAsync(
Resources\DownloadResourcePlugin.cs (2)
73/// The task result (<see cref="Task{TResult}.Result" />) returns 81public async override Task<DownloadResourceResult> GetDownloadResourceResultAsync(
Resources\DownloadResourceV3.cs (4)
80private async Task<Uri?> GetDownloadUrl(PackageIdentity identity, ILogger log, CancellationToken token) 123private static async Task<Uri?> GetDownloadUrlFromItemAsync(RegistrationResourceV3 regResource, PackageIdentity identity, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 131private static async Task<Uri?> GetDownloadUrlFromJObjectAsync(RegistrationResourceV3 regResource, PackageIdentity identity, SourceCacheContext sourceCacheContext, ILogger log, CancellationToken token) 145public override async Task<DownloadResourceResult> GetDownloadResourceResultAsync(
Resources\FindPackageByIdResource.cs (10)
29/// The task result (<see cref="Task{TResult}.Result" />) returns an 37public abstract Task<IEnumerable<NuGetVersion>> GetAllVersionsAsync( 52/// The task result (<see cref="Task{TResult}.Result" />) returns an 61public abstract Task<FindPackageByIdDependencyInfo?> GetDependencyInfoAsync( 78/// The task result (<see cref="Task{TResult}.Result" />) returns an 88public abstract Task<bool> CopyNupkgToStreamAsync( 104/// The task result (<see cref="Task{TResult}.Result" />) returns an <see cref="IPackageDownloader" />.</returns> 110public abstract Task<IPackageDownloader?> GetPackageDownloaderAsync( 125/// The task result (<see cref="Task{TResult}.Result" />) returns an 134public abstract Task<bool> DoesPackageExistAsync(
Resources\IVulnerabilityInfoResource.cs (1)
20Task<GetVulnerabilityInfoResult> GetVulnerabilityInfoAsync(SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken);
Resources\LegacyFeedCapabilityResource.cs (2)
15public abstract Task<bool> SupportsSearchAsync(ILogger log, CancellationToken token); 17public abstract Task<bool> SupportsIsAbsoluteLatestVersionAsync(ILogger log, CancellationToken token);
Resources\ListResource.cs (1)
12public abstract Task<IEnumerableAsync<IPackageSearchMetadata>> ListAsync(
Resources\MetadataResource.cs (8)
21public async Task<IEnumerable<NuGetVersion>> GetVersions(string packageId, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token) 29public abstract Task<IEnumerable<NuGetVersion>> GetVersions(string packageId, bool includePrerelease, bool includeUnlisted, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token); 35public async Task<bool> Exists(PackageIdentity identity, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token) 43public abstract Task<bool> Exists(PackageIdentity identity, bool includeUnlisted, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token); 45public async Task<bool> Exists(string packageId, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token) 50public abstract Task<bool> Exists(string packageId, bool includePrerelease, bool includeUnlisted, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token); 52public abstract Task<IEnumerable<KeyValuePair<string, NuGetVersion?>>> GetLatestVersions(IEnumerable<string> packageIds, bool includePrerelease, bool includeUnlisted, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token); 54public async Task<NuGetVersion?> GetLatestVersion(string packageId, bool includePrerelease, bool includeUnlisted, SourceCacheContext sourceCacheContext, Common.ILogger log, CancellationToken token)
Resources\MetadataResourceV3.cs (7)
45public override async Task<IEnumerable<KeyValuePair<string, NuGetVersion?>>> GetLatestVersions( 87public override async Task<bool> Exists( 117public override async Task<bool> Exists( 130public override async Task<IEnumerable<NuGetVersion>> GetVersions( 151private async Task<List<NuGetVersion>> GetVersionsFromItemsAsync( 183private async Task<List<NuGetVersion>> GetVersionsFromJObjectsAsync( 213private async Task<bool> ExistsFromJObjectAsync(
Resources\PackageMetadataResource.cs (2)
16public abstract Task<IEnumerable<IPackageSearchMetadata>> GetMetadataAsync( 27public abstract Task<IPackageSearchMetadata?> GetMetadataAsync(
Resources\PackageMetadataResourceV3.cs (9)
71public override async Task<IEnumerable<IPackageSearchMetadata>> GetMetadataAsync( 91public override async Task<IPackageSearchMetadata?> GetMetadataAsync( 103private async Task<IEnumerable<IPackageSearchMetadata>> GetMetadataAsync( 173private async Task<T?> DeserializeStreamDataAsync<T>(Stream? stream, CancellationToken token) 196private static async Task<T?> DeserializeStreamDataWithStjAsync<T>(Stream stream, CancellationToken token) 222private async Task<ValueTuple<RegistrationIndex?, HttpSourceCacheContext>> LoadRegistrationIndexAsync( 227Func<HttpSourceResult, Task<RegistrationIndex?>> processAsync, 263private Task<RegistrationPage?> GetRegistratioIndexPageAsync( 274var registrationPage = httpSource.GetAsync(
Resources\PackageSearchResource.cs (1)
15public abstract Task<IEnumerable<IPackageSearchMetadata>> SearchAsync(
Resources\PackageSearchResourceV3.cs (8)
54public override async Task<IEnumerable<IPackageSearchMetadata>> SearchAsync(string searchTerm, SearchFilter filter, int skip, int take, Common.ILogger log, CancellationToken cancellationToken) 96private async Task<T> SearchPage<T>( 97Func<Uri, Task<T>> getResultAsync, 202internal async Task<IReadOnlyList<PackageSearchMetadata>> Search( 224internal async Task<IReadOnlyList<PackageSearchMetadata>> ProcessHttpStreamTakeCountedItemAsync(HttpResponseMessage? httpInitialResponse, int take, CancellationToken token) 235private async Task<V3SearchResults?> ProcessHttpStreamWithoutBufferingAsync(HttpResponseMessage? httpInitialResponse, uint take, CancellationToken token) 256private static async Task<V3SearchResults?> ProcessHttpStreamWithStjAsync(HttpResponseMessage httpInitialResponse, uint take, CancellationToken token) 273private static async Task<V3SearchResults?> ProcessHttpStreamWithNsjAsync(HttpResponseMessage httpInitialResponse, uint take, CancellationToken token)
Resources\PackageUpdateResource.cs (3)
351private async Task<bool> PushPackageCore(string source, 423private async Task<bool> PushPackageToServer(string source, 909private async Task<string> GetSecureApiKey(
Resources\PluginResource.cs (2)
60/// The task result (<see cref="Task{TResult}.Result" />) returns a <see cref="GetPluginResult" />.</returns> 63public async Task<GetPluginResult?> GetPluginAsync(
Resources\RawSearchResourceV3.cs (2)
41public virtual async Task<JObject> SearchPage(string searchTerm, SearchFilter filters, int skip, int take, Common.ILogger log, CancellationToken cancellationToken) 115public virtual async Task<IEnumerable<JObject>> Search(string searchTerm, SearchFilter filters, int skip, int take, Common.ILogger log, CancellationToken cancellationToken)
Resources\RegistrationResourceV3.cs (6)
103public virtual async Task<JObject?> GetPackageMetadata(PackageIdentity identity, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token) 112public virtual async Task<IEnumerable<JObject>> GetPackageMetadata(string packageId, bool includePrerelease, bool includeUnlisted, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token) 121public virtual async Task<IEnumerable<JObject>> GetPackageMetadata( 170public virtual Task<IEnumerable<JObject>> GetPackageEntries(string packageId, bool includeUnlisted, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token) 181internal virtual async Task<IReadOnlyList<RegistrationLeafItem>> GetPackageMetadataItemsAsync( 229internal virtual async Task<RegistrationLeafItem?> GetPackageMetadataItemAsync(PackageIdentity identity, SourceCacheContext cacheContext, Common.ILogger log, CancellationToken token)
Resources\VulnerabilityInfoResourceV3.cs (5)
36public async Task<IReadOnlyList<V3VulnerabilityIndexEntry>> GetVulnerabilityFilesAsync(SourceCacheContext cacheContext, ILogger log, CancellationToken cancellationToken) 72async Task<Uri> GetIndexUrlAsync(CancellationToken cancellationToken) 88public async Task<IReadOnlyDictionary<string, IReadOnlyList<PackageVulnerabilityInfo>>> GetVulnerabilityDataAsync( 129public async Task<GetVulnerabilityInfoResult> GetVulnerabilityInfoAsync(SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken) 152var tasks = new Task<IReadOnlyDictionary<string, IReadOnlyList<PackageVulnerabilityInfo>>>[indexEntries.Count];
SourceRepository.cs (4)
98public virtual async Task<FeedType> GetFeedType(CancellationToken token) 129Task<T?> task = GetResourceAsync<T>(token); 140public virtual async Task<T?> GetResourceAsync<T>() where T : class, INuGetResource 150public virtual async Task<T?> GetResourceAsync<T>(CancellationToken token) where T : class, INuGetResource
src\nuget-client\build\Shared\TaskResult.cs (21)
16/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 18public static Task<bool> True { get; } = Task.FromResult(true); 21/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 23public static Task<bool> False { get; } = Task.FromResult(false); 26/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="b"/>. 28public static Task<bool> Boolean(bool b) 34/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="true"/>. 36public static Task<int> Zero { get; } = Task.FromResult(0); 39/// Gets a <see cref="Task{TResult}"/> that's completed successfully with the result of <see langword="false"/>. 41public static Task<int> One { get; } = Task.FromResult(1); 44/// Returns a <see cref="Task{TResult}"/> that's completed successfully with the result of <paramref name="i"/>. 46public static Task<int> Integer(int i) 57/// Returns a <see cref="Task{TResult}"/> of type <typeparamref name="T" /> that's completed successfully with the result of <see langword="null"/>. 59public static Task<T?> Null<T>() where T : class => NullTaskResult<T>.Instance; 63public static readonly Task<T?> Instance = Task.FromResult<T?>(null); 67/// Returns a <see cref="Task{TResult}"/> whose value is an empty enumerable of type <typeparamref name="T" />. 69public static Task<IEnumerable<T>> EmptyEnumerable<T>() => EmptyEnumerableTaskResult<T>.Instance; 73public static readonly Task<IEnumerable<T>> Instance = Task.FromResult(Enumerable.Empty<T>()); 77/// Returns a <see cref="Task{TResult}"/> whose value is an empty array with element type <typeparamref name="T" />. 79public static Task<T[]> EmptyArray<T>() => EmptyArrayTaskResult<T>.Instance; 83public static readonly Task<T[]> Instance = Task.FromResult(Array.Empty<T>());
src\nuget-client\build\Shared\TaskResultCache.cs (13)
23private readonly ConcurrentDictionary<TKey, Task<TValue>> _cache; 65/// Gets the cached async operation associated with the specified key, or runs the operation asynchronously and returns <see cref="Task{TValue}" /> that the caller can await. 71/// <returns>A <see cref="Task{TResult}" /> for the specified asynchronous operation from the cache if found, otherwise the scheduled asynchronous operation to await.</returns> 72public Task<TValue> GetOrAddAsync<TState>(TKey key, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 78/// Gets the cached async operation associated with the specified key, or runs the operation asynchronously and returns <see cref="Task{TValue}" /> that the caller can await, and optionally refreshes the cache. 85/// <returns>A <see cref="Task{TResult}" /> for the specified asynchronous operation from the cache if found, otherwise the scheduled asynchronous operation to await.</returns> 86public Task<TValue> GetOrAddAsync<TState>(TKey key, bool refresh, Func<TState, Task<TValue>> valueFactory, TState state, CancellationToken cancellationToken) 88if (!refresh && _cache.TryGetValue(key, out Task<TValue>? value)) 125public Task<TValue> GetValueAsync(TKey key) 127if (TryGetValue(key, out Task<TValue>? value)) 136public bool TryGetValue(TKey key, [NotNullWhen(true)] out Task<TValue>? value)
Utility\DownloadTimeoutStream.cs (1)
66public override async Task<int> ReadAsync(
Utility\FindPackagesByIdNupkgDownloader.cs (7)
53public async Task<NuspecReader> GetNuspecReaderFromNupkgAsync( 109public async Task<bool> CopyNupkgToStreamAsync( 168private async Task<bool> ProcessNupkgStreamAsync( 212private async Task<CacheEntry> ProcessStreamAndGetCacheEntryAsync( 251private async Task<T> ProcessHttpSourceResultAsync<T>( 254Func<HttpSourceResult?, Task<T>> processAsync, 333private async Task<bool> ProcessCacheEntryAsync(
Utility\GetDownloadResultUtility.cs (2)
23public static async Task<DownloadResourceResult> GetDownloadResultAsync( 158private static async Task<DownloadResourceResult> DirectDownloadAsync(
Utility\GlobalPackagesFolderUtility.cs (1)
84public static async Task<DownloadResourceResult> AddPackageAsync(
Utility\StreamExtensions.cs (3)
20internal static async Task<JObject?> AsJObjectAsync(this Stream? stream, CancellationToken token) 40internal static Task<Stream?> AsSeekableStreamAsync(this Stream? stream, CancellationToken token) 50internal static async Task<Stream?> AsSeekableStreamAsync(this Stream? stream, bool leaveStreamOpen, CancellationToken token)
Utility\TimeoutUtility.cs (3)
16public static async Task<T> StartWithTimeout<T>( 17Func<CancellationToken, Task<T>> getTask, 40var responseTask = getTask(taskTcs.Token);
Publishers.Frontend (1)
Program.cs (1)
37public async Task<string> GetDataAsync(CancellationToken cancellationToken = default)
Roslyn.Diagnostics.Analyzers (208)
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\0bf6ba47805c8821\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\0bf6ba47805c8821\AbstractMoveDeclarationNearReferenceService.State.cs (2)
38internal static async Task<State> GenerateAsync( 53private async Task<bool> TryInitializeAsync(
src\0bf6ba47805c8821\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\5f6f2f95b47c3dc6\SemanticModelWorkspaceServiceFactory.SemanticModelWorkspaceService.cs (2)
137private static async Task<ImmutableDictionary<DocumentId, SemanticModelReuseInfo?>> ComputeUpdatedMapAsync( 174private static async Task<SemanticModelReuseInfo?> TryReuseCachedSemanticModelAsync(
src\7a47995420f988d7\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\7a47995420f988d7\IRemoveUnnecessaryImportsService.cs (2)
14Task<Document> RemoveUnnecessaryImportsAsync(Document document, CancellationToken cancellationToken); 16Task<Document> RemoveUnnecessaryImportsAsync(Document fromDocument, Func<SyntaxNode, bool>? predicate, CancellationToken cancellationToken);
src\ce787ef1f541c32a\IReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
30Task<SyntaxNode> ReplaceAsync(Document document, SyntaxNode memberDeclaration, CancellationToken cancellationToken);
src\ce8c1e82c1124a2b\AbstractInitializerParameterService.cs (3)
30protected abstract Task<Solution> TryAddAssignmentForPrimaryConstructorAsync( 82public async Task<Solution> AddAssignmentAsync( 111private async Task<Solution> TryAddAssignmentForFunctionLikeDeclarationAsync(
src\f53a47129f87bc30\AbstractGeneratedCodeRecognitionService.cs (1)
24public async Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken)
src\f53a47129f87bc30\IGeneratedCodeRecognitionService.cs (1)
17Task<bool> IsGeneratedCodeAsync(Document document, CancellationToken cancellationToken);
src\roslyn\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\roslyn\src\Dependencies\Collections\Extensions\IEnumerableExtensions.cs (1)
599Func<TItem, CancellationToken, Task<IEnumerable<TResult>>> selector,
src\roslyn\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\roslyn\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\roslyn\src\Dependencies\Threading\IAsyncEnumerableExtensions.cs (1)
16public static async Task<ImmutableArray<T>> ToImmutableArrayAsync<T>(this IAsyncEnumerable<T> values, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Dependencies\Threading\TestHooks\IExpeditableDelaySource.cs (1)
30Task<bool> Delay(TimeSpan delay, CancellationToken cancellationToken);
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.AssemblyMetricData.cs (1)
31internal static async Task<AssemblyMetricData> ComputeAsync(IAssemblySymbol assembly, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamedTypeMetricData.cs (1)
31internal static async Task<NamedTypeMetricData> ComputeAsync(INamedTypeSymbol namedType, CodeMetricsAnalysisContext context)
src\roslyn\src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.NamespaceMetricData.cs (1)
30internal static async Task<NamespaceMetricData> ComputeAsync(INamespaceSymbol @namespace, CodeMetricsAnalysisContext context)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (3)
49public static Task<SyntaxToken> GetTouchingWordAsync( 59public static Task<SyntaxToken> GetTouchingTokenAsync( 68public static async Task<SyntaxToken> GetTouchingTokenAsync(
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\SerializableBytes.cs (1)
34internal static async Task<PooledStream> CreateReadableStreamAsync(Stream stream, CancellationToken cancellationToken)
src\roslyn\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) 100public static readonly Task<T?> Default = Task.FromResult<T?>(default); 101public static readonly Task<IEnumerable<T>> EmptyEnumerable = Task.FromResult<IEnumerable<T>>(SpecializedCollections.EmptyEnumerable<T>()); 102public static readonly Task<ImmutableArray<T>> EmptyImmutableArray = Task.FromResult(ImmutableArray<T>.Empty); 103public static readonly Task<IList<T>> EmptyList = Task.FromResult(SpecializedCollections.EmptyList<T>()); 104public static readonly Task<IReadOnlyList<T>> EmptyReadOnlyList = Task.FromResult(SpecializedCollections.EmptyReadOnlyList<T>());
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Extensions\Compilation\CompilationExtensions.cs (1)
154=> compilation.GetTypeByMetadataName(typeof(Task<>).FullName!);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeCleanup\CodeCleanupHelpers.cs (1)
14public static async Task<Document> CleanupSyntaxAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixes\MultiProjectSafeFixAllProvider.cs (2)
28public sealed override async Task<CodeAction?> GetFixAsync(FixAllContext fixAllContext) 71async Task<Solution> ProcessLinkedDocumentMapAsync()
src\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeFixesAndRefactorings\IFixAllSpanMappingService.cs (1)
30Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansAsync(
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (9)
30public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken) 37public static Task<Document> AddFieldDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IFieldSymbol field, CancellationToken cancellationToken) 44public static Task<Document> AddMethodDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IMethodSymbol method, CancellationToken cancellationToken) 51public static Task<Document> AddPropertyDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IPropertySymbol property, CancellationToken cancellationToken) 58public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 65public static Task<Document> AddNamedTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamedTypeSymbol namedType, CancellationToken cancellationToken) 72public static Task<Document> AddNamespaceDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceSymbol @namespace, CancellationToken cancellationToken) 79public static Task<Document> AddNamespaceOrTypeDeclarationAsync(CodeGenerationSolutionContext context, INamespaceSymbol destination, INamespaceOrTypeSymbol namespaceOrType, CancellationToken cancellationToken) 86public static Task<Document> AddMemberDeclarationsAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEnumerable<ISymbol> members, CancellationToken cancellationToken)
src\roslyn\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\roslyn\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\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (3)
178public static async Task<bool> HasAnyErrorsAsync(this Document document, CancellationToken cancellationToken, List<string>? ignoreErrorCode = null) 184public static async Task<ImmutableArray<Diagnostic>> GetErrorsAsync(this Document document, CancellationToken cancellationToken, IList<string>? ignoreErrorCode = null) 219public static async Task<bool> IsGeneratedCodeAsync(this Document document, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
94public static async Task<Compilation> GetRequiredCompilationAsync(this Project project, CancellationToken cancellationToken)
src\roslyn\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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\InitializeParameter\IInitializeParameterService.cs (1)
21Task<Solution> AddAssignmentAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxFactsService\ISyntaxFactsService.cs (1)
18Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree syntaxTree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\AbstractSemanticModelReuseLanguageService.cs (1)
49public async Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\SemanticModelReuse\ISemanticModelReuseLanguageService.cs (1)
36Task<SemanticModel?> TryGetSpeculativeSemanticModelAsync(SemanticModel previousSemanticModel, SyntaxNode currentBodyNode, CancellationToken cancellationToken);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (3)
54public async Task<Document> ReduceAsync( 86private async Task<Document> ReduceCoreAsync( 294private async Task<Document> RemoveUnusedNamespaceImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (1)
30Task<Document> ReduceAsync(
src\roslyn\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\4f0789c9734b88bf\CSharpInitializeParameterService.cs (1)
109protected override Task<Solution> TryAddAssignmentForPrimaryConstructorAsync(Document document, IParameterSymbol parameter, ISymbol fieldOrProperty, CancellationToken cancellationToken)
src\50a3a051b0fef0d6\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
36public async Task<SyntaxNode> ReplaceAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeFixesAndRefactorings\CSharpFixAllSpanMappingService.cs (1)
24protected override async Task<ImmutableDictionary<Document, ImmutableArray<TextSpan>>> GetFixAllSpansIfWithinGlobalStatementAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (1)
62public override async Task<Document> AddEventAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (1)
109public static async Task<ISymbol?> FindApplicableAliasAsync(this ITypeSymbol type, int position, SemanticModel semanticModel, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
52protected override async Task<bool> TypesAreCompatibleAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.cs (1)
37public override async Task<Document> RemoveUnnecessaryImportsAsync(
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
116public Task<ImmutableArray<SyntaxNode>> GetSelectedFieldsAndPropertiesAsync(SyntaxTree tree, TextSpan textSpan, bool allowPartialSelection, CancellationToken cancellationToken)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (2)
1805if (name.Equals(nameof(Task<>.ConfigureAwait)) && 1811else if (name.Equals(nameof(Task<>.ContinueWith)))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\InitializeParameter\InitializeParameterHelpers.cs (1)
33public static async Task<Solution> AddAssignmentForPrimaryConstructorAsync(
rzc (27)
Client.cs (1)
40public static async Task<Client> ConnectAsync(string pipeName, TimeSpan? timeout, CancellationToken cancellationToken)
CommandBase.cs (3)
28OnExecute((Func<Task<int>>)ExecuteAsync); 42protected abstract Task<int> ExecuteCoreAsync(); 44private async Task<int> ExecuteAsync()
CommandLine\CommandLineApplication.cs (1)
132public void OnExecute(Func<Task<int>> invoke)
ConnectionHost.cs (2)
14public abstract Task<Connection> WaitForConnectionAsync(CancellationToken cancellationToken); 45public override async Task<Connection> WaitForConnectionAsync(CancellationToken cancellationToken)
DefaultRequestDispatcher.cs (9)
24private Task<Connection> _listenTask; 26private List<Task<ConnectionResult>> _connections = new(); 187var connectionTask = AcceptConnection(_listenTask, accept, cancellationToken); 250var current = _connections[i]; 306internal async Task<ConnectionResult> AcceptConnection(Task<Connection> task, bool accept, CancellationToken cancellationToken) 364var worker = ExecuteRequestAsync(request, buildCancelled.Token); 411private Task<ServerResponse> ExecuteRequestAsync(ServerRequest buildRequest, CancellationToken cancellationToken) 423var task = new Task<ServerResponse>(func, cancellationToken, TaskCreationOptions.LongRunning);
DiscoverCommand.cs (1)
144protected override Task<int> ExecuteCoreAsync()
GenerateCommand.cs (1)
78protected override Task<int> ExecuteCoreAsync()
ServerCommand.cs (1)
51protected override Task<int> ExecuteCoreAsync()
ServerProtocol\ServerConnection.cs (5)
91public static Task<ServerResponse> RunOnServer( 115private static async Task<ServerResponse> RunOnServerCore( 139Task<Client> pipeTask = null; 221private static async Task<ServerResponse> TryProcessRequest( 247var responseTask = ServerResponse.ReadAsync(client.Stream, serverCts.Token);
ServerProtocol\ServerRequest.cs (1)
123public static async Task<ServerRequest> ReadAsync(Stream inStream, CancellationToken cancellationToken)
ServerProtocol\ServerResponse.cs (1)
89public static async Task<ServerResponse> ReadAsync(Stream stream, CancellationToken cancellationToken = default(CancellationToken))
ShutdownCommand.cs (1)
32protected override async Task<int> ExecuteCoreAsync()
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);
Shared.Tests (1)
Memoization\MemoizeTests.cs (1)
24Func<int, Task<int>> doubler = x => Task.FromResult(x * 2);
Stress.AppHost (2)
InteractionCommands.cs (2)
19var resultTask1 = interactionService.PromptConfirmationAsync("Command confirmation", "Are you sure?", cancellationToken: commandContext.CancellationToken); 20var 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)
SuperFileCheck (5)
Program.cs (5)
101static async Task<FileCheckResult> RunLLVMFileCheckAsync(string[] args) 418static async Task<FileCheckResult> RunSuperFileCheckAsync(MethodDeclarationInfo methodDeclInfo, string[] args, string[] checkPrefixes, string tmpFilePath) 633static async Task<int> Main(string[] args) 709var tasks = new Task<FileCheckResult>[methodDeclInfos.Length]; 734foreach (var x in tasks)
System.CommandLine (14)
Command.cs (3)
183/// When possible, prefer using the <see cref="SetAction(Func{ParseResult, CancellationToken, Task{int}})"/> overload 189public void SetAction(Func<ParseResult, Task<int>> action) 206public void SetAction(Func<ParseResult, CancellationToken, Task<int>> action)
Invocation\AnonymousAsynchronousCommandLineAction.cs (3)
11private readonly Func<ParseResult, CancellationToken, Task<int>> _asyncAction; 13internal AnonymousAsynchronousCommandLineAction(Func<ParseResult, CancellationToken, Task<int>> action) 17public override Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) =>
Invocation\AsynchronousCommandLineAction.cs (1)
18public abstract Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default);
Invocation\InvocationPipeline.cs (3)
11internal static async Task<int> InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken) 65var startedInvocation = asyncAction.InvokeAsync(parseResult, cts.Token); 77Task<int> firstCompletedTask = await Task.WhenAny(startedInvocation, terminationHandler.ProcessTerminationCompletionSource.Task);
Invocation\ProcessTerminationHandler.cs (3)
17private Task<int>? _startedHandler; 23internal Task<int> StartedHandler { set => Volatile.Write(ref _startedHandler, value); } 89var startedHandler = Volatile.Read(ref _startedHandler);
ParseResult.cs (1)
278public Task<int> InvokeAsync(
System.ComponentModel.Annotations (23)
System\ComponentModel\DataAnnotations\AsyncValidationAttribute.cs (4)
69/// A <see cref="Task{ValidationResult}" /> representing the asynchronous validation operation. 73protected abstract Task<ValidationResult?> IsValidAsync( 103/// A <see cref="Task{ValidationResult}" /> representing the asynchronous validation operation. 109public async Task<ValidationResult?> GetValidationResultAsync(
System\ComponentModel\DataAnnotations\Validator.cs (19)
349/// <returns>A <see cref="Task{Boolean}" /> that is <c>true</c> if the value is valid, <c>false</c> if any validation errors are encountered.</returns> 354public static async Task<bool> TryValidatePropertyAsync( 393/// <returns>A <see cref="Task{Boolean}" /> that is <c>true</c> if the object is valid, <c>false</c> if any validation errors are encountered.</returns> 400public static Task<bool> TryValidateObjectAsync( 428/// Returns <see cref="Task{Boolean}" /> for interoperability with standard async 439/// <returns>A <see cref="Task{Boolean}" /> that is <c>true</c> if the object is valid, <c>false</c> if any validation errors are encountered.</returns> 446public static async Task<bool> TryValidateObjectAsync( 490/// <returns>A <see cref="Task{Boolean}" /> that is <c>true</c> if the object is valid, <c>false</c> if any validation errors are encountered.</returns> 491public static async Task<bool> TryValidateValueAsync( 639private static async Task<List<ValidationError>> GetObjectValidationErrorsAsync( 709private static async Task<List<ValidationError>> GetObjectPropertyValidationErrorsAsync( 723var tasks = new List<Task<List<ValidationError>>>(properties.Count); 736Task<List<ValidationError>> completed = await Task.WhenAny(tasks).ConfigureAwait(false); 769foreach (Task<List<ValidationError>> remaining in tasks) 809private static async Task<List<ValidationError>> GetValidationErrorsAsync( 867var tasks = new List<Task<(AsyncValidationAttribute Attr, ValidationResult? Result)>>(asyncAttributes.Count); 877Task<(AsyncValidationAttribute Attr, ValidationResult? Result)> completed = 911foreach (var remaining in tasks) 923private static async Task<(AsyncValidationAttribute Attr, ValidationResult? Result)> RunAsyncValidation(
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\runtime\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\runtime\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\runtime\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.Data.OleDb (5)
System\Data\ProviderBase\DbConnectionFactory.cs (5)
26private static readonly Task<DbConnectionInternal?>[] s_pendingOpenNonPooled = new Task<DbConnectionInternal?>[Environment.ProcessorCount]; 27private static Task<DbConnectionInternal?>? s_completedTask; 111private static Task<DbConnectionInternal?> GetCompletedTask() 156Task<DbConnectionInternal> newTask;
System.Diagnostics.Process (13)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (2)
354public async Task<ProcessExitStatus> WaitForExitAsync(CancellationToken cancellationToken = default) 422public async Task<ProcessExitStatus> WaitForExitOrKillOnCancellationAsync(CancellationToken cancellationToken)
System\Diagnostics\Process.cs (1)
1851public async Task<ProcessExitStatus> WaitForExitStatusAsync(CancellationToken cancellationToken = default)
System\Diagnostics\Process.Multiplexing.cs (6)
383public async Task<(string StandardOutput, string StandardError)> ReadAllTextAsync(CancellationToken cancellationToken = default) 422public async Task<(byte[] StandardOutput, byte[] StandardError)> ReadAllBytesAsync(CancellationToken cancellationToken = default) 437private async Task<(ArraySegment<byte> StandardOutput, ArraySegment<byte> StandardError)> ReadAllBytesIntoRentedArraysAsync(CancellationToken cancellationToken) 441Task<ArraySegment<byte>> outputTask = ReadPipeToBufferAsync(_standardOutput!.BaseStream, cancellationToken); 442Task<ArraySegment<byte>> errorTask = ReadPipeToBufferAsync(_standardError!.BaseStream, cancellationToken); 481private static async Task<ArraySegment<byte>> ReadPipeToBufferAsync(Stream stream, CancellationToken cancellationToken)
System\Diagnostics\Process.Scenarios.cs (4)
168public static async Task<ProcessExitStatus> RunAsync(ProcessStartInfo startInfo, CancellationToken cancellationToken = default) 202public static async Task<ProcessExitStatus> RunAsync(string fileName, IEnumerable<string>? arguments = null, bool silent = false, CancellationToken cancellationToken = default) 314public static async Task<ProcessTextOutput> RunAndCaptureTextAsync(ProcessStartInfo startInfo, CancellationToken cancellationToken = default) 358public static Task<ProcessTextOutput> RunAndCaptureTextAsync(string fileName, IEnumerable<string>? arguments = null, CancellationToken cancellationToken = default)
System.Formats.Tar (2)
src\runtime\src\libraries\Common\src\System\IO\SubReadStream.cs (1)
209public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Formats\Tar\GnuSparseStream.cs (1)
189public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Compression (47)
src\runtime\src\libraries\Common\src\System\IO\SubReadStream.cs (1)
209public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
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)
423public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\GZipStream.cs (1)
211public 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\WinZipAesStream.cs (2)
87internal static async Task<WinZipAesStream> CreateAsync(Stream baseStream, WinZipAesKeyMaterial keyMaterial, long totalStreamSize, bool encrypting, bool leaveOpen = false, CancellationToken cancellationToken = default) 432public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\ZipArchive.Async.cs (1)
67public static async Task<ZipArchive> CreateAsync(Stream stream, ZipArchiveMode mode, bool leaveOpen, Encoding? entryNameEncoding, CancellationToken cancellationToken = default)
System\IO\Compression\ZipArchiveEntry.Async.cs (22)
22public Task<Stream> OpenAsync(CancellationToken cancellationToken = default) 34/// <returns>A <see cref="Task{Stream}"/> that represents the asynchronous open operation.</returns> 48public Task<Stream> OpenAsync(FileAccess access, CancellationToken cancellationToken = default) 62/// <returns>A <see cref="Task{Stream}"/> that represents the asynchronous open operation.</returns> 75public Task<Stream> OpenAsync(FileAccess access, ReadOnlySpan<char> password, CancellationToken cancellationToken = default) 103public Task<Stream> OpenAsync(ReadOnlySpan<char> password, CancellationToken cancellationToken = default) 116private Task<Stream> OpenAsyncCore(FileAccess access, ReadOnlySpan<char> password, CancellationToken cancellationToken) 153internal async Task<long> GetOffsetOfCompressedDataAsync(CancellationToken cancellationToken) 218private Task<Stream> OpenInReadModeAsync(bool checkOpenable, ReadOnlySpan<char> password, CancellationToken cancellationToken) 267async Task<Stream> OpenInReadModeAsyncCore(bool checkOpenable, WinZipAesKeyMaterial? aesKeys, ZipCryptoKeys? zipCryptoKeys, byte zipCryptoCheckByte, CancellationToken cancellationToken) 302private async Task<WrappedStream> OpenInUpdateModeAsync(bool loadExistingContent, CancellationToken cancellationToken) 345private async Task<Stream> OpenInUpdateModeForReadAsync(CancellationToken cancellationToken) 356private async Task<MemoryStream> GetUncompressedDataAsync(CancellationToken cancellationToken) 490private async Task<bool> GetIsOpenableAsync(bool needToUncompress, bool needToLoadIntoMemory, CancellationToken cancellationToken) 511private Task<Stream> OpenInUpdateModeWithPasswordAsync(bool loadExistingContent, ReadOnlySpan<char> password, CancellationToken cancellationToken) 568private static async Task<Stream> CastToStreamAsync(Task<WrappedStream> task) => await task.ConfigureAwait(false); 570private async Task<Stream> DecryptAndStoreForUpdateWithZipCryptoAsync(ZipCryptoKeys keys, byte checkByte, CancellationToken cancellationToken) 582private async Task<Stream> DecryptAndStoreForUpdateWithAesAsync(WinZipAesKeyMaterial aesKeys, CancellationToken cancellationToken) 607private async Task<Stream> StoreDecryptedDataForUpdateAsync(Stream decryptedStream, CancellationToken cancellationToken) 645private async Task<(bool, string?)> IsOpenableAsync(bool needToUncompress, bool needToLoadIntoMemory, CancellationToken cancellationToken) 689private async Task<bool> WriteLocalFileHeaderAsync(bool isEmptyFile, bool forceWrite, bool preserveDataDescriptor, CancellationToken cancellationToken)
System\IO\Compression\ZipArchiveEntry.cs (1)
2279public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\ZipBlocks.Async.cs (6)
79public static async Task<Zip64EndOfCentralDirectoryLocator> TryReadBlockAsync(Stream stream, CancellationToken cancellationToken) 104public static async Task<Zip64EndOfCentralDirectoryRecord> TryReadBlockAsync(Stream stream, CancellationToken cancellationToken) 132public static async Task<(List<ZipGenericExtraField>, byte[] trailingData)> GetExtraFieldsAsync(Stream stream, CancellationToken cancellationToken) 166public static async Task<bool> TrySkipBlockAsync(Stream stream, CancellationToken cancellationToken) 185public static async Task<(bool, int, ZipCentralDirectoryFileHeader?)> TryReadBlockAsync(ReadOnlyMemory<byte> buffer, Stream furtherReads, bool saveExtraFieldsAndComments, CancellationToken cancellationToken) 260public static async Task<ZipEndOfCentralDirectoryBlock> ReadBlockAsync(Stream stream, CancellationToken cancellationToken)
System\IO\Compression\ZipCryptoStream.cs (3)
76internal static async Task<ZipCryptoStream> CreateAsync(Stream baseStream, ZipCryptoKeys keys, byte expectedCheckByte, bool encrypting, CancellationToken cancellationToken = default, bool leaveOpen = false) 204private static async Task<(uint key0, uint key1, uint key2)> ReadAndValidateHeaderCore(bool isAsync, Stream baseStream, ZipCryptoKeys keys, byte expectedCheckByte, CancellationToken cancellationToken) 389public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\ZipCustomStreams.cs (3)
121public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 341public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 592public 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)
159public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\IO\Compression\Zstandard\ZstandardStream.Decompress.cs (1)
296public 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)
129public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.IO.Compression.ZipFile (8)
System\IO\Compression\ZipFile.Create.Async.cs (3)
36public static Task<ZipArchive> OpenReadAsync(string archiveFileName, CancellationToken cancellationToken = default) => OpenAsync(archiveFileName, ZipArchiveMode.Read, cancellationToken); 76public static Task<ZipArchive> OpenAsync(string archiveFileName, ZipArchiveMode mode, CancellationToken cancellationToken = default) => OpenAsync(archiveFileName, mode, entryNameEncoding: null, cancellationToken); 155public static async Task<ZipArchive> OpenAsync(string archiveFileName, ZipArchiveMode mode, Encoding? entryNameEncoding, CancellationToken cancellationToken = default)
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Async.cs (5)
46public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, string sourceFileName, string entryName, CancellationToken cancellationToken = default) => 74public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, 108public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, 138public static Task<ZipArchiveEntry> CreateEntryFromFileAsync(this ZipArchive destination, 142internal 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 (6)
src\runtime\src\libraries\Common\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)
System\Buffers\ReadOnlySequenceStream.cs (1)
128public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System.Memory.Data (6)
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 (100)
src\runtime\src\libraries\Common\src\System\IO\DelegatingStream.cs (1)
105public 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)
164public Task<string> GetStringAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 167public Task<string> GetStringAsync(Uri? requestUri) => 170public Task<string> GetStringAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 173public Task<string> GetStringAsync(Uri? requestUri, CancellationToken cancellationToken) 183private async Task<string> GetStringAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 238public Task<byte[]> GetByteArrayAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 241public Task<byte[]> GetByteArrayAsync(Uri? requestUri) => 244public Task<byte[]> GetByteArrayAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 247public Task<byte[]> GetByteArrayAsync(Uri? requestUri, CancellationToken cancellationToken) 257private async Task<byte[]> GetByteArrayAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 315public Task<Stream> GetStreamAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 318public Task<Stream> GetStreamAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 321public Task<Stream> GetStreamAsync(Uri? requestUri) => 324public Task<Stream> GetStreamAsync(Uri? requestUri, CancellationToken cancellationToken) 334private async Task<Stream> GetStreamAsyncCore(HttpRequestMessage request, CancellationToken cancellationToken) 365public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 368public Task<HttpResponseMessage> GetAsync(Uri? requestUri) => 371public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption) => 374public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption) => 377public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 380public Task<HttpResponseMessage> GetAsync(Uri? requestUri, CancellationToken cancellationToken) => 383public Task<HttpResponseMessage> GetAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 386public Task<HttpResponseMessage> GetAsync(Uri? requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken) => 389public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 392public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content) => 395public Task<HttpResponseMessage> PostAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 398public Task<HttpResponseMessage> PostAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 405public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 408public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content) => 411public Task<HttpResponseMessage> PutAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 414public Task<HttpResponseMessage> PutAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 421public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content) => 424public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content) => 427public Task<HttpResponseMessage> PatchAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, HttpContent? content, CancellationToken cancellationToken) => 430public Task<HttpResponseMessage> PatchAsync(Uri? requestUri, HttpContent? content, CancellationToken cancellationToken) 437public Task<HttpResponseMessage> DeleteAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri) => 440public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri) => 443public Task<HttpResponseMessage> DeleteAsync([StringSyntax(StringSyntaxAttribute.Uri)] string? requestUri, CancellationToken cancellationToken) => 446public Task<HttpResponseMessage> DeleteAsync(Uri? requestUri, CancellationToken cancellationToken) => 517public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request) => 520public override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) => 523public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption) => 526public Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken) 534async Task<HttpResponseMessage> Core(
System\Net\Http\HttpClientHandler.cs (1)
364protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
System\Net\Http\HttpContent.cs (16)
97public Task<string> ReadAsStringAsync() => 100public Task<string> ReadAsStringAsync(CancellationToken cancellationToken) 193public Task<byte[]> ReadAsByteArrayAsync() => 196public Task<byte[]> ReadAsByteArrayAsync(CancellationToken cancellationToken) 239public Task<Stream> ReadAsStreamAsync() => 242public Task<Stream> ReadAsStreamAsync(CancellationToken cancellationToken) 252Task<Stream> t = IsBuffered ? 258else if (_contentReadStream is Task<Stream> t) // have a Task<Stream> 265Task<Stream> ts = Task.FromResult((Stream)_contentReadStream); 293Debug.Assert(_contentReadStream is Task<Stream>, $"Expected a Task<Stream>, got ${_contentReadStream}"); 294Task<Stream> t = (Task<Stream>)_contentReadStream; 549protected virtual Task<Stream> CreateContentReadStreamAsync() 557protected virtual Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) 649(_contentReadStream is Task<Stream> t && t.Status == TaskStatus.RanToCompletion ? t.Result : null); 772private 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)
67public virtual Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 80static 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)
242protected override Task<Stream> CreateContentReadStreamAsync() => 245protected override Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) => 510public 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)
21private static Task<HttpResponseMessage> InnerSendAsync(HttpRequestMessage request, bool async, bool isProxyAuth, HttpConnectionPool pool, HttpConnection connection, CancellationToken cancellationToken) 46private static async Task<HttpResponseMessage> SendWithNtAuthAsync(HttpRequestMessage request, Uri authUri, bool async, ICredentials credentials, TokenImpersonationLevel impersonationLevel, bool isProxyAuth, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 205public static Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpRequestMessage request, Uri proxyUri, bool async, ICredentials proxyCredentials, TokenImpersonationLevel impersonationLevel, HttpConnection connection, HttpConnectionPool connectionPool, CancellationToken cancellationToken) 210public 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)
381private Task<HttpResponseMessage> SendWithNtConnectionAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken) 391public Task<HttpResponseMessage> SendWithNtProxyAuthAsync(HttpConnection connection, HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\DecompressionHandler.cs (1)
188protected override Task<Stream> CreateContentReadStreamAsync(CancellationToken cancellationToken) =>
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (2)
361public Task<bool> WaitForAvailableStreamsAsync() 2074public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
242public Task<bool> WaitForAvailableStreamsAsync() 266public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, WaitForHttp3ConnectionActivity waitForConnectionActivity, bool streamAvailable, CancellationToken cancellationToken) 338Task<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)
533public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, bool async, CancellationToken cancellationToken) 1000HttpRequestMessage request, Task<bool> allowExpect100ToContinueTask,
System\Net\Http\SocketsHttpHandler\HttpConnectionResponseContent.cs (1)
75protected sealed override Task<Stream> CreateContentReadStreamAsync() =>
System\Net\Http\SocketsHttpHandler\HttpConnectionSettings.cs (1)
69internal Func<SocketsHttpConnectionEvictionContext, CancellationToken, Task<bool>>? _shouldEvictConnection;
System\Net\Http\SocketsHttpHandler\HttpMessageHandlerStage.cs (1)
20protected internal sealed override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) =>
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (4)
24private Task<HttpMessageHandlerStage>? _handlerChainSetupTask; 454public Func<SocketsHttpConnectionEvictionContext, CancellationToken, Task<bool>>? ShouldEvictConnection 640protected internal override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) 664async 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 (6)
System\Net\Http\NoWriteNoSeekStreamContent.cs (1)
80protected override Task<Stream> CreateContentReadStreamAsync() => Task.FromResult(_content);
System\Net\Http\WinHttpHandler.cs (1)
591protected override Task<HttpResponseMessage> SendAsync(
System\Net\Http\WinHttpRequestStream.cs (2)
220private Task<bool> InternalWriteDataAsync(byte[] buffer, int offset, int count) 244private Task<bool> InternalWriteEndDataAsync()
System\Net\Http\WinHttpResponseStream.cs (2)
172public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken token) 207private async Task<int> ReadAsyncCore(byte[] buffer, int offset, int count, CancellationToken token)
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)
87public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync(string? subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval) 92public 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)
255internal async Task<LineInfo[]> ReadLinesAsync<TIOAdapter>(SmtpReplyReader caller, bool oneLine = false, CancellationToken cancellationToken = default) where TIOAdapter : IReadWriteAdapter 335internal 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 (77)
System\Net\Dns.cs (28)
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); 666private static Task<IPHostEntry> GetHostEntryCoreAsync(string hostName, bool justReturnParsedIp, bool throwOnIIPAny, AddressFamily family, CancellationToken cancellationToken) => 667(Task<IPHostEntry>)GetHostEntryOrAddressesCoreAsync(hostName, justReturnParsedIp, throwOnIIPAny, justAddresses: false, family, cancellationToken); 785private static Task<T>? GetAddrInfoWithTelemetryAsync<T>(string hostName, bool justAddresses, AddressFamily addressFamily, CancellationToken cancellationToken) 801static async Task<T> CompleteAsync(Task task, string hostName, bool justAddresses, AddressFamily addressFamily, bool shouldFallbackToLocalhost, long startingTimeStamp, CancellationToken cancellationToken) 809result = await ((Task<T>)task).ConfigureAwait(false); 859static async Task<T> GetLocalhostAddressesAsync(AddressFamily family, CancellationToken cancellationToken) 863return await ((Task<T>)(Task)Dns.GetHostAddressesAsync(Localhost, family, cancellationToken)).ConfigureAwait(false); 868return await ((Task<T>)(Task)Dns.GetHostAddressesAsync(IPv6Localhost, family, cancellationToken)).ConfigureAwait(false); 872static async Task<T> GetLocalhostEntryAsync(AddressFamily family, CancellationToken cancellationToken) 876return await ((Task<T>)(Task)Dns.GetHostEntryAsync(Localhost, family, cancellationToken)).ConfigureAwait(false); 881return await ((Task<T>)(Task)Dns.GetHostEntryAsync(IPv6Localhost, family, cancellationToken)).ConfigureAwait(false); 934private static Task<TResult> RunAsync<TResult>(Func<object, NameResolutionActivity, TResult> func, object key, CancellationToken cancellationToken) 945Task<TResult>? task = null;
System\Net\Dns.Resolve.cs (9)
51public static Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, CancellationToken cancellationToken = default) 67public static Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, AddressFamily addressFamily, CancellationToken cancellationToken = default) 88public static Task<DnsResult<SrvRecord>> ResolveSrvAsync(string name, CancellationToken cancellationToken = default) 109public static Task<DnsResult<MxRecord>> ResolveMxAsync(string name, CancellationToken cancellationToken = default) 130public static Task<DnsResult<TxtRecord>> ResolveTxtAsync(string name, CancellationToken cancellationToken = default) 151public static Task<DnsResult<CNameRecord>> ResolveCNameAsync(string name, CancellationToken cancellationToken = default) 181public static Task<DnsResult<PtrRecord>> ResolvePtrAsync(string name, CancellationToken cancellationToken = default) 191public static Task<DnsResult<PtrRecord>> ResolvePtrAsync(IPAddress address, CancellationToken cancellationToken = default) 212public static Task<DnsResult<NsRecord>> ResolveNsAsync(string name, CancellationToken cancellationToken = default)
System\Net\DnsResolver.cs (29)
90Task<DnsResult<AddressRecord>> task = ResolveAddressesCore(async: false, name, addressFamily, default); 107Task<DnsResult<SrvRecord>> task = ResolveSrvCore(async: false, name, default); 124Task<DnsResult<MxRecord>> task = ResolveMxCore(async: false, name, default); 141Task<DnsResult<TxtRecord>> task = ResolveTxtCore(async: false, name, default); 158Task<DnsResult<CNameRecord>> task = ResolveCNameCore(async: false, name, default); 175Task<DnsResult<PtrRecord>> task = ResolvePtrCore(async: false, name, default); 191Task<DnsResult<PtrRecord>> task = ResolvePtrCore(async: false, BuildArpaName(address), default); 208Task<DnsResult<NsRecord>> task = ResolveNsCore(async: false, name, default); 222public Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, CancellationToken cancellationToken = default) 239public Task<DnsResult<AddressRecord>> ResolveAddressesAsync(string name, AddressFamily addressFamily, CancellationToken cancellationToken = default) 255public Task<DnsResult<SrvRecord>> ResolveSrvAsync(string name, CancellationToken cancellationToken = default) 271public Task<DnsResult<MxRecord>> ResolveMxAsync(string name, CancellationToken cancellationToken = default) 287public Task<DnsResult<TxtRecord>> ResolveTxtAsync(string name, CancellationToken cancellationToken = default) 303public Task<DnsResult<CNameRecord>> ResolveCNameAsync(string name, CancellationToken cancellationToken = default) 319public Task<DnsResult<PtrRecord>> ResolvePtrAsync(string name, CancellationToken cancellationToken = default) 334public Task<DnsResult<PtrRecord>> ResolvePtrAsync(IPAddress address, CancellationToken cancellationToken = default) 350public Task<DnsResult<NsRecord>> ResolveNsAsync(string name, CancellationToken cancellationToken = default) 379private async Task<DnsResult<AddressRecord>> ResolveAddressesCore(bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken) 384Task<DnsResult<AddressRecord>> aTask = DoResolve(async, name, AddressFamily.InterNetwork, cancellationToken); 385Task<DnsResult<AddressRecord>> aaaaTask = DoResolve(async, name, AddressFamily.InterNetworkV6, cancellationToken); 395Task<DnsResult<AddressRecord>> DoResolve(bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken) 403private Task<DnsResult<SrvRecord>> ResolveSrvCore(bool async, string name, CancellationToken cancellationToken) 410private Task<DnsResult<MxRecord>> ResolveMxCore(bool async, string name, CancellationToken cancellationToken) 417private Task<DnsResult<TxtRecord>> ResolveTxtCore(bool async, string name, CancellationToken cancellationToken) 432private Task<DnsResult<CNameRecord>> ResolveCNameCore(bool async, string name, CancellationToken cancellationToken) 439private Task<DnsResult<PtrRecord>> ResolvePtrCore(bool async, string name, CancellationToken cancellationToken) 446private Task<DnsResult<NsRecord>> ResolveNsCore(bool async, string name, CancellationToken cancellationToken) 453private static async Task<DnsResult<T>> ResolveWithTelemetry<T, TState>(string name, TState state, Func<TState, Task<DnsResult<T>>> resolve, Func<DnsResult<T>, string[]> getAnswers)
System\Net\DnsResolverPal.Managed.cs (11)
63public static async Task<DnsResult<AddressRecord>> ResolveAddresses(IList<IPEndPoint> servers, bool async, string name, AddressFamily addressFamily, CancellationToken cancellationToken) 76public static async Task<DnsResult<SrvRecord>> ResolveSrv(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 82public static async Task<DnsResult<MxRecord>> ResolveMx(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 88public static async Task<DnsResult<TxtRecord>> ResolveTxt(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 94public static async Task<DnsResult<CNameRecord>> ResolveCName(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 100public static async Task<DnsResult<PtrRecord>> ResolvePtr(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 106public static async Task<DnsResult<NsRecord>> ResolveNs(IList<IPEndPoint> servers, bool async, string name, CancellationToken cancellationToken) 382private static async Task<DnsResponse> SendQuery(IList<IPEndPoint> servers, bool async, string name, DnsRecordType qtype, CancellationToken cancellationToken) 622private static async Task<int> SendUdpQueryAsync( 646private static async Task<(byte[]? Buffer, int Length, Exception? Error)> TryTcpFallbackAsync( 682private static async Task<(byte[] Buffer, int Length)> SendTcpQueryAsync(
System.Net.NetworkInformation (3)
System\Net\NetworkInformation\IPGlobalProperties.cs (1)
125public virtual Task<UnicastIPAddressInformationCollection> GetUnicastAddressesAsync()
System\Net\NetworkInformation\UnixIPGlobalProperties.cs (2)
45Task<UnicastIPAddressInformationCollection> t = GetUnicastAddressesAsync(); 54public 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)
319private 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\runtime\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)
311public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
System\Net\Security\SslStream.cs (1)
891public 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 (51)
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)
2514Task<int> t = SendAsync(new ReadOnlyMemory<byte>(buffer, offset, size), socketFlags, default).AsTask(); 2540Task<int> t = SendAsync(buffers, socketFlags); 2589Task<int> t = SendToAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2610Task<int> t = ReceiveAsync(new ArraySegment<byte>(buffer, offset, size), socketFlags, fromNetworkStream: false, default).AsTask(); 2635Task<int> t = ReceiveAsync(buffers, socketFlags); 2656Task<int> ti = TaskToAsyncResult.Unwrap<int>(asyncResult); 2680Task<SocketReceiveMessageFromResult> t = ReceiveMessageFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2721Task<SocketReceiveFromResult> t = ReceiveFromAsync(buffer.AsMemory(offset, size), socketFlags, remoteEP).AsTask(); 2759private 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(); 254public Task<int> ReceiveAsync(ArraySegment<byte> buffer) => 263public Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) => ReceiveAsync(buffer, socketFlags, fromNetworkStream: false); 265internal Task<int> ReceiveAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, bool fromNetworkStream) 313public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers) => 322public Task<int> ReceiveAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 344public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 354public Task<SocketReceiveFromResult> ReceiveFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 446public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, EndPoint remoteEndPoint) => 456public Task<SocketReceiveMessageFromResult> ReceiveMessageFromAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEndPoint) 505public Task<int> SendAsync(ArraySegment<byte> buffer) => 514public Task<int> SendAsync(ArraySegment<byte> buffer, SocketFlags socketFlags) 577public Task<int> SendAsync(IList<ArraySegment<byte>> buffers) => 586public Task<int> SendAsync(IList<ArraySegment<byte>> buffers, SocketFlags socketFlags) 608public Task<int> SendToAsync(ArraySegment<byte> buffer, EndPoint remoteEP) => 618public Task<int> SendToAsync(ArraySegment<byte> buffer, SocketFlags socketFlags, EndPoint remoteEP) 831private Task<int> GetTaskForSendReceive(bool pending, TaskSocketAsyncEventArgs<int> saea, bool fromNetworkStream, bool isReceive) 833Task<int> t;
System\Net\Sockets\SocketAsyncEventArgs.cs (3)
707Task<IPAddress[]> addressesTask = Dns.GetHostAddressesAsync(endPoint.Host, parallelConnect ? AddressFamily.InterNetwork : endPoint.AddressFamily, cancellationToken); 725Task<IPAddress[]> addressesTask6 = Dns.GetHostAddressesAsync(endPoint.Host, AddressFamily.InterNetworkV6, cancellationToken); 740async Task Core(MultiConnectSocketAsyncEventArgs internalArgs, Task<IPAddress[]> addressesTask, int port, SocketType socketType, ProtocolType protocolType, ParallelMultiConnectSocketState? parallelState, 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)
221public Task<Socket> AcceptSocketAsync() => AcceptSocketAsync(CancellationToken.None).AsTask(); 233public Task<TcpClient> AcceptTcpClientAsync() => AcceptTcpClientAsync(CancellationToken.None).AsTask();
System\Net\Sockets\UDPClient.cs (6)
529public Task<int> SendAsync(byte[] datagram, int bytes) => 547public Task<int> SendAsync(byte[] datagram, int bytes, string? hostname, int port) => 572public Task<int> SendAsync(byte[] datagram, int bytes, IPEndPoint? endPoint) 620public Task<UdpReceiveResult> ReceiveAsync() 629async Task<UdpReceiveResult> WaitAndWrap(Task<SocketReceiveFromResult> task)
System.Net.WebClient (28)
src\runtime\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 (3)
System\Net\WebSockets\BrowserWebSockets\BrowserWebSocket.cs (2)
174public override Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) 420private async Task<WebSocketReceiveResult> ReceiveAsyncCore(ArraySegment<byte> buffer, CancellationToken cancellationToken)
System\Net\WebSockets\ClientWebSocket.cs (1)
150public override Task<WebSocketReceiveResult> ReceiveAsync(ArraySegment<byte> buffer, CancellationToken cancellationToken) =>
System.Private.CoreLib (977)
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (7)
404private static unsafe T Suspend<T>(Task<T> task, ConfigureAwaitOptions options) 546if (obj is Task<T> t) 663private static unsafe T TransparentSuspend<T>(Task<T> task) 721private static T TransparentAwait<T>(Task<T> task) 1322private static Task<T?> CreateRuntimeAsyncTask<T>(ref RuntimeAsyncAwaitState state) 1348private static Task<T?> TaskFromException<T>(Exception ex) 1350Task<T?> task = new();
src\runtime\src\coreclr\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeAsyncTaskContinuation.cs (4)
123public void Initialize<T>(Task<T> task) 136Debug.Assert(task is Task<T>); 138Task<T> taskOfT = Unsafe.As<Task, Task<T>>(ref task);
src\runtime\src\libraries\Common\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\File.cs (9)
1109public static Task<string> ReadAllTextAsync(string path, CancellationToken cancellationToken = default) 1112public static Task<string> ReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1121private static async Task<string> InternalReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken) 1194public static Task<byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken = default) 1223private static async Task<byte[]> InternalReadAllBytesAsync(SafeFileHandle sfh, int count, CancellationToken cancellationToken) 1244private static async Task<byte[]> InternalReadAllBytesUnknownLengthAsync(SafeFileHandle sfh, CancellationToken cancellationToken) 1317public static Task<string[]> ReadAllLinesAsync(string path, CancellationToken cancellationToken = default) 1320public static Task<string[]> ReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken = default) 1329private static async Task<string[]> InternalReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (2)
273public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) 604internal Task<int> BaseReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\MemoryStream.cs (1)
365public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\ReadOnlyMemoryStream.cs (1)
126public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (1)
268public sealed override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\Stream.cs (7)
202internal Task<int> BeginReadInternal( 302public Task<int> ReadAsync(byte[] buffer, int offset, int count) => ReadAsync(buffer, offset, count, CancellationToken.None); 304public virtual Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) => 319static async ValueTask<int> FinishReadAsync(Task<int> readTask, byte[] localBuffer, Memory<byte> localDestination) 452private Task<int> BeginEndReadAsync(byte[] buffer, int offset, int count) 1037TaskToAsyncResult.Begin(Task<int>.s_defaultResultTask, callback, state); 1052public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken) =>
src\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (17)
884public override Task<string?> ReadLineAsync() => 931private async Task<string?> ReadLineAsyncInternal(CancellationToken cancellationToken) 1016public override Task<string> ReadToEndAsync() => ReadToEndAsync(default); 1041public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) 1058private async Task<string> ReadToEndAsyncInternal(CancellationToken cancellationToken) 1075public override Task<int> ReadAsync(char[] buffer, int index, int count) 1103Task<int> task = ReadAsyncInternal(new Memory<char>(buffer, index, count), CancellationToken.None).AsTask(); 1107async Task<int> ReadAsyncInternalWithGuard(Memory<char> buffer, CancellationToken cancellationToken) 1296public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) 1324Task<int> task = base.ReadBlockAsync(buffer, index, count); 1328async Task<int> ReadBlockAsyncWithGuard(char[] buffer, int index, int count) 1363Task<int> t = vt.AsTask(); 1486public override Task<int> ReadAsync(char[] buffer, int index, int count) => Task.FromResult(0); 1495public override Task<int> ReadBlockAsync(char[] buffer, int index, int count) => Task.FromResult(0); 1502public override Task<string?> ReadLineAsync() => Task.FromResult<string?>(null); 1509public override Task<string> ReadToEndAsync() => Task.FromResult(""); 1511public override Task<string> ReadToEndAsync(CancellationToken cancellationToken) =>
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\StringStream.cs (1)
226public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\UnmanagedMemoryStream.cs (1)
422public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\IO\WritableMemoryStream.cs (1)
125public override Task<int> ReadAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.cs (4)
120/// Awaits the specified <see cref="Task{T}"/> and returns its result, throwing any exception produced by the task. 128public static T Await<T>(Task<T> task) 177if (obj is Task<T> t) 368if (obj is Task<T> t)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\AsyncHelpers.NonBrowser.cs (1)
34public static int HandleAsyncEntryPoint(Task<int> task)
src\runtime\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\runtime\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\runtime\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) 97ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref Task<TResult>? taskField) 172[NotNull] ref Task<TResult>? taskField) 601/// <summary>Gets the <see cref="Task{TResult}"/> for this builder.</summary> 602/// <returns>The <see cref="Task{TResult}"/> representing the builder's asynchronous operation.</returns> 603public Task<TResult> Task 615private Task<TResult> InitializeTaskAsPromise() 621internal static Task<TResult> CreateWeaklyTypedStateMachineBox() 637/// Completes the <see cref="Task{TResult}"/> in the 660internal static void SetExistingTaskResult(Task<TResult> task, TResult? result) 684/// Completes the <see cref="Task{TResult}"/> in the 692internal static void SetException(Exception exception, ref Task<TResult>? taskField) 700Task<TResult> task = (taskField ??= new Task<TResult>()); 741internal static void SetNotificationForWaitCompletion(bool enabled, [NotNull] ref Task<TResult>? taskField)
src\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ConfiguredValueTaskAwaitable.cs (6)
168Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 170if (obj is Task<TResult> t) 190Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 192if (obj is Task<TResult> t) 210Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 212if (obj is Task<TResult> t)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\TaskAwaiter.cs (14)
313/// <summary>Provides an awaiter for awaiting a <see cref="Task{TResult}"/>.</summary> 320private readonly Task<TResult> m_task; 323/// <param name="task">The <see cref="Task{TResult}"/> to be awaited.</param> 324internal TaskAwaiter(Task<TResult> task) 355/// <summary>Ends the await on the completed <see cref="Task{TResult}"/>.</summary> 356/// <returns>The result of the completed <see cref="Task{TResult}"/>.</returns> 465/// <summary>Provides an awaitable object that allows for configured awaits on <see cref="Task{TResult}"/>.</summary> 473/// <param name="task">The awaitable <see cref="Task{TResult}"/>.</param> 475internal ConfiguredTaskAwaitable(Task<TResult> task, ConfigureAwaitOptions options) 495internal readonly Task<TResult> m_task; 500/// <param name="task">The awaitable <see cref="Task{TResult}"/>.</param> 502internal ConfiguredTaskAwaiter(Task<TResult> task, ConfigureAwaitOptions options) 535/// <summary>Ends the await on the completed <see cref="Task{TResult}"/>.</summary> 536/// <returns>The result of the completed <see cref="Task{TResult}"/>.</returns>
src\runtime\src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\ValueTaskAwaiter.cs (6)
140Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 142if (obj is Task<TResult> t) 160Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 162if (obj is Task<TResult> t) 179Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 181if (obj is Task<TResult> t)
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (7)
332Task<bool>? asyncWaitTask = null; 552public Task<bool> WaitAsync(int millisecondsTimeout) 582public Task<bool> WaitAsync(TimeSpan timeout) 615public Task<bool> WaitAsync(TimeSpan timeout, CancellationToken cancellationToken) 647public Task<bool> WaitAsync(int millisecondsTimeout, CancellationToken cancellationToken) 673private Task<bool> WaitAsyncCore(long millisecondsTimeout, CancellationToken cancellationToken) 767private async Task<bool> WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, long millisecondsTimeout, CancellationToken cancellationToken)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
635var t = new Task<bool>(s =>
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task_T.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> continuationTask = 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> continuationTask = new ContinuationResultTaskFromResultTask<TResult, TNewResult>( 1416private readonly Task<TResult> m_task; 1418public SystemThreadingTasks_TaskOfTResultDebugView(Task<TResult> task)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (128)
96/// For operations that return values, the <see cref="Task{TResult}"/> class 1604/// Provides access to factory methods for creating <see cref="Task"/> and <see cref="Task{TResult}"/> instances. 1614/// <remarks>It's a <see cref="Task{VoidTaskResult}"/> so it can be shared with <see cref="AsyncTaskMethodBuilder"/>.</remarks> 1615internal static readonly Task<VoidTaskResult> s_cachedCompleted = new Task<VoidTaskResult>(false, default, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default); 3079_ => completingTask is Task<TResult> taskTResult ? TrySetResult(taskTResult.Result) : TrySetResult(), 4179/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4181/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4188public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction) 4205/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4207/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4217public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 4235/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4237/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4247public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler) 4269/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4271/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4283public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 4310/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4312/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4329public Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, CancellationToken cancellationToken, 4336private Task<TResult> ContinueWith<TResult>(Func<Task, TResult> continuationFunction, TaskScheduler scheduler, 4353Task<TResult> continuationTask = new ContinuationResultTaskFromTask<TResult>( 4379/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4381/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4388public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state) 4406/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4408/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4418public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken) 4437/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4439/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4449public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler) 4472/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4474/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4486public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskContinuationOptions continuationOptions) 4514/// <returns>A new continuation <see cref="Task{TResult}"/>.</returns> 4516/// The returned <see cref="Task{TResult}"/> will not be scheduled for execution until the current task has 4533public Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, CancellationToken cancellationToken, 4540private Task<TResult> ContinueWith<TResult>(Func<Task, object?, TResult> continuationFunction, object? state, TaskScheduler scheduler, 4557Task<TResult> continuationTask = new ContinuationResultTaskFromTask<TResult>( 5522Task<Task> firstCompleted = TaskFactory.CommonCWAnyLogic(tasks, isSyncBlocking: true); 5547/// <summary>Gets a <see cref="Task{TResult}"/> that's completed successfully with the specified result.</summary> 5553public static unsafe Task<TResult> FromResult<TResult>(TResult result) 5564return Task<TResult>.s_defaultResultTask; 5570Task<bool> task = *(bool*)&result ? TaskCache.s_trueTask : TaskCache.s_falseTask; 5571return *(Task<TResult>*)&task; 5581Task<int> task = TaskCache.s_int32Tasks[value - TaskCache.InclusiveInt32Min]; 5582return *(Task<TResult>*)&task; 5597return Task<TResult>.s_defaultResultTask; 5605/// <summary>Creates a <see cref="Task{TResult}"/> that's completed exceptionally with the specified exception.</summary> 5618/// <summary>Creates a <see cref="Task{TResult}"/> that's completed exceptionally with the specified exception.</summary> 5622public static Task<TResult> FromException<TResult>(Exception exception) 5626var task = new Task<TResult>(); 5642/// <summary>Creates a <see cref="Task{TResult}"/> that's completed due to cancellation with the specified token.</summary> 5646public static Task<TResult> FromCanceled<TResult>(CancellationToken cancellationToken) 5666/// <summary>Creates a <see cref="Task{TResult}"/> that's completed due to cancellation with the specified exception.</summary> 5670internal static Task<TResult> FromCanceled<TResult>(OperationCanceledException exception) 5674var task = new Task<TResult>(); 5724public static Task<TResult> Run<TResult>(Func<TResult> function) 5726return Task<TResult>.StartNew(null, function, default, 5742public static Task<TResult> Run<TResult>(Func<TResult> function, CancellationToken cancellationToken) 5744return Task<TResult>.StartNew(null, function, cancellationToken, 5784Task<Task?> task1 = Task<Task?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 5803public static Task<TResult> Run<TResult>(Func<Task<TResult>?> function) 5819public static Task<TResult> Run<TResult>(Func<Task<TResult>?> function, CancellationToken cancellationToken) 5828Task<Task<TResult>?> task1 = Task<Task<TResult>?>.Factory.StartNew(function, cancellationToken, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); 6419public static Task<TResult[]> WhenAll<TResult>(IEnumerable<Task<TResult>> tasks) 6422if (tasks is Task<TResult>[] taskArray) 6428if (tasks is ICollection<Task<TResult>> taskCollection) 6436taskArray = new Task<TResult>[count]; 6438foreach (Task<TResult> task in taskArray) 6455List<Task<TResult>> taskList = new List<Task<TResult>>(); 6456foreach (Task<TResult> task in tasks) 6502public static Task<TResult[]> WhenAll<TResult>(params Task<TResult>[] tasks) 6509return WhenAll((ReadOnlySpan<Task<TResult>>)tasks); 6540public static Task<TResult[]> WhenAll<TResult>(params ReadOnlySpan<Task<TResult>> tasks) 6547Task<TResult>[] tasksCopy = tasks.ToArray(); 6548foreach (Task<TResult> task in tasksCopy) 6570private readonly Task<T>?[] m_tasks; 6574internal WhenAllPromise(Task<T>[] tasks) 6588foreach (Task<T> task in tasks) 6614Task<T>? task = m_tasks[i]; 6692public static Task<Task> WhenAny(params Task[] tasks) 6711public static Task<Task> WhenAny(params ReadOnlySpan<Task> tasks) => 6726private static Task<TTask> WhenAnyCore<TTask>(ReadOnlySpan<TTask> tasks) where TTask : Task 6764public static Task<Task> WhenAny(Task task1, Task task2) => 6778private static Task<TTask> WhenAny<TTask>(TTask task1, TTask task2) where TTask : Task 6884public static Task<Task> WhenAny(IEnumerable<Task> tasks) => 6900private static Task<TTask> WhenAny<TTask>(IEnumerable<TTask> tasks) where TTask : Task 6978public static Task<Task<TResult>> WhenAny<TResult>(params Task<TResult>[] tasks) 6982return WhenAnyCore((ReadOnlySpan<Task<TResult>>)tasks); 6998public static Task<Task<TResult>> WhenAny<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => 7013public static Task<Task<TResult>> WhenAny<TResult>(Task<TResult> task1, Task<TResult> task2) => 7014WhenAny<Task<TResult>>(task1, task2); 7032public static Task<Task<TResult>> WhenAny<TResult>(IEnumerable<Task<TResult>> tasks) => 7033WhenAny<Task<TResult>>(tasks); 7065public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params Task<TResult>[] tasks) 7068return WhenEach((ReadOnlySpan<Task<TResult>>)tasks); 7074public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(params ReadOnlySpan<Task<TResult>> tasks) => 7075WhenEachState.Iterate<Task<TResult>>(WhenEachState.Create(ReadOnlySpan<Task>.CastUp(tasks))); 7080public static IAsyncEnumerable<Task<TResult>> WhenEach<TResult>(IEnumerable<Task<TResult>> tasks) => 7081WhenEachState.Iterate<Task<TResult>>(WhenEachState.Create(tasks)); 7229internal static Task<TResult> CreateUnwrapPromise<TResult>(Task outerTask, bool lookForOce) 7675ProcessInnerTask(task is Task<Task<TResult>> taskOfTaskOfTResult ? // it's either a Task<Task> or Task<Task<TResult>> 7676taskOfTaskOfTResult.Result : ((Task<Task>)task).Result); 7721result = TrySetResult(task is Task<TResult> taskTResult ? taskTResult.Result : default);
src\runtime\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\runtime\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\runtime\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\runtime\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\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TaskFactory_T.cs (204)
11/// <see cref="Task{TResult}">Task{TResult}</see> objects. 14/// the <see cref="Task{TResult}">Task{TResult}</see> objects that are associated with 24/// <see cref="Task{TResult}.Factory">Task{TResult}.Factory</see> property. 242/// Creates and starts a <see cref="Task{TResult}"/>. 245/// the <see cref="Task{TResult}"/>.</param> 246/// <returns>The started <see cref="Task{TResult}"/>.</returns> 251/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 257public Task<TResult> StartNew(Func<TResult> function) 260return Task<TResult>.StartNew(currTask, function, m_defaultCancellationToken, 265/// Creates and starts a <see cref="Task{TResult}"/>. 268/// the <see cref="Task{TResult}"/>.</param> 270/// <returns>The started <see cref="Task{TResult}"/>.</returns> 278/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 284public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken) 287return Task<TResult>.StartNew(currTask, function, cancellationToken, 292/// Creates and starts a <see cref="Task{TResult}"/>. 295/// the <see cref="Task{TResult}"/>.</param> 298/// <see cref="Task{TResult}"/>.</param> 299/// <returns>The started <see cref="Task{TResult}"/>.</returns> 307/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 313public Task<TResult> StartNew(Func<TResult> function, TaskCreationOptions creationOptions) 316return Task<TResult>.StartNew(currTask, function, m_defaultCancellationToken, 321/// Creates and starts a <see cref="Task{TResult}"/>. 324/// the <see cref="Task{TResult}"/>.</param> 327/// <see cref="Task{TResult}"/>.</param> 331/// that is used to schedule the created <see cref="Task{TResult}"> 333/// <returns>The started <see cref="Task{TResult}"/>.</returns> 347/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 353public Task<TResult> StartNew(Func<TResult> function, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) 355return Task<TResult>.StartNew( 361/// Creates and starts a <see cref="Task{TResult}"/>. 364/// the <see cref="Task{TResult}"/>.</param> 367/// <returns>The started <see cref="Task{TResult}"/>.</returns> 372/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 378public Task<TResult> StartNew(Func<object?, TResult> function, object? state) 381return Task<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken, 386/// Creates and starts a <see cref="Task{TResult}"/>. 389/// the <see cref="Task{TResult}"/>.</param> 393/// <returns>The started <see cref="Task{TResult}"/>.</returns> 401/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 407public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken) 410return Task<TResult>.StartNew(currTask, function, state, cancellationToken, 415/// Creates and starts a <see cref="Task{TResult}"/>. 418/// the <see cref="Task{TResult}"/>.</param> 423/// <see cref="Task{TResult}"/>.</param> 424/// <returns>The started <see cref="Task{TResult}"/>.</returns> 432/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 438public Task<TResult> StartNew(Func<object?, TResult> function, object? state, TaskCreationOptions creationOptions) 441return Task<TResult>.StartNew(currTask, function, state, m_defaultCancellationToken, 446/// Creates and starts a <see cref="Task{TResult}"/>. 449/// the <see cref="Task{TResult}"/>.</param> 455/// <see cref="Task{TResult}"/>.</param> 458/// that is used to schedule the created <see cref="Task{TResult}"> 460/// <returns>The started <see cref="Task{TResult}"/>.</returns> 474/// Calling StartNew is functionally equivalent to creating a <see cref="Task{TResult}"/> using one 480public Task<TResult> StartNew(Func<object?, TResult> function, object? state, CancellationToken cancellationToken, TaskCreationOptions creationOptions, TaskScheduler scheduler) 482return Task<TResult>.StartNew(Task.InternalCurrentIfAttached(creationOptions), function, state, cancellationToken, 495Task<TResult> promise, 548/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 559/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 561public Task<TResult> FromAsync(IAsyncResult asyncResult, Func<IAsyncResult, TResult> endMethod) 567/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 575/// created <see cref="Task{TResult}">Task</see>.</param> 583/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 585public Task<TResult> FromAsync( 596/// Creates a <see cref="Task{TResult}">Task</see> that executes an end 606/// created <see cref="Task{TResult}">Task</see>.</param> 616/// <returns>A <see cref="Task{TResult}">Task</see> that represents the 618public Task<TResult> FromAsync( 629internal static Task<TResult> FromAsyncImpl( 649Task<TResult> promise = new Task<TResult>((object?)null, creationOptions); 700/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 711/// <returns>The created <see cref="Task{TResult}">Task</see> that 716public Task<TResult> FromAsync( 724/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 730/// created <see cref="Task{TResult}">Task</see>.</param> 740/// <returns>The created <see cref="Task{TResult}">Task</see> that 745public Task<TResult> FromAsync( 754internal static Task<TResult> FromAsyncImpl(Func<AsyncCallback, object?, IAsyncResult> beginMethod, 768Task<TResult> promise = new Task<TResult>(state, creationOptions); 807/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 822/// <returns>The created <see cref="Task{TResult}">Task</see> that 827public Task<TResult> FromAsync<TArg1>( 836/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 846/// created <see cref="Task{TResult}">Task</see>.</param> 856/// <returns>The created <see cref="Task{TResult}">Task</see> that 861public Task<TResult> FromAsync<TArg1>( 871internal static Task<TResult> FromAsyncImpl<TArg1>(Func<TArg1, AsyncCallback, object?, IAsyncResult> beginMethod, 885Task<TResult> promise = new Task<TResult>(state, creationOptions); 924/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 943/// <returns>The created <see cref="Task{TResult}">Task</see> that 948public Task<TResult> FromAsync<TArg1, TArg2>( 957/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 971/// created <see cref="Task{TResult}">Task</see>.</param> 981/// <returns>The created <see cref="Task{TResult}">Task</see> that 986public Task<TResult> FromAsync<TArg1, TArg2>( 996internal static Task<TResult> FromAsyncImpl<TArg1, TArg2>(Func<TArg1, TArg2, AsyncCallback, object?, IAsyncResult> beginMethod, 1010Task<TResult> promise = new Task<TResult>(state, creationOptions); 1049/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1072/// <returns>The created <see cref="Task{TResult}">Task</see> that 1077public Task<TResult> FromAsync<TArg1, TArg2, TArg3>( 1086/// Creates a <see cref="Task{TResult}">Task</see> that represents a pair of 1104/// created <see cref="Task{TResult}">Task</see>.</param> 1114/// <returns>The created <see cref="Task{TResult}">Task</see> that 1119public Task<TResult> FromAsync<TArg1, TArg2, TArg3>( 1129internal static Task<TResult> FromAsyncImpl<TArg1, TArg2, TArg3>(Func<TArg1, TArg2, TArg3, AsyncCallback, object?, IAsyncResult> beginMethod, 1143Task<TResult> promise = new Task<TResult>(state, creationOptions); 1193internal static Task<TResult> FromAsyncTrim<TInstance, TArgs>( 1325private static Task<TResult> CreateCanceledTask(TaskContinuationOptions continuationOptions, CancellationToken ct) 1336/// Creates a continuation <see cref="Task{TResult}">Task</see> 1342/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1351public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction) 1359/// Creates a continuation <see cref="Task{TResult}">Task</see> 1367/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1379public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, CancellationToken cancellationToken) 1387/// Creates a continuation <see cref="Task{TResult}">Task</see> 1395/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1396/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1413public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, TaskContinuationOptions continuationOptions) 1421/// Creates a continuation <see cref="Task{TResult}">Task</see> 1431/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1435/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1457public Task<TResult> ContinueWhenAll(Task[] tasks, Func<Task[], TResult> continuationFunction, 1466/// Creates a continuation <see cref="Task{TResult}">Task</see> 1473/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1482public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction) 1490/// Creates a continuation <see cref="Task{TResult}">Task</see> 1499/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1511public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1520/// Creates a continuation <see cref="Task{TResult}">Task</see> 1529/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1530/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1547public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1556/// Creates a continuation <see cref="Task{TResult}">Task</see> 1567/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1570/// cref="Task{TResult}"/>.</param> 1571/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1593public Task<TResult> ContinueWhenAll<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>[], TResult> continuationFunction, 1604internal static Task<TResult> ContinueWhenAllImpl<TAntecedentResult>(Task<TAntecedentResult>[] tasks, 1605Func<Task<TAntecedentResult>[], TResult>? continuationFunction, Action<Task<TAntecedentResult>[]>? continuationAction, 1615Task<TAntecedentResult>[] tasksCopy = TaskFactory.CheckMultiContinuationTasksAndCopy(tasks); 1626Task<Task<TAntecedentResult>[]> starter = TaskFactory.CommonCWAllLogic(tasksCopy); 1632static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>[], TResult>)continuationFunction!)(starter.Result), 1642((Action<Task<TAntecedentResult>[]>)continuationAction!)(starter.Result); 1651internal static Task<TResult> ContinueWhenAllImpl(Task[] tasks, 1673Task<Task[]> starter = TaskFactory.CommonCWAllLogic(tasksCopy); 1706/// Creates a continuation <see cref="Task{TResult}">Task</see> 1712/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1721public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction) 1729/// Creates a continuation <see cref="Task{TResult}">Task</see> 1737/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1749public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, CancellationToken cancellationToken) 1757/// Creates a continuation <see cref="Task{TResult}">Task</see> 1765/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1766/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1783public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, TaskContinuationOptions continuationOptions) 1791/// Creates a continuation <see cref="Task{TResult}">Task</see> 1801/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1805/// <returns>The new continuation <see cref="Task{TResult}">Task</see>.</returns> 1827public Task<TResult> ContinueWhenAny(Task[] tasks, Func<Task, TResult> continuationFunction, 1836/// Creates a continuation <see cref="Task{TResult}">Task</see> 1843/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1852public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction) 1860/// Creates a continuation <see cref="Task{TResult}">Task</see> 1869/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1881public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1890/// Creates a continuation <see cref="Task{TResult}">Task</see> 1899/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1900/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1917public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1926/// Creates a continuation <see cref="Task{TResult}">Task</see> 1937/// the created continuation <see cref="Task{TResult}">Task</see>.</param> 1940/// cref="Task{TResult}"/>.</param> 1941/// <returns>The new continuation <see cref="Task{TResult}"/>.</returns> 1963public Task<TResult> ContinueWhenAny<TAntecedentResult>(Task<TAntecedentResult>[] tasks, Func<Task<TAntecedentResult>, TResult> continuationFunction, 1973internal static Task<TResult> ContinueWhenAnyImpl(Task[] tasks, 1986Task<Task> starter = TaskFactory.CommonCWAnyLogic(tasks); 2024internal static Task<TResult> ContinueWhenAnyImpl<TAntecedentResult>(Task<TAntecedentResult>[] tasks, 2025Func<Task<TAntecedentResult>, TResult>? continuationFunction, Action<Task<TAntecedentResult>>? continuationAction, 2036Task<Task<TAntecedentResult>> starter = TaskFactory.CommonCWAnyLogic(tasks); 2050static (starter, continuationFunction) => ((Func<Task<TAntecedentResult>, TResult>)continuationFunction!)(starter.Result), 2059((Action<Task<TAntecedentResult>>)continuationAction!)(starter.Result);
src\runtime\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\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ValueTask.cs (25)
444/// <see cref="ValueTask{TResult}"/> instances are meant to be directly awaited. To do more complicated operations with them, a <see cref="Task{TResult}"/> 457/// <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}"/> 472private static volatile Task<TResult>? s_canceledTask; 473/// <summary>null if <see cref="_result"/> has the result, otherwise a <see cref="Task{TResult}"/> or a <see cref="IValueTaskSource{TResult}"/>.</summary> 499/// <summary>Initialize the <see cref="ValueTask{TResult}"/> with a <see cref="Task{TResult}"/> that represents the operation.</summary> 503public ValueTask(Task<TResult> task) 576/// Gets a <see cref="Task{TResult}"/> object to represent this ValueTask. 583public Task<TResult> AsTask() 586Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 593if (obj is Task<TResult> t) 604/// <summary>Creates a <see cref="Task{TResult}"/> to represent the <see cref="IValueTaskSource{TResult}"/>.</summary> 609private Task<TResult> GetTaskForValueTaskSource(IValueTaskSource<TResult> t) 631var task = new Task<TResult>(); 649/// <summary>Type used to create a <see cref="Task{TResult}"/> to represent a <see cref="IValueTaskSource{TResult}"/>.</summary> 718Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 725if (obj is Task<TResult> t) 741Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 748if (obj is Task<TResult> t) 763Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 770if (obj is Task<TResult> t) 790Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 797if (obj is Task<TResult> t) 814Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>); 821if (obj is Task<TResult> t)
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)
18public virtual Task<string> GetValueAsync() 25public virtual async Task<object> ReadContentAsObjectAsync() 36public virtual Task<string> ReadContentAsStringAsync() 47public virtual async Task<object> ReadContentAsAsync(Type returnType, IXmlNamespaceResolver? namespaceResolver) 75public virtual async Task<object> ReadElementContentAsObjectAsync() 87public virtual async Task<string> ReadElementContentAsStringAsync() 99public virtual async Task<object> ReadElementContentAsAsync(Type returnType, IXmlNamespaceResolver namespaceResolver) 113public virtual Task<bool> ReadAsync() 125public virtual Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) 131public virtual Task<int> ReadElementContentAsBase64Async(byte[] buffer, int index, int count) 137public virtual Task<int> ReadContentAsBinHexAsync(byte[] buffer, int index, int count) 143public virtual Task<int> ReadElementContentAsBinHexAsync(byte[] buffer, int index, int count) 150public virtual Task<int> ReadValueChunkAsync(char[] buffer, int index, int count) 158public virtual async Task<XmlNodeType> MoveToContentAsync() 180public virtual async Task<string> ReadInnerXmlAsync() 263public virtual async Task<string> ReadOuterXmlAsync() 298private async Task<bool> SkipSubtreeAsync() 322internal async Task<string> InternalReadContentAsStringAsync() 368private async Task<bool> SetupReadElementContentAsXxxAsync(string methodName) 399private 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)
14public 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)
42public override Task<object> GetEntityAsync(Uri absoluteUri, string? role, Type? ofObjectToReturn)
System\Xml\XmlResolver.ThrowingResolver.cs (1)
45public 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 (12)
System\Xml\Linq\XDeclaration.cs (1)
69internal static async Task<XDeclaration> CreateAsync(XmlReader r)
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) 459public static Task<XDocument> LoadAsync(XmlReader reader, LoadOptions options, CancellationToken cancellationToken) 468private 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)
src\runtime\artifacts\obj\System.Runtime\Release\net11.0\System.Runtime.Forwards.cs (1)
842[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Threading.Tasks.Task<>))]
System.Runtime.InteropServices.JavaScript (23)
_generated\0\JSImports.g.cs (2)
780public static partial global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.JSObject> DynamicImport(string moduleName, string moduleUrl) 792global::System.Threading.Tasks.Task<global::System.Runtime.InteropServices.JavaScript.JSObject> __retVal;
System\Runtime\InteropServices\JavaScript\Interop\JavaScriptImports.Generated.cs (1)
46public static partial Task<JSObject> DynamicImport(string moduleName, string moduleUrl);
System\Runtime\InteropServices\JavaScript\JSHost.cs (1)
50public static Task<JSObject> ImportAsync(string moduleName, string moduleUrl, CancellationToken cancellationToken = default)
System\Runtime\InteropServices\JavaScript\JSHostImplementation.cs (11)
55s_taskGetResultMethodInfo = typeof(Task<>).GetMethod(TaskGetResultName); 81public static async Task<JSObject> ImportAsync(string moduleName, string moduleUrl, CancellationToken cancellationToken) 83Task<JSObject> modulePromise = JavaScriptImports.DynamicImport(moduleName, moduleUrl); 84var wrappedTask = CancellationHelper(modulePromise, cancellationToken); 93public static async Task<JSObject> CancellationHelper(Task<JSObject> jsTask, CancellationToken cancellationToken) 101CancelablePromise.CancelPromise((Task<JSObject>)s!); 206public static unsafe Task<int>? CallEntrypoint(IntPtr assemblyNamePtr, string?[]? args, bool waitForDebugger) 221Task<int>? result = null; 256else if (method.ReturnType == typeof(Task<int>)) 258result = (Task<int>)method.Invoke(null, argsToPass)!;
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Object.cs (4)
108ToManaged(out Task<object?>? val, static (ref JSMarshalerArgument arg, out object? value) => 276else if (typeof(Task<object>) == type) 278Task<object>? val = value as Task<object>;
System\Runtime\InteropServices\JavaScript\Marshaling\JSMarshalerArgument.Task.cs (4)
101public unsafe void ToManaged<T>(out Task<T>? value, ArgumentToManagedCallback<T> marshaler) 331public void ToJS<T>(Task<T>? value, ArgumentToJSCallback<T> marshaler) 333Task<T>? task = value; 389static void Complete(Task<T> task, object? thm)
System.Security.Cryptography (9)
src\runtime\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) 811/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 842public Task<bool> VerifyDetachedAsync(AsymmetricAlgorithm key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 874/// <returns>A task whose <see cref="Task{TResult}"/> property is <see langword="true"/> if the signature is valid; otherwise, <see langword="false"/>.</returns> 904public Task<bool> VerifyDetachedAsync(CoseKey key, Stream detachedContent, ReadOnlyMemory<byte> associatedData = default, CancellationToken cancellationToken = default) 928private 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) 615private async Task<bool> VerifyAsyncCore(CoseKey key, Stream content, ReadOnlyMemory<byte> associatedData, CancellationToken cancellationToken)
System.Security.Principal.Windows (5)
System\Security\Principal\WindowsIdentity.cs (5)
723/// <param name="func">The <see cref="System.Func{Task}"/> of <see cref="System.Threading.Tasks.Task{T}"/> to run.</param> 724/// <returns>A <see cref="Task{T}"/> that represents the asynchronous operation of the <see cref="System.Func{Task}"/> of <see cref="System.Threading.Tasks.Task{T}"/> provided.</returns> 725public static Task<T> RunImpersonatedAsync<T>(SafeAccessTokenHandle safeAccessTokenHandle, Func<Task<T>> func)
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)
81Debug.Assert(state.PendingTask is Task<bool> && state.PendingTask.IsCompleted); 82moveNextTask = new ValueTask<bool>((Task<bool>)state.PendingTask);
System.Text.RegularExpressions.Generator (3)
UpgradeToGeneratedRegexCodeFixer.cs (3)
93private static async Task<Document> CreateGeneratedRegexProperty( 191private static async Task<Document> ConvertFieldToGeneratedRegexProperty(Document document, SyntaxNode root, SyntaxNode nodeToFix, FieldDeclarationSyntax fieldDeclaration, CancellationToken cancellationToken) 242private static async Task<Document> ConvertPropertyToGeneratedRegexProperty(
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)
5842/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. The task completes when the form is 5872public Task<DialogResult> ShowDialogAsync() => ShowDialogAsyncInternal(owner: null); 5882/// A <see cref="Task{DialogResult}"/> representing the outcome of the dialog. 5912public Task<DialogResult> ShowDialogAsync(IWin32Window owner) => ShowDialogAsyncInternal(owner); 5914private 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(
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)
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\roslyn\src\Compilers\Shared\BuildClient.cs (3)
25internal delegate Task<BuildResponse> CompileOnServerFunc(BuildRequest buildRequest, string pipeName, CancellationToken cancellationToken); 168public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> originalArguments, BuildPaths buildPaths, TextWriter? textWriter = null) 231var buildResponseTask = _compileOnServerFunc(
src\roslyn\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\roslyn\src\Compilers\Shared\BuildServerConnection.cs (7)
99internal static async Task<bool> RunServerShutdownRequestAsync( 177internal static Task<BuildResponse> RunServerBuildRequestAsync( 191internal static async Task<BuildResponse> RunServerBuildRequestAsync( 214static Task<NamedPipeClientStream?> tryConnectToServerAsync( 291static async Task<BuildResponse> tryRunRequestAsync( 314var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 385internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
VBCSCompiler (32)
src\roslyn\src\Compilers\Server\VBCSCompiler\BuildServerController.cs (1)
157internal async Task<int> RunShutdownAsync(string? pipeName, bool waitForProcess, int? timeoutOverride, CancellationToken cancellationToken = default)
src\roslyn\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\roslyn\src\Compilers\Server\VBCSCompiler\IClientConnection.cs (2)
25Task<BuildRequest> ReadBuildRequestAsync(CancellationToken cancellationToken); 51Task<IClientConnection> GetNextClientConnectionAsync();
src\roslyn\src\Compilers\Server\VBCSCompiler\NamedPipeClientConnection.cs (1)
54public async Task<BuildRequest> ReadBuildRequestAsync(CancellationToken cancellationToken)
src\roslyn\src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (1)
135public async Task<IClientConnection> GetNextClientConnectionAsync()
src\roslyn\src\Compilers\Server\VBCSCompiler\ServerDispatcher.cs (7)
61private Task<IClientConnection>? _listenTask; 62private readonly List<Task<CompletionData>> _connectionList = new List<Task<CompletionData>>(); 155var connectionTask = ProcessClientConnectionAsync( 274var current = _connectionList[i]; 334internal static async Task<CompletionData> ProcessClientConnectionAsync( 336Task<IClientConnection> clientStreamTask,
src\roslyn\src\Compilers\Shared\BuildClient.cs (3)
25internal delegate Task<BuildResponse> CompileOnServerFunc(BuildRequest buildRequest, string pipeName, CancellationToken cancellationToken); 168public Task<RunCompilationResult> RunCompilationAsync(IEnumerable<string> originalArguments, BuildPaths buildPaths, TextWriter? textWriter = null) 231var buildResponseTask = _compileOnServerFunc(
src\roslyn\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\roslyn\src\Compilers\Shared\BuildServerConnection.cs (7)
99internal static async Task<bool> RunServerShutdownRequestAsync( 177internal static Task<BuildResponse> RunServerBuildRequestAsync( 191internal static async Task<BuildResponse> RunServerBuildRequestAsync( 214static Task<NamedPipeClientStream?> tryConnectToServerAsync( 291static async Task<BuildResponse> tryRunRequestAsync( 314var responseTask = BuildResponse.ReadAsync(pipeStream, serverCts.Token); 385internal static async Task<NamedPipeClientStream?> TryConnectToServerAsync(
vstest.console (4)
Publisher\MetricsPublisherFactory.cs (1)
20public static async Task<IMetricsPublisher> GetMetricsPublisher(bool isTelemetryOptedIn, bool isDesignMode)
TestPlatformHelpers\TestRequestManager.cs (3)
54private readonly Task<IMetricsPublisher> _metricsPublisher; 118Task<IMetricsPublisher> metricsPublisher, 144Task<IMetricsPublisher> metricsPublisher,
vstest.console.arm64 (4)
src\vstest\src\vstest.console\Publisher\MetricsPublisherFactory.cs (1)
20public static async Task<IMetricsPublisher> GetMetricsPublisher(bool isTelemetryOptedIn, bool isDesignMode)
src\vstest\src\vstest.console\TestPlatformHelpers\TestRequestManager.cs (3)
54private readonly Task<IMetricsPublisher> _metricsPublisher; 118Task<IMetricsPublisher> metricsPublisher, 144Task<IMetricsPublisher> metricsPublisher,
WaitFor.Frontend (1)
Program.cs (1)
37public async Task<string> GetDataAsync(CancellationToken cancellationToken = default)